@@ -54,7 +54,7 @@ void send_carstate_msg(void)
5454 get_nero_state ().home_mode ,
5555 get_nero_state ().nero_index ,
5656 dti_get_mph (),
57- is_shutdown_active (),
57+ is_shutdown_closed (),
5858 pedals_getTorqueLimitPercentage (),
5959 (cerberus_state .functional != F_REVERSE ),
6060 pedals_getRegenLimit (),
@@ -128,7 +128,7 @@ static int transition_functional_state(func_state_t new_state)
128128
129129 brake_state = pedals_getBrakeState ();
130130#ifdef TSMS_OVERRIDE
131- if (!is_shutdown_active () && (!brake_state || cerberus_state .functional == FAULTED )) { // only enforce brake / fault if tsms is actually on
131+ if (!is_shutdown_closed () && (!brake_state || cerberus_state .functional == FAULTED )) { // only enforce brake / fault if tsms is actually on
132132 return 3 ;
133133 }
134134 printf ("Ignoring tsms\n\n" );
@@ -143,13 +143,13 @@ static int transition_functional_state(func_state_t new_state)
143143 return 3 ;
144144 }
145145
146- /* Only turn on motor if brakes engaged and shutdown active */
147- if (!brake_state || !is_shutdown_active ()) {
146+ /* Only turn on motor if brakes engaged and shutdown is closed */
147+ if (!brake_state || !is_shutdown_closed ()) {
148148 return 3 ;
149149 }
150150#endif
151151
152- if (is_shutdown_active ()) {
152+ if (is_shutdown_closed ()) {
153153 rtds_soundRTDS ();
154154 }
155155
@@ -189,10 +189,10 @@ static int transition_nero_state(nero_state_t new_state)
189189 }
190190 }
191191
192- /* TSMS OFF and MPH = 0 to enter games */
192+ /* Shutdown = Open and MPH = 0 to enter games */
193193 if (new_state .nero_index == GAMES ) {
194194#ifndef TSMS_OVERRIDE
195- if (is_shutdown_active () || dti_get_mph () >= 1 ) {
195+ if (is_shutdown_closed () || dti_get_mph () >= 1 ) {
196196 return 1 ;
197197 }
198198#endif
@@ -322,21 +322,21 @@ void statemachine_process(state_req_t new_state_req) {
322322 else if (new_state_req .id == FUNCTIONAL ) { transition_functional_state (new_state_req .state .functional ); }
323323 }
324324
325- if (!is_ts_rising && is_shutdown_active ()) {
325+ if (!is_ts_rising && is_shutdown_closed ()) {
326326 is_ts_rising = true;
327327
328328 /* Restart TS Rising timer. */
329329 int status = timer_restart (& ts_rising_timer );
330330 if (status != U_SUCCESS ) {
331- PRINTLN_ERROR ("Failed to restart TS Rising timer ( in !ts_rising && !is_shutdown_active ()) (Status: %d)." , status );
331+ PRINTLN_ERROR ("Failed to restart TS Rising timer in `if ( !ts_rising && !is_shutdown_closed ())` (Status: %d)." , status );
332332 return ;
333333 }
334334
335- } else if (!is_shutdown_active ()) {
335+ } else if (!is_shutdown_closed ()) {
336336 /* Stop the TS Rising timer. */
337337 int status = timer_stop (& ts_rising_timer );
338338 if (status != U_SUCCESS ) {
339- PRINTLN_ERROR ("Failed to stop TS Rising timer ( in is_shutdown_active()) (Status: %d)." , status );
339+ PRINTLN_ERROR ("Failed to stop TS Rising timer in `else if (!is_shutdown_closed())` (Status: %d)." , status );
340340 return ;
341341 }
342342 is_ts_rising = false;
0 commit comments