
first commit
Diff: state_control.h
- Revision:
- 26:54ce9f642477
- Parent:
- 25:8bd029d58251
- Child:
- 27:0fa9d61c5fc6
--- a/state_control.h Sat Nov 06 16:31:02 2021 +0000 +++ b/state_control.h Mon Nov 08 21:08:41 2021 +0000 @@ -81,14 +81,16 @@ batteryVoltage = battInput * 3.3 * battDividerScalar; avgCellVoltage = batteryVoltage / 3.0; - if (left_distance_sensor.read()*1.2 < (0.380/3.3) && right_distance_sensor.read()*1.2 < (0.380/3.3)) + if (left_distance_sensor.read()*1.2 < (0.300/3.3) && right_distance_sensor.read()*1.2 < (0.300/3.3)) { _fault = true; fault_type = OFF_TRACK; } - if (avgCellVoltage <= 3.4){ + if + + (avgCellVoltage <= 3.4){ _fault = true; fault_type = LOW_VOLTAGE; }