mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 22:45:23 +00:00
split device info and status protocol messages
This commit is contained in:
parent
37d8474260
commit
c6ef075f4f
22 changed files with 248 additions and 204 deletions
|
|
@ -117,7 +117,7 @@ inline void App_Process() {
|
|||
sweepActive = VNA::Setup(recv_packet.settings);
|
||||
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
|
||||
break;
|
||||
case Protocol::PacketType::ManualControl:
|
||||
case Protocol::PacketType::ManualControlV1:
|
||||
sweepActive = false;
|
||||
last_measure_packet = recv_packet;
|
||||
Manual::Setup(recv_packet.manual);
|
||||
|
|
@ -145,12 +145,21 @@ inline void App_Process() {
|
|||
SA::Setup(recv_packet.spectrumSettings);
|
||||
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
|
||||
break;
|
||||
case Protocol::PacketType::RequestDeviceInfo:
|
||||
case Protocol::PacketType::RequestDeviceInfo: {
|
||||
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
|
||||
Protocol::PacketInfo p;
|
||||
p.type = Protocol::PacketType::DeviceInfo;
|
||||
HW::fillDeviceInfo(&p.info);
|
||||
p.info = HW::Info;
|
||||
Communication::Send(p);
|
||||
}
|
||||
break;
|
||||
case Protocol::PacketType::RequestDeviceStatus: {
|
||||
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
|
||||
Protocol::PacketInfo p;
|
||||
p.type = Protocol::PacketType::DeviceStatusV1;
|
||||
HW::getDeviceStatus(&p.statusV1);
|
||||
Communication::Send(p);
|
||||
}
|
||||
break;
|
||||
case Protocol::PacketType::SetIdle:
|
||||
HW::SetMode(HW::Mode::Idle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue