1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Start Frsky telemetry using a switch without beeing armed.

This adds a Telemetry checkbox in the gui.
This commit is contained in:
KipK 2014-01-15 14:53:03 +01:00
parent 8c4a594808
commit e6889aea12
3 changed files with 7 additions and 2 deletions

View file

@ -84,6 +84,7 @@ struct box_t {
{ BOXCALIB, "CALIB;", 17 },
{ BOXGOV, "GOVERNOR;", 18 },
{ BOXOSD, "OSD SW;", 19 },
{ BOXTELEMETRY, "TELEMETRY;", 20 },
{ CHECKBOXITEMS, NULL, 0xFF }
};
@ -265,6 +266,8 @@ void serialInit(uint32_t baudrate)
if (feature(FEATURE_INFLIGHT_ACC_CAL))
availableBoxes[idx++] = BOXCALIB;
availableBoxes[idx++] = BOXOSD;
if (feature(FEATURE_TELEMETRY))
availableBoxes[idx++] = BOXTELEMETRY;
numberBoxItems = idx;
}
@ -379,6 +382,7 @@ static void evaluateCommand(void)
rcOptions[BOXCALIB] << BOXCALIB |
rcOptions[BOXGOV] << BOXGOV |
rcOptions[BOXOSD] << BOXOSD |
rcOptions[BOXTELEMETRY] << BOXTELEMETRY |
f.ARMED << BOXARM;
for (i = 0; i < numberBoxItems; i++) {
int flag = (tmp & (1 << availableBoxes[i]));