mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-13 08:01:24 +00:00
Remove devicestate no_save (#3424)
This commit is contained in:
parent
e27f029d09
commit
bb57ccfc9e
@ -97,13 +97,6 @@ bool NodeDB::resetRadioConfig(bool factory_reset)
|
|||||||
|
|
||||||
channels.onConfigChanged();
|
channels.onConfigChanged();
|
||||||
|
|
||||||
// temp hack for quicker testing
|
|
||||||
// devicestate.no_save = true;
|
|
||||||
if (devicestate.no_save) {
|
|
||||||
LOG_DEBUG("***** DEVELOPMENT MODE - DO NOT RELEASE *****\n");
|
|
||||||
// Put your development config changes here
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the global myRegion
|
// Update the global myRegion
|
||||||
initRegion();
|
initRegion();
|
||||||
|
|
||||||
@ -644,27 +637,21 @@ bool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_
|
|||||||
|
|
||||||
void NodeDB::saveChannelsToDisk()
|
void NodeDB::saveChannelsToDisk()
|
||||||
{
|
{
|
||||||
if (!devicestate.no_save) {
|
|
||||||
#ifdef FSCom
|
#ifdef FSCom
|
||||||
FSCom.mkdir("/prefs");
|
FSCom.mkdir("/prefs");
|
||||||
#endif
|
#endif
|
||||||
saveProto(channelFileName, meshtastic_ChannelFile_size, &meshtastic_ChannelFile_msg, &channelFile);
|
saveProto(channelFileName, meshtastic_ChannelFile_size, &meshtastic_ChannelFile_msg, &channelFile);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void NodeDB::saveDeviceStateToDisk()
|
void NodeDB::saveDeviceStateToDisk()
|
||||||
{
|
{
|
||||||
if (!devicestate.no_save) {
|
|
||||||
#ifdef FSCom
|
#ifdef FSCom
|
||||||
FSCom.mkdir("/prefs");
|
FSCom.mkdir("/prefs");
|
||||||
#endif
|
#endif
|
||||||
saveProto(prefFileName, meshtastic_DeviceState_size, &meshtastic_DeviceState_msg, &devicestate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeDB::saveToDisk(int saveWhat)
|
void NodeDB::saveToDisk(int saveWhat)
|
||||||
{
|
{
|
||||||
if (!devicestate.no_save) {
|
|
||||||
#ifdef FSCom
|
#ifdef FSCom
|
||||||
FSCom.mkdir("/prefs");
|
FSCom.mkdir("/prefs");
|
||||||
#endif
|
#endif
|
||||||
@ -697,9 +684,6 @@ void NodeDB::saveToDisk(int saveWhat)
|
|||||||
if (saveWhat & SEGMENT_CHANNELS) {
|
if (saveWhat & SEGMENT_CHANNELS) {
|
||||||
saveChannelsToDisk();
|
saveChannelsToDisk();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
LOG_DEBUG("***** DEVELOPMENT MODE - DO NOT RELEASE - not saving to flash *****\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const meshtastic_NodeInfoLite *NodeDB::readNextMeshNode(uint32_t &readIndex)
|
const meshtastic_NodeInfoLite *NodeDB::readNextMeshNode(uint32_t &readIndex)
|
||||||
|
Loading…
Reference in New Issue
Block a user