summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-11-30 20:51:47 -0800
committerKeith Packard <keithp@keithp.com>2012-11-30 20:51:47 -0800
commit5f6b3790667d9b92370b4fe0dad5626929fea2ba (patch)
tree9754433d3805dd0104c768c8e77014de76ca0e5f /src/drivers
parentdd8b2eadab12965d232640449b1d1c9f2484238c (diff)
altos: Make skytraq reflashing code try both 9600 and 4800 baud
This lets it communicate with the ROM code which boots at 4800 baud instead of 9600 baud. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ao_gps_skytraq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/ao_gps_skytraq.c b/src/drivers/ao_gps_skytraq.c
index b7dc0a86..d637a602 100644
--- a/src/drivers/ao_gps_skytraq.c
+++ b/src/drivers/ao_gps_skytraq.c
@@ -515,7 +515,13 @@ gps_update(void) __reentrant
ao_timer_set_adc_interval(0);
#endif
ao_skytraq_sendstruct(ao_gps_115200);
+ ao_delay(AO_MS_TO_TICKS(500));
+ ao_gps_set_speed(AO_SERIAL_SPEED_4800);
+ ao_delay(AO_MS_TO_TICKS(500));
+ ao_skytraq_sendstruct(ao_gps_115200);
+ ao_delay(AO_MS_TO_TICKS(500));
ao_gps_set_speed(AO_SERIAL_SPEED_115200);
+ ao_delay(AO_MS_TO_TICKS(500));
/* It's a binary protocol; abandon attempts to escape */
for (;;)