1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Merge pull request #8730 from joelucid/erpm_cli

report erpm, rpm and hz for convenience in dshot_telemetry_info
This commit is contained in:
Michael Keller 2019-08-18 23:21:28 +12:00 committed by GitHub
commit c961c6c557
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5840,14 +5840,17 @@ static void cliDshotTelemetryInfo(char *cmdline)
cliPrintLinefeed();
#ifdef USE_DSHOT_TELEMETRY_STATS
cliPrintLine("Motor RPM Invalid");
cliPrintLine("===== ===== =======");
cliPrintLine("Motor eRPM RPM Hz Invalid");
cliPrintLine("===== ======= ====== ===== =======");
#else
cliPrintLine("Motor RPM");
cliPrintLine("===== =====");
cliPrintLine("Motor eRPM RPM Hz");
cliPrintLine("===== ======= ====== =====");
#endif
for (uint8_t i = 0; i < getMotorCount(); i++) {
cliPrintf("%5d %5d ", i, (int)getDshotTelemetry(i));
cliPrintf("%5d %7d %6d %5d ", i,
(int)getDshotTelemetry(i) * 100,
(int)getDshotTelemetry(i) * 100 * 2 / motorConfig()->motorPoleCount,
(int)getDshotTelemetry(i) * 100 * 2 / motorConfig()->motorPoleCount / 60);
#ifdef USE_DSHOT_TELEMETRY_STATS
if (isDshotMotorTelemetryActive(i)) {
const int calcPercent = getDshotTelemetryMotorInvalidPercent(i);