Make region changes take effect immedately

This commit is contained in:
Kevin Hester committed 2020-10-29 13:26:36 +08:00
1 parent f698883c02
commit cfcb62bd18
3 files changed
+12 -11

No files matched your search

+3 -3
View File
@@ -150,6 +150,9 @@ bool NodeDB::resetRadioConfig()
radioConfig.preferences.region = RegionCode_TW;
}
// Update the global myRegion
initRegion();
return didFactoryReset;
}
@@ -245,9 +248,6 @@ void NodeDB::init()
}
}
// Update the global myRegion
initRegion();
strncpy(myNodeInfo.firmware_version, optstr(APP_VERSION), sizeof(myNodeInfo.firmware_version));
strncpy(myNodeInfo.hw_model, HW_VENDOR, sizeof(myNodeInfo.hw_model));