Copter: comment update re low battery event

This commit is contained in:
Randy Mackay 2013-09-12 22:41:28 +09:00
parent 0a047ae1c1
commit c5bd1a76ed
2 changed files with 1 additions and 1 deletions

View File

@ -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
}

View File

@ -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 ) {