mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Use RC Smoothing initialized settings rather than current PG values (#8282)
Use RC Smoothing initialized settings rather than current PG values
This commit is contained in:
commit
7cd030559d
10 changed files with 94 additions and 59 deletions
|
@ -4453,10 +4453,11 @@ static void cliVersion(char *cmdline)
|
|||
static void cliRcSmoothing(char *cmdline)
|
||||
{
|
||||
UNUSED(cmdline);
|
||||
rcSmoothingFilter_t *rcSmoothingData = getRcSmoothingData();
|
||||
cliPrint("# RC Smoothing Type: ");
|
||||
if (rxConfig()->rc_smoothing_type == RC_SMOOTHING_TYPE_FILTER) {
|
||||
cliPrintLine("FILTER");
|
||||
uint16_t avgRxFrameMs = rcSmoothingGetValue(RC_SMOOTHING_VALUE_AVERAGE_FRAME);
|
||||
uint16_t avgRxFrameMs = rcSmoothingData->averageFrameTimeUs;
|
||||
if (rcSmoothingAutoCalculate()) {
|
||||
cliPrint("# Detected RX frame rate: ");
|
||||
if (avgRxFrameMs == 0) {
|
||||
|
@ -4466,20 +4467,20 @@ static void cliRcSmoothing(char *cmdline)
|
|||
}
|
||||
}
|
||||
cliPrint("# Input filter type: ");
|
||||
cliPrintLinef(lookupTables[TABLE_RC_SMOOTHING_INPUT_TYPE].values[rxConfig()->rc_smoothing_input_type]);
|
||||
cliPrintf("# Active input cutoff: %dhz ", rcSmoothingGetValue(RC_SMOOTHING_VALUE_INPUT_ACTIVE));
|
||||
if (rxConfig()->rc_smoothing_input_cutoff == 0) {
|
||||
cliPrintLinef(lookupTables[TABLE_RC_SMOOTHING_INPUT_TYPE].values[rcSmoothingData->inputFilterType]);
|
||||
cliPrintf("# Active input cutoff: %dhz ", rcSmoothingData->inputCutoffFrequency);
|
||||
if (rcSmoothingData->inputCutoffSetting == 0) {
|
||||
cliPrintLine("(auto)");
|
||||
} else {
|
||||
cliPrintLine("(manual)");
|
||||
}
|
||||
cliPrint("# Derivative filter type: ");
|
||||
cliPrintLinef(lookupTables[TABLE_RC_SMOOTHING_DERIVATIVE_TYPE].values[rxConfig()->rc_smoothing_derivative_type]);
|
||||
cliPrintf("# Active derivative cutoff: %dhz (", rcSmoothingGetValue(RC_SMOOTHING_VALUE_DERIVATIVE_ACTIVE));
|
||||
if (rxConfig()->rc_smoothing_derivative_type == RC_SMOOTHING_DERIVATIVE_OFF) {
|
||||
cliPrintLinef(lookupTables[TABLE_RC_SMOOTHING_DERIVATIVE_TYPE].values[rcSmoothingData->derivativeFilterType]);
|
||||
cliPrintf("# Active derivative cutoff: %dhz (", rcSmoothingData->derivativeCutoffFrequency);
|
||||
if (rcSmoothingData->derivativeFilterType == RC_SMOOTHING_DERIVATIVE_OFF) {
|
||||
cliPrintLine("off)");
|
||||
} else {
|
||||
if (rxConfig()->rc_smoothing_derivative_cutoff == 0) {
|
||||
if (rcSmoothingData->derivativeCutoffSetting == 0) {
|
||||
cliPrintLine("auto)");
|
||||
} else {
|
||||
cliPrintLine("manual)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue