mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-10 06:39:25 +08:00
drivers/gps: publish secondary instance satellite_info if main instance is advertised
This commit is contained in:
@@ -1214,11 +1214,13 @@ GPS::publish()
|
||||
void
|
||||
GPS::publishSatelliteInfo()
|
||||
{
|
||||
if (_instance == Instance::Main) {
|
||||
if (_instance == Instance::Main || _is_gps_main_advertised.load()) {
|
||||
if (_p_report_sat_info != nullptr) {
|
||||
_report_sat_info_pub.publish(*_p_report_sat_info);
|
||||
}
|
||||
|
||||
_is_gps_main_advertised.store(true);
|
||||
|
||||
} else {
|
||||
//we don't publish satellite info for the secondary gps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user