Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / io / spektrum_rssi.h
blob0ee90eb9bb97ba7b7ffd047fc4f442ff59e0a308
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 // Spektrum RSSI signal strength range, in dBm
22 #define SPEKTRUM_RSSI_MAX (-42)
23 #define SPEKTRUM_RSSI_MIN (-92)
25 // Spektrum RSSI reported value limit at or below which signals a fade instead of a real RSSI
26 #define SPEKTRUM_RSSI_FADE_LIMIT (-100)
28 #define SPEKTRUM_MAX_FADE_PER_SEC 40
29 #define SPEKTRUM_FADE_REPORTS_PER_SEC 2
31 typedef struct dbm_table_s
33 int8_t dBm;
34 uint8_t reportAs;
35 } dbm_table_t;
38 void spektrumHandleRSSI(volatile uint8_t spekFrame[]);