pub struct BaseController<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> {
pub fl: Tb6612<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm>,
pub fr: Tb6612<W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm>,
pub rl: Tb6612<W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm>,
pub rr: Tb6612<W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>,
}Fields§
§fl: Tb6612<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm>§fr: Tb6612<W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm>§rl: Tb6612<W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm>§rr: Tb6612<W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>Implementations§
Source§impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm: _embedded_hal_PwmPin<Duty = u16>, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm: _embedded_hal_PwmPin<Duty = u16>, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm: _embedded_hal_PwmPin<Duty = u16>, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm: _embedded_hal_PwmPin<Duty = u16>> BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm: _embedded_hal_PwmPin<Duty = u16>, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm: _embedded_hal_PwmPin<Duty = u16>, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm: _embedded_hal_PwmPin<Duty = u16>, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm: _embedded_hal_PwmPin<Duty = u16>> BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
pub fn new( fl: Tb6612<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm>, fr: Tb6612<W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm>, rl: Tb6612<W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm>, rr: Tb6612<W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>, ) -> Self
Sourcepub fn set_velocity(&mut self, vx: f32, vy: f32, omega: f32)
pub fn set_velocity(&mut self, vx: f32, vy: f32, omega: f32)
Set body-frame velocity. Inputs are normalized: -1.0..1.0 for each axis.
Auto Trait Implementations§
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> Freeze for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> RefUnwindSafe for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> Send for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> Sync for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> Unpin for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> UnsafeUnpin for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
impl<const W1_IN1_P: char, const W1_IN1_N: u8, const W1_IN2_P: char, const W1_IN2_N: u8, W1Pwm, const W2_IN1_P: char, const W2_IN1_N: u8, const W2_IN2_P: char, const W2_IN2_N: u8, W2Pwm, const W3_IN1_P: char, const W3_IN1_N: u8, const W3_IN2_P: char, const W3_IN2_N: u8, W3Pwm, const W4_IN1_P: char, const W4_IN1_N: u8, const W4_IN2_P: char, const W4_IN2_N: u8, W4Pwm> UnwindSafe for BaseController<W1_IN1_P, W1_IN1_N, W1_IN2_P, W1_IN2_N, W1Pwm, W2_IN1_P, W2_IN1_N, W2_IN2_P, W2_IN2_N, W2Pwm, W3_IN1_P, W3_IN1_N, W3_IN2_P, W3_IN2_N, W3Pwm, W4_IN1_P, W4_IN1_N, W4_IN2_P, W4_IN2_N, W4Pwm>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more