Initialize motor, limit, status states
This commit is contained in:
@ -71,6 +71,15 @@ impl FakePic {
|
||||
recv_q: dp.get_callback_channel(&cmd_filter),
|
||||
}
|
||||
}
|
||||
// === Sync with the pic controller =========================================================
|
||||
// Since we don't have a pic controller, just update the bluetooth with the internal state
|
||||
// of the fake controller.
|
||||
pub async fn sync_pic(&mut self) -> Result<()> {
|
||||
self.send_q.send(Commands::BluetoothStatusMotor { data: self.motor_state }).await?;
|
||||
self.send_q.send(Commands::BluetoothStatusLimits { data: self.limit_state }).await?;
|
||||
self.send_q.send(Commands::BluetoothStatusStatus { data: self.status_state }).await?;
|
||||
Ok(())
|
||||
}
|
||||
// === Change Fake Hardware Parameters ======================================================
|
||||
pub fn change_limits(&mut self, l: Limits) -> () {
|
||||
self.limit_state = l;
|
||||
|
||||
Reference in New Issue
Block a user