mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:18:54 +08:00
gps: reset RTCM instance
We need to reset the instance after looping through all instances. Otherwise, we are left with the last instance if none is valid but have not updated the _selected_rtcm_instance which is what is logged. Therefore, this change fixes the logged RTCM instance. Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
@@ -540,6 +540,9 @@ void GPS::handleInjectDataTopic()
|
||||
}
|
||||
}
|
||||
|
||||
// Reset instance in case we didn't actually want to switch
|
||||
_orb_inject_data_sub.ChangeInstance(_selected_rtcm_instance);
|
||||
|
||||
bool updated = false;
|
||||
|
||||
// Limit maximum number of GPS injections to 8 since usually
|
||||
|
||||
Reference in New Issue
Block a user