Przeglądaj źródła

🧑‍💻 Add RESET_STEPPERS_ON_MEDIA_INSERT flag

Scott Lahteine 2 lat temu
rodzic
commit
aaf5bf0218

+ 1
- 1
Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h Wyświetl plik

@@ -27,7 +27,7 @@
27 27
 #define BOARD_WEBSITE_URL "fysetc.com"
28 28
 
29 29
 #define BOARD_NO_NATIVE_USB
30
-
30
+#define RESET_STEPPERS_ON_MEDIA_INSERT
31 31
 #define DISABLE_JTAG
32 32
 
33 33
 #define pins_v2_20190128                          // new pins define

+ 1
- 1
Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h Wyświetl plik

@@ -32,7 +32,7 @@
32 32
 //#define BOGUS_TEMPERATURE_GRACE_PERIOD    2000
33 33
 
34 34
 #define BOARD_NO_NATIVE_USB
35
-
35
+#define RESET_STEPPERS_ON_MEDIA_INSERT
36 36
 #define DISABLE_JTAG
37 37
 
38 38
 #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)

+ 5
- 5
Marlin/src/sd/cardreader.cpp Wyświetl plik

@@ -491,12 +491,12 @@ void CardReader::manage_media() {
491 491
 
492 492
   if (stat) {                       // Media Inserted
493 493
     safe_delay(500);                // Some boards need a delay to get settled
494
-    if (TERN1(SD_IGNORE_AT_STARTUP, old_stat != 2))
495
-      mount();                      // Try to mount the media
496
-    #if MB(FYSETC_CHEETAH, FYSETC_CHEETAH_V12, FYSETC_AIO_II)
497
-      reset_stepper_drivers();      // Workaround for Cheetah bug
498
-    #endif
494
+
495
+    // Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
496
+    if (TERN1(SD_IGNORE_AT_STARTUP, media_stat.inited)) mount();
499 497
     if (!isMounted()) stat = 0;     // Not mounted?
498
+
499
+    TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug
500 500
   }
501 501
   else {
502 502
     #if PIN_EXISTS(SD_DETECT)

Ładowanie…
Anuluj
Zapisz