mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 23:13:43 +00:00
proof-of-concept spectrum analyzer mode
This commit is contained in:
parent
76875c2316
commit
38e73365df
33 changed files with 942 additions and 82 deletions
|
|
@ -203,6 +203,14 @@ bool Device::Configure(Protocol::SweepSettings settings)
|
|||
return SendPacket(p);
|
||||
}
|
||||
|
||||
bool Device::Configure(Protocol::SpectrumAnalyzerSettings settings)
|
||||
{
|
||||
Protocol::PacketInfo p;
|
||||
p.type = Protocol::PacketType::SpectrumAnalyzerSettings;
|
||||
p.spectrumSettings = settings;
|
||||
return SendPacket(p);
|
||||
}
|
||||
|
||||
bool Device::SetManual(Protocol::ManualControl manual)
|
||||
{
|
||||
Protocol::PacketInfo p;
|
||||
|
|
@ -364,6 +372,9 @@ void Device::ReceivedData()
|
|||
case Protocol::PacketType::Status:
|
||||
emit ManualStatusReceived(packet.status);
|
||||
break;
|
||||
case Protocol::PacketType::SpectrumAnalyzerResult:
|
||||
emit SpectrumResultReceived(packet.spectrumResult);
|
||||
break;
|
||||
case Protocol::PacketType::DeviceInfo:
|
||||
lastInfo = packet.info;
|
||||
lastInfoValid = true;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
Q_DECLARE_METATYPE(Protocol::Datapoint);
|
||||
Q_DECLARE_METATYPE(Protocol::ManualStatus);
|
||||
Q_DECLARE_METATYPE(Protocol::DeviceInfo);
|
||||
Q_DECLARE_METATYPE(Protocol::SpectrumAnalyzerResult);
|
||||
|
||||
class USBInBuffer : public QObject {
|
||||
Q_OBJECT;
|
||||
|
|
@ -57,6 +58,7 @@ public:
|
|||
~Device();
|
||||
bool SendPacket(Protocol::PacketInfo packet, std::function<void(TransmissionResult)> cb = nullptr, unsigned int timeout = 10);
|
||||
bool Configure(Protocol::SweepSettings settings);
|
||||
bool Configure(Protocol::SpectrumAnalyzerSettings settings);
|
||||
bool SetManual(Protocol::ManualControl manual);
|
||||
bool SendFirmwareChunk(Protocol::FirmwarePacket &fw);
|
||||
bool SendCommandWithoutPayload(Protocol::PacketType type);
|
||||
|
|
@ -69,6 +71,7 @@ public:
|
|||
signals:
|
||||
void DatapointReceived(Protocol::Datapoint);
|
||||
void ManualStatusReceived(Protocol::ManualStatus);
|
||||
void SpectrumResultReceived(Protocol::SpectrumAnalyzerResult);
|
||||
void DeviceInfoUpdated();
|
||||
void ConnectionLost();
|
||||
void AckReceived();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue