mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 20:30:43 +00:00
Merge branch 'master' into dismiss_frames
This commit is contained in:
commit
4637197293
10
.github/workflows/main_matrix.yml
vendored
10
.github/workflows/main_matrix.yml
vendored
@ -31,10 +31,16 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check]
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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: |
|
run: |
|
||||||
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
|
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
|
||||||
|
@ -2,50 +2,67 @@
|
|||||||
|
|
||||||
"""Generate the CI matrix."""
|
"""Generate the CI matrix."""
|
||||||
|
|
||||||
import configparser
|
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import random
|
import random
|
||||||
|
import re
|
||||||
rootdir = "variants/"
|
from platformio.project.config import ProjectConfig
|
||||||
|
|
||||||
options = sys.argv[1:]
|
options = sys.argv[1:]
|
||||||
|
|
||||||
outlist = []
|
outlist = []
|
||||||
|
|
||||||
if len(options) < 1:
|
if len(options) < 1:
|
||||||
print(json.dumps(outlist))
|
print(json.dumps(outlist))
|
||||||
exit()
|
exit(1)
|
||||||
|
|
||||||
for subdir, dirs, files in os.walk(rootdir):
|
cfg = ProjectConfig.get_instance()
|
||||||
for file in files:
|
pio_envs = cfg.envs()
|
||||||
if file == "platformio.ini":
|
|
||||||
config = configparser.ConfigParser()
|
# Gather all PlatformIO environments for filtering later
|
||||||
config.read(subdir + "/" + file)
|
all_envs = []
|
||||||
for c in config.sections():
|
for pio_env in pio_envs:
|
||||||
if c.startswith("env:"):
|
env_build_flags = cfg.get(f"env:{pio_env}", 'build_flags')
|
||||||
section = config[c].name[4:]
|
env_platform = None
|
||||||
if "extends" in config[config[c].name]:
|
for flag in env_build_flags:
|
||||||
if options[0] + "_base" in config[config[c].name]["extends"]:
|
# Extract the platform from the build flags
|
||||||
if "board_level" in config[config[c].name]:
|
# Example flag: -I variants/esp32s3/heltec-v3
|
||||||
if (
|
match = re.search(r"-I\s?variants/([^/]+)", flag)
|
||||||
config[config[c].name]["board_level"] == "extra"
|
if match:
|
||||||
) & ("extra" in options):
|
env_platform = match.group(1)
|
||||||
outlist.append(section)
|
break
|
||||||
else:
|
# Intentionally fail if platform cannot be determined
|
||||||
outlist.append(section)
|
if not env_platform:
|
||||||
# Add the TFT variants if the base variant is selected
|
print(f"Error: Could not determine platform for environment '{pio_env}'")
|
||||||
elif section.replace("-tft", "") in outlist and config[config[c].name].get("board_level") != "extra":
|
exit(1)
|
||||||
outlist.append(section)
|
# Store env details as a dictionary, and add to 'all_envs' list
|
||||||
elif section.replace("-inkhud", "") in outlist and config[config[c].name].get("board_level") != "extra":
|
env = {
|
||||||
outlist.append(section)
|
'name': pio_env,
|
||||||
if "board_check" in config[config[c].name]:
|
'platform': env_platform,
|
||||||
if (config[config[c].name]["board_check"] == "true") & (
|
'board_level': cfg.get(f"env:{pio_env}", 'board_level', default=None),
|
||||||
"check" in options
|
'board_check': bool(cfg.get(f"env:{pio_env}", 'board_check', default=False))
|
||||||
):
|
}
|
||||||
outlist.append(section)
|
all_envs.append(env)
|
||||||
if ("quick" in options) & (len(outlist) > 3):
|
|
||||||
|
# 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)))
|
print(json.dumps(random.sample(outlist, 3)))
|
||||||
else:
|
else:
|
||||||
print(json.dumps(outlist))
|
print(json.dumps(outlist))
|
||||||
|
@ -643,8 +643,16 @@ bool GPS::setup()
|
|||||||
delay(250);
|
delay(250);
|
||||||
} else if (IS_ONE_OF(gnssModel, GNSS_MODEL_AG3335, GNSS_MODEL_AG3352)) {
|
} 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)
|
// Configure NMEA (sentences will output once per fix)
|
||||||
_serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON
|
_serial_gps->write("$PAIR062,0,1*3F\r\n"); // GGA ON
|
||||||
_serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF
|
_serial_gps->write("$PAIR062,1,0*3F\r\n"); // GLL OFF
|
||||||
|
@ -199,7 +199,7 @@ void ExpressLRSFiveWay::sendKey(input_broker_event key)
|
|||||||
void ExpressLRSFiveWay::toggleGPS()
|
void ExpressLRSFiveWay::toggleGPS()
|
||||||
{
|
{
|
||||||
#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS
|
#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS
|
||||||
if (!config.device.disable_triple_click && (gps != nullptr)) {
|
if (gps != nullptr) {
|
||||||
gps->toggleGpsMode();
|
gps->toggleGpsMode();
|
||||||
screen->startAlert("GPS Toggled");
|
screen->startAlert("GPS Toggled");
|
||||||
alerting = true;
|
alerting = true;
|
||||||
|
@ -628,11 +628,6 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
|||||||
#ifdef PIN_GPS_EN
|
#ifdef PIN_GPS_EN
|
||||||
config.position.gps_en_gpio = PIN_GPS_EN;
|
config.position.gps_en_gpio = PIN_GPS_EN;
|
||||||
#endif
|
#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)
|
#if defined(USERPREFS_CONFIG_GPS_MODE)
|
||||||
config.position.gps_mode = USERPREFS_CONFIG_GPS_MODE;
|
config.position.gps_mode = USERPREFS_CONFIG_GPS_MODE;
|
||||||
#elif !HAS_GPS || GPS_DEFAULT_NOT_PRESENT
|
#elif !HAS_GPS || GPS_DEFAULT_NOT_PRESENT
|
||||||
|
@ -596,7 +596,6 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
if (config.device.button_gpio == c.payload_variant.device.button_gpio &&
|
if (config.device.button_gpio == c.payload_variant.device.button_gpio &&
|
||||||
config.device.buzzer_gpio == c.payload_variant.device.buzzer_gpio &&
|
config.device.buzzer_gpio == c.payload_variant.device.buzzer_gpio &&
|
||||||
config.device.role == c.payload_variant.device.role &&
|
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) {
|
config.device.rebroadcast_mode == c.payload_variant.device.rebroadcast_mode) {
|
||||||
requiresReboot = false;
|
requiresReboot = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user