Extended GPS support to UV-380 module

replace/35e9387275e5c43c7109e4ad63a5883a75f3b97d
Niccolò Izzo 2021-02-24 08:04:49 +01:00
rodzic 3438006ef5
commit 6b24895ef3
1 zmienionych plików z 4 dodań i 0 usunięć
openrtx/src

Wyświetl plik

@ -24,6 +24,8 @@
#include <state.h>
#include <strings.h>
#define KNOTS2KMH 1.852f
/**
* This function parses a GPS NMEA sentence and updates radio state
*/
@ -47,6 +49,8 @@ void gps_taskFunc(char *line, __attribute__((unused)) int len, state_t *state)
// Synchronize RTC with GPS UTC clock
if(state->settings.gps_set_time)
rtc_setTime(state->gps_data.timestamp);
state->gps_data.tmg_true = minmea_tofloat(&frame.course);
state->gps_data.speed = minmea_tofloat(&frame.speed) * KNOTS2KMH;
} break;
case MINMEA_SENTENCE_GGA: