respond to InitiateSweep with nack when misconfigured

This commit is contained in:
Andre Dunford 2022-12-17 01:19:46 -08:00
parent 9a23938180
commit 795b1eb3fa
3 changed files with 8 additions and 3 deletions

View File

@ -1029,6 +1029,6 @@ This packet instructs the device to stop sending automatically scheduled DeviceS
This packet instructs the device to start sending automatically scheduled DeviceStatusV1 packets. This restores default update behaviour if a StopStatusUpdates packet has previously been sent. This packet instructs the device to start sending automatically scheduled DeviceStatusV1 packets. This restores default update behaviour if a StopStatusUpdates packet has previously been sent.
\subsection{InitiateSweep} \subsection{InitiateSweep}
This packet instructs the device to initiate a new single sweep when the VNA is configured for standby operation. This triggering method can be used for fast intermittent single sweeps with minimum latency. The packet will be acknowledged but quietly ignored if the SweepSettings are not configured for standby operation. This packet instructs the device to initiate a new single sweep when the VNA is configured for standby operation. This triggering method can be used for fast intermittent single sweeps with minimum latency. If the SweepSettings are not configured for standby operation, this packet will result in a Nack response.
\end{document} \end{document}

View File

@ -184,8 +184,13 @@ inline void App_Process() {
} }
break; break;
case Protocol::PacketType::InitiateSweep: { case Protocol::PacketType::InitiateSweep: {
VNA::InitiateSweep(); if(VNA::GetStandbyMode()) {
Communication::SendWithoutPayload(Protocol::PacketType::Ack); VNA::InitiateSweep();
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
} else {
Communication::SendWithoutPayload(Protocol::PacketType::Nack);
}
} }
break; break;
case Protocol::PacketType::SetIdle: case Protocol::PacketType::SetIdle: