mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge branch 'master' into development
This commit is contained in:
commit
d45fcdd9ae
6 changed files with 51 additions and 66 deletions
|
@ -451,6 +451,7 @@ static const char * const lookupTableAccHardware[] = {
|
|||
"LSM303DLHC",
|
||||
"MPU6000",
|
||||
"MPU6500",
|
||||
"MPU9250",
|
||||
"FAKE"
|
||||
};
|
||||
|
||||
|
@ -790,8 +791,8 @@ const clivalue_t valueTable[] = {
|
|||
{ "servo_lowpass_enable", VAR_INT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.mixerConfig.servo_lowpass_enable, .config.lookup = { TABLE_OFF_ON } },
|
||||
#endif
|
||||
|
||||
{ "rc_rate", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcRate8, .config.minmax = { 0, 300 } },
|
||||
{ "rc_rate_yaw", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcYawRate8, .config.minmax = { 0, 300 } },
|
||||
{ "rc_rate", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcRate8, .config.minmax = { 0, 255 } },
|
||||
{ "rc_rate_yaw", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcYawRate8, .config.minmax = { 0, 255 } },
|
||||
{ "rc_expo", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcExpo8, .config.minmax = { 0, 100 } },
|
||||
{ "rc_yaw_expo", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcYawExpo8, .config.minmax = { 0, 100 } },
|
||||
{ "thr_mid", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].thrMid8, .config.minmax = { 0, 100 } },
|
||||
|
@ -842,7 +843,7 @@ const clivalue_t valueTable[] = {
|
|||
{ "dterm_notch_hz", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.dterm_notch_hz, .config.minmax = { 0, 500 } },
|
||||
{ "dterm_notch_cutoff", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.dterm_notch_cutoff, .config.minmax = { 1, 500 } },
|
||||
{ "vbat_pid_compensation", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.vbatPidCompensation, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "zero_throttle_stabilisation",VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.zeroThrottleStabilisation, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "pid_at_min_throttle", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.pidAtMinThrottle, .config.lookup = { TABLE_OFF_ON } },
|
||||
{ "pid_tolerance_band", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.toleranceBand, .config.minmax = {0, 200 } },
|
||||
{ "tolerance_band_reduction", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.toleranceBandReduction, .config.minmax = {0, 100 } },
|
||||
{ "zero_cross_allowance", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.zeroCrossAllowanceCount, .config.minmax = {0, 50 } },
|
||||
|
@ -927,7 +928,6 @@ const clivalue_t valueTable[] = {
|
|||
|
||||
#define VALUE_COUNT (sizeof(valueTable) / sizeof(clivalue_t))
|
||||
|
||||
|
||||
typedef union {
|
||||
int32_t int_value;
|
||||
float float_value;
|
||||
|
@ -940,8 +940,6 @@ static void cliPrint(const char *str);
|
|||
static void cliPrintf(const char *fmt, ...);
|
||||
static void cliWrite(uint8_t ch);
|
||||
|
||||
#define printSectionBreak() cliPrintf((char *)sectionBreak)
|
||||
|
||||
#define COMPARE_CONFIG(value) (masterConfig.value == defaultConfig.value)
|
||||
static bool cliDumpPrintf(uint8_t dumpMask, bool equalsDefault, const char *format, ...);
|
||||
|
||||
|
@ -1731,8 +1729,6 @@ static void printServo(uint8_t dumpMask, master_t *defaultConfig)
|
|||
);
|
||||
}
|
||||
|
||||
printSectionBreak();
|
||||
|
||||
// print servo directions
|
||||
unsigned int channel;
|
||||
for (i = 0; i < MAX_SUPPORTED_SERVOS; i++) {
|
||||
|
@ -2022,10 +2018,9 @@ static void cliSdInfo(char *cmdline) {
|
|||
; // Nothing more detailed to print
|
||||
break;
|
||||
}
|
||||
|
||||
cliPrint("\r\n");
|
||||
break;
|
||||
}
|
||||
cliPrint("\r\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2326,14 +2321,12 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
if ((dumpMask & DUMP_MASTER) || (dumpMask & DUMP_ALL)) {
|
||||
cliPrint("\r\n# version\r\n");
|
||||
cliVersion(NULL);
|
||||
cliPrint("\r\n");
|
||||
|
||||
if ((dumpMask & (DUMP_ALL | DO_DIFF)) == (DUMP_ALL | DO_DIFF)) {
|
||||
cliPrint("\r\n# reset configuration to default settings\r\ndefaults\r\n");
|
||||
}
|
||||
|
||||
printSectionBreak();
|
||||
cliPrint("# name\r\n");
|
||||
cliPrint("\r\n# name\r\n");
|
||||
printName(dumpMask);
|
||||
|
||||
cliPrint("\r\n# mixer\r\n");
|
||||
|
@ -2460,7 +2453,7 @@ static void printConfig(char *cmdline, bool doDiff)
|
|||
cliPrint("\r\n# adjrange\r\n");
|
||||
printAdjustmentRange(dumpMask, &defaultConfig);
|
||||
|
||||
cliPrintf("\r\n# rxrange\r\n");
|
||||
cliPrint("\r\n# rxrange\r\n");
|
||||
printRxRange(dumpMask, &defaultConfig);
|
||||
|
||||
#ifdef USE_SERVOS
|
||||
|
@ -2519,26 +2512,19 @@ static void cliDumpProfile(uint8_t profileIndex, uint8_t dumpMask, master_t *def
|
|||
{
|
||||
if (profileIndex >= MAX_PROFILE_COUNT) // Faulty values
|
||||
return;
|
||||
|
||||
changeProfile(profileIndex);
|
||||
cliPrint("\r\n# profile\r\n");
|
||||
cliProfile("");
|
||||
|
||||
printSectionBreak();
|
||||
dumpValues(PROFILE_VALUE, dumpMask, defaultConfig);
|
||||
|
||||
cliRateProfile("");
|
||||
}
|
||||
|
||||
static void cliDumpRateProfile(uint8_t rateProfileIndex, uint8_t dumpMask, master_t *defaultConfig)
|
||||
{
|
||||
if (rateProfileIndex >= MAX_RATEPROFILES) // Faulty values
|
||||
return;
|
||||
return;
|
||||
changeControlRateProfile(rateProfileIndex);
|
||||
cliPrint("\r\n# rateprofile\r\n");
|
||||
cliRateProfile("");
|
||||
printSectionBreak();
|
||||
|
||||
dumpValues(PROFILE_RATE_VALUE, dumpMask, defaultConfig);
|
||||
}
|
||||
|
||||
|
@ -3338,7 +3324,7 @@ static void cliVersion(char *cmdline)
|
|||
{
|
||||
UNUSED(cmdline);
|
||||
|
||||
cliPrintf("# BetaFlight/%s %s %s / %s (%s)",
|
||||
cliPrintf("# BetaFlight/%s %s %s / %s (%s)\r\n",
|
||||
targetName,
|
||||
FC_VERSION_STRING,
|
||||
buildDate,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue