Add REGULATORY_ prefix to LORA_REGIONCODE

Add REGULATORY_ prefix to LORA_REGIONCODE to prepare for more regulatory configuration options, and update comment block accordingly too.

Signed-off-by: Andrew Yong <me@ndoo.sg>
This commit is contained in:
Andrew Yong 2024-05-08 20:15:06 +08:00
parent 96b286cd48
commit 5554cc46a7
2 changed files with 5 additions and 5 deletions

View File

@ -75,11 +75,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
// -----------------------------------------------------------------------------
// Regulatory overrides for producing regional builds
// Regulatory overrides
// -----------------------------------------------------------------------------
// Define if region should override user saved region
// #define LORA_REGIONCODE meshtastic_Config_LoRaConfig_RegionCode_SG_923
// Override user saved region, for producing region-locked builds
// #define REGULATORY_LORA_REGIONCODE meshtastic_Config_LoRaConfig_RegionCode_SG_923
// -----------------------------------------------------------------------------
// Feature toggles

View File

@ -154,8 +154,8 @@ static uint8_t bytes[MAX_RHPACKETLEN];
void initRegion()
{
const RegionInfo *r = regions;
#ifdef LORA_REGIONCODE
for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != LORA_REGIONCODE; r++)
#ifdef REGULATORY_LORA_REGIONCODE
for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != REGULATORY_LORA_REGIONCODE; r++)
;
LOG_INFO("Wanted region %d, regulatory override to %s\n", config.lora.region, r->name);
#else