im-me
im-me copied to clipboard
RSSI ^ 0x80
im-me/specan/src/specan.c Line:542
chan_table[ch].ss[sweep] = (RSSI ^ 0x80);
Where does the 0x80 come from? What does it do? Is it a short cut to skip the harder math?
The PDF for the 1110 states: The RSSI value read from the RSSI status register is a 2’s complement number. The following procedure can be used to convert the RSSI reading to an absolute power level (RSSI_dBm).
- Read the RSSI status register
- Convert the reading from a hexadecimal number to a decimal number (RSSI_dec)
- If RSSI_dec ≥ 128 then RSSI_dBm = (RSSI_dec – 256)/2 – RSSI_offset
- Else if RSSI_dec < 128 then RSSI_dBm = (RSSI_dec)/2 – RSSI_offset