altos/ao_cc1120: Only call ao_packet_slave_stop when HAS_SLAVE
authorKeith Packard <keithp@keithp.com>
Fri, 23 Mar 2018 23:34:23 +0000 (17:34 -0600)
committerKeith Packard <keithp@keithp.com>
Fri, 23 Mar 2018 23:37:02 +0000 (17:37 -0600)
Don't try to disable packet slave mode when the product doesn't
support packet slave mode.

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

index efe5f996acaaaa157d42397ad9f2bf313554368e..2f091485a24721e09f80cd972f8dd32c3d8fcc9b 100644 (file)
@@ -1447,7 +1447,9 @@ ao_radio_test_recv(void)
 static void
 ao_radio_aprs(void)
 {
+#if PACKET_HAS_SLAVE
        ao_packet_slave_stop();
+#endif
        ao_aprs_send();
 }
 #endif