pub struct RobotConfig {
pub left_motor_factor: f32,
pub right_motor_factor: f32,
pub left_motor: Motor,
pub right_motor: Motor,
pub adjustment_step: f32,
pub adjustment_interval: Duration,
}Expand description
Configuration for a Robot instance.
Start with Default and override individual fields. Robot::new validates
the configuration before starting its background task.
Fields§
§left_motor_factor: f32Finite left motor factor (-1.0 reverses polarity, zero disables demand).
The factored demand is clamped to [-1.0, 1.0].
right_motor_factor: f32Finite right motor factor (-1.0 reverses polarity, zero disables demand).
The factored demand is clamped to [-1.0, 1.0].
left_motor: MotorWhich motor is the left motor.
right_motor: MotorWhich motor is the right motor (must differ from the left motor).
adjustment_step: f32Positive, finite speed adjustment step per tick (controls ramp smoothness).
adjustment_interval: DurationPositive interval between motor adjustment ticks. Step divided by interval
in seconds must also be positive and finite in f32.
Trait Implementations§
Source§impl Clone for RobotConfig
impl Clone for RobotConfig
Source§impl Debug for RobotConfig
impl Debug for RobotConfig
Auto Trait Implementations§
impl Forget for RobotConfig
impl Freeze for RobotConfig
impl Move for RobotConfig
impl RefUnwindSafe for RobotConfig
impl Send for RobotConfig
impl Sync for RobotConfig
impl Unpin for RobotConfig
impl UnsafeUnpin for RobotConfig
impl UnwindSafe for RobotConfig
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