mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
drivers/gps: publish secondary instance satellite_info if main instance is advertised
This commit is contained in:
parent
ecfdbd2e60
commit
f2f4488594
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user