Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firmware/bluetooth_rxtx/ubertooth_rssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void rssi_iir_update(uint16_t channel)

/* Use array to track 79 Bluetooth channels, or just first slot
* of array if the frequency is not a valid Bluetooth channel. */
if ( channel < 2402 || channel < 2480 )
if ( channel < 2402 || channel > 2480 )
channel = 2402;

int i = channel - 2402;
Expand All @@ -77,7 +77,7 @@ int8_t rssi_get_avg(uint16_t channel)
{
/* Use array to track 79 Bluetooth channels, or just first slot
* of array if the frequency is not a valid Bluetooth channel. */
if ( channel < 2402 || channel < 2480 )
if ( channel < 2402 || channel > 2480 )
channel = 2402;

return (rssi_iir[channel-2402] + 128) / 256;
Expand Down