Changed over to async functions

changed over all the classes in these files to use async based methods
rather than non. This SHOULD make the system more reliable with embassy
in the future, and hopefully prevent issues with blocking code and the
way embassy works.
This commit is contained in:
2026-06-14 14:24:08 -05:00
parent 6ade7615a7
commit 3df2334b10
3 changed files with 28 additions and 23 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ impl PID {
///Will output a float between -1.0 and 1.0
///Current value is the current "position" of the system NOT the goal
/// Use set_point() method to change the "goal position" for the system
pub fn pid_step(&mut self, current_value: f32) -> f32 {
pub async fn pid_step(&mut self, current_value: f32) -> f32 {
//If the values
let error = self.set_point - current_value;
@@ -117,7 +117,7 @@ impl PID {
return self.output;
}
pub fn set_point(&mut self, set_point: f32) {
pub async fn set_point(&mut self, set_point: f32) {
if set_point != self.set_point {
//Update all internal fields
self.integral = 0.0;