mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 06:25:16 +00:00
app/main/device: move metatypes to device
This commit is contained in:
parent
5f0f99cfbf
commit
e863d5d3c9
4 changed files with 13 additions and 5 deletions
|
|
@ -234,6 +234,14 @@ Device::~Device()
|
|||
}
|
||||
}
|
||||
|
||||
void Device::RegisterTypes()
|
||||
{
|
||||
qRegisterMetaType<Protocol::Datapoint>("Datapoint");
|
||||
qRegisterMetaType<Protocol::ManualStatusV1>("ManualV1");
|
||||
qRegisterMetaType<Protocol::SpectrumAnalyzerResult>("SpectrumAnalyzerResult");
|
||||
qRegisterMetaType<Protocol::AmplitudeCorrectionPoint>("AmplitudeCorrection");
|
||||
}
|
||||
|
||||
bool Device::SendPacket(const Protocol::PacketInfo& packet, std::function<void(TransmissionResult)> cb, unsigned int timeout)
|
||||
{
|
||||
Transmission t;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ public:
|
|||
// connect to a VNA device. If serial is specified only connecting to this device, otherwise to the first one found
|
||||
Device(QString serial = QString());
|
||||
~Device();
|
||||
|
||||
static void RegisterTypes();
|
||||
bool SendPacket(const Protocol::PacketInfo& packet, std::function<void(TransmissionResult)> cb = nullptr, unsigned int timeout = 500);
|
||||
bool Configure(Protocol::SweepSettings settings, std::function<void(TransmissionResult)> cb = nullptr);
|
||||
bool Configure(Protocol::SpectrumAnalyzerSettings settings, std::function<void(TransmissionResult)> cb = nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue