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:
Julian Oes
2023-05-03 07:47:51 +02:00
committed by Beat Küng
parent b6f19d5e9b
commit 6108b31e6a
+3
View File
@@ -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