This commit is contained in:
2026-04-12 22:15:52 +02:00
parent 0e3786a588
commit 12405d1bef
2 changed files with 18 additions and 63 deletions

View File

@@ -565,13 +565,7 @@ impl Esp<'_> {
/// Retries once on flash error.
pub(crate) async fn save_config(&mut self, config: Vec<u8>) -> FatResult<()> {
let timestamp = self.get_time().to_rfc3339();
match self.savegame.save(config.as_slice(), &timestamp) {
Ok(()) => Ok(()),
Err(e) => {
warn!("First save attempt failed: {e:?}. Retrying...");
self.savegame.save(config.as_slice(), &timestamp)
}
}
self.savegame.save(config.as_slice(), &timestamp)
}
/// Delete a specific save slot by erasing it on flash.