Allow to disable telemetry alarams (#4981)
* Allow to disable telemetry alarams This mainly useful for cheap transceivers that have telemetry but no power amplifier and very limited range of often 10-20 meters. This includes fishpepper's tinyFISH FC (and its legal/illegal clones) and also Spektrum BNF models. * Always disable a warning when RSSI Warnings are disabled * Compile fix * Fix typos, also mute sensor lost Refactor the FrskyRSSIAlarm[2] into a EEPROM compatible RssiAlarm struct * Compile fixes * Also refactor Companion * Cleanup unused datastruct on ARM * Compile fix for AVR * Change int to uin8_t for avr * Fix strings
This commit is contained in:
committed by
Bertrand Songis
parent
656daa75fa
commit
8e07f9b0f4
@@ -591,12 +591,20 @@ class FrSkyAlarmData {
|
||||
void clear() { memset(this, 0, sizeof(FrSkyAlarmData)); }
|
||||
};
|
||||
|
||||
class FrSkyRSSIAlarm {
|
||||
class RSSIAlarmData {
|
||||
public:
|
||||
FrSkyRSSIAlarm() { clear(0, 50); }
|
||||
unsigned int level;
|
||||
int value;
|
||||
void clear(unsigned int level, int value) { this->level = level; this->value = value;}
|
||||
RSSIAlarmData() { clear(); }
|
||||
unsigned int level[2]; // AVR Only
|
||||
int warning;
|
||||
int critical;
|
||||
bool disabled;
|
||||
void clear() {
|
||||
this->level[0] = 2;
|
||||
this->level[1] = 3;
|
||||
this->warning = 42;
|
||||
this->critical = 45;
|
||||
this->disabled = false;
|
||||
}
|
||||
};
|
||||
|
||||
class FrSkyChannelData {
|
||||
@@ -703,7 +711,6 @@ class FrSkyData {
|
||||
unsigned int altitudeSource;
|
||||
unsigned int currentSource;
|
||||
FrSkyScreenData screens[4];
|
||||
FrSkyRSSIAlarm rssiAlarms[2];
|
||||
unsigned int varioSource;
|
||||
bool varioCenterSilent;
|
||||
int varioMin;
|
||||
@@ -1066,6 +1073,7 @@ class ModelData {
|
||||
MavlinkData mavlink;
|
||||
unsigned int telemetryProtocol;
|
||||
FrSkyData frsky;
|
||||
RSSIAlarmData rssiAlarms;
|
||||
|
||||
char bitmap[10+1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user