From cff737c290347b61ba16584880c2f4c436b95042 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 28 Aug 2011 15:40:40 -0700 Subject: [PATCH] altos: Remove RSSI reporting from telebt Telebt uses one LED for bluetooth connection and the other for telem packet reception leaving none for RSSI. Signed-off-by: Keith Packard --- src/cc1111/ao_pins.h | 11 +++++++++++ src/core/ao_monitor.c | 6 ++++++ src/product/Makefile.telebt | 1 - src/product/ao_telebt.c | 3 +-- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/cc1111/ao_pins.h b/src/cc1111/ao_pins.h index 91719b54..57de67b2 100644 --- a/src/cc1111/ao_pins.h +++ b/src/cc1111/ao_pins.h @@ -111,6 +111,7 @@ #define SPI_CS_ON_P0 0 #define HAS_IGNITE 0 #define HAS_MONITOR 1 + #define HAS_RSSI 1 #define HAS_AES 1 #endif @@ -220,6 +221,7 @@ #define SPI_CS_ON_P0 1 #define HAS_IGNITE 0 #define HAS_MONITOR 1 + #define HAS_RSSI 1 #define HAS_AES 1 #endif @@ -245,6 +247,7 @@ #define SPI_CS_ON_P0 1 #define HAS_IGNITE 0 #define HAS_MONITOR 1 + #define HAS_RSSI 1 #define HAS_AES 1 #endif @@ -276,6 +279,7 @@ #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 @@ -314,6 +318,7 @@ #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 @@ -456,6 +461,12 @@ #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 diff --git a/src/core/ao_monitor.c b/src/core/ao_monitor.c index c167b861..aaa6bb8b 100644 --- a/src/core/ao_monitor.c +++ b/src/core/ao_monitor.c @@ -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(); diff --git a/src/product/Makefile.telebt b/src/product/Makefile.telebt index ff0e1502..46c87db0 100644 --- a/src/product/Makefile.telebt +++ b/src/product/Makefile.telebt @@ -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 diff --git a/src/product/ao_telebt.c b/src/product/ao_telebt.c index cb23f391..9154f4be 100644 --- a/src/product/ao_telebt.c +++ b/src/product/ao_telebt.c @@ -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(); -- 2.30.2