mirror of https://github.com/ArduPilot/ardupilot
Notify: rename lost_copter to vehicle_lost
This commit is contained in:
parent
3c00b0a0a8
commit
2472702838
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
// additional flags
|
||||
uint32_t external_leds : 1; // 1 if external LEDs are enabled (normally only used for copter)
|
||||
uint32_t lost_copter : 1; // 1 when lost copter tone is requested (normally only used for copter)
|
||||
uint32_t vehicle_lost : 1; // 1 when lost copter tone is requested (normally only used for copter)
|
||||
};
|
||||
|
||||
/// notify_events_type - bitmask of active events.
|
||||
|
|
|
@ -59,7 +59,7 @@ const ToneAlarm_PX4::Tone ToneAlarm_PX4::_tones[] {
|
|||
{ "MFT200L8G>C3", false },
|
||||
#define AP_NOTIFY_PX4_TONE_LOUD_LAND_WARNING_CTS 11
|
||||
{ "MBT200L2A-G-A-G-A-G-", true },
|
||||
#define AP_NOTIFY_PX4_TONE_LOUD_LOST_COPTER_CTS 12
|
||||
#define AP_NOTIFY_PX4_TONE_LOUD_VEHICLE_LOST_CTS 12
|
||||
{ "MBT200>B#1", true },
|
||||
#define AP_NOTIFY_PX4_TONE_LOUD_BATTERY_ALERT_CTS 13
|
||||
{ "MBNT255>B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8B#8", true },
|
||||
|
@ -231,12 +231,12 @@ void ToneAlarm_PX4::update()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (flags.lost_copter != AP_Notify::flags.lost_copter) {
|
||||
flags.lost_copter = AP_Notify::flags.lost_copter;
|
||||
if(flags.lost_copter) {
|
||||
play_tone(AP_NOTIFY_PX4_TONE_LOUD_LOST_COPTER_CTS);
|
||||
}else{
|
||||
// lost vehicle tone
|
||||
if (flags.vehicle_lost != AP_Notify::flags.vehicle_lost) {
|
||||
flags.vehicle_lost = AP_Notify::flags.vehicle_lost;
|
||||
if (flags.vehicle_lost) {
|
||||
play_tone(AP_NOTIFY_PX4_TONE_LOUD_VEHICLE_LOST_CTS);
|
||||
} else {
|
||||
stop_cont_tone();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ private:
|
|||
uint8_t parachute_release : 1; // 1 if parachute is being released
|
||||
uint8_t pre_arm_check : 1; // 0 = failing checks, 1 = passed
|
||||
uint8_t failsafe_radio : 1; // 1 if radio failsafe
|
||||
uint8_t lost_copter : 1; // 1 if lost copter tone requested
|
||||
uint8_t vehicle_lost : 1; // 1 if lost copter tone requested
|
||||
} flags;
|
||||
|
||||
int8_t _cont_tone_playing;
|
||||
|
|
Loading…
Reference in New Issue