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 nominal power change per interval. The slew rate is step / interval in seconds; elapsed-time updates never exceed this step.
adjustment_interval: DurationPositive interval between motor adjustment ticks. Step divided by interval
in seconds must also be positive and finite in f32.