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

Implement tuning sliders, add to CMS, MSP

This commit is contained in:
IvoFPV 2019-10-11 18:43:10 +02:00 committed by Michael Keller
parent 3f116fd103
commit cff19dc113
14 changed files with 443 additions and 35 deletions

View file

@ -57,6 +57,7 @@ bool cliMode = false;
#include "config/config.h"
#include "config/config_eeprom.h"
#include "config/feature.h"
#include "config/tuning_sliders.h"
#include "drivers/accgyro/accgyro.h"
#include "drivers/adc.h"
@ -3093,6 +3094,17 @@ static void cliVtxInfo(const char *cmdName, char *cmdline)
}
#endif // USE_VTX_TABLE
#ifdef USE_TUNING_SLIDERS
static void cliTuningSliders(const char *cmdName, char *cmdline)
{
UNUSED(cmdName);
UNUSED(cmdline);
applyTuningSliders(currentPidProfile);
cliPrintLine("Applied tuning slider calculation");
}
#endif
static void printName(dumpFlags_t dumpMask, const pilotConfig_t *pilotConfig)
{
const bool equalsDefault = strlen(pilotConfig->name) == 0;
@ -6391,6 +6403,9 @@ static void cliHelp(const char *cmdName, char *cmdline);
// should be sorted a..z for bsearch()
const clicmd_t cmdTable[] = {
CLI_COMMAND_DEF("adjrange", "configure adjustment ranges", "<index> <unused> <range channel> <start> <end> <function> <select channel> [<center> <scale>]", cliAdjustmentRange),
#ifdef USE_TUNING_SLIDERS
CLI_COMMAND_DEF("apply_tuning_sliders", "applies tuning sliders calculation based on slider positions", NULL, cliTuningSliders),
#endif
CLI_COMMAND_DEF("aux", "configure modes", "<index> <mode> <aux> <start> <end> <logic>", cliAux),
#ifdef USE_CLI_BATCH
CLI_COMMAND_DEF("batch", "start or end a batch of commands", "start | end", cliBatch),