Где-то ты нам лукавишь
void appendFile(fs::FS &fs, const char * path, const char * message){
Serial.printf("Appending to file: %s\n", path);
sdwr="[SD: Write failed]";
File file = fs.open(path, FILE_APPEND);
if(!file){
if (D_bug==true) { Serial.println("Failed to open file for appending"); }
}
if(file.print(message)){
sdwr="[SD: Write OK]";
if (D_bug==true) { Serial.println("Message appended"); }
} else {
if (D_bug==true) { Serial.println("Append failed"); }
}
file.close();
}