Compare commits

..

No commits in common. "c28458d876fb2ea022c8fa2e1c1eca96f612e886" and "70d8da65619a0c102cf8a38fbe48f27adcae8ab4" have entirely different histories.

20 changed files with 60 additions and 87 deletions

View File

@ -1,7 +1,7 @@
name: Bug Report name: Bug Report
description: File a bug report description: File a bug report
title: "[Bug]: " title: "[Bug]: "
labels: [bug, triage] labels: ["bug", "triage"]
body: body:
- type: markdown - type: markdown
attributes: attributes:

View File

@ -1,7 +1,7 @@
name: New Board name: New Board
description: Request us to support new hardware description: Request us to support new hardware
title: "[Board]: " title: "[Board]: "
labels: [enhancement, triage] labels: ["enhancement", "triage"]
body: body:
- type: markdown - type: markdown
attributes: attributes:

View File

@ -1,7 +1,7 @@
name: Feature Request name: Feature Request
description: Request a new feature description: Request a new feature
title: "[Feature Request]: " title: "[Feature Request]: "
labels: [enhancement] labels: ["enhancement"]
body: body:
- type: markdown - type: markdown
attributes: attributes:

View File

@ -1,5 +0,0 @@
# Configuration related to self-hosted runner.
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- test-runner

View File

@ -34,7 +34,7 @@ inputs:
arch: arch:
description: Processor arch name description: Processor arch name
required: true required: true
default: esp32 default: "esp32"
runs: runs:
using: composite using: composite

View File

@ -1,13 +1,13 @@
name: Setup Build Base Composite Action name: "Setup Build Base Composite Action"
description: Base build actions for Meshtastic Platform IO steps description: "Base build actions for Meshtastic Platform IO steps"
runs: runs:
using: composite using: "composite"
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: "recursive"
ref: ${{github.event.pull_request.head.ref}} ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}} repository: ${{github.event.pull_request.head.repo.full_name}}

View File

@ -1,27 +1,26 @@
#trunk-ignore-all(yamllint/quoted-strings): required by dependabot syntax check
version: 2 version: 2
updates: updates:
- package-ecosystem: docker - package-ecosystem: docker
directory: devcontainer directory: devcontainer
schedule: schedule:
interval: daily interval: daily
time: "05:00" time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
timezone: US/Pacific timezone: US/Pacific
- package-ecosystem: docker - package-ecosystem: docker
directory: / directory: /
schedule: schedule:
interval: daily interval: daily
time: "05:00" time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
timezone: US/Pacific timezone: US/Pacific
- package-ecosystem: gitsubmodule - package-ecosystem: gitsubmodule
directory: / directory: /
schedule: schedule:
interval: daily interval: daily
time: "05:00" time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
timezone: US/Pacific timezone: US/Pacific
- package-ecosystem: github-actions - package-ecosystem: github-actions
directory: /.github/workflows directory: /.github/workflows
schedule: schedule:
interval: daily interval: daily
time: "05:00" time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
timezone: US/Pacific timezone: US/Pacific

View File

@ -7,8 +7,6 @@ on:
required: true required: true
type: string type: string
permissions: read-all
jobs: jobs:
build-nrf52: build-nrf52:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -7,8 +7,6 @@ on:
required: true required: true
type: string type: string
permissions: read-all
jobs: jobs:
build-rpi2040: build-rpi2040:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -7,8 +7,6 @@ on:
required: true required: true
type: string type: string
permissions: read-all
jobs: jobs:
build-stm32: build-stm32:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -2,11 +2,9 @@ name: End to end tests
on: on:
schedule: schedule:
- cron: 0 0 * * * # Run every day at midnight - cron: "0 0 * * *" # Run every day at midnight
workflow_dispatch: {} workflow_dispatch: {}
permissions: read-all
jobs: jobs:
native-tests: native-tests:
uses: ./.github/workflows/test_native.yml uses: ./.github/workflows/test_native.yml

View File

@ -8,4 +8,3 @@ line_length: false
spaces: false spaces: false
url: false url: false
whitespace: false whitespace: false
headings: false

View File

@ -8,11 +8,11 @@ plugins:
uri: https://github.com/trunk-io/plugins uri: https://github.com/trunk-io/plugins
lint: lint:
enabled: enabled:
- prettier@3.5.2 - prettier@3.5.1
- trufflehog@3.88.12 - trufflehog@3.88.12
- yamllint@1.35.1 - yamllint@1.35.1
- bandit@1.8.3 - bandit@1.8.3
- checkov@3.2.373 - checkov@3.2.372
- terrascan@1.19.9 - terrascan@1.19.9
- trivy@0.59.1 - trivy@0.59.1
- taplo@0.9.3 - taplo@0.9.3

View File

@ -1,23 +1,21 @@
# trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue # trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue
# trunk-ignore-all(hadolint/DL3008): Use latest version of apt packages for buildchain
# trunk-ignore-all(trivy/DS002): We must run as root for this container # trunk-ignore-all(trivy/DS002): We must run as root for this container
# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container
# trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container
# trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
FROM python:3.13-bookworm AS builder FROM python:3.12-bookworm AS builder
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC ENV TZ=Etc/UTC
# Install Dependencies # Install Dependencies
ENV PIP_ROOT_USER_ACTION=ignore ENV PIP_ROOT_USER_ACTION=ignore
RUN apt-get update && apt-get install --no-install-recommends -y \ RUN apt-get update && apt-get install --no-install-recommends -y wget g++ zip git ca-certificates \
wget g++ zip git ca-certificates \
libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev \ libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev \
libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \ libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config && \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \ apt-get clean && rm -rf /var/lib/apt/lists/* && \
&& pip install --no-cache-dir -U platformio \ pip install --no-cache-dir -U platformio==6.1.16 && \
&& mkdir /tmp/firmware mkdir /tmp/firmware
# Copy source code # Copy source code
WORKDIR /tmp/firmware WORKDIR /tmp/firmware
@ -37,9 +35,8 @@ ENV TZ=Etc/UTC
# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root # nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root
USER root USER root
RUN apt-get update && apt-get --no-install-recommends -y install \ RUN apt-get update && apt-get --no-install-recommends -y install libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libulfius2.7 libusb-1.0-0-dev liborcania2.3 libssl3 && \
libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libulfius2.7 libusb-1.0-0-dev liborcania2.3 libssl3 \ apt-get clean && rm -rf /var/lib/apt/lists/* \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/lib/meshtasticd \ && mkdir -p /var/lib/meshtasticd \
&& mkdir -p /etc/meshtasticd/config.d \ && mkdir -p /etc/meshtasticd/config.d \
&& mkdir -p /etc/meshtasticd/ssl && mkdir -p /etc/meshtasticd/ssl

View File

@ -1,18 +1,14 @@
# trunk-ignore-all(trivy/DS002): We must run as root for this container # trunk-ignore-all(trivy/DS002): We must run as root for this container
# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container
# trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container
# trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
FROM python:3.13-alpine3.21 AS builder FROM python:3.12-alpine3.21 AS builder
ENV PIP_ROOT_USER_ACTION=ignore ENV PIP_ROOT_USER_ACTION=ignore
RUN apk --no-cache add \ RUN apk add bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \
bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev openssl-dev pkgconf argp-standalone && \
libusb-dev i2c-tools-dev openssl-dev pkgconf argp-standalone \ pip install --no-cache-dir -U platformio==6.1.16 && \
&& rm -rf /var/cache/apk/* \ mkdir /tmp/firmware
&& pip install --no-cache-dir -U platformio \
&& mkdir /tmp/firmware
WORKDIR /tmp/firmware WORKDIR /tmp/firmware
COPY . /tmp/firmware COPY . /tmp/firmware
@ -31,9 +27,7 @@ FROM alpine:3.21
# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root # nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root
USER root USER root
RUN apk --no-cache add \ RUN apk add libstdc++ libgpiod yaml-cpp libusb i2c-tools \
libstdc++ libgpiod yaml-cpp libusb i2c-tools \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /var/lib/meshtasticd \ && mkdir -p /var/lib/meshtasticd \
&& mkdir -p /etc/meshtasticd/config.d \ && mkdir -p /etc/meshtasticd/config.d \
&& mkdir -p /etc/meshtasticd/ssl && mkdir -p /etc/meshtasticd/ssl

@ -1 +1 @@
Subproject commit 5c6156d2aa10d62cca3e57ffc117b934ef2fbffe Subproject commit e5dbf9f73157def18dd2b831a86a8317574811ec

@ -1 +1 @@
Subproject commit 2a3a67f0431926dc3f32a8b216d264daab09b9bf Subproject commit 79298fcdf04c1e680f5abd875233394f44ddaf7a

View File

@ -144,9 +144,9 @@ void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state,
bearingToOther -= myHeading; bearingToOther -= myHeading;
screen->drawNodeHeading(display, compassX, compassY, compassDiam, bearingToOther); screen->drawNodeHeading(display, compassX, compassY, compassDiam, bearingToOther);
float bearingToOtherDegrees = (bearingToOther < 0) ? bearingToOther + 2 * PI : bearingToOther; float bearingToOtherDegrees = (bearingToOther < 0) ? bearingToOther + 2*PI : bearingToOther;
bearingToOtherDegrees = bearingToOtherDegrees * 180 / PI; bearingToOtherDegrees = bearingToOtherDegrees * 180 / PI;
// Distance to Waypoint // Distance to Waypoint
float d = GeoCoord::latLongToMeter(DegD(wp.latitude_i), DegD(wp.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i)); float d = GeoCoord::latLongToMeter(DegD(wp.latitude_i), DegD(wp.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));
if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) { if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {
@ -161,6 +161,7 @@ void WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state,
snprintf(distStr, sizeof(distStr), "%.1fkm %.0f°", d / 1000, bearingToOtherDegrees); snprintf(distStr, sizeof(distStr), "%.1fkm %.0f°", d / 1000, bearingToOtherDegrees);
} }
} }
// If our node doesn't have position // If our node doesn't have position

View File

@ -1,4 +1,3 @@
// trunk-ignore-all(gitleaks): These are dummy values. Not real secrets.
#include "CryptoEngine.h" #include "CryptoEngine.h"
#include "TestUtil.h" #include "TestUtil.h"

View File

@ -116,26 +116,24 @@ The default pin mapping in `variant.h` uses 'automatic Tx/Rx switching' mode. If
&nbsp; &nbsp;
<strong>MCU -> E22 connections</strong> <strong>MCU -> E22 connections</strong>
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| Xiao BLE pin | variant.h definition | E22 pin | Notes | | :------------ | :---------------------------- | :-----------------| :------------------------------------------------------------------------------------------------------------------- |
| :----------- | :------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------- | | D0 | SX126X_CS | 19 (NSS) | |
| D0 | SX126X_CS | 19 (NSS) | | | D1 | SX126X_DIO1 | 13 (DIO1) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | | | D2 | SX126X_BUSY | 14 (BUSY) | |
| D2 | SX126X_BUSY | 14 (BUSY) | | | D3 | SX126X_RESET | 15 (NRST) | |
| D3 | SX126X_RESET | 15 (NRST) | | | D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |
| D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. | | D8 | PIN_SPI_SCK | 18 (SCK) | |
| D8 | PIN_SPI_SCK | 18 (SCK) | | | D9 | PIN_SPI_MISO | 16 (MISO) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | | | D10 | PIN_SPI_MOSI | 17 (MOSI) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
&nbsp; &nbsp;
&nbsp; &nbsp;
<strong>E22 -> E22 connections:</strong> <strong>E22 -> E22 connections:</strong>
| E22 pin | E22 pin | Notes |
| E22 pin | E22 pin | Notes | | :------------ | :---------------------------- | :------------------------------------------------------------------------ |
| :------ | :------ | :------------------------------------------------------------------------ | | TXEN | DIO2 | These must be physically connected for automatic Tx/Rx switching to work. |
| TXEN | DIO2 | These must be physically connected for automatic Tx/Rx switching to work. |
<h3>Note</h3> <h3>Note</h3>
@ -150,18 +148,17 @@ The schematic (`xiao-ble-e22-schematic.png`) in the `eagle-project` directory us
<h3>Example wiring for "Manual Tx/Rx switching" mode:</h3> <h3>Example wiring for "Manual Tx/Rx switching" mode:</h3>
<strong>MCU -> E22 connections</strong> <strong>MCU -> E22 connections</strong>
| Xiao BLE pin | variant.h definition | E22 pin | Notes |
| Xiao BLE pin | variant.h definition | E22 pin | Notes | | :------------ | :---------------------------- | :-----------------| :--------------------------- |
| :----------- | :------------------- | :-------- | :---- | | D0 | SX126X_CS | 19 (NSS) | |
| D0 | SX126X_CS | 19 (NSS) | | | D1 | SX126X_DIO1 | 13 (DIO1) | |
| D1 | SX126X_DIO1 | 13 (DIO1) | | | D2 | SX126X_BUSY | 14 (BUSY) | |
| D2 | SX126X_BUSY | 14 (BUSY) | | | D3 | SX126X_RESET | 15 (NRST) | |
| D3 | SX126X_RESET | 15 (NRST) | | | D6 | SX126X_TXEN | 7 (TXEN) | |
| D6 | SX126X_TXEN | 7 (TXEN) | | | D7 | SX126X_RXEN | 6 (RXEN) | |
| D7 | SX126X_RXEN | 6 (RXEN) | | | D8 | PIN_SPI_SCK | 18 (SCK) | |
| D8 | PIN_SPI_SCK | 18 (SCK) | | | D9 | PIN_SPI_MISO | 16 (MISO) | |
| D9 | PIN_SPI_MISO | 16 (MISO) | | | D10 | PIN_SPI_MOSI | 17 (MOSI) | |
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
<strong>E22 -> E22 connections:</strong> (none) <strong>E22 -> E22 connections:</strong> (none)