kopia lustrzana https://github.com/OpenRTX/OpenRTX
Fixed issue with RSSI calculation on MD-UV3x0, leading to an output value of +105dBm when AT1846S register read 0x00
rodzic
fb295a7aa0
commit
a20f907330
|
@ -277,7 +277,11 @@ float radio_getRssi(const freq_t rxFreq)
|
||||||
{
|
{
|
||||||
(void) rxFreq;
|
(void) rxFreq;
|
||||||
|
|
||||||
uint16_t val = AT1846S_readRSSI();
|
/*
|
||||||
int8_t rssi = -151 + (val >> 8);
|
* RSSI and SNR are packed in a 16-bit value, with RSSI being the upper
|
||||||
|
* eight bits.
|
||||||
|
*/
|
||||||
|
uint16_t val = (AT1846S_readRSSI() >> 8);
|
||||||
|
int16_t rssi = -151 + ((int16_t) val);
|
||||||
return ((float) rssi);
|
return ((float) rssi);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue