1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Merge pull request #10121 from githubDLG/master

This commit is contained in:
Michael Keller 2020-09-13 16:11:14 +12:00 committed by GitHub
commit 75ad6389de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,7 @@ static const dbm_table_t dbmTable[] = {
static int8_t dBm2range (int8_t dBm) {
int8_t retval = dbmTable[0].reportAs;
dBm = constrain(dBm, SPEKTRUM_RSSI_MIN, SPEKTRUM_RSSI_MAX);
for ( uint8_t i = 1; i < ARRAYLEN(dbmTable); i++ ) {
if (dBm >= dbmTable[i].dBm) {
// Linear interpolation between table points.