]> git.gag.com Git - fw/altos/commitdiff
telegps-v4.0-seeed: Test CC1200 using ao_radio_post
authorKeith Packard <keithp@keithp.com>
Thu, 23 Jan 2025 17:29:15 +0000 (09:29 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 28 Jan 2025 18:23:35 +0000 (10:23 -0800)
Make sure the radio chip is alive enough to respond to SPI.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/telegps-v4.0-seeed/ao_telegps_seeed.c

index 18dee5d6d4513fd22f51cfc940fb5d29d460ed09..b9cc81873674ea2302cd2c1d05dda3a46de52193 100644 (file)
@@ -24,6 +24,7 @@
 #define AO_FAIL_FLASH  1
 #define AO_FAIL_ADC    2
 #define AO_FAIL_GPS    3
+#define AO_FAIL_RADIO  4
 
 static void
 ao_validate(void)
@@ -69,6 +70,10 @@ ao_validate(void)
                if ((AO_TICK_SIGNED) (ao_time() - gps_start) > (AO_TICK_SIGNED) AO_SEC_TO_TICKS(10))
                        ao_panic(AO_FAIL_GPS);
        }
+
+       if (!ao_radio_post())
+               ao_panic(AO_FAIL_RADIO);
+
        ao_led_on(LEDS_AVAILABLE);
        ao_exit();
 }