mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-08 04:31:35 +08:00
Commander: add GPS valid info message if in flight
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -4261,6 +4261,15 @@ void Commander::estimator_check()
|
||||
events::send(events::ID("commander_gps_lost"), {events::Log::Critical, events::LogInternal::Info},
|
||||
"GPS no longer valid");
|
||||
}
|
||||
|
||||
} else if (!condition_gps_position_was_valid && _vehicle_status_flags.gps_position_valid) {
|
||||
|
||||
// report GPS valid if flying and global position is (still) valid
|
||||
if (!_vehicle_land_detected.landed && _vehicle_status_flags.global_position_valid) {
|
||||
mavlink_log_warning(&_mavlink_log_pub, "GPS valid\t");
|
||||
events::send(events::ID("commander_gps_valid_in_flight"), {events::Log::Warning, events::LogInternal::Info},
|
||||
"GPS valid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user