mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-01 03:15:42 +00:00
Delete ringtone.proto file for factory reset (#7303)
This commit is contained in:
parent
e9a551ae90
commit
9798a91e7b
@ -474,6 +474,9 @@ bool NodeDB::factoryReset(bool eraseBleBonds)
|
|||||||
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
|
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
|
||||||
LOG_ERROR("Could not remove rangetest.csv file");
|
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
|
#endif
|
||||||
spiLock->unlock();
|
spiLock->unlock();
|
||||||
// second, install default state (this will deal with the duplicate mac address issue)
|
// second, install default state (this will deal with the duplicate mac address issue)
|
||||||
|
@ -364,7 +364,6 @@ ExternalNotificationModule::ExternalNotificationModule()
|
|||||||
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
|
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
|
||||||
// The default ringtone is always loaded from userPrefs.jsonc
|
// The default ringtone is always loaded from userPrefs.jsonc
|
||||||
strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE, sizeof(rtttlConfig.ringtone));
|
strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE, sizeof(rtttlConfig.ringtone));
|
||||||
rtttlConfig.ringtone[sizeof(rtttlConfig.ringtone) - 1] = '\0'; // Ensure null termination
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("Init External Notification Module");
|
LOG_INFO("Init External Notification Module");
|
||||||
|
Loading…
Reference in New Issue
Block a user