diff --git a/.gitignore b/.gitignore index 34dd269dd7..245d33be92 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ *.dep *.bak *.uvgui.* +*.swp +*.save .project .settings .cproject diff --git a/.testThrottle.c.swp b/.testThrottle.c.swp deleted file mode 100644 index d53eb7fc58..0000000000 Binary files a/.testThrottle.c.swp and /dev/null differ diff --git a/src/main/io/i2c_bst.c b/src/main/io/i2c_bst.c index c31fcf3e5a..f45628ca9d 100644 --- a/src/main/io/i2c_bst.c +++ b/src/main/io/i2c_bst.c @@ -1705,7 +1705,7 @@ bool writeFCModeToBST(void) IS_ENABLED(FLIGHT_MODE(HORIZON_MODE)) << 2 | IS_ENABLED(FLIGHT_MODE(BARO_MODE)) << 3 | IS_ENABLED(FLIGHT_MODE(MAG_MODE)) << 4 | - IS_ENABLED(FLIGHT_MODE(HEADFREE_MODE)) << 5 | + IS_ENABLED(IS_RC_MODE_ACTIVE(BOXAIRMODE)) << 5 | IS_ENABLED(FLIGHT_MODE(SONAR_MODE)) << 6 | IS_ENABLED(FLIGHT_MODE(FAILSAFE_MODE)) << 7; diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 641e9ec2cd..b9e194c003 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -110,6 +110,8 @@ static void cliAdjustmentRange(char *cmdline); static void cliMotorMix(char *cmdline); static void cliDefaults(char *cmdline); static void cliDump(char *cmdLine); +void cliDumpProfile(uint8_t profileIndex); +void cliDumpRateProfile(uint8_t rateProfileIndex) ; static void cliExit(char *cmdline); static void cliFeature(char *cmdline); static void cliMotor(char *cmdline); @@ -1818,8 +1820,6 @@ typedef enum { DUMP_RATES = (1 << 2), } dumpFlags_e; -#define DUMP_ALL (DUMP_MASTER | DUMP_PROFILE | DUMP_RATES) - static const char* const sectionBreak = "\r\n"; @@ -1835,7 +1835,7 @@ static void cliDump(char *cmdline) float thr, roll, pitch, yaw; #endif - uint8_t dumpMask = DUMP_ALL; + uint8_t dumpMask = DUMP_MASTER; if (strcasecmp(cmdline, "master") == 0) { dumpMask = DUMP_MASTER; // only } @@ -1930,7 +1930,7 @@ static void cliDump(char *cmdline) if (mask & (1 << i)) cliPrintf("beeper -%s\r\n", beeperNameForTableIndex(i)); else - cliPrintf("beeper %s\r\n", beeperNameForTableIndex(i)); + cliPrintf("beeper %s\r\n", beeperNameForTableIndex(i)); } #endif @@ -1987,38 +1987,56 @@ static void cliDump(char *cmdline) cliPrint("\r\n# rxfail\r\n"); cliRxFail(""); + + uint8_t activeProfile = masterConfig.current_profile_index; + uint8_t i; + for (i=0; iactiveRateProfile); } } +void cliDumpProfile(uint8_t profileIndex) { + if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values + return; + + changeProfile(profileIndex); + cliPrint("\r\n# profile\r\n"); + cliProfile(""); + printSectionBreak(); + dumpValues(PROFILE_VALUE); + uint8_t currentRateIndex = currentProfile->activeRateProfile; + uint8_t i; + for (i=0; i= MAX_RATEPROFILES) // Faulty values + return; + + changeControlRateProfile(rateProfileIndex); + cliPrint("\r\n# rateprofile\r\n"); + cliRateProfile(""); + printSectionBreak(); + + dumpValues(PROFILE_RATE_VALUE); + +} void cliEnter(serialPort_t *serialPort) { cliMode = 1; diff --git a/testThrottle.c.save b/testThrottle.c.save deleted file mode 100644 index 51cab990bc..0000000000 --- a/testThrottle.c.save +++ /dev/null @@ -1,5 +0,0 @@ -#include "stdint.h" -#include "stdio.h" - - -int main()