Motor logic area has been started.

This commit is contained in:
2026-05-24 12:11:37 -05:00
parent da5431f5f7
commit 35d30bd213
5 changed files with 25 additions and 3 deletions
View File
+1 -3
View File
@@ -1,4 +1,2 @@
pub mod structs;
pub mod kinematics; pub mod kinematics;
pub mod impls; pub mod motor;
pub mod traits;
+24
View File
@@ -0,0 +1,24 @@
use crate::core::{
motor,
positional,
units,
};
///The Config for the PID system used by the controller
pub struct PIDConfig {
///The Porportional value for the controller
pub kp: f32,
///The Integral value for the controller
pub ki: f32,
///The Derivative value for the controller
pub kd: f32,
///The Feedforward value for the controller
pub ff: f32,
}
///Controller trait for motors. Motors with this trait, automatically have a PID included.
pub trait Controller : motor::Driver + motor::Sensor {
const CONFIG: PIDConfig;
}
View File
View File