fix: bug in batt logging, sd didn't check if directory exists
which would mean the user had not yet enabled loggin to sd but only mounted a card
This commit is contained in:
1 file changed
+2
-2
@@ -14780,13 +14780,13 @@ static void calibrateBatteryCb(lv_event_t* e) {
|
||||
// SPIFFS (flat) uses a top-level path.
|
||||
static fs::FS& battLogFs() {
|
||||
#if CAP_SD
|
||||
if (SD.cardType() != CARD_NONE) return SD;
|
||||
if (SD.cardType() != CARD_NONE && SD.exists("/meshcomod")) return SD;
|
||||
#endif
|
||||
return SPIFFS;
|
||||
}
|
||||
static bool battLogOnSd() {
|
||||
#if CAP_SD
|
||||
return SD.cardType() != CARD_NONE;
|
||||
return SD.cardType() != CARD_NONE && SD.exists("/meshcomod");
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user