Add HAS_HAM_2M definition to variant headers for 2M support

This commit is contained in:
vidplace7
2026-05-26 22:46:56 -04:00
parent 4a73482162
commit f0a67c5cb0
4 changed files with 13 additions and 0 deletions

View File

@@ -564,6 +564,10 @@ std::unique_ptr<RadioInterface> 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

View File

@@ -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

View File

@@ -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

View File

@@ -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