diff --git a/flight/modules/GPS/UBX.c b/flight/modules/GPS/UBX.c index 0761c31b8..6265262eb 100644 --- a/flight/modules/GPS/UBX.c +++ b/flight/modules/GPS/UBX.c @@ -380,7 +380,6 @@ static void parse_ubx_nav_pvt(struct UBXPacket *ubx, GPSPositionSensorData *GpsP GPSTimeSet(&GpsTime); } #endif - GpsPosition->SensorType = sensorType; } #if !defined(PIOS_GPS_MINIMAL) @@ -528,6 +527,8 @@ uint32_t parse_ubx_message(struct UBXPacket *ubx, GPSPositionSensorData *GpsPosi } } + GpsPosition->SensorType = sensorType; + if (msgtracker.msg_received == ALL_RECEIVED) { GPSPositionSensorSet(GpsPosition); msgtracker.msg_received = NONE_RECEIVED;