Repository for verBOT robot project, hopefully featuring two branches: Dev/Test and Prod.

Dependencies:   PM2_Libary Eigen

Revision:
43:a889b6a30787
Parent:
42:883d16a5d59e
Child:
44:a65bc3e11481
diff -r 883d16a5d59e -r a889b6a30787 main.cpp
--- a/main.cpp	Tue May 17 16:39:54 2022 +0200
+++ b/main.cpp	Wed May 18 07:49:27 2022 +0200
@@ -14,7 +14,7 @@
 void user_button_pressed_fcn();     // custom functions which gets executed when user button gets pressed and released, definition below
 void user_button_released_fcn();
 
-float ir_distance_mV2cm(float ir_distance_cm);
+float ir_distance_mV2cm(float ir_distance_mV);
 
 int main()
 {
@@ -139,11 +139,11 @@
     }
 }
 
-float ir_distance_mV2cm(float ir_distance_cm)
+float ir_distance_mV2cm(float ir_distance_mV)
 {
     // defining these variables static makes them persistent within the function
     static float a =    -4.685f; //  (-6.581, -2.79)
     static float c = 3.017e+04f; //  (2.853e+04, 3.181e+04)
 
-    return c/(ir_distance_cm + 1) + a;
+    return c/(ir_distance_mV + 1) + a;
 }
\ No newline at end of file