Elct Car Team
/
CarLab
first commit
Diff: state_control.h
- Revision:
- 25:8bd029d58251
- Parent:
- 23:4c743746533c
- Child:
- 26:54ce9f642477
--- a/state_control.h Thu Nov 04 17:21:18 2021 +0000 +++ b/state_control.h Sat Nov 06 16:31:02 2021 +0000 @@ -49,13 +49,9 @@ disable_brakes(); motor_enabled = true; turn_led(GREEN); - setpointLeft = 0.1; - setpointRight = 0.1; }; void _wait(void){ // release brakes, turn on steering system, do not start the motor - _fault =false; - fault_type=CLEAR; // disable_brakes(); disable_brakes(); motor_enabled = false; @@ -85,7 +81,7 @@ batteryVoltage = battInput * 3.3 * battDividerScalar; avgCellVoltage = batteryVoltage / 3.0; - if (left_distance_sensor.read() < (0.600/3.3) && right_distance_sensor.read()*3.3 < (0.600/3.3)) + if (left_distance_sensor.read()*1.2 < (0.380/3.3) && right_distance_sensor.read()*1.2 < (0.380/3.3)) { _fault = true; fault_type = OFF_TRACK;