|
@@ -10325,25 +10325,30 @@ inline void gcode_M502() {
|
10325
|
10325
|
SERIAL_ECHOLNPGM(" prewarn flag cleared");
|
10326
|
10326
|
}
|
10327
|
10327
|
|
10328
|
|
- static void tmc2130_get_pwmthrs(TMC2130Stepper &st, const char name, const uint16_t spmm) {
|
10329
|
|
- SERIAL_CHAR(name);
|
10330
|
|
- SERIAL_ECHOPGM(" stealthChop max speed set to ");
|
10331
|
|
- SERIAL_ECHOLN(12650000UL * st.microsteps() / (256 * st.stealth_max_speed() * spmm));
|
10332
|
|
- }
|
10333
|
|
- static void tmc2130_set_pwmthrs(TMC2130Stepper &st, const char name, const int32_t thrs, const uint32_t spmm) {
|
10334
|
|
- st.stealth_max_speed(12650000UL * st.microsteps() / (256 * thrs * spmm));
|
10335
|
|
- tmc2130_get_pwmthrs(st, name, spmm);
|
10336
|
|
- }
|
|
10328
|
+ #if ENABLED(HYBRID_THRESHOLD)
|
|
10329
|
+ static void tmc2130_get_pwmthrs(TMC2130Stepper &st, const char name, const uint16_t spmm) {
|
|
10330
|
+ SERIAL_CHAR(name);
|
|
10331
|
+ SERIAL_ECHOPGM(" stealthChop max speed set to ");
|
|
10332
|
+ SERIAL_ECHOLN(12650000UL * st.microsteps() / (256 * st.stealth_max_speed() * spmm));
|
|
10333
|
+ }
|
10337
|
10334
|
|
10338
|
|
- static void tmc2130_get_sgt(TMC2130Stepper &st, const char name) {
|
10339
|
|
- SERIAL_CHAR(name);
|
10340
|
|
- SERIAL_ECHOPGM(" driver homing sensitivity set to ");
|
10341
|
|
- SERIAL_ECHOLN(st.sgt());
|
10342
|
|
- }
|
10343
|
|
- static void tmc2130_set_sgt(TMC2130Stepper &st, const char name, const int8_t sgt_val) {
|
10344
|
|
- st.sgt(sgt_val);
|
10345
|
|
- tmc2130_get_sgt(st, name);
|
10346
|
|
- }
|
|
10335
|
+ static void tmc2130_set_pwmthrs(TMC2130Stepper &st, const char name, const int32_t thrs, const uint32_t spmm) {
|
|
10336
|
+ st.stealth_max_speed(12650000UL * st.microsteps() / (256 * thrs * spmm));
|
|
10337
|
+ tmc2130_get_pwmthrs(st, name, spmm);
|
|
10338
|
+ }
|
|
10339
|
+ #endif
|
|
10340
|
+
|
|
10341
|
+ #if ENABLED(SENSORLESS_HOMING)
|
|
10342
|
+ static void tmc2130_get_sgt(TMC2130Stepper &st, const char name) {
|
|
10343
|
+ SERIAL_CHAR(name);
|
|
10344
|
+ SERIAL_ECHOPGM(" driver homing sensitivity set to ");
|
|
10345
|
+ SERIAL_ECHOLN(st.sgt());
|
|
10346
|
+ }
|
|
10347
|
+ static void tmc2130_set_sgt(TMC2130Stepper &st, const char name, const int8_t sgt_val) {
|
|
10348
|
+ st.sgt(sgt_val);
|
|
10349
|
+ tmc2130_get_sgt(st, name);
|
|
10350
|
+ }
|
|
10351
|
+ #endif
|
10347
|
10352
|
|
10348
|
10353
|
/**
|
10349
|
10354
|
* M906: Set motor current in milliamps using axis codes X, Y, Z, E
|