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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user