浏览代码

EEPROM followup (tmc_stepper_current_t)

Scott Lahteine 6 年前
父节点
当前提交
e8d2cf4fb5
共有 1 个文件被更改,包括 5 次插入10 次删除
  1. 5
    10
      Marlin/src/module/configuration_store.cpp

+ 5
- 10
Marlin/src/module/configuration_store.cpp 查看文件

197
           delta_calibration_radius,                     // M665 B
197
           delta_calibration_radius,                     // M665 B
198
           delta_tower_angle_trim[ABC];                  // M665 XYZ
198
           delta_tower_angle_trim[ABC];                  // M665 XYZ
199
   #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
199
   #elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
200
-    float x2_endstop_adj,                                // M666 X
201
-          y2_endstop_adj,                                // M666 Y
202
-          z2_endstop_adj;                                // M666 Z
200
+    float x2_endstop_adj,                               // M666 X
201
+          y2_endstop_adj,                               // M666 Y
202
+          z2_endstop_adj;                               // M666 Z
203
     #if ENABLED(Z_TRIPLE_ENDSTOPS)
203
     #if ENABLED(Z_TRIPLE_ENDSTOPS)
204
       float z3_endstop_adj;                             // M666 Z
204
       float z3_endstop_adj;                             // M666 Z
205
     #endif
205
     #endif
243
   //
243
   //
244
   // HAS_TRINAMIC
244
   // HAS_TRINAMIC
245
   //
245
   //
246
-  #define TMC_AXES (MAX_EXTRUDERS + 7)
247
   tmc_stepper_current_t tmc_stepper_current;            // M906 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
246
   tmc_stepper_current_t tmc_stepper_current;            // M906 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
248
   tmc_hybrid_threshold_t tmc_hybrid_threshold;          // M913 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
247
   tmc_hybrid_threshold_t tmc_hybrid_threshold;          // M913 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
249
   tmc_sgt_t tmc_sgt;                                    // M914 X Y Z
248
   tmc_sgt_t tmc_sgt;                                    // M914 X Y Z
1353
       {
1352
       {
1354
         _FIELD_TEST(tmc_stepper_current);
1353
         _FIELD_TEST(tmc_stepper_current);
1355
 
1354
 
1356
-        tmc_stepper_current_t tmc_stepper_current;
1355
+        tmc_stepper_current_t currents;
1356
+        EEPROM_READ(currents);
1357
 
1357
 
1358
         #if HAS_TRINAMIC
1358
         #if HAS_TRINAMIC
1359
 
1359
 
1360
           #define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
1360
           #define SET_CURR(Q) stepper##Q.rms_current(currents.Q ? currents.Q : Q##_CURRENT)
1361
-          tmc_stepper_current_t currents;
1362
-          EEPROM_READ(currents);
1363
           if (!validating) {
1361
           if (!validating) {
1364
             #if AXIS_IS_TMC(X)
1362
             #if AXIS_IS_TMC(X)
1365
               SET_CURR(X);
1363
               SET_CURR(X);
1401
               SET_CURR(E5);
1399
               SET_CURR(E5);
1402
             #endif
1400
             #endif
1403
           }
1401
           }
1404
-        #else
1405
-          uint16_t val;
1406
-          for (uint8_t q=TMC_AXES; q--;) EEPROM_READ(val);
1407
         #endif
1402
         #endif
1408
       }
1403
       }
1409
 
1404
 

正在加载...
取消
保存