summaryrefslogtreecommitdiff
path: root/src/product
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-11 13:50:56 -0700
committerKeith Packard <keithp@keithp.com>2012-07-11 13:50:56 -0700
commitfe70611c3c7d4b8cce3b5292f0ec549f3191bf86 (patch)
tree34c7b7c73fc3a2528757fece149e7a5d26edc4d6 /src/product
parent18431c88c8a6cb267922b97192e8b7ddb88d0e7e (diff)
altos: Create macros to convert from/to radio RSSI representation
AO_RSSI_FROM_RADIO and AO_RADIO_FROM_RSSI. Removes a bunch of open-coded versions of the same function. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/product')
-rw-r--r--src/product/ao_terraui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/product/ao_terraui.c b/src/product/ao_terraui.c
index 963c7be4..1866eb0c 100644
--- a/src/product/ao_terraui.c
+++ b/src/product/ao_terraui.c
@@ -594,7 +594,7 @@ ao_terramonitor(void)
continue;
if (!(ao_monitor_ring[monitor].all.status & PKT_APPEND_STATUS_1_CRC_OK))
continue;
- ao_tel_rssi = (ao_monitor_ring[monitor].all.rssi >> 1) - 74;
+ ao_tel_rssi = AO_RSSI_FROM_RADIO(ao_monitor_ring[monitor].all.rssi);
switch (ao_monitor_ring[monitor].all.telemetry.generic.type) {
case AO_TELEMETRY_SENSOR_TELEMETRUM:
case AO_TELEMETRY_SENSOR_TELEMINI: