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
Generated
+1 -1
View File
@@ -22,7 +22,7 @@ dependencies = [
[[package]] [[package]]
name = "rnavp" name = "rnavp"
version = "0.2.1" version = "0.2.2"
dependencies = [ dependencies = [
"serde", "serde",
] ]
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "rnavp" name = "rnavp"
version = "0.2.1" version = "0.2.2"
edition = "2024" edition = "2024"
publish = ["gitea"] publish = ["gitea"]
+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); .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 { Controller {
motor: motor, motor: motor,
max_speed: max_speed, max_speed: max_speed,
pid: pid, pid: pid::PID::new(config),
current_direction: Direction::CCW, current_direction: Direction::CCW,
} }
} }