Browse Source

Use float to init TMC2133 steps-per-mm

pull/1/head
Scott Lahteine 7 years ago
parent
commit
a7e5c1bf19
  1. 4
      Marlin/stepper_indirection.cpp

4
Marlin/stepper_indirection.cpp

@ -171,7 +171,7 @@
// Use internal reference voltage for current calculations. This is the default.
// Following values from Trinamic's spreadsheet with values for a NEMA17 (42BYGHW609)
// https://www.trinamic.com/products/integrated-circuits/details/tmc2130/
void tmc2130_init(TMC2130Stepper &st, const uint16_t microsteps, const uint32_t thrs, const uint32_t spmm) {
void tmc2130_init(TMC2130Stepper &st, const uint16_t microsteps, const uint32_t thrs, const float &spmm) {
st.begin();
st.setCurrent(st.getCurrent(), R_SENSE, HOLD_MULTIPLIER);
st.microsteps(microsteps);
@ -199,7 +199,7 @@
#define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM)
void tmc2130_init() {
constexpr uint16_t steps_per_mm[] = DEFAULT_AXIS_STEPS_PER_UNIT;
constexpr float steps_per_mm[] = DEFAULT_AXIS_STEPS_PER_UNIT;
#if ENABLED(X_IS_TMC2130)
_TMC2130_INIT( X, steps_per_mm[X_AXIS]);
#if ENABLED(SENSORLESS_HOMING)

Loading…
Cancel
Save