File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Arduino_Pedelec_Controller Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -801,7 +801,19 @@ void loop()
801801 throttle_pre = throttle_stat;
802802 }
803803 }
804- #endif
804+ #endif
805+
806+ #if HARDWARE_REV >= 2
807+ // Emergency power down to protect battery from undervoltage. Also saves to EEPROM
808+ // Don't shut down on USB power.
809+ if (voltage < vemergency_shutdown
810+ && voltage_2s > 6.0 )
811+ {
812+ display_show_important_info (FROM_FLASH (msg_emergency_shutdown), 60 );
813+ save_shutdown ();
814+ }
815+ #endif
816+
805817// slow loop start----------------------//use this subroutine to place any functions which should happen only once a second
806818 if (millis ()-last_writetime > 1000 ) // don't do this more than once a second
807819 {
@@ -847,16 +859,6 @@ void loop()
847859 }
848860 }
849861
850- // Emergency power down to protect battery from undervoltage.
851- // Also checks averaged voltage to prevent ADC read errors killing the system.
852- // Don't shut down on USB power, too.
853- if (voltage < vemergency_shutdown && voltage_display < vemergency_shutdown
854- && voltage > 6.0 )
855- {
856- display_show_important_info (FROM_FLASH (msg_emergency_shutdown), 60 );
857- delay (1000 );
858- save_shutdown ();
859- }
860862#endif
861863#ifdef SUPPORT_HRMI
862864 pulse_human=getHeartRate ();
You can’t perform that action at this time.
0 commit comments