Read all packets until device is configured

This commit is contained in:
2025-01-01 16:05:00 +01:00
parent 9a3e034fce
commit 833901aecb
2 changed files with 37 additions and 5 deletions

View File

@@ -263,6 +263,19 @@ impl ImprovPacket {
}
}
impl std::fmt::Display for ImprovPacket {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::CurrentState(_) => write!(f, "CurrentStatePacket"),
Self::ErrorState(_) => write!(f, "ErrorStatePacket"),
Self::RequestCurrentState(_) => write!(f, "RequestCurrentStatePacket"),
Self::RequestDeviceInformation(_) => write!(f, "RequestDeviceInformationPacket"),
Self::RequestScannedWiFiNetworks(_) => write!(f, "RequestScannedWiFiNetworksPacket"),
Self::RPCResult(_) => write!(f, "RPCResultPacket"),
}
}
}
pub struct CurrentStatePacket {
pub current_state: CurrentState,
}