Add powerlimits to reconfigured radio settings as well as init settings. (#10025)

* Add powerlimits to reconfigured radio settings as well as init settings.

* Refactor preamble length handling for wide LoRa configurations

* Moved the preamble setting to the main class and made the references static
This commit is contained in:
Tom
2026-04-09 16:18:05 -05:00
committed by GitHub
co-authored by GitHub
parent 17945884a5
commit a3b49b9028
7 changed files with 39 additions and 26 deletions
+3 -1
View File
@@ -163,9 +163,11 @@ void menuHandler::LoraRegionPicker(uint32_t duration)
// Guard: without a reboot, reconfigure() applies the region directly.
// Reject LORA_24 on sub-GHz-only hardware — getRadio() used to catch this post-reboot.
// TODO: change this to either use the validateLoraConfig() logic or at least check the region for wideLora
// rather than a hardcoded check for LORA_24.
if (selectedRegion == meshtastic_Config_LoRaConfig_RegionCode_LORA_24 &&
!(RadioLibInterface::instance && RadioLibInterface::instance->wideLora())) {
LOG_WARN("Radio hardware does not support 2.4 GHz; ignoring LORA_24 selection");
LOG_WARN("Radio hardware does not support 2.4 GHz; ignoring region selection");
return;
}