You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boolcalibration_needed=odrive_calibration_needed();// check if calibration is needed, which is true if any of the error alarms are raised
69
69
70
70
alarm.odrive_calibration=calibration_needed;
71
71
@@ -75,20 +75,20 @@ static void steer_100Hz()
75
75
&&CANRX_is_node_ODRIVE_ok()
76
76
&&CANRX_get_SUP_steerAuthorized();
77
77
78
-
if (!steer_authorized) {
78
+
if (!steer_authorized) {// if steer is not authorized, set to idle
79
79
base_request_state(SYS_STATE_IDLE);
80
80
81
81
velocity=0;
82
82
83
83
if (odrive_state!=IDLE) {
84
84
odrive_state=IDLE;
85
-
CANTX_doTx_STEER_ODriveRequestState();
85
+
CANTX_doTx_STEER_ODriveRequestState();// transmits IDLE state to ODrive
86
86
}
87
87
88
-
return;
88
+
return;// exit function
89
89
}
90
-
91
-
base_request_state(SYS_STATE_DBW_ACTIVE);
90
+
// if steer is authorized, set to active
91
+
base_request_state(SYS_STATE_DBW_ACTIVE);// request DBW active state, DBW is drive by wire so the throttle, brake, and steering are controlled by the computer
0 commit comments