Fixed a new() issue

where it took in a PID rather than a pid::PID rather than a pid::PID

Version Bump to 0.2.2
This commit is contained in:
2026-06-12 19:07:37 -05:00
parent eb7d4ca59a
commit 8631d9d2a1
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -40,11 +40,11 @@ impl<T: motor::Driver + motor::Sensor> Controller<T> {
.set_speed_and_direction(motor_command, self.current_direction);
}
pub fn new(motor: T, max_speed: Speed, pid: pid::PID) -> Self {
pub fn new(motor: T, max_speed: Speed, config: pid::Config) -> Self {
Controller {
motor: motor,
max_speed: max_speed,
pid: pid,
pid: pid::PID::new(config),
current_direction: Direction::CCW,
}
}