diff --git a/radio/src/cli.cpp b/radio/src/cli.cpp index 57fab5fd8..e38f41f6b 100644 --- a/radio/src/cli.cpp +++ b/radio/src/cli.cpp @@ -157,7 +157,6 @@ int cliStackInfo(const char ** argv) return 0; } - int cliMemoryInfo(const char ** argv) { // struct mallinfo { @@ -400,6 +399,24 @@ int cliRepeat(const char ** argv) return 0; } +#if defined(JITTER_MEASURE) +int cliShowJitter(const char ** argv) +{ + serialPrint( "# anaIn rawJ avgJ"); + for (int i=0; icount; j++) { + serialPrint(" s%d %04X", j, calib->steps[j]); + } + } + } + return 0; +} +#endif + + const CliCommand cliCommands[] = { { "beep", cliBeep, "[] []" }, { "ls", cliLs, "" }, @@ -417,6 +434,9 @@ const CliCommand cliCommands[] = { { "help", cliHelp, "[]" }, { "debugvars", cliDebugVars, "" }, { "repeat", cliRepeat, " " }, +#if defined(JITTER_MEASURE) + { "jitter", cliShowJitter, "" }, +#endif { NULL, NULL, NULL } /* sentinel */ }; diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index c95c002b6..55ea6eaa5 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1490,7 +1490,11 @@ uint16_t BandGap ; JitterMeter rawJitter[NUMBER_ANALOG]; JitterMeter avgJitter[NUMBER_ANALOG]; tmr10ms_t jitterResetTime = 0; -#define JITTER_MEASURE_ACTIVE() (menuHandlers[menuLevel] == menuGeneralDiagAna) + #if defined(PCBTARANIS) + #define JITTER_MEASURE_ACTIVE() (menuHandlers[menuLevel] == menuGeneralDiagAna) + #elif defined(CLI) + #define JITTER_MEASURE_ACTIVE() (1) + #endif #endif // defined(JITTER_MEASURE) #if !defined(SIMU)