|
@@ -222,7 +222,6 @@ void TMC26XStepper::setSpeed(uint16_t whatSpeed) {
|
222
|
222
|
this->speed = whatSpeed;
|
223
|
223
|
this->step_delay = 60UL * sq(1000UL) / ((uint32_t)this->number_of_steps * (uint32_t)whatSpeed * (uint32_t)this->microsteps);
|
224
|
224
|
#ifdef TMC_DEBUG0 // crashes
|
225
|
|
- //SERIAL_PRINTF("Step delay in micros: ");
|
226
|
225
|
SERIAL_ECHOPAIR("\nStep delay in micros: ", this->step_delay);
|
227
|
226
|
#endif
|
228
|
227
|
// Update the next step time
|
|
@@ -315,10 +314,8 @@ void TMC26XStepper::setCurrent(uint16_t current) {
|
315
|
314
|
// and recalculate the current setting
|
316
|
315
|
current_scaling = (byte)((resistor_value * mASetting * 32.0 / (0.165 * sq(1000.0))) - 0.5); //theoretically - 1.0 for better rounding it is 0.5
|
317
|
316
|
#ifdef TMC_DEBUG0 // crashes
|
318
|
|
- //SERIAL_PRINTF("CS (Vsense=1): ");
|
319
|
317
|
SERIAL_ECHOPAIR("\nCS (Vsense=1): ",current_scaling);
|
320
|
318
|
} else {
|
321
|
|
- //SERIAL_PRINTF("CS: ");
|
322
|
319
|
SERIAL_ECHOPAIR("\nCS: ", current_scaling);
|
323
|
320
|
#endif
|
324
|
321
|
}
|
|
@@ -405,7 +402,6 @@ void TMC26XStepper::setMicrosteps(const int16_t in_steps) {
|
405
|
402
|
microsteps = _BV(8 - setting_pattern);
|
406
|
403
|
|
407
|
404
|
#ifdef TMC_DEBUG0 // crashes
|
408
|
|
- //SERIAL_PRINTF("Microstepping: ");
|
409
|
405
|
SERIAL_ECHOPAIR("\n Microstepping: ", microsteps);
|
410
|
406
|
#endif
|
411
|
407
|
|
|
@@ -612,7 +608,6 @@ void TMC26XStepper::setCoolStepConfiguration(
|
612
|
608
|
| (((uint32_t)lower_current_limit) << 15)
|
613
|
609
|
| COOL_STEP_REGISTER; // Register signature
|
614
|
610
|
|
615
|
|
- //SERIAL_PRINTFln(cool_step_register_value,HEX);
|
616
|
611
|
if (started) send262(cool_step_register_value);
|
617
|
612
|
}
|
618
|
613
|
|
|
@@ -830,18 +825,14 @@ void TMC26XStepper::debugLastStatus() {
|
830
|
825
|
uint32_t readout_config = driver_configuration_register_value & READ_SELECTION_PATTERN;
|
831
|
826
|
const int16_t value = getReadoutValue();
|
832
|
827
|
if (readout_config == READ_MICROSTEP_POSTION) {
|
833
|
|
- //SERIAL_PRINTF("Microstep position phase A: ");
|
834
|
828
|
SERIAL_ECHOPAIR("\n Microstep position phase A: ", value);
|
835
|
829
|
}
|
836
|
830
|
else if (readout_config == READ_STALL_GUARD_READING) {
|
837
|
|
- //SERIAL_PRINTF("Stall Guard value:");
|
838
|
831
|
SERIAL_ECHOPAIR("\n Stall Guard value:", value);
|
839
|
832
|
}
|
840
|
833
|
else if (readout_config == READ_STALL_GUARD_AND_COOL_STEP) {
|
841
|
834
|
int16_t stallGuard = value & 0xF, current = value & 0x1F0;
|
842
|
|
- //SERIAL_PRINTF("Approx Stall Guard: ");
|
843
|
835
|
SERIAL_ECHOPAIR("\n Approx Stall Guard: ", stallGuard);
|
844
|
|
- //SERIAL_PRINTF("Current level");
|
845
|
836
|
SERIAL_ECHOPAIR("\n Current level", current);
|
846
|
837
|
}
|
847
|
838
|
}
|