From 8631d9d2a13893be3a06cb2b27c3668d11a77bd6 Mon Sep 17 00:00:00 2001 From: melfey Date: Fri, 12 Jun 2026 19:07:37 -0500 Subject: [PATCH] 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 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/core/logic/motor.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9db6f06..f40d17d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ dependencies = [ [[package]] name = "rnavp" -version = "0.2.1" +version = "0.2.2" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index aab01b3..de19f76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rnavp" -version = "0.2.1" +version = "0.2.2" edition = "2024" publish = ["gitea"] diff --git a/src/core/logic/motor.rs b/src/core/logic/motor.rs index 81a98a1..52124a1 100644 --- a/src/core/logic/motor.rs +++ b/src/core/logic/motor.rs @@ -40,11 +40,11 @@ impl Controller { .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, } }