diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 6234596d0..02ee2c71e 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -564,6 +564,10 @@ std::unique_ptr initLoRa() config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_ITU3_2M; #ifdef HAS_HAM_2M_ONLY const bool mismatch = !is2mRegion && config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_UNSET; +#elif defined(HAS_HAM_2M) && !defined(HAS_HAM_2M_ONLY) + // If hardware specifies HAS_HAM_2M without HAS_HAM_2M_ONLY, it supports 2m but isn't restricted to it. + // In this case, we allow any region. + const bool mismatch = false; #else const bool mismatch = is2mRegion; #endif diff --git a/variants/esp32/tlora_v2_1_16/variant.h b/variants/esp32/tlora_v2_1_16/variant.h index 27d2fb5ab..dde154858 100644 --- a/variants/esp32/tlora_v2_1_16/variant.h +++ b/variants/esp32/tlora_v2_1_16/variant.h @@ -2,6 +2,9 @@ #define ADC_CHANNEL ADC_CHANNEL_7 #define BATTERY_SENSE_SAMPLES 30 +// A variant has 2M support +#define HAS_HAM_2M 1 + // ratio of voltage divider = 2.0 (R42=100k, R43=100k) #define ADC_MULTIPLIER 2 diff --git a/variants/esp32s3/t-beam-bpf/variant.h b/variants/esp32s3/t-beam-bpf/variant.h index 1b1524145..4cd0501c0 100644 --- a/variants/esp32s3/t-beam-bpf/variant.h +++ b/variants/esp32s3/t-beam-bpf/variant.h @@ -1,6 +1,9 @@ // LilyGo T-Beam-BPF variant.h // Configuration based on LilyGO utilities.h and RF documentation +// Hardware has 2M support +#define HAS_HAM_2M 1 + // Hardware is restricted to the amateur 2m band (144-148 MHz). #define HAS_HAM_2M_ONLY 1 diff --git a/variants/esp32s3/tbeam-s3-core/variant.h b/variants/esp32s3/tbeam-s3-core/variant.h index 11e463364..a3bb0c5ec 100644 --- a/variants/esp32s3/tbeam-s3-core/variant.h +++ b/variants/esp32s3/tbeam-s3-core/variant.h @@ -9,6 +9,9 @@ #define BUTTON_PIN 0 // The middle button GPIO on the T-Beam S3 // #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. +// A variant has 2M support +#define HAS_HAM_2M 1 + // TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if // not found then probe for SX1262 #define USE_SX1262