|
35 | 35 |
|
36 | 36 | // ********************* Serial debugging *********************
|
37 | 37 |
|
38 |
| -bool check_ignition(void) { |
| 38 | +bool check_started(void) { |
39 | 39 | return current_board->check_ignition() || ignition_can;
|
40 | 40 | }
|
41 | 41 |
|
@@ -84,10 +84,10 @@ void started_interrupt_handler(uint8_t interrupt_line) {
|
84 | 84 |
|
85 | 85 | #ifdef EON
|
86 | 86 | // set power savings mode here if on EON build
|
87 |
| - int power_save_state = check_ignition() ? POWER_SAVE_STATUS_DISABLED : POWER_SAVE_STATUS_ENABLED; |
| 87 | + int power_save_state = check_started() ? POWER_SAVE_STATUS_DISABLED : POWER_SAVE_STATUS_ENABLED; |
88 | 88 | set_power_save_state(power_save_state);
|
89 | 89 | // set CDP usb power mode everytime that the car starts to make sure EON is charging
|
90 |
| - if (check_ignition()) { |
| 90 | + if (check_started()) { |
91 | 91 | current_board->set_usb_power_mode(USB_POWER_CDP);
|
92 | 92 | }
|
93 | 93 | #endif
|
@@ -609,7 +609,7 @@ void TIM3_IRQHandler(void) {
|
609 | 609 |
|
610 | 610 | // check heartbeat counter if we are running EON code. If the heartbeat has been gone for a while, go to NOOUTPUT safety mode.
|
611 | 611 | #ifdef EON
|
612 |
| - if (heartbeat_counter >= (check_ignition() ? EON_HEARTBEAT_IGNITION_CNT_ON : EON_HEARTBEAT_IGNITION_CNT_OFF)) { |
| 612 | + if (heartbeat_counter >= (check_started() ? EON_HEARTBEAT_IGNITION_CNT_ON : EON_HEARTBEAT_IGNITION_CNT_OFF)) { |
613 | 613 | puts("EON hasn't sent a heartbeat for 0x"); puth(heartbeat_counter); puts(" seconds. Safety is set to NOOUTPUT mode.\n");
|
614 | 614 | if(current_safety_mode != SAFETY_NOOUTPUT){
|
615 | 615 | set_safety_mode(SAFETY_NOOUTPUT, 0U);
|
@@ -707,7 +707,7 @@ int main(void) {
|
707 | 707 | current_board->set_esp_gps_mode(ESP_GPS_DISABLED);
|
708 | 708 | }
|
709 | 709 | // only enter power save after the first cycle
|
710 |
| - /*if (check_ignition()) { |
| 710 | + /*if (check_started()) { |
711 | 711 | set_power_save_state(POWER_SAVE_STATUS_ENABLED);
|
712 | 712 | }*/
|
713 | 713 | #endif
|
|
0 commit comments