|
|
|
@ -93,14 +93,17 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action)
@@ -93,14 +93,17 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action)
|
|
|
|
|
// should immediately disarm when we're on the ground
|
|
|
|
|
arming.disarm(); |
|
|
|
|
desired_action = Failsafe_Action_None; |
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe - Disarming"); |
|
|
|
|
// gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe - Disarming");
|
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "低电压保护 - 锁定"); |
|
|
|
|
|
|
|
|
|
} else if (flightmode->is_landing() && failsafe_option(FailsafeOption::CONTINUE_IF_LANDING) && desired_action != Failsafe_Action_None) { |
|
|
|
|
// Allow landing to continue when FS_OPTIONS is set to continue when landing
|
|
|
|
|
desired_action = Failsafe_Action_Land; |
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe - Continuing Landing"); |
|
|
|
|
// gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe - Continuing Landing");
|
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "低电压保护 - 降落"); |
|
|
|
|
} else { |
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe"); |
|
|
|
|
// gcs().send_text(MAV_SEVERITY_WARNING, "Battery Failsafe");
|
|
|
|
|
gcs().send_text(MAV_SEVERITY_WARNING, "低电压保护"); |
|
|
|
|
} |
|
|
|
|
const AP_AHRS &_ahrs = AP::ahrs(); |
|
|
|
|
float home = 0.0; |
|
|
|
@ -391,7 +394,8 @@ void Copter::do_failsafe_action(Failsafe_Action action, ModeReason reason){
@@ -391,7 +394,8 @@ void Copter::do_failsafe_action(Failsafe_Action action, ModeReason reason){
|
|
|
|
|
case Failsafe_Action_Terminate: |
|
|
|
|
#if ADVANCED_FAILSAFE == ENABLED |
|
|
|
|
char battery_type_str[17]; |
|
|
|
|
snprintf(battery_type_str, 17, "%s battery", type_str); |
|
|
|
|
// snprintf(battery_type_str, 17, "%s battery", type_str);
|
|
|
|
|
snprintf(battery_type_str, 17, "%s 电池", type_str); |
|
|
|
|
g2.afs.gcs_terminate(true, battery_type_str); |
|
|
|
|
#else |
|
|
|
|
arming.disarm(); |
|
|
|
|