From 564ebfc48daebfe1c83009665a3283f6616e38dd Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Sat, 14 Dec 2019 16:30:00 -0500 Subject: [PATCH] Fix CLI rc_smoothing_info frame rate display formatting The formatting of the fractional part of the frame interval was not correct. For example 9004us would be displayed as 9.4ms instead of 9.004ms. --- src/main/cli/cli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 8c06ce4ce4..c0fc026eab 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -4807,13 +4807,13 @@ static void cliRcSmoothing(char *cmdline) cliPrint("# RC Smoothing Type: "); if (rxConfig()->rc_smoothing_type == RC_SMOOTHING_TYPE_FILTER) { cliPrintLine("FILTER"); - uint16_t avgRxFrameMs = rcSmoothingData->averageFrameTimeUs; if (rcSmoothingAutoCalculate()) { + const uint16_t avgRxFrameUs = rcSmoothingData->averageFrameTimeUs; cliPrint("# Detected RX frame rate: "); - if (avgRxFrameMs == 0) { + if (avgRxFrameUs == 0) { cliPrintLine("NO SIGNAL"); } else { - cliPrintLinef("%d.%dms", avgRxFrameMs / 1000, avgRxFrameMs % 1000); + cliPrintLinef("%d.%03dms", avgRxFrameUs / 1000, avgRxFrameUs % 1000); } } cliPrintLinef("# Input filter type: %s", lookupTables[TABLE_RC_SMOOTHING_INPUT_TYPE].values[rcSmoothingData->inputFilterType]);