Kaynağa Gözat

Fix chopper timing struct and initialization (#12943)

teemuatlut 6 yıl önce
ebeveyn
işleme
8a3f1d6932

+ 6
- 6
Marlin/src/module/stepper_indirection.cpp Dosyayı Görüntüle

@@ -209,8 +209,8 @@
209 209
     chopconf.tbl = 1;
210 210
     chopconf.toff = chopper_timing.toff;
211 211
     chopconf.intpol = INTERPOLATE;
212
-    chopconf.hend = chopper_timing.hstrt + 3;
213
-    chopconf.hstrt = chopper_timing.hend - 1;
212
+    chopconf.hend = chopper_timing.hend + 3;
213
+    chopconf.hstrt = chopper_timing.hstrt - 1;
214 214
     st.CHOPCONF(chopconf.sr);
215 215
 
216 216
     st.rms_current(mA, HOLD_MULTIPLIER);
@@ -453,8 +453,8 @@
453 453
     chopconf.tbl = 0b01; // blank_time = 24
454 454
     chopconf.toff = chopper_timing.toff;
455 455
     chopconf.intpol = INTERPOLATE;
456
-    chopconf.hend = chopper_timing.hstrt + 3;
457
-    chopconf.hstrt = chopper_timing.hend - 1;
456
+    chopconf.hend = chopper_timing.hend + 3;
457
+    chopconf.hstrt = chopper_timing.hstrt - 1;
458 458
     st.CHOPCONF(chopconf.sr);
459 459
 
460 460
     st.rms_current(mA, HOLD_MULTIPLIER);
@@ -546,8 +546,8 @@
546 546
     TMC2660_n::CHOPCONF_t chopconf{0};
547 547
     chopconf.tbl = 1;
548 548
     chopconf.toff = chopper_timing.toff;
549
-    chopconf.hend = chopper_timing.hstrt + 3;
550
-    chopconf.hstrt = chopper_timing.hend - 1;
549
+    chopconf.hend = chopper_timing.hend + 3;
550
+    chopconf.hstrt = chopper_timing.hstrt - 1;
551 551
     st.CHOPCONF(chopconf.sr);
552 552
 
553 553
     st.rms_current(mA);

+ 2
- 2
Marlin/src/module/stepper_indirection.h Dosyayı Görüntüle

@@ -68,8 +68,8 @@
68 68
 
69 69
   typedef struct {
70 70
     uint8_t toff;
71
-    int8_t hstrt;
72
-    uint8_t hend;
71
+    int8_t hend;
72
+    uint8_t hstrt;
73 73
   } chopper_timing_t;
74 74
 
75 75
   static constexpr chopper_timing_t chopper_timing = CHOPPER_TIMING;

Loading…
İptal
Kaydet