diff --git a/src/main.rs b/src/main.rs index e6a2cc92b4b25245947da9a2a3bc66e5ad210586..475c06572de0014e9ee1152c7516cd09f40699ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,6 +44,7 @@ mod app { BufferStatus, SendPacket, GetTemp, + Sync, } impl SlaveCmd { @@ -52,6 +53,7 @@ mod app { 0x00 => Some(Self::BufferStatus), 0x01 => Some(Self::SendPacket), 0x02 => Some(Self::GetTemp), + 0x03 => Some(Self::Sync), _ => None, } } @@ -189,6 +191,10 @@ mod app { let temp = ctx.shared.radio_temp.lock(|x| *x); usart.bwrite_all(&temp.to_le_bytes()).unwrap(); } + + SlaveCmd::Sync => { + usart.bwrite_all(&[0x03]).unwrap(); + } } } }