Browse Source

Use float to init TMC2133 steps-per-mm

Scott Lahteine 7 years ago
parent
commit
a7e5c1bf19
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/stepper_indirection.cpp

+ 2
- 2
Marlin/stepper_indirection.cpp View File

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

Loading…
Cancel
Save