summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cc1111/ao_pins.h11
-rw-r--r--src/core/ao_monitor.c6
-rw-r--r--src/product/Makefile.telebt1
-rw-r--r--src/product/ao_telebt.c3
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();