diff --git a/tele0592/src/controller.rs b/tele0592/src/controller.rs index 79f71f03ef2be9ac873003146f7c5b2d7bc78e83..a36840798d4bd7d0fbf5a434d868c69bc22f0c19 100644 --- a/tele0592/src/controller.rs +++ b/tele0592/src/controller.rs @@ -198,6 +198,14 @@ pub trait Controller: Device { } } + /// Put both motors in standby mode. + /// + /// # Errors + /// This method may fail if the communication with the board fails. + fn standby(&mut self) -> Result<(), Self::I2cError> { + self.set_raw_motor_speed(None, None) + } + /// Set the left and right motor speeds. The speed will be controlled /// using the internal PID. ///