pid tuner
Public functions and their Rust signatures.
pid_tune_mode
pub async fn pid_tune_mode<C: ControllerDevice>(
controller_master: &mut ProsController<C>,
chassis: &Chassis,
)Run the tuner with Pushback's buttons. Never returns.
Parameters
Prop
Type
Returns
()pid_tune_mode_with
pub async fn pid_tune_mode_with<C: ControllerDevice>(
controller_master: &mut ProsController<C>,
chassis: &Chassis,
buttons: TuneButtons,
)Run the tuner with custom buttons. Never returns.
Parameters
Prop
Type
Returns
()write_pid_values
pub fn write_pid_values(chassis: &Chassis, path: &str) -> std::io::Result<()>Write both PIDs' gains to a file on the SD card, in Pushback's format:
Angular:
KP: 3.6 KI: 0KD: 22
Lateral:
KP: 10.1 KI: 0KD: 40Pushback has this code in the tuner loop, disabled (if (false)); here it is a function
you can call.
Errors
If the file cannot be created or written.
Parameters
Prop
Type
Returns
std::io::Result<()>