mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
cleaner cli dump output
This commit is contained in:
parent
87a06b55f9
commit
ba2d8d115f
1 changed files with 17 additions and 32 deletions
|
@ -2006,9 +2006,10 @@ static void cliDump(char *cmdline)
|
||||||
cliPrint("\r\n# version\r\n");
|
cliPrint("\r\n# version\r\n");
|
||||||
cliVersion(NULL);
|
cliVersion(NULL);
|
||||||
|
|
||||||
|
printSectionBreak();
|
||||||
cliPrint("\r\n# name\r\n");
|
cliPrint("\r\n# name\r\n");
|
||||||
cliName(NULL);
|
cliName(NULL);
|
||||||
cliPrint("\r\n# dump master\r\n");
|
|
||||||
cliPrint("\r\n# mixer\r\n");
|
cliPrint("\r\n# mixer\r\n");
|
||||||
|
|
||||||
#ifndef USE_QUAD_MIXER_ONLY
|
#ifndef USE_QUAD_MIXER_ONLY
|
||||||
|
@ -2069,8 +2070,7 @@ static void cliDump(char *cmdline)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cliPrint("\r\n\r\n# feature\r\n");
|
cliPrint("\r\n# feature\r\n");
|
||||||
|
|
||||||
mask = featureMask();
|
mask = featureMask();
|
||||||
for (i = 0; ; i++) { // disable all feature first
|
for (i = 0; ; i++) { // disable all feature first
|
||||||
if (featureNames[i] == NULL)
|
if (featureNames[i] == NULL)
|
||||||
|
@ -2090,10 +2090,8 @@ static void cliDump(char *cmdline)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef BEEPER
|
#ifdef BEEPER
|
||||||
cliPrint("\r\n\r\n# beeper\r\n");
|
cliPrint("\r\n# beeper\r\n");
|
||||||
|
|
||||||
uint8_t beeperCount = beeperTableEntryCount();
|
uint8_t beeperCount = beeperTableEntryCount();
|
||||||
mask = getBeeperOffMask();
|
mask = getBeeperOffMask();
|
||||||
for (int i = 0; i < (beeperCount-2); i++) {
|
for (int i = 0; i < (beeperCount-2); i++) {
|
||||||
|
@ -2104,43 +2102,38 @@ static void cliDump(char *cmdline)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cliPrint("\r\n# map\r\n");
|
||||||
cliPrint("\r\n\r\n# map\r\n");
|
|
||||||
|
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
buf[masterConfig.rxConfig.rcmap[i]] = rcChannelLetters[i];
|
buf[masterConfig.rxConfig.rcmap[i]] = rcChannelLetters[i];
|
||||||
buf[i] = '\0';
|
buf[i] = '\0';
|
||||||
cliPrintf("map %s\r\n", buf);
|
cliPrintf("map %s\r\n", buf);
|
||||||
|
|
||||||
cliPrint("\r\n\r\n# serial\r\n");
|
cliPrint("\r\n# serial\r\n");
|
||||||
cliSerial("");
|
cliSerial("");
|
||||||
|
|
||||||
#ifdef LED_STRIP
|
#ifdef LED_STRIP
|
||||||
cliPrint("\r\n\r\n# led\r\n");
|
cliPrint("\r\n# led\r\n");
|
||||||
cliLed("");
|
cliLed("");
|
||||||
|
|
||||||
cliPrint("\r\n\r\n# color\r\n");
|
cliPrint("\r\n# color\r\n");
|
||||||
cliColor("");
|
cliColor("");
|
||||||
|
|
||||||
cliPrint("\r\n\r\n# mode_color\r\n");
|
cliPrint("\r\n# mode_color\r\n");
|
||||||
cliModeColor("");
|
cliModeColor("");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cliPrint("\r\n# aux\r\n");
|
cliPrint("\r\n# aux\r\n");
|
||||||
|
|
||||||
cliAux("");
|
cliAux("");
|
||||||
|
|
||||||
cliPrint("\r\n# adjrange\r\n");
|
cliPrint("\r\n# adjrange\r\n");
|
||||||
|
|
||||||
cliAdjustmentRange("");
|
cliAdjustmentRange("");
|
||||||
|
|
||||||
cliPrintf("\r\n# rxrange\r\n");
|
cliPrintf("\r\n# rxrange\r\n");
|
||||||
|
|
||||||
cliRxRange("");
|
cliRxRange("");
|
||||||
|
|
||||||
#ifdef USE_SERVOS
|
#ifdef USE_SERVOS
|
||||||
cliPrint("\r\n# servo\r\n");
|
cliPrint("\r\n# servo\r\n");
|
||||||
|
|
||||||
cliServo("");
|
cliServo("");
|
||||||
|
|
||||||
// print servo directions
|
// print servo directions
|
||||||
|
@ -2160,11 +2153,10 @@ static void cliDump(char *cmdline)
|
||||||
|
|
||||||
#ifdef VTX
|
#ifdef VTX
|
||||||
cliPrint("\r\n# vtx\r\n");
|
cliPrint("\r\n# vtx\r\n");
|
||||||
|
|
||||||
cliVtx("");
|
cliVtx("");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printSectionBreak();
|
cliPrint("\r\n# dump master\r\n");
|
||||||
dumpValues(MASTER_VALUE);
|
dumpValues(MASTER_VALUE);
|
||||||
|
|
||||||
cliPrint("\r\n# rxfail\r\n");
|
cliPrint("\r\n# rxfail\r\n");
|
||||||
|
@ -2216,28 +2208,21 @@ void cliDumpProfile(uint8_t profileIndex)
|
||||||
{
|
{
|
||||||
if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values
|
if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values
|
||||||
return;
|
return;
|
||||||
|
|
||||||
changeProfile(profileIndex);
|
changeProfile(profileIndex);
|
||||||
cliPrint("\r\n# profile\r\n");
|
cliPrint("\r\n# profile\r\n");
|
||||||
cliProfile("");
|
cliProfile("");
|
||||||
cliPrintf("############################# PROFILE VALUES ####################################\r\n");
|
|
||||||
|
|
||||||
printSectionBreak();
|
printSectionBreak();
|
||||||
dumpValues(PROFILE_VALUE);
|
dumpValues(PROFILE_VALUE);
|
||||||
|
|
||||||
cliRateProfile("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cliDumpRateProfile(uint8_t rateProfileIndex)
|
void cliDumpRateProfile(uint8_t rateProfileIndex)
|
||||||
{
|
{
|
||||||
if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values
|
if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values
|
||||||
return;
|
return;
|
||||||
|
|
||||||
changeControlRateProfile(rateProfileIndex);
|
changeControlRateProfile(rateProfileIndex);
|
||||||
cliPrint("\r\n# rateprofile\r\n");
|
cliPrint("\r\n# rateprofile\r\n");
|
||||||
cliRateProfile("");
|
cliRateProfile("");
|
||||||
printSectionBreak();
|
printSectionBreak();
|
||||||
|
|
||||||
dumpValues(PROFILE_RATE_VALUE);
|
dumpValues(PROFILE_RATE_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue