altos: Fix tracker start state
authorKeith Packard <keithp@keithp.com>
Fri, 6 Jun 2014 01:45:18 +0000 (18:45 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Jun 2014 01:45:18 +0000 (18:45 -0700)
Make sure log can start by scanning existing logs
Enable RDF by default
Turn off telemetry until we decide whether to turn it on in the loop
Allow TeleGPS v0.3 to run without ADC

Signed-off-by: Keith Packard <keithp@keithp.com>
src/product/ao_tracker.c

index 80eade5c63d6173383254589247be992f9b147fe..d4960d258081a0b0e8223baab5df493c2cfe83af 100644 (file)
@@ -36,7 +36,7 @@ ao_usb_connected(void)
 #else
 #define ao_usb_connected()     1
 #endif
+
 #define STARTUP_AVERAGE        5
 
 static void
@@ -54,7 +54,15 @@ ao_tracker(void)
        int32_t         alt_sum = 0;
        int             nsamples = 0;
 
+#if HAS_ADC
        ao_timer_set_adc_interval(100);
+#endif
+
+       ao_log_scan();
+
+       ao_rdf_set(1);
+
+       ao_telemetry_set_interval(0);
 
        ao_flight_state = ao_flight_startup;
        for (;;) {