Skip to content

Commit

Permalink
publish secondary instance satellite_info if main instance is advertised
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRigi committed Aug 19, 2024
1 parent 7e45f49 commit 805dcbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/drivers/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 805dcbe

Please sign in to comment.