mirror of https://github.com/ArduPilot/ardupilot
Copter: comment update re low battery event
This commit is contained in:
parent
0a047ae1c1
commit
c5bd1a76ed
|
@ -123,7 +123,6 @@ static void low_battery_event(void)
|
|||
Log_Write_Error(ERROR_SUBSYSTEM_FAILSAFE_BATT, ERROR_CODE_FAILSAFE_OCCURRED);
|
||||
|
||||
#if COPTER_LEDS == ENABLED
|
||||
// Only Activate if a battery is connected to avoid alarm on USB only
|
||||
piezo_on();
|
||||
#endif // COPTER_LEDS
|
||||
}
|
||||
|
|
|
@ -131,6 +131,7 @@ static void read_battery(void)
|
|||
}
|
||||
|
||||
// check for low voltage or current if the low voltage check hasn't already been triggered
|
||||
// we only check when we're not powered by USB to avoid false alarms during bench tests
|
||||
if (!ap_system.usb_connected && !ap.low_battery && ( battery_voltage1 < g.low_voltage || (g.battery_monitoring == BATT_MONITOR_VOLTAGE_AND_CURRENT && current_total1 > g.pack_capacity))) {
|
||||
low_battery_counter++;
|
||||
if( low_battery_counter >= BATTERY_FS_COUNTER ) {
|
||||
|
|
Loading…
Reference in New Issue