altos: Make skytraq reflashing code try both 9600 and 4800 baud
[fw/altos] / src / drivers / ao_gps_skytraq.c
index b7dc0a86bbff38c393a81b3a385ead7adb43b591..d637a6027306b877cf38a0282f697fe8c1f68b9d 100644 (file)
@@ -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 (;;)