summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-08-28 22:04:18 -0600
committerKeith Packard <keithp@keithp.com>2013-08-28 22:04:18 -0600
commit4887af0bf90661a3fdca76f1797a704888edab06 (patch)
treec32805a20ec08b50f8ef4a2e44dc201aa1f49d98
parent61163980f096d555a843e25cd9fe1aec93bbbbba (diff)
altos: Force u-blox to 9600 baud for now
The Max-7 parts just aren't happy switching baud rates, managing only about half the time. Someday I'll figure out why, but until then, make things work by just leaving the chips at 9600 baud Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/drivers/ao_gps_ublox.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/drivers/ao_gps_ublox.c b/src/drivers/ao_gps_ublox.c
index a11ca3f7..1bc2a68f 100644
--- a/src/drivers/ao_gps_ublox.c
+++ b/src/drivers/ao_gps_ublox.c
@@ -30,21 +30,27 @@ __pdata uint16_t ao_gps_tick;
__xdata struct ao_telemetry_location ao_gps_data;
__xdata struct ao_telemetry_satellite ao_gps_tracking_data;
+#undef AO_SERIAL_SPEED_UBLOX
+
#ifndef AO_SERIAL_SPEED_UBLOX
-#define AO_SERIAL_SPEED_UBLOX AO_SERIAL_SPEED_57600
+#define AO_SERIAL_SPEED_UBLOX AO_SERIAL_SPEED_9600
#endif
#if AO_SERIAL_SPEED_UBLOX == AO_SERIAL_SPEED_57600
#define SERIAL_SPEED_STRING "57600"
+#define SERIAL_SPEED_CHECKSUM "2d"
#endif
#if AO_SERIAL_SPEED_UBLOX == AO_SERIAL_SPEED_19200
#define SERIAL_SPEED_STRING "19200"
+#define SERIAL_SPEED_CHECKSUM "23"
#endif
#if AO_SERIAL_SPEED_UBLOX == AO_SERIAL_SPEED_9600
#define SERIAL_SPEED_STRING "9600"
+#define SERIAL_SPEED_CHECKSUM "16"
#endif
-static const char ao_gps_set_nmea[] = "\r\n$PUBX,41,1,3,1," SERIAL_SPEED_STRING ",0*2d\r\n";
+static const char ao_gps_set_nmea[] =
+ "\r\n$PUBX,41,1,3,1," SERIAL_SPEED_STRING ",0*" SERIAL_SPEED_CHECKSUM "\r\n";
struct ao_ublox_cksum {
uint8_t a, b;