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

Initial commit for implementation of autotune.

This commit is contained in:
Dominic Clifton 2014-05-27 00:33:28 +01:00
parent 49c283fe59
commit f7c38af7fc
10 changed files with 184 additions and 3 deletions

View file

@ -139,6 +139,7 @@ struct box_t {
{ BOXGOV, "GOVERNOR;", 18 },
{ BOXOSD, "OSD SW;", 19 },
{ BOXTELEMETRY, "TELEMETRY;", 20 },
{ BOXAUTOTUNE, "AUTOTUNE;", 21 },
{ CHECKBOX_ITEM_COUNT, NULL, 0xFF }
};
@ -367,6 +368,8 @@ void mspInit(serialConfig_t *serialConfig)
if (feature(FEATURE_TELEMETRY && masterConfig.telemetryConfig.telemetry_switch))
availableBoxes[idx++] = BOXTELEMETRY;
availableBoxes[idx++] = BOXAUTOTUNE;
numberBoxItems = idx;
openAllMSPSerialPorts(serialConfig);
@ -513,6 +516,7 @@ static void evaluateCommand(void)
rcOptions[BOXGOV] << BOXGOV |
rcOptions[BOXOSD] << BOXOSD |
rcOptions[BOXTELEMETRY] << BOXTELEMETRY |
rcOptions[BOXAUTOTUNE] << BOXAUTOTUNE |
f.ARMED << BOXARM;
for (i = 0; i < numberBoxItems; i++) {
int flag = (tmp & (1 << availableBoxes[i]));