altos: Remove RSSI reporting from telebt
authorKeith Packard <keithp@keithp.com>
Sun, 28 Aug 2011 22:40:40 +0000 (15:40 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 28 Aug 2011 22:40:40 +0000 (15:40 -0700)
Telebt uses one LED for bluetooth connection and the other for telem
packet reception leaving none for RSSI.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cc1111/ao_pins.h
src/core/ao_monitor.c
src/product/Makefile.telebt
src/product/ao_telebt.c

index 91719b5..57de67b 100644 (file)
        #define SPI_CS_ON_P0            0
        #define HAS_IGNITE              0
        #define HAS_MONITOR             1
+       #define HAS_RSSI                1
        #define HAS_AES                 1
 #endif
 
        #define SPI_CS_ON_P0            1
        #define HAS_IGNITE              0
        #define HAS_MONITOR             1
+       #define HAS_RSSI                1
        #define HAS_AES                 1
 #endif
 
        #define SPI_CS_ON_P0            1
        #define HAS_IGNITE              0
        #define HAS_MONITOR             1
+       #define HAS_RSSI                1
        #define HAS_AES                 1
 #endif
 
        #define BT_LINK_PIN_INDEX       7
        #define BT_LINK_PIN             P2_1
        #define HAS_MONITOR             1
+       #define HAS_RSSI                0
        #define HAS_AES                 1
 #endif
 
        #define BT_LINK_PIN_INDEX       7
        #define BT_LINK_PIN             P1_7
        #define HAS_MONITOR             1
+       #define HAS_RSSI                0
        #define HAS_AES                 1
 #endif
 
 #error Please define HAS_MONITOR
 #endif
 
+#if HAS_MONITOR
+#ifndef HAS_RSSI
+#error Please define HAS_RSSI
+#endif
+#endif
+
 #ifndef HAS_ADC
 #error Please define HAS_ADC
 #endif
index c167b86..aaa6bb8 100644 (file)
@@ -151,7 +151,9 @@ ao_monitor_put(void)
                                ao_gps_print(&recv_orig.telemetry_orig.gps);
                                ao_gps_tracking_print(&recv_orig.telemetry_orig.gps_tracking);
                                putchar('\n');
+#if HAS_RSSI
                                ao_rssi_set(rssi);
+#endif
                        } else {
                                printf("CRC INVALID RSSI %3d\n", rssi);
                        }
@@ -214,7 +216,9 @@ ao_monitor_put(void)
                                       recv_tiny.telemetry_tiny.flight_vel,
                                       recv_tiny.telemetry_tiny.flight_pres);
 #endif
+#if HAS_RSSI
                                ao_rssi_set(rssi);
+#endif
                        } else {
                                printf("CRC INVALID RSSI %3d\n", rssi);
                        }
@@ -228,10 +232,12 @@ ao_monitor_put(void)
                                printf("%02x", byte);
                        }
                        printf("%02x\n", sum);
+#if HAS_RSSI
                        if (recv_raw.packet[ao_monitoring + 1] & PKT_APPEND_STATUS_1_CRC_OK) {
                                rssi = ((int16_t) recv_raw.packet[ao_monitoring] >> 1) - 74;
                                ao_rssi_set(rssi);
                        }
+#endif
                        break;
                }
                ao_usb_flush();
index ff0e150..46c87db 100644 (file)
@@ -26,7 +26,6 @@ CORE_SRC = \
        ao_monitor.c \
        ao_mutex.c \
        ao_panic.c \
-       ao_rssi.c \
        ao_state.c \
        ao_stdio.c \
        ao_task.c
index cb23f39..9154f4b 100644 (file)
@@ -37,8 +37,7 @@ main(void)
        ao_storage_init();
 #endif
        ao_usb_init();
-       ao_monitor_init(AO_LED_GREEN, TRUE);
-       ao_rssi_init(AO_LED_RED);
+       ao_monitor_init(AO_LED_RED, TRUE);
        ao_radio_init();
        ao_packet_master_init();
        ao_btm_init();