Skip to content

Commit

Permalink
G7710 boot workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9064 committed May 21, 2023
1 parent 7254df6 commit e9b2c48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ void Settings::LoadSettingsFromFile() {

void Settings::SaveSettingsToFile() {
lfs_file_t settingsFile;
auto prevFace = settings.watchFace;

if (fs.FileOpen(&settingsFile, "/settings.dat", LFS_O_WRONLY | LFS_O_CREAT) != LFS_ERR_OK) {
return;
}
if (prevFace == Pinetime::Applications::WatchFace::CasioStyleG7710) {
settings.watchFace = Pinetime::Applications::WatchFace::Digital;
}
fs.FileWrite(&settingsFile, reinterpret_cast<uint8_t*>(&settings), sizeof(settings));
fs.FileClose(&settingsFile);
settings.watchFace = prevFace;
}

0 comments on commit e9b2c48

Please sign in to comment.