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

@@ -30,15 +30,13 @@ const RegionInfo *myRegion;
void initRegion()
{
if (!myRegion) {
const RegionInfo *r = regions;
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
;
myRegion = r;
DEBUG_MSG("Wanted region %d, using %s\n", radioConfig.preferences.region, r->name);
const RegionInfo *r = regions;
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
;
myRegion = r;
DEBUG_MSG("Wanted region %d, using %s\n", radioConfig.preferences.region, r->name);
myNodeInfo.num_channels = myRegion->numChannels; // Tell our android app how many channels we have
}
myNodeInfo.num_channels = myRegion->numChannels; // Tell our android app how many channels we have
}
/**