pub struct SystemController<I2C: 'static> {
pub sensors: Option<I2CDevices<'static, I2C>>,
pub robot_dimensions: (f32, f32),
}
Fields§
§sensors: Option<I2CDevices<'static, I2C>>
§robot_dimensions: (f32, f32)
Implementations§
Source§impl<I2C> SystemController<I2C>where
I2C: I2c + 'static,
impl<I2C> SystemController<I2C>where
I2C: I2c + 'static,
Sourcepub fn new(
i2c_bus: &'static RefCell<I2C>,
wheel_radius: Option<f32>,
robot_radius: Option<f32>,
) -> Self
pub fn new( i2c_bus: &'static RefCell<I2C>, wheel_radius: Option<f32>, robot_radius: Option<f32>, ) -> Self
Create a new system controller for motor and IMU devices.
i2c_bus
is the shared I2C bus reference. wheel_radius
and robot_radius
(in meters) default to 0.148 and 0.195 respectively if None
.
Auto Trait Implementations§
impl<I2C> Freeze for SystemController<I2C>
impl<I2C> !RefUnwindSafe for SystemController<I2C>
impl<I2C> !Send for SystemController<I2C>
impl<I2C> !Sync for SystemController<I2C>
impl<I2C> Unpin for SystemController<I2C>
impl<I2C> !UnwindSafe for SystemController<I2C>
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