From 8836be0f47b2162f022633f2954d42dc5854e811 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Wed, 23 Jul 2025 12:00:34 +1000 Subject: [PATCH 1/3] AG3335 GPS: Use NAVIC in India/Nepal, L1+L5 elsewhere. (#7413) As determined by @b8b8 , enabling NAVIC meant the more modern L5 GPS signal was not used (L1 GPS is always available). NAVIC, India's GNSS, probably provides the best coverage in India and the neighbouring region. However, outside of NAVIC's coverage area, L5 GPS is highly desirable. This patch amends the AG3335-family GPS configuration to enable L5 GPS coverage by default. If the Lora region is set to India or Nepal, NAVIC will be enabled instead. --- src/gps/GPS.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 3a6b19f64..f3624c627 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -643,8 +643,16 @@ bool GPS::setup() delay(250); } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_AG3335, GNSS_MODEL_AG3352)) { - _serial_gps->write("$PAIR066,1,0,1,0,0,1*3B\r\n"); // Enable GPS+GALILEO+NAVIC - + if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_IN || + config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_NP_865) { + _serial_gps->write("$PAIR066,1,0,1,0,0,1*3B\r\n"); // Enable GPS+GALILEO+NAVIC + // GPS GLONASS GALILEO BDS QZSS NAVIC + // 1 0 1 0 0 1 + } else { + _serial_gps->write("$PAIR066,1,1,1,1,0,0*3A\r\n"); // Enable GPS+GLONASS+GALILEO+BDS + // GPS GLONASS GALILEO BDS QZSS NAVIC + // 1 1 1 1 0 0 + } // Configure NMEA (sentences will output once per fix) _serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON _serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF From ed0cdefb448b02b9c195bc6d5e41eca26904331f Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 22 Jul 2025 22:01:29 -0400 Subject: [PATCH 2/3] Use platformio-core to build the matrix (#7424) Co-authored-by: Ben Meadors --- .github/workflows/main_matrix.yml | 10 +++- bin/generate_ci_matrix.py | 87 ++++++++++++++++++------------- 2 files changed, 60 insertions(+), 37 deletions(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 9d5cb0981..a3e8caf15 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -31,10 +31,16 @@ jobs: fail-fast: false matrix: arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - id: jsonStep + - uses: actions/setup-python@v5 + with: + python-version: 3.x + cache: pip + - run: pip install -U platformio + - name: Generate matrix + id: jsonStep run: | if [[ "$GITHUB_HEAD_REF" == "" ]]; then TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}}) diff --git a/bin/generate_ci_matrix.py b/bin/generate_ci_matrix.py index 0ce6b0f6b..acc0a9fb7 100755 --- a/bin/generate_ci_matrix.py +++ b/bin/generate_ci_matrix.py @@ -2,50 +2,67 @@ """Generate the CI matrix.""" -import configparser import json -import os import sys import random - -rootdir = "variants/" +import re +from platformio.project.config import ProjectConfig options = sys.argv[1:] outlist = [] if len(options) < 1: - print(json.dumps(outlist)) - exit() + print(json.dumps(outlist)) + exit(1) -for subdir, dirs, files in os.walk(rootdir): - for file in files: - if file == "platformio.ini": - config = configparser.ConfigParser() - config.read(subdir + "/" + file) - for c in config.sections(): - if c.startswith("env:"): - section = config[c].name[4:] - if "extends" in config[config[c].name]: - if options[0] + "_base" in config[config[c].name]["extends"]: - if "board_level" in config[config[c].name]: - if ( - config[config[c].name]["board_level"] == "extra" - ) & ("extra" in options): - outlist.append(section) - else: - outlist.append(section) - # Add the TFT variants if the base variant is selected - elif section.replace("-tft", "") in outlist and config[config[c].name].get("board_level") != "extra": - outlist.append(section) - elif section.replace("-inkhud", "") in outlist and config[config[c].name].get("board_level") != "extra": - outlist.append(section) - if "board_check" in config[config[c].name]: - if (config[config[c].name]["board_check"] == "true") & ( - "check" in options - ): - outlist.append(section) -if ("quick" in options) & (len(outlist) > 3): +cfg = ProjectConfig.get_instance() +pio_envs = cfg.envs() + +# Gather all PlatformIO environments for filtering later +all_envs = [] +for pio_env in pio_envs: + env_build_flags = cfg.get(f"env:{pio_env}", 'build_flags') + env_platform = None + for flag in env_build_flags: + # Extract the platform from the build flags + # Example flag: -I variants/esp32s3/heltec-v3 + match = re.search(r"-I\s?variants/([^/]+)", flag) + if match: + env_platform = match.group(1) + break + # Intentionally fail if platform cannot be determined + if not env_platform: + print(f"Error: Could not determine platform for environment '{pio_env}'") + exit(1) + # Store env details as a dictionary, and add to 'all_envs' list + env = { + 'name': pio_env, + 'platform': env_platform, + 'board_level': cfg.get(f"env:{pio_env}", 'board_level', default=None), + 'board_check': bool(cfg.get(f"env:{pio_env}", 'board_check', default=False)) + } + all_envs.append(env) + +# Filter outputs based on options +# Check is currently mutually exclusive with other options +if "check" in options: + for env in all_envs: + if env['board_check']: + outlist.append(env['name']) +# Filter (non-check) builds by platform +else: + for env in all_envs: + if options[0] == env['platform']: + # If no board level is specified, always include it + if not env['board_level']: + outlist.append(env['name']) + # Include `extra` boards when requested + elif "extra" in options and env['board_level'] == "extra": + outlist.append(env['name']) + +# Return as a JSON list +if ("quick" in options) and (len(outlist) > 3): print(json.dumps(random.sample(outlist, 3))) else: - print(json.dumps(outlist)) \ No newline at end of file + print(json.dumps(outlist)) From 82ddf4732a60e70783dc40f5a6597df2d4f907ff Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 23 Jul 2025 05:57:17 -0500 Subject: [PATCH 3/3] Deprecate disable_triple_click config (#7425) --- src/input/ExpressLRSFiveWay.cpp | 2 +- src/mesh/NodeDB.cpp | 5 ----- src/modules/AdminModule.cpp | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/input/ExpressLRSFiveWay.cpp b/src/input/ExpressLRSFiveWay.cpp index 77f9e9993..776b9001d 100644 --- a/src/input/ExpressLRSFiveWay.cpp +++ b/src/input/ExpressLRSFiveWay.cpp @@ -199,7 +199,7 @@ void ExpressLRSFiveWay::sendKey(input_broker_event key) void ExpressLRSFiveWay::toggleGPS() { #if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS - if (!config.device.disable_triple_click && (gps != nullptr)) { + if (gps != nullptr) { gps->toggleGpsMode(); screen->startAlert("GPS Toggled"); alerting = true; diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 38e213167..b7120a064 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -628,11 +628,6 @@ void NodeDB::installDefaultConfig(bool preserveKey = false) #ifdef PIN_GPS_EN config.position.gps_en_gpio = PIN_GPS_EN; #endif -#ifdef GPS_POWER_TOGGLE - config.device.disable_triple_click = false; -#else - config.device.disable_triple_click = true; -#endif #if defined(USERPREFS_CONFIG_GPS_MODE) config.position.gps_mode = USERPREFS_CONFIG_GPS_MODE; #elif !HAS_GPS || GPS_DEFAULT_NOT_PRESENT diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index 8d3e710df..33d5e1016 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -596,7 +596,6 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c) if (config.device.button_gpio == c.payload_variant.device.button_gpio && config.device.buzzer_gpio == c.payload_variant.device.buzzer_gpio && config.device.role == c.payload_variant.device.role && - config.device.disable_triple_click == c.payload_variant.device.disable_triple_click && config.device.rebroadcast_mode == c.payload_variant.device.rebroadcast_mode) { requiresReboot = false; }