浏览代码

Fix CURRENT_STEP_DOWN compile error

Scott Lahteine 5 年前
父节点
当前提交
0d342bac51
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 8
    6
      Marlin/src/feature/tmc_util.cpp

+ 8
- 6
Marlin/src/feature/tmc_util.cpp 查看文件

281
       }
281
       }
282
     }
282
     }
283
 
283
 
284
+  #else
285
+
286
+    #define step_current_down(...)
287
+
284
   #endif
288
   #endif
285
 
289
 
286
   template<typename TMC>
290
   template<typename TMC>
288
     TMC_driver_data data = get_driver_data(st);
292
     TMC_driver_data data = get_driver_data(st);
289
     if (data.drv_status == 0xFFFFFFFF || data.drv_status == 0x0) return false;
293
     if (data.drv_status == 0xFFFFFFFF || data.drv_status == 0x0) return false;
290
 
294
 
291
-    bool did_step_down = false;
295
+    bool should_step_down = false;
292
 
296
 
293
     if (need_update_error_counters) {
297
     if (need_update_error_counters) {
294
       if (data.is_ot /* | data.s2ga | data.s2gb*/) st.error_count++;
298
       if (data.is_ot /* | data.s2ga | data.s2gb*/) st.error_count++;
308
 
312
 
309
       #if CURRENT_STEP_DOWN > 0
313
       #if CURRENT_STEP_DOWN > 0
310
         // Decrease current if is_otpw is true and driver is enabled and there's been more than 4 warnings
314
         // Decrease current if is_otpw is true and driver is enabled and there's been more than 4 warnings
311
-        if (data.is_otpw && st.otpw_count > 4 && st.isEnabled()) {
312
-          step_current_down(st);
313
-          did_step_down = true;
314
-        }
315
+        if (data.is_otpw && st.otpw_count > 4 && st.isEnabled())
316
+          should_step_down = true;
315
       #endif
317
       #endif
316
 
318
 
317
       if (data.is_otpw) {
319
       if (data.is_otpw) {
325
       if (need_debug_reporting) report_polled_driver_data(st, data);
327
       if (need_debug_reporting) report_polled_driver_data(st, data);
326
     #endif
328
     #endif
327
 
329
 
328
-    return did_step_down;
330
+    return should_step_down;
329
   }
331
   }
330
 
332
 
331
   void monitor_tmc_drivers() {
333
   void monitor_tmc_drivers() {

正在加载...
取消
保存