Delete ringtone.proto file for factory reset (#7303)

This commit is contained in:
Ben Meadors 2025-07-11 08:22:50 -05:00 committed by GitHub
parent e9a551ae90
commit 9798a91e7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -474,6 +474,9 @@ bool NodeDB::factoryReset(bool eraseBleBonds)
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
LOG_ERROR("Could not remove rangetest.csv file");
}
if (FSCom.exists("/prefs/ringtone.proto") && !FSCom.remove("/prefs/ringtone.proto")) {
LOG_ERROR("Could not remove ringtone.proto file");
}
#endif
spiLock->unlock();
// second, install default state (this will deal with the duplicate mac address issue)

View File

@ -364,7 +364,6 @@ ExternalNotificationModule::ExternalNotificationModule()
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
// The default ringtone is always loaded from userPrefs.jsonc
strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE, sizeof(rtttlConfig.ringtone));
rtttlConfig.ringtone[sizeof(rtttlConfig.ringtone) - 1] = '\0'; // Ensure null termination
}
LOG_INFO("Init External Notification Module");