Parcourir la source

Fix TMC220x short circuit (#20731)

devin122 il y a 3 ans
Parent
révision
8ff87c120a
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      Marlin/src/feature/tmc_util.cpp

+ 2
- 2
Marlin/src/feature/tmc_util.cpp Voir le fichier

@@ -147,7 +147,7 @@
147 147
 
148 148
     static TMC_driver_data get_driver_data(TMC2208Stepper &st) {
149 149
       constexpr uint8_t OTPW_bp = 0, OT_bp = 1;
150
-      constexpr uint8_t S2G_bm = 0b11110; // 2..5
150
+      constexpr uint8_t S2G_bm = 0b111100; // 2..5
151 151
       TMC_driver_data data;
152 152
       const auto ds = data.drv_status = st.DRV_STATUS();
153 153
       data.is_otpw = TEST(ds, OTPW_bp);
@@ -291,7 +291,7 @@
291 291
     bool should_step_down = false;
292 292
 
293 293
     if (need_update_error_counters) {
294
-      if (data.is_ot /* | data.s2ga | data.s2gb*/) st.error_count++;
294
+      if (data.is_ot | data.is_s2g) st.error_count++;
295 295
       else if (st.error_count > 0) st.error_count--;
296 296
 
297 297
       #if ENABLED(STOP_ON_ERROR)

Chargement…
Annuler
Enregistrer