Skip to content

Commit

Permalink
🩹 Fix ESP32 servos, SD_IGNORE_AT_STARTUP
Browse files Browse the repository at this point in the history
Fixes #24007
Followup to aaf5bf0
  • Loading branch information
thinkyhead committed Apr 21, 2022
1 parent 3905234 commit d507ea1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/HAL/ESP32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef Servo hal_servo_t;
//
void tone(const pin_t _pin, const unsigned int frequency, const unsigned long duration=0);
void noTone(const pin_t _pin);

int8_t get_pwm_channel(const pin_t pin, const uint32_t freq, const uint16_t res);
void analogWrite(const pin_t pin, const uint16_t value, const uint32_t freq=PWM_FREQUENCY, const uint16_t res=8);

//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/sd/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void CardReader::manage_media() {
safe_delay(500); // Some boards need a delay to get settled

// Try to mount the media (only later with SD_IGNORE_AT_STARTUP)
if (TERN1(SD_IGNORE_AT_STARTUP, media_stat.inited)) mount();
if (TERN1(SD_IGNORE_AT_STARTUP, old_stat != 2)) mount();
if (!isMounted()) stat = 0; // Not mounted?

TERN_(RESET_STEPPERS_ON_MEDIA_INSERT, reset_stepper_drivers()); // Workaround for Cheetah bug
Expand Down

0 comments on commit d507ea1

Please sign in to comment.