implement optional device status updates

This commit is contained in:
Andre Dunford 2022-12-05 22:29:33 -08:00
parent 35cdfa5922
commit 9b38a1fc3d
8 changed files with 49 additions and 16 deletions

View file

@ -325,8 +325,10 @@ void VNA::Work() {
// Compile info packet
Protocol::PacketInfo packet;
packet.type = Protocol::PacketType::DeviceStatusV1;
HW::getDeviceStatus(&packet.statusV1, true);
Communication::Send(packet);
if(HW::getStatusUpdateFlag()) {
HW::getDeviceStatus(&packet.statusV1, true);
Communication::Send(packet);
}
// do not reset unlevel flag here, as it is calculated only once at the setup of the sweep
// Start next sweep
FPGA::StartSweep();