Browse Source

🩹 Fix ESP32 servos, SD_IGNORE_AT_STARTUP

Fixes #24007
Followup to aaf5bf02
Scott Lahteine 2 years ago
parent
commit
d507ea117e
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Marlin/src/HAL/ESP32/HAL.h
  2. 1
    1
      Marlin/src/sd/cardreader.cpp

+ 1
- 1
Marlin/src/HAL/ESP32/HAL.h View File

89
 //
89
 //
90
 void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
90
 void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
91
 void noTone(const pin_t _pin);
91
 void noTone(const pin_t _pin);
92
-
92
+int8_t get_pwm_channel(const pin_t pin, const uint32_t freq, const uint16_t res);
93
 void analogWrite(const pin_t pin, const uint16_t value, const uint32_t freq=PWM_FREQUENCY, const uint16_t res=8);
93
 void analogWrite(const pin_t pin, const uint16_t value, const uint32_t freq=PWM_FREQUENCY, const uint16_t res=8);
94
 
94
 
95
 //
95
 //

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

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
 
494
 
495
     // Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
495
     // Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
496
-    if (TERN1(SD_IGNORE_AT_STARTUP, media_stat.inited)) mount();
496
+    if (TERN1(SD_IGNORE_AT_STARTUP, old_stat != 2)) mount();
497
     if (!isMounted()) stat = 0;     // Not mounted?
497
     if (!isMounted()) stat = 0;     // Not mounted?
498
 
498
 
499
     TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug
499
     TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug

Loading…
Cancel
Save