🚸 Set M122 interval only with S0 or Pn
This commit is contained in:
parent
eafd0ed765
commit
418743cf6a
@ -43,10 +43,13 @@ void GcodeSuite::M122() {
|
|||||||
|
|
||||||
#if ENABLED(TMC_DEBUG)
|
#if ENABLED(TMC_DEBUG)
|
||||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||||
uint16_t interval = MONITOR_DRIVER_STATUS_INTERVAL_MS;
|
const bool sflag = parser.seen_test('S'), sval = sflag && parser.value_bool();
|
||||||
if (parser.seen('S') && !parser.value_bool()) interval = 0;
|
if (sflag && !sval)
|
||||||
if (parser.seenval('P')) NOMORE(interval, parser.value_ushort());
|
tmc_set_report_interval(0);
|
||||||
tmc_set_report_interval(interval);
|
else if (parser.seenval('P'))
|
||||||
|
tmc_set_report_interval(_MAX(250, parser.value_ushort()));
|
||||||
|
else if (sval)
|
||||||
|
tmc_set_report_interval(MONITOR_DRIVER_STATUS_INTERVAL_MS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (parser.seen_test('V'))
|
if (parser.seen_test('V'))
|
||||||
|
Loading…
Reference in New Issue
Block a user