core_pb::driving::motors

Trait RobotMotorsBehavior

Source
pub trait RobotMotorsBehavior {
    // Required method
    async fn set_pwm(&mut self, pin: usize, to: u16);
}
Expand description

Functionality that robots with motors must support

Required Methods§

Source

async fn set_pwm(&mut self, pin: usize, to: u16)

Set PWM for the given pin

  • 0 <= pin < 2*WHEELS
  • 0 <= to <= [robot_definition.pwm_max]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§