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
|
||||
|
@ -650,9 +650,7 @@ void GcodeSuite::process_parsed_command(
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
#if ENABLED(TMC_DEBUG)
|
||||
case 122: M122(); break;
|
||||
#endif
|
||||
case 122: M122(); break;
|
||||
case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags
|
||||
|
@ -792,9 +792,7 @@ private:
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
#if ENABLED(TMC_DEBUG)
|
||||
static void M122();
|
||||
#endif
|
||||
static void M122();
|
||||
static void M906();
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
static void M911();
|
||||
|
Reference in New Issue
Block a user