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:
Generated
+1
-1
@@ -22,7 +22,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rnavp"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rnavp"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2024"
|
||||
publish = ["gitea"]
|
||||
|
||||
|
||||
@@ -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