Просмотр исходного кода

Use float to init TMC2133 steps-per-mm

Scott Lahteine 6 лет назад
Родитель
Сommit
a7e5c1bf19
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      Marlin/stepper_indirection.cpp

+ 2
- 2
Marlin/stepper_indirection.cpp Просмотреть файл

@@ -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)

Загрузка…
Отмена
Сохранить