mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
junk in the Trunk (#6149)
This commit is contained in:
parent
bf958ed01d
commit
4e575872da
2
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
2
.github/ISSUE_TEMPLATE/Bug Report.yml
vendored
@ -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:
|
||||||
|
2
.github/ISSUE_TEMPLATE/New Board.yml
vendored
2
.github/ISSUE_TEMPLATE/New Board.yml
vendored
@ -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:
|
||||||
|
2
.github/ISSUE_TEMPLATE/feature.yml
vendored
2
.github/ISSUE_TEMPLATE/feature.yml
vendored
@ -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:
|
||||||
|
5
.github/actionlint.yaml
vendored
Normal file
5
.github/actionlint.yaml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Configuration related to self-hosted runner.
|
||||||
|
self-hosted-runner:
|
||||||
|
# Labels of self-hosted runner in array of strings.
|
||||||
|
labels:
|
||||||
|
- test-runner
|
2
.github/actions/build-variant/action.yml
vendored
2
.github/actions/build-variant/action.yml
vendored
@ -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
|
||||||
|
8
.github/actions/setup-base/action.yml
vendored
8
.github/actions/setup-base/action.yml
vendored
@ -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}}
|
||||||
|
|
||||||
|
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
@ -1,26 +1,27 @@
|
|||||||
|
#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" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
|
time: "05:00"
|
||||||
timezone: US/Pacific
|
timezone: US/Pacific
|
||||||
- package-ecosystem: docker
|
- package-ecosystem: docker
|
||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
|
time: "05:00"
|
||||||
timezone: US/Pacific
|
timezone: US/Pacific
|
||||||
- package-ecosystem: gitsubmodule
|
- package-ecosystem: gitsubmodule
|
||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
time: "05:00" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
|
time: "05:00"
|
||||||
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" # trunk-ignore(yamllint/quoted-strings): required by dependabot syntax check
|
time: "05:00"
|
||||||
timezone: US/Pacific
|
timezone: US/Pacific
|
||||||
|
2
.github/workflows/build_nrf52.yml
vendored
2
.github/workflows/build_nrf52.yml
vendored
@ -7,6 +7,8 @@ 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
|
||||||
|
2
.github/workflows/build_rpi2040.yml
vendored
2
.github/workflows/build_rpi2040.yml
vendored
@ -7,6 +7,8 @@ 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
|
||||||
|
2
.github/workflows/build_stm32.yml
vendored
2
.github/workflows/build_stm32.yml
vendored
@ -7,6 +7,8 @@ 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
|
||||||
|
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -2,9 +2,11 @@ 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
|
||||||
|
@ -8,3 +8,4 @@ line_length: false
|
|||||||
spaces: false
|
spaces: false
|
||||||
url: false
|
url: false
|
||||||
whitespace: false
|
whitespace: false
|
||||||
|
headings: false
|
||||||
|
19
Dockerfile
19
Dockerfile
@ -1,8 +1,9 @@
|
|||||||
# 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.12-bookworm AS builder
|
FROM python:3.12-bookworm AS builder
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@ -10,12 +11,13 @@ 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 wget g++ zip git ca-certificates \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
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==6.1.16 && \
|
&& pip install --no-cache-dir -U platformio \
|
||||||
mkdir /tmp/firmware
|
&& mkdir /tmp/firmware
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
WORKDIR /tmp/firmware
|
WORKDIR /tmp/firmware
|
||||||
@ -35,8 +37,9 @@ 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 libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libulfius2.7 libusb-1.0-0-dev liborcania2.3 libssl3 && \
|
RUN apt-get update && apt-get --no-install-recommends -y install \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* \
|
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/* \
|
||||||
&& 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,14 +1,18 @@
|
|||||||
# 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.12-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 add bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \
|
RUN apk --no-cache add \
|
||||||
libusb-dev i2c-tools-dev openssl-dev pkgconf argp-standalone && \
|
bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \
|
||||||
pip install --no-cache-dir -U platformio==6.1.16 && \
|
libusb-dev i2c-tools-dev openssl-dev pkgconf argp-standalone \
|
||||||
mkdir /tmp/firmware
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
&& pip install --no-cache-dir -U platformio \
|
||||||
|
&& mkdir /tmp/firmware
|
||||||
|
|
||||||
WORKDIR /tmp/firmware
|
WORKDIR /tmp/firmware
|
||||||
COPY . /tmp/firmware
|
COPY . /tmp/firmware
|
||||||
@ -27,7 +31,9 @@ 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 add libstdc++ libgpiod yaml-cpp libusb i2c-tools \
|
RUN apk --no-cache add \
|
||||||
|
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
|
||||||
|
@ -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,7 +161,6 @@ 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
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// trunk-ignore-all(gitleaks): These are dummy values. Not real secrets.
|
||||||
#include "CryptoEngine.h"
|
#include "CryptoEngine.h"
|
||||||
|
|
||||||
#include "TestUtil.h"
|
#include "TestUtil.h"
|
||||||
|
@ -116,24 +116,26 @@ The default pin mapping in `variant.h` uses 'automatic Tx/Rx switching' mode. If
|
|||||||
|
|
||||||
|
|
||||||
<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) | |
|
| :----------- | :------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------- |
|
||||||
| D1 | SX126X_DIO1 | 13 (DIO1) | |
|
| D0 | SX126X_CS | 19 (NSS) | |
|
||||||
| D2 | SX126X_BUSY | 14 (BUSY) | |
|
| D1 | SX126X_DIO1 | 13 (DIO1) | |
|
||||||
| D3 | SX126X_RESET | 15 (NRST) | |
|
| D2 | SX126X_BUSY | 14 (BUSY) | |
|
||||||
| D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |
|
| D3 | SX126X_RESET | 15 (NRST) | |
|
||||||
| D8 | PIN_SPI_SCK | 18 (SCK) | |
|
| D7 | SX126X_RXEN | 6 (RXEN) | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |
|
||||||
| D9 | PIN_SPI_MISO | 16 (MISO) | |
|
| D8 | PIN_SPI_SCK | 18 (SCK) | |
|
||||||
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
|
| D9 | PIN_SPI_MISO | 16 (MISO) | |
|
||||||
|
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
@ -148,17 +150,18 @@ 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) | |
|
| :----------- | :------------------- | :-------- | :---- |
|
||||||
| D1 | SX126X_DIO1 | 13 (DIO1) | |
|
| D0 | SX126X_CS | 19 (NSS) | |
|
||||||
| D2 | SX126X_BUSY | 14 (BUSY) | |
|
| D1 | SX126X_DIO1 | 13 (DIO1) | |
|
||||||
| D3 | SX126X_RESET | 15 (NRST) | |
|
| D2 | SX126X_BUSY | 14 (BUSY) | |
|
||||||
| D6 | SX126X_TXEN | 7 (TXEN) | |
|
| D3 | SX126X_RESET | 15 (NRST) | |
|
||||||
| D7 | SX126X_RXEN | 6 (RXEN) | |
|
| D6 | SX126X_TXEN | 7 (TXEN) | |
|
||||||
| D8 | PIN_SPI_SCK | 18 (SCK) | |
|
| D7 | SX126X_RXEN | 6 (RXEN) | |
|
||||||
| D9 | PIN_SPI_MISO | 16 (MISO) | |
|
| D8 | PIN_SPI_SCK | 18 (SCK) | |
|
||||||
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
|
| D9 | PIN_SPI_MISO | 16 (MISO) | |
|
||||||
|
| D10 | PIN_SPI_MOSI | 17 (MOSI) | |
|
||||||
|
|
||||||
<strong>E22 -> E22 connections:</strong> (none)
|
<strong>E22 -> E22 connections:</strong> (none)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user