Plane: log GPS messages as they come in
stops us logging duplicate messages
This commit is contained in:
parent
786e4cf705
commit
b53e3bb1fc
@ -881,9 +881,6 @@ static void medium_loop()
|
||||
|
||||
if (g.log_bitmask & MASK_LOG_NTUN)
|
||||
Log_Write_Nav_Tuning();
|
||||
|
||||
if (g.log_bitmask & MASK_LOG_GPS)
|
||||
Log_Write_GPS();
|
||||
break;
|
||||
|
||||
// This case controls the slow loop
|
||||
@ -972,9 +969,17 @@ static void one_second_loop()
|
||||
|
||||
static void update_GPS(void)
|
||||
{
|
||||
static uint32_t last_gps_reading;
|
||||
g_gps->update();
|
||||
update_GPS_light();
|
||||
|
||||
if (g_gps->last_message_time_ms() != last_gps_reading) {
|
||||
last_gps_reading = g_gps->last_message_time_ms();
|
||||
if (g.log_bitmask & MASK_LOG_GPS) {
|
||||
Log_Write_GPS();
|
||||
}
|
||||
}
|
||||
|
||||
// get position from AHRS
|
||||
have_position = ahrs.get_position(¤t_loc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user