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,7 +89,7 @@ typedef Servo hal_servo_t;
89 89
 //
90 90
 void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
91 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 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,7 +493,7 @@ void CardReader::manage_media() {
493 493
     safe_delay(500);                // Some boards need a delay to get settled
494 494
 
495 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 497
     if (!isMounted()) stat = 0;     // Not mounted?
498 498
 
499 499
     TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug

Loading…
Cancel
Save