File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
rb_ws/src/buggy/scripts/watchdog Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,15 @@ def check_stepper_steering(self, msg):
57
57
if self .alarm < 2 :
58
58
self .alarm = 0
59
59
60
- # Finds the minimum difference between the stepper's reported angle and the last 10 steering instructions
61
- steer_instruct_diff_min = min (
62
- map (
63
- lambda steer : abs (stepper_steer - steer ),
64
- self .steering_instructions
60
+ steer_instruct_diff_min = 0
61
+ if len (self .steering_instructions ) > 0 :
62
+ # Finds the minimum difference between the stepper's reported angle and the last 10 steering instructions
63
+ steer_instruct_diff_min = min (
64
+ map (
65
+ lambda steer : abs (stepper_steer - steer ),
66
+ self .steering_instructions
67
+ )
65
68
)
66
- )
67
69
68
70
if steer_instruct_diff_min > Watchdog .STEERING_DEVIANCE :
69
71
if self .inAutonSteer :
You can’t perform that action at this time.
0 commit comments