altos: fix cc1120 radio test - state wasn't made static
authorKeith Packard <keithp@keithp.com>
Sun, 18 Nov 2012 16:46:31 +0000 (08:46 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 18 Nov 2012 16:46:31 +0000 (08:46 -0800)
so whether the radio got turned on was random.

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

index bad313ebaad23bdac7886812c48d3f51678ec7f6..f27958f96ae397776248f17a64f1f687da780b0b 100644 (file)
@@ -521,7 +521,7 @@ static void
 ao_radio_test_cmd(void)
 {
        uint8_t mode = 2;
-       uint8_t radio_on;
+       static uint8_t radio_on;
        ao_cmd_white();
        if (ao_cmd_lex_c != '\n') {
                ao_cmd_decimal();