Show analog jitter measuring results and multipos calibration in CLI
This commit is contained in:
+21
-1
@@ -157,7 +157,6 @@ int cliStackInfo(const char ** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int cliMemoryInfo(const char ** argv)
|
int cliMemoryInfo(const char ** argv)
|
||||||
{
|
{
|
||||||
// struct mallinfo {
|
// struct mallinfo {
|
||||||
@@ -400,6 +399,24 @@ int cliRepeat(const char ** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(JITTER_MEASURE)
|
||||||
|
int cliShowJitter(const char ** argv)
|
||||||
|
{
|
||||||
|
serialPrint( "# anaIn rawJ avgJ");
|
||||||
|
for (int i=0; i<NUMBER_ANALOG; i++) {
|
||||||
|
serialPrint("A%02d %04X %3d %3d", i, anaIn(i), rawJitter[i].get(), avgJitter[i].get());
|
||||||
|
if (IS_POT_MULTIPOS(i)) {
|
||||||
|
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[i];
|
||||||
|
for (int j=0; j<calib->count; j++) {
|
||||||
|
serialPrint(" s%d %04X", j, calib->steps[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const CliCommand cliCommands[] = {
|
const CliCommand cliCommands[] = {
|
||||||
{ "beep", cliBeep, "[<frequency>] [<duration>]" },
|
{ "beep", cliBeep, "[<frequency>] [<duration>]" },
|
||||||
{ "ls", cliLs, "<directory>" },
|
{ "ls", cliLs, "<directory>" },
|
||||||
@@ -417,6 +434,9 @@ const CliCommand cliCommands[] = {
|
|||||||
{ "help", cliHelp, "[<command>]" },
|
{ "help", cliHelp, "[<command>]" },
|
||||||
{ "debugvars", cliDebugVars, "" },
|
{ "debugvars", cliDebugVars, "" },
|
||||||
{ "repeat", cliRepeat, "<interval> <command>" },
|
{ "repeat", cliRepeat, "<interval> <command>" },
|
||||||
|
#if defined(JITTER_MEASURE)
|
||||||
|
{ "jitter", cliShowJitter, "" },
|
||||||
|
#endif
|
||||||
{ NULL, NULL, NULL } /* sentinel */
|
{ NULL, NULL, NULL } /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1490,7 +1490,11 @@ uint16_t BandGap ;
|
|||||||
JitterMeter<uint16_t> rawJitter[NUMBER_ANALOG];
|
JitterMeter<uint16_t> rawJitter[NUMBER_ANALOG];
|
||||||
JitterMeter<uint16_t> avgJitter[NUMBER_ANALOG];
|
JitterMeter<uint16_t> avgJitter[NUMBER_ANALOG];
|
||||||
tmr10ms_t jitterResetTime = 0;
|
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)
|
#endif // defined(JITTER_MEASURE)
|
||||||
|
|
||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
|
|||||||
Reference in New Issue
Block a user