TMC connection test, spreadCycle parameters, improved debugging (#12616)
This commit is contained in:
committed by
Scott Lahteine
parent
97de9d54a5
commit
55144284c2
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(TMC_DEBUG)
|
||||
#if HAS_TRINAMIC
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/tmc_util.h"
|
||||
@ -31,14 +31,25 @@
|
||||
* M122: Debug TMC drivers
|
||||
*/
|
||||
void GcodeSuite::M122() {
|
||||
bool print_axis[XYZE] = { false, false, false, false },
|
||||
print_all = true;
|
||||
LOOP_XYZE(i) if (parser.seen(axis_codes[i])) { print_axis[i] = true; print_all = false; }
|
||||
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
if (parser.seen('S'))
|
||||
tmc_set_report_status(parser.value_bool());
|
||||
if (print_all) LOOP_XYZE(i) print_axis[i] = true;
|
||||
|
||||
#if ENABLED(TMC_DEBUG)
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
if (parser.seen('S'))
|
||||
tmc_set_report_status(parser.value_bool());
|
||||
#endif
|
||||
|
||||
if (parser.seen('V'))
|
||||
tmc_get_registers(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]);
|
||||
else
|
||||
tmc_report_all(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]);
|
||||
#endif
|
||||
tmc_report_all();
|
||||
|
||||
test_tmc_connection(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]);
|
||||
}
|
||||
|
||||
#endif // TMC_DEBUG
|
||||
#endif // HAS_TRINAMIC
|
||||
|
Reference in New Issue
Block a user