X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_gps_test.c;h=93d7a9abc6ee5e3371cf72f33fda50d19dd9ad50;hp=c94128d91adc9b0f1c5799dffab77f0917bdcb77;hb=41c230cac359b4459ca93196d08704b7d35447c7;hpb=4486d9156e19e4280b42bcd422d81d04f2d04a92 diff --git a/src/ao_gps_test.c b/src/ao_gps_test.c index c94128d9..93d7a9ab 100644 --- a/src/ao_gps_test.c +++ b/src/ao_gps_test.c @@ -27,8 +27,13 @@ #define AO_GPS_VALID (1 << 4) #define AO_GPS_RUNNING (1 << 5) +#define AO_GPS_DATE_VALID (1 << 6) +#define AO_GPS_COURSE_VALID (1 << 7) -struct ao_gps_data { +struct ao_gps_orig { + uint8_t year; + uint8_t month; + uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; @@ -53,17 +58,22 @@ struct ao_gps_data { #define SIRF_SAT_ACQUISITION_FAILED (1 << 6) #define SIRF_SAT_EPHEMERIS_AVAILABLE (1 << 7) -struct ao_gps_sat_data { +struct ao_gps_sat_orig { uint8_t svid; - uint8_t state; uint8_t c_n_1; }; -struct ao_gps_tracking_data { +#define AO_MAX_GPS_TRACKING 12 + +struct ao_gps_tracking_orig { uint8_t channels; - struct ao_gps_sat_data sats[12]; + struct ao_gps_sat_orig sats[AO_MAX_GPS_TRACKING]; }; +#define ao_telemetry_location ao_gps_orig +#define ao_telemetry_satellite ao_gps_tracking_orig +#define ao_telemetry_satellite_info ao_gps_sat_orig + void ao_mutex_get(uint8_t *mutex) { @@ -397,8 +407,10 @@ ao_serial_set_speed(uint8_t speed) tcflush(fd, TCIFLUSH); } +#define ao_time() 0 + #include "ao_gps_print.c" -#include "ao_gps.c" +#include "ao_gps_sirf.c" void ao_dump_state(void *wchan) @@ -431,9 +443,9 @@ ao_dump_state(void *wchan) printf("\n"); printf ("\t"); for (i = 0; i < 12; i++) - printf (" %2d(%02x)", + printf (" %2d(%02d)", ao_gps_tracking_data.sats[i].svid, - ao_gps_tracking_data.sats[i].state); + ao_gps_tracking_data.sats[i].c_n_1); printf ("\n"); }