mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
report erpm, rpm and hz for convenience in dshot_telemetry_info
This commit is contained in:
parent
f1cd99e6b6
commit
0d73d51ba8
1 changed files with 8 additions and 5 deletions
|
@ -5840,14 +5840,17 @@ static void cliDshotTelemetryInfo(char *cmdline)
|
||||||
cliPrintLinefeed();
|
cliPrintLinefeed();
|
||||||
|
|
||||||
#ifdef USE_DSHOT_TELEMETRY_STATS
|
#ifdef USE_DSHOT_TELEMETRY_STATS
|
||||||
cliPrintLine("Motor RPM Invalid");
|
cliPrintLine("Motor eRPM RPM Hz Invalid");
|
||||||
cliPrintLine("===== ===== =======");
|
cliPrintLine("===== ======= ====== ===== =======");
|
||||||
#else
|
#else
|
||||||
cliPrintLine("Motor RPM");
|
cliPrintLine("Motor eRPM RPM Hz");
|
||||||
cliPrintLine("===== =====");
|
cliPrintLine("===== ======= ====== =====");
|
||||||
#endif
|
#endif
|
||||||
for (uint8_t i = 0; i < getMotorCount(); i++) {
|
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
|
#ifdef USE_DSHOT_TELEMETRY_STATS
|
||||||
if (isDshotMotorTelemetryActive(i)) {
|
if (isDshotMotorTelemetryActive(i)) {
|
||||||
const int calcPercent = getDshotTelemetryMotorInvalidPercent(i);
|
const int calcPercent = getDshotTelemetryMotorInvalidPercent(i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue