Make region changes take effect immedately

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

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));