first commit

Dependencies:   mbed MMA8451Q

Revision:
31:d570f957e083
Parent:
27:0fa9d61c5fc6
--- a/state_control.h	Fri Nov 19 22:53:54 2021 +0000
+++ b/state_control.h	Mon Nov 22 21:44:10 2021 +0000
@@ -81,7 +81,7 @@
     batteryVoltage = battInput * 3.3 * battDividerScalar;
     avgCellVoltage = batteryVoltage / 3.0;
     
-    if (left_distance_sensor.read()*1.5 < (0.300/3.3) && right_distance_sensor.read()*1.5 < (0.300/3.3))
+    if (left_distance_sensor.read() < (0.400/3.3) && right_distance_sensor.read() < (0.400/3.3))
         {
           _fault = true;
           fault_type = OFF_TRACK;