Browse Source

🧑‍💻 Add RESET_STEPPERS_ON_MEDIA_INSERT flag

Scott Lahteine 2 years ago
parent
commit
aaf5bf0218

+ 1
- 1
Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h View File

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

+ 1
- 1
Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h View File

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

+ 5
- 5
Marlin/src/sd/cardreader.cpp View File

491
 
491
 
492
   if (stat) {                       // Media Inserted
492
   if (stat) {                       // Media Inserted
493
     safe_delay(500);                // Some boards need a delay to get settled
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
     if (!isMounted()) stat = 0;     // Not mounted?
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
   else {
501
   else {
502
     #if PIN_EXISTS(SD_DETECT)
502
     #if PIN_EXISTS(SD_DETECT)

Loading…
Cancel
Save