altos: TM: Don't turn on packet slave mode until idle/invalid state
[fw/altos] / src / ao_telemetrum.c
index 4ace415c23be7b3487f6bc9768c7a3b8b47e7bdd..ea77f5afe83e55c5a5808fe50cb023ea194f48f2 100644 (file)
 #include "ao.h"
 #include "ao_pins.h"
 
-/* stub so as telemetrum doesn't have monitor mode */
-void
-ao_set_monitor(uint8_t monitoring)
-{
-       (void) monitoring;
-}
-
 void
 main(void)
 {
-       ao_clock_init();
+       /*
+        * Reduce the transient on the ignite pins at startup by
+        * pulling the pins low as soon as possible at power up
+        */
+       ao_ignite_set_pins();
 
+       ao_clock_init();
 
        /* Turn on the red LED until the system is stable */
        ao_led_init(LEDS_AVAILABLE);
@@ -59,10 +57,13 @@ main(void)
        ao_gps_report_init();
        ao_telemetry_init();
        ao_radio_init();
-       ao_packet_slave_init(TRUE);
+       ao_packet_slave_init(FALSE);
        ao_igniter_init();
 #if HAS_DBG
        ao_dbg_init();
+#endif
+#if HAS_COMPANION
+       ao_companion_init();
 #endif
        ao_config_init();
        ao_start_scheduler();