Skip to content
Snippets Groups Projects
Commit 3e376e1d authored by Stephen D's avatar Stephen D
Browse files

merp

parent a26f1d5b
No related branches found
No related tags found
1 merge request!4Radio refactor
......@@ -135,7 +135,8 @@ impl SpiDeviceController {
fn radio_tick(&mut self) {
if let Some(cmd) = &self.tx_command {
self.radio
let res = self
.radio
.start_tx(self.spi.as_mut().unwrap(), |out| match cmd {
TxCommand::Message(_) => 0,
TxCommand::Ping => 0,
......@@ -149,6 +150,11 @@ impl SpiDeviceController {
)
.unwrap_or(0),
});
if res {
// Command succeeded - we can delete it
self.tx_command = None;
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment