mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:53:34 +08:00
refactor commander: rename rc_signal_lost -> manual_control_signal_lost, data_link_lost -> gcs_connection_lost
This commit is contained in:
@@ -68,12 +68,12 @@ void RC_Loss_Alarm::process()
|
||||
_was_armed = true; // Once true, impossible to go back to false
|
||||
}
|
||||
|
||||
if (!_had_rc && !status_flags.rc_signal_lost) {
|
||||
if (!_had_manual_control && !status_flags.manual_control_signal_lost) {
|
||||
|
||||
_had_rc = true;
|
||||
_had_manual_control = true;
|
||||
}
|
||||
|
||||
if (_was_armed && _had_rc && status_flags.rc_signal_lost &&
|
||||
if (_was_armed && _had_manual_control && status_flags.manual_control_signal_lost &&
|
||||
status.arming_state != vehicle_status_s::ARMING_STATE_ARMED) {
|
||||
play_tune();
|
||||
_alarm_playing = true;
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
uORB::Subscription _vehicle_status_flags_sub{ORB_ID(vehicle_status_flags)};
|
||||
|
||||
bool _was_armed = false;
|
||||
bool _had_rc = false; // Don't trigger alarm for systems without RC
|
||||
bool _had_manual_control = false; // Don't trigger alarm for systems without RC
|
||||
bool _alarm_playing = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user