Skip to content

Commit 70fa368

Browse files
committed
Fix SD is not automaticaly mounted on printer after access
1 parent 8593136 commit 70fa368

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

esp3d/src/include/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define _VERSION_ESP3D_H
2323

2424
//version and sources location
25-
#define FW_VERSION "3.0.0.a212"
25+
#define FW_VERSION "3.0.0.a213"
2626
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
2727

2828
#endif //_VERSION_ESP3D_H

esp3d/src/modules/filesystem/esp_sd.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,20 @@ bool ESP_SD::accessFS(uint8_t FS)
125125
void ESP_SD::releaseFS(uint8_t FS)
126126
{
127127
(void)FS;
128+
log_esp3d("Release SD");
129+
setState(ESP_SDCARD_IDLE);
128130
#if SD_DEVICE_CONNECTION == ESP_SHARED_SD
131+
_enabled = false;
129132
#if defined (ESP_FLAG_SHARED_SD_PIN) && ESP_FLAG_SHARED_SD_PIN != -1
130133
log_esp3d("SD shared disabled PIN %d with %d", ESP_FLAG_SHARED_SD_PIN, ESP_FLAG_SHARED_SD_VALUE);
131134
digitalWrite(ESP_FLAG_SHARED_SD_PIN, !ESP_FLAG_SHARED_SD_VALUE);
132135
#endif // ESP_FLAG_SHARED_SD_PIN
133136
#if defined (ESP3DLIB_ENV)
134-
log_esp3d("Release SD");
137+
log_esp3d("Mount SD in Marlin");
135138
card.mount();
136139
#endif // ESP3DLIB_ENV
137-
_enabled = false;
138140
#endif //SD_DEVICE_CONNECTION == ESP_SHARED_SD
139-
setState(ESP_SDCARD_IDLE);
141+
140142
}
141143

142144

0 commit comments

Comments
 (0)