X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_gps.c;h=c4c434fdba41885384d2ffa8fbf638b42018f3d8;hp=e793de519ebf553eae49e107c189a046d03aaafd;hb=dd09f0bc2b950c00f3b489878cd69ad8a003f46c;hpb=2a7956a64935246475f92d44c08369e0230b676a diff --git a/src/ao_gps.c b/src/ao_gps.c index e793de51..c4c434fd 100644 --- a/src/ao_gps.c +++ b/src/ao_gps.c @@ -22,15 +22,10 @@ __xdata uint8_t ao_gps_mutex; __xdata struct ao_gps_data ao_gps_data; -#undef AO_GPS_4800 - -#ifdef AO_GPS_4800 -static const char ao_gps_set_nmea[] = "\r\n$PSRF100,0,57600,8,1,0*37\r\n\r\n"; -#else -static const char ao_gps_set_nmea[] = "\r\n$PSRF100,0,4800,8,1,0*0F\r\n\r\n"; -#endif +static const char ao_gps_set_nmea[] = "\r\n$PSRF100,0,57600,8,1,0*37\r\n"; const char ao_gps_config[] = { + 0xa0, 0xa2, 0x00, 0x0e, /* length: 14 bytes */ 136, /* mode control */ 0, 0, /* reserved */ @@ -234,17 +229,13 @@ static void ao_gps_setup(void) __reentrant { uint8_t i, k; -#ifdef AO_GPS_4800 ao_serial_set_speed(AO_SERIAL_SPEED_4800); -#endif for (i = 0; i < 64; i++) ao_serial_putchar(0x00); for (k = 0; k < 3; k++) for (i = 0; i < sizeof (ao_gps_set_nmea); i++) ao_serial_putchar(ao_gps_set_nmea[i]); -#ifdef AO_GPS_4800 ao_serial_set_speed(AO_SERIAL_SPEED_57600); -#endif for (i = 0; i < 64; i++) ao_serial_putchar(0x00); }