Browse Source

Fix TMC_DEBUG undefined report_tmc_status (#11993)

pull/1/head
Scott Lahteine 6 years ago
committed by GitHub
parent
commit
8daadd2c8c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Marlin/src/feature/tmc_util.cpp

6
Marlin/src/feature/tmc_util.cpp

@ -34,6 +34,7 @@
#if ENABLED(TMC_DEBUG)
#include "../module/planner.h"
static bool report_tmc_status; // = false;
#endif
/**
@ -44,7 +45,6 @@
* and so we don't repeatedly report warning before the condition is cleared.
*/
#if ENABLED(MONITOR_DRIVER_STATUS)
static bool report_tmc_status = false;
struct TMC_driver_data {
uint32_t drv_status;
@ -144,6 +144,7 @@
}
else if (st.otpw_count > 0) st.otpw_count = 0;
#if ENABLED(TMC_DEBUG)
if (report_tmc_status) {
const uint32_t pwm_scale = get_pwm_scale(st);
st.printLabel();
@ -157,6 +158,7 @@
else if (st.flag_otpw) SERIAL_CHAR('F');
SERIAL_CHAR('\t');
}
#endif
}
#define HAS_HW_COMMS(ST) AXIS_DRIVER_TYPE(ST, TMC2130) || (AXIS_DRIVER_TYPE(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL))
@ -205,7 +207,9 @@
monitor_tmc_driver(stepperE5);
#endif
#if ENABLED(TMC_DEBUG)
if (report_tmc_status) SERIAL_EOL();
#endif
}
}

Loading…
Cancel
Save