mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Compare commits
1 Commits
rak-autoco
...
ble-locati
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bad6c5b96a |
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,3 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
open_collective: meshtastic
|
|
||||||
50
.github/actions/build-variant/action.yml
vendored
50
.github/actions/build-variant/action.yml
vendored
@@ -27,10 +27,10 @@ inputs:
|
|||||||
description: A newline separated list of paths to store as artifacts
|
description: A newline separated list of paths to store as artifacts
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
# include-web-ui:
|
include-web-ui:
|
||||||
# description: Include the web UI in the build
|
description: Include the web UI in the build
|
||||||
# required: false
|
required: false
|
||||||
# default: "false"
|
default: "false"
|
||||||
arch:
|
arch:
|
||||||
description: Processor arch name
|
description: Processor arch name
|
||||||
required: true
|
required: true
|
||||||
@@ -43,29 +43,29 @@ runs:
|
|||||||
id: base
|
id: base
|
||||||
uses: ./.github/actions/setup-base
|
uses: ./.github/actions/setup-base
|
||||||
|
|
||||||
# - name: Get web ui version
|
- name: Get web ui version
|
||||||
# if: inputs.include-web-ui == 'true'
|
if: inputs.include-web-ui == 'true'
|
||||||
# id: webver
|
id: webver
|
||||||
# shell: bash
|
shell: bash
|
||||||
# run: |
|
run: |
|
||||||
# echo "ver=$(cat bin/web.version)" >> $GITHUB_OUTPUT
|
echo "ver=$(cat bin/web.version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# - name: Pull web ui
|
- name: Pull web ui
|
||||||
# if: inputs.include-web-ui == 'true'
|
if: inputs.include-web-ui == 'true'
|
||||||
# uses: dsaltares/fetch-gh-release-asset@master
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
# with:
|
with:
|
||||||
# repo: meshtastic/web
|
repo: meshtastic/web
|
||||||
# file: build.tar
|
file: build.tar
|
||||||
# target: build.tar
|
target: build.tar
|
||||||
# token: ${{ inputs.github_token }}
|
token: ${{ inputs.github_token }}
|
||||||
# version: tags/v${{ steps.webver.outputs.ver }}
|
version: tags/v${{ steps.webver.outputs.ver }}
|
||||||
|
|
||||||
# - name: Unpack web ui
|
- name: Unpack web ui
|
||||||
# if: inputs.include-web-ui == 'true'
|
if: inputs.include-web-ui == 'true'
|
||||||
# shell: bash
|
shell: bash
|
||||||
# run: |
|
run: |
|
||||||
# tar -xf build.tar -C data/static
|
tar -xf build.tar -C data/static
|
||||||
# rm build.tar
|
rm build.tar
|
||||||
|
|
||||||
- name: Remove debug flags for release
|
- name: Remove debug flags for release
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
2
.github/actions/setup-base/action.yml
vendored
2
.github/actions/setup-base/action.yml
vendored
@@ -5,7 +5,7 @@ runs:
|
|||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
|||||||
3
.github/pull_request_template.md
vendored
3
.github/pull_request_template.md
vendored
@@ -1,7 +1,6 @@
|
|||||||
## 🙏 Thank you for sending in a pull request, here's some tips to get started!
|
## 🙏 Thank you for sending in a pull request, here's some tips to get started!
|
||||||
|
|
||||||
### ❌ (Please delete all these tips and replace them with your text) ❌
|
### ❌ (Please delete all these tips and replace them with your text) ❌
|
||||||
|
|
||||||
- Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first
|
- Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first
|
||||||
to say "Hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback
|
to say "Hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback
|
||||||
is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
|
is appreciated." This will allow other devs to potentially save you time by not accidentially duplicating work etc...
|
||||||
@@ -16,8 +15,8 @@
|
|||||||
- If you do not have the affected hardware to test your code changes adequately against regressions, please indicate this, so that contributors and commnunity members can help test your changes.
|
- If you do not have the affected hardware to test your code changes adequately against regressions, please indicate this, so that contributors and commnunity members can help test your changes.
|
||||||
- If your PR gets accepted you can request a "Contributor" role in the Meshtastic Discord
|
- If your PR gets accepted you can request a "Contributor" role in the Meshtastic Discord
|
||||||
|
|
||||||
## 🤝 Attestations
|
|
||||||
|
|
||||||
|
## 🤝 Attestations
|
||||||
- [ ] I have tested that my proposed changes behave as described.
|
- [ ] I have tested that my proposed changes behave as described.
|
||||||
- [ ] I have tested that my proposed changes do not cause any obvious regressions on the following devices:
|
- [ ] I have tested that my proposed changes do not cause any obvious regressions on the following devices:
|
||||||
- [ ] Heltec (Lora32) V3
|
- [ ] Heltec (Lora32) V3
|
||||||
|
|||||||
2
.github/workflows/build_debian_src.yml
vendored
2
.github/workflows/build_debian_src.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
path: meshtasticd
|
path: meshtasticd
|
||||||
|
|||||||
37
.github/workflows/build_esp32.yml
vendored
Normal file
37
.github/workflows/build_esp32.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build ESP32
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-esp32:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build ESP32
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
remove-debug-flags: >-
|
||||||
|
./arch/esp32/esp32.ini
|
||||||
|
./arch/esp32/esp32s2.ini
|
||||||
|
./arch/esp32/esp32s3.ini
|
||||||
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
|
build-script-path: bin/build-esp32.sh
|
||||||
|
ota-firmware-source: firmware.bin
|
||||||
|
ota-firmware-target: release/bleota.bin
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32
|
||||||
37
.github/workflows/build_esp32_c3.yml
vendored
Normal file
37
.github/workflows/build_esp32_c3.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build ESP32-C3
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-esp32-c3:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build ESP32-C3
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
remove-debug-flags: >-
|
||||||
|
./arch/esp32/esp32.ini
|
||||||
|
./arch/esp32/esp32s2.ini
|
||||||
|
./arch/esp32/esp32s3.ini
|
||||||
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
|
build-script-path: bin/build-esp32.sh
|
||||||
|
ota-firmware-source: firmware-c3.bin
|
||||||
|
ota-firmware-target: release/bleota-c3.bin
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32c3
|
||||||
37
.github/workflows/build_esp32_c6.yml
vendored
Normal file
37
.github/workflows/build_esp32_c6.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build ESP32-C6
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-esp32-c6:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build ESP32-C6
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
remove-debug-flags: >-
|
||||||
|
./arch/esp32/esp32.ini
|
||||||
|
./arch/esp32/esp32s2.ini
|
||||||
|
./arch/esp32/esp32s3.ini
|
||||||
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
|
build-script-path: bin/build-esp32.sh
|
||||||
|
ota-firmware-source: firmware-c3.bin
|
||||||
|
ota-firmware-target: release/bleota-c3.bin
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32c6
|
||||||
37
.github/workflows/build_esp32_s3.yml
vendored
Normal file
37
.github/workflows/build_esp32_s3.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Build ESP32-S3
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-esp32-s3:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build ESP32-S3
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
remove-debug-flags: >-
|
||||||
|
./arch/esp32/esp32.ini
|
||||||
|
./arch/esp32/esp32s2.ini
|
||||||
|
./arch/esp32/esp32s3.ini
|
||||||
|
./arch/esp32/esp32c3.ini
|
||||||
|
./arch/esp32/esp32c6.ini
|
||||||
|
build-script-path: bin/build-esp32.sh
|
||||||
|
ota-firmware-source: firmware-s3.bin
|
||||||
|
ota-firmware-target: release/bleota-s3.bin
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
include-web-ui: true
|
||||||
|
arch: esp32s3
|
||||||
66
.github/workflows/build_firmware.yml
vendored
66
.github/workflows/build_firmware.yml
vendored
@@ -1,66 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
platform:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
pio_env:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
pio-build:
|
|
||||||
name: build-${{ inputs.platform }}
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
|
||||||
repository: ${{github.event.pull_request.head.repo.full_name}}
|
|
||||||
|
|
||||||
- name: Set OTA firmware source and target
|
|
||||||
if: startsWith(inputs.platform, 'esp32')
|
|
||||||
id: ota_dir
|
|
||||||
env:
|
|
||||||
PIO_PLATFORM: ${{ inputs.platform }}
|
|
||||||
run: |
|
|
||||||
if [ "$PIO_PLATFORM" = "esp32s3" ]; then
|
|
||||||
echo "src=firmware-s3.bin" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgt=release/bleota-s3.bin" >> $GITHUB_OUTPUT
|
|
||||||
elif [ "$PIO_PLATFORM" = "esp32c3" ] || [ "$PIO_PLATFORM" = "esp32c6" ]; then
|
|
||||||
echo "src=firmware-c3.bin" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgt=release/bleota-c3.bin" >> $GITHUB_OUTPUT
|
|
||||||
elif [ "$PIO_PLATFORM" = "esp32" ]; then
|
|
||||||
echo "src=firmware.bin" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgt=release/bleota.bin" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build ${{ inputs.platform }}
|
|
||||||
id: build
|
|
||||||
uses: meshtastic/gh-action-firmware@main
|
|
||||||
with:
|
|
||||||
pio_platform: ${{ inputs.platform }}
|
|
||||||
pio_env: ${{ inputs.pio_env }}
|
|
||||||
pio_target: build
|
|
||||||
ota_firmware_source: ${{ steps.ota_dir.outputs.src || '' }}
|
|
||||||
ota_firmware_target: ${{ steps.ota_dir.outputs.tgt || '' }}
|
|
||||||
|
|
||||||
- name: Store binaries as an artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: firmware-${{ inputs.platform }}-${{ inputs.pio_env }}-${{ inputs.version }}.zip
|
|
||||||
overwrite: true
|
|
||||||
path: |
|
|
||||||
release/*.bin
|
|
||||||
release/*.elf
|
|
||||||
release/*.uf2
|
|
||||||
release/*.hex
|
|
||||||
release/*-ota.zip
|
|
||||||
30
.github/workflows/build_nrf52.yml
vendored
Normal file
30
.github/workflows/build_nrf52.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Build NRF52
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-nrf52:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build NRF52
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
build-script-path: bin/build-nrf52.sh
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.hex
|
||||||
|
release/*.uf2
|
||||||
|
release/*.elf
|
||||||
|
release/*.zip
|
||||||
|
arch: nrf52840
|
||||||
28
.github/workflows/build_rpi2040.yml
vendored
Normal file
28
.github/workflows/build_rpi2040.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Build RPI2040
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-rpi2040:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build Raspberry Pi 2040
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
build-script-path: bin/build-rpi2040.sh
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.uf2
|
||||||
|
release/*.elf
|
||||||
|
arch: rp2040
|
||||||
29
.github/workflows/build_stm32.yml
vendored
Normal file
29
.github/workflows/build_stm32.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: Build STM32
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-stm32:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build STM32WL
|
||||||
|
id: build
|
||||||
|
uses: ./.github/actions/build-variant
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
board: ${{ inputs.board }}
|
||||||
|
build-script-path: bin/build-stm32.sh
|
||||||
|
artifact-paths: |
|
||||||
|
release/*.hex
|
||||||
|
release/*.bin
|
||||||
|
release/*.elf
|
||||||
|
arch: stm32
|
||||||
8
.github/workflows/daily_packaging.yml
vendored
8
.github/workflows/daily_packaging.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Daily Packaging
|
name: Daily Packaging
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 2 * * *
|
- cron: 0 9 * * *
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -30,11 +30,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
series:
|
series: [plucky, oracular, noble, jammy]
|
||||||
- jammy # 22.04
|
|
||||||
- noble # 24.04
|
|
||||||
- plucky # 25.04
|
|
||||||
- questing # 25.10
|
|
||||||
uses: ./.github/workflows/package_ppa.yml
|
uses: ./.github/workflows/package_ppa.yml
|
||||||
with:
|
with:
|
||||||
ppa_repo: ppa:meshtastic/daily
|
ppa_repo: ppa:meshtastic/daily
|
||||||
|
|||||||
2
.github/workflows/docker_build.yml
vendored
2
.github/workflows/docker_build.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
runs-on: ${{ inputs.runs-on }}
|
runs-on: ${{ inputs.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
|||||||
2
.github/workflows/docker_manifest.yml
vendored
2
.github/workflows/docker_manifest.yml
vendored
@@ -83,7 +83,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
|||||||
2
.github/workflows/hook_copr.yml
vendored
2
.github/workflows/hook_copr.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|||||||
254
.github/workflows/main_matrix.yml
vendored
254
.github/workflows/main_matrix.yml
vendored
@@ -30,31 +30,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
arch:
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check]
|
||||||
- esp32
|
runs-on: ubuntu-latest
|
||||||
- esp32s3
|
|
||||||
- esp32c3
|
|
||||||
- esp32c6
|
|
||||||
- nrf52840
|
|
||||||
- rp2040
|
|
||||||
- rp2350
|
|
||||||
- stm32
|
|
||||||
- check
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- id: checkout
|
||||||
- uses: actions/setup-python@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
name: Checkout base
|
||||||
python-version: 3.x
|
- id: jsonStep
|
||||||
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}})
|
||||||
else
|
else
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} pr)
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} quick)
|
||||||
fi
|
fi
|
||||||
echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF Targets: $TARGETS"
|
echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF Targets: $TARGETS"
|
||||||
echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT
|
echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT
|
||||||
@@ -65,25 +52,9 @@ jobs:
|
|||||||
esp32c6: ${{ steps.jsonStep.outputs.esp32c6 }}
|
esp32c6: ${{ steps.jsonStep.outputs.esp32c6 }}
|
||||||
nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }}
|
nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }}
|
||||||
rp2040: ${{ steps.jsonStep.outputs.rp2040 }}
|
rp2040: ${{ steps.jsonStep.outputs.rp2040 }}
|
||||||
rp2350: ${{ steps.jsonStep.outputs.rp2350 }}
|
|
||||||
stm32: ${{ steps.jsonStep.outputs.stm32 }}
|
stm32: ${{ steps.jsonStep.outputs.stm32 }}
|
||||||
check: ${{ steps.jsonStep.outputs.check }}
|
check: ${{ steps.jsonStep.outputs.check }}
|
||||||
|
|
||||||
version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
- name: Get release version string
|
|
||||||
run: |
|
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
env:
|
|
||||||
BUILD_LOCATION: local
|
|
||||||
outputs:
|
|
||||||
long: ${{ steps.version.outputs.long }}
|
|
||||||
deb: ${{ steps.version.outputs.deb }}
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
needs: setup
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
@@ -93,7 +64,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
- name: Build base
|
- name: Build base
|
||||||
id: base
|
id: base
|
||||||
uses: ./.github/actions/setup-base
|
uses: ./.github/actions/setup-base
|
||||||
@@ -101,95 +72,69 @@ jobs:
|
|||||||
run: bin/check-all.sh ${{ matrix.board }}
|
run: bin/check-all.sh ${{ matrix.board }}
|
||||||
|
|
||||||
build-esp32:
|
build-esp32:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_esp32.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: esp32
|
|
||||||
|
|
||||||
build-esp32s3:
|
build-esp32-s3:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_esp32_s3.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: esp32s3
|
|
||||||
|
|
||||||
build-esp32c3:
|
build-esp32-c3:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_esp32_c3.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: esp32c3
|
|
||||||
|
|
||||||
build-esp32c6:
|
build-esp32-c6:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32c6) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32c6) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_esp32_c6.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: esp32c6
|
|
||||||
|
|
||||||
build-nrf52840:
|
build-nrf52:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
|
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_nrf52.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: nrf52840
|
|
||||||
|
|
||||||
build-rp2040:
|
build-rpi2040:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
|
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_rpi2040.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: rp2040
|
|
||||||
|
|
||||||
build-rp2350:
|
|
||||||
needs: [setup, version]
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.rp2350) }}
|
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
|
||||||
with:
|
|
||||||
version: ${{ needs.version.outputs.long }}
|
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: rp2350
|
|
||||||
|
|
||||||
build-stm32:
|
build-stm32:
|
||||||
needs: [setup, version]
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
|
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
|
||||||
uses: ./.github/workflows/build_firmware.yml
|
uses: ./.github/workflows/build_stm32.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.version.outputs.long }}
|
board: ${{ matrix.board }}
|
||||||
pio_env: ${{ matrix.board }}
|
|
||||||
platform: stm32
|
|
||||||
|
|
||||||
build-debian-src:
|
build-debian-src:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
uses: ./.github/workflows/build_debian_src.yml
|
uses: ./.github/workflows/build_debian_src.yml
|
||||||
with:
|
with:
|
||||||
series: UNRELEASED
|
series: UNRELEASED
|
||||||
@@ -264,36 +209,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
arch:
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
||||||
- esp32
|
|
||||||
- esp32s3
|
|
||||||
- esp32c3
|
|
||||||
- esp32c6
|
|
||||||
- nrf52840
|
|
||||||
- rp2040
|
|
||||||
- rp2350
|
|
||||||
- stm32
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
[
|
[
|
||||||
version,
|
|
||||||
build-esp32,
|
build-esp32,
|
||||||
build-esp32s3,
|
build-esp32-s3,
|
||||||
build-esp32c3,
|
build-esp32-c3,
|
||||||
build-esp32c6,
|
build-esp32-c6,
|
||||||
build-nrf52840,
|
build-nrf52,
|
||||||
build-rp2040,
|
build-rpi2040,
|
||||||
build-rp2350,
|
|
||||||
build-stm32,
|
build-stm32,
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
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}}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ./
|
path: ./
|
||||||
pattern: firmware-${{matrix.arch}}-*
|
pattern: firmware-${{matrix.arch}}-*
|
||||||
@@ -302,13 +237,17 @@ jobs:
|
|||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
- name: Move files up
|
- name: Move files up
|
||||||
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
- name: Repackage in single firmware zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
./firmware-*.bin
|
./firmware-*.bin
|
||||||
@@ -318,13 +257,14 @@ jobs:
|
|||||||
./device-*.sh
|
./device-*.sh
|
||||||
./device-*.bat
|
./device-*.bat
|
||||||
./littlefs-*.bin
|
./littlefs-*.bin
|
||||||
|
./littlefswebui-*.bin
|
||||||
./bleota*bin
|
./bleota*bin
|
||||||
./Meshtastic_nRF52_factory_erase*.uf2
|
./Meshtastic_nRF52_factory_erase*.uf2
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
@@ -338,12 +278,12 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
- name: Repackage in single elfs zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: ./*.elf
|
path: ./*.elf
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
@@ -351,8 +291,8 @@ jobs:
|
|||||||
- uses: scruplelesswizard/comment-artifact@main
|
- uses: scruplelesswizard/comment-artifact@main
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
description: "Download firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
description: "Download firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-artifacts:
|
release-artifacts:
|
||||||
@@ -361,49 +301,56 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
needs:
|
needs:
|
||||||
- version
|
|
||||||
- gather-artifacts
|
- gather-artifacts
|
||||||
- build-debian-src
|
- build-debian-src
|
||||||
- package-pio-deps-native-tft
|
- package-pio-deps-native-tft
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
env:
|
||||||
|
BUILD_LOCATION: local
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
id: create_release
|
id: create_release
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
name: Meshtastic Firmware ${{ needs.version.outputs.long }} Alpha
|
name: Meshtastic Firmware ${{ steps.version.outputs.long }} Alpha
|
||||||
tag_name: v${{ needs.version.outputs.long }}
|
tag_name: v${{ steps.version.outputs.long }}
|
||||||
body: |
|
body: |
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
|
|
||||||
- name: Download source deb
|
- name: Download source deb
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-debian-${{ needs.version.outputs.deb }}~UNRELEASED-src
|
pattern: firmware-debian-${{ steps.version.outputs.deb }}~UNRELEASED-src
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output/debian-src
|
path: ./output/debian-src
|
||||||
|
|
||||||
- name: Download `native-tft` pio deps
|
- name: Download `native-tft` pio deps
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: platformio-deps-native-tft-${{ needs.version.outputs.long }}
|
pattern: platformio-deps-native-tft-${{ steps.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output/pio-deps-native-tft
|
path: ./output/pio-deps-native-tft
|
||||||
|
|
||||||
- name: Zip Linux sources
|
- name: Zip Linux sources
|
||||||
working-directory: output
|
working-directory: output
|
||||||
run: |
|
run: |
|
||||||
zip -j -9 -r ./meshtasticd-${{ needs.version.outputs.deb }}-src.zip ./debian-src
|
zip -j -9 -r ./meshtasticd-${{ steps.version.outputs.deb }}-src.zip ./debian-src
|
||||||
zip -9 -r ./platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip ./pio-deps-native-tft
|
zip -9 -r ./platformio-deps-native-tft-${{ steps.version.outputs.long }}.zip ./pio-deps-native-tft
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
@@ -413,8 +360,8 @@ jobs:
|
|||||||
# Only run when targeting master branch with workflow_dispatch
|
# Only run when targeting master branch with workflow_dispatch
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload v${{ needs.version.outputs.long }} ./output/meshtasticd-${{ needs.version.outputs.deb }}-src.zip
|
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip
|
||||||
gh release upload v${{ needs.version.outputs.long }} ./output/platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip
|
gh release upload v${{ steps.version.outputs.long }} ./output/platformio-deps-native-tft-${{ steps.version.outputs.long }}.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -422,30 +369,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
arch:
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
||||||
- esp32
|
|
||||||
- esp32s3
|
|
||||||
- esp32c3
|
|
||||||
- esp32c6
|
|
||||||
- nrf52840
|
|
||||||
- rp2040
|
|
||||||
- rp2350
|
|
||||||
- stm32
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [release-artifacts, version]
|
needs: [release-artifacts]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- uses: actions/download-artifact@v5
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
pattern: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
@@ -458,16 +401,16 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
- uses: actions/download-artifact@v5
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./elfs
|
path: ./elfs
|
||||||
|
|
||||||
- name: Zip debug elfs
|
- name: Zip debug elfs
|
||||||
run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./elfs
|
run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./elfs
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
@@ -477,30 +420,33 @@ jobs:
|
|||||||
# Only run when targeting master branch with workflow_dispatch
|
# Only run when targeting master branch with workflow_dispatch
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload v${{ needs.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
gh release upload v${{ steps.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
gh release upload v${{ needs.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
gh release upload v${{ steps.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
publish-firmware:
|
publish-firmware:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [release-firmware, version]
|
needs: [release-firmware]
|
||||||
env:
|
env:
|
||||||
targets: |-
|
targets: esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,stm32
|
||||||
esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,rp2350,stm32
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- uses: actions/download-artifact@v5
|
- name: Get release version string
|
||||||
|
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-{${{ env.targets }}}-${{ needs.version.outputs.long }}
|
pattern: firmware-{${{ env.targets }}}-${{ steps.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./publish
|
path: ./publish
|
||||||
|
|
||||||
@@ -514,9 +460,9 @@ jobs:
|
|||||||
external_repository: meshtastic/meshtastic.github.io
|
external_repository: meshtastic/meshtastic.github.io
|
||||||
publish_branch: master
|
publish_branch: master
|
||||||
publish_dir: ./publish
|
publish_dir: ./publish
|
||||||
destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ needs.version.outputs.long }}
|
destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ steps.version.outputs.long }}
|
||||||
keep_files: true
|
keep_files: true
|
||||||
user_name: github-actions[bot]
|
user_name: github-actions[bot]
|
||||||
user_email: github-actions[bot]@users.noreply.github.com
|
user_email: github-actions[bot]@users.noreply.github.com
|
||||||
commit_message: ${{ needs.version.outputs.long }}
|
commit_message: ${{ steps.version.outputs.long }}
|
||||||
enable_jekyll: true
|
enable_jekyll: true
|
||||||
|
|||||||
6
.github/workflows/nightly.yml
vendored
6
.github/workflows/nightly.yml
vendored
@@ -8,13 +8,12 @@ permissions: read-all
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
trunk_check:
|
trunk_check:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
name: Trunk Check and Upload
|
name: Trunk Check and Upload
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Trunk Check
|
- name: Trunk Check
|
||||||
uses: trunk-io/trunk-action@v1
|
uses: trunk-io/trunk-action@v1
|
||||||
@@ -22,7 +21,6 @@ jobs:
|
|||||||
trunk-token: ${{ secrets.TRUNK_TOKEN }}
|
trunk-token: ${{ secrets.TRUNK_TOKEN }}
|
||||||
|
|
||||||
trunk_upgrade:
|
trunk_upgrade:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
# See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#automatic-upgrades
|
# See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#automatic-upgrades
|
||||||
name: Trunk Upgrade (PR)
|
name: Trunk Upgrade (PR)
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -31,7 +29,7 @@ jobs:
|
|||||||
pull-requests: write # For trunk to create PRs
|
pull-requests: write # For trunk to create PRs
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Trunk Upgrade
|
- name: Trunk Upgrade
|
||||||
uses: trunk-io/trunk-action/upgrade@v1
|
uses: trunk-io/trunk-action/upgrade@v1
|
||||||
|
|||||||
4
.github/workflows/package_obs.yml
vendored
4
.github/workflows/package_obs.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
needs: build-debian-src
|
needs: build-debian-src
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
path: meshtasticd
|
path: meshtasticd
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|||||||
2
.github/workflows/package_pio_deps.yml
vendored
2
.github/workflows/package_pio_deps.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
ref: ${{github.event.pull_request.head.ref}}
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
|||||||
4
.github/workflows/package_ppa.yml
vendored
4
.github/workflows/package_ppa.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
needs: build-debian-src
|
needs: build-debian-src
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
path: meshtasticd
|
path: meshtasticd
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|||||||
24
.github/workflows/pr_enforce_labels.yml
vendored
24
.github/workflows/pr_enforce_labels.yml
vendored
@@ -1,24 +0,0 @@
|
|||||||
name: Check PR Labels
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, edited, labeled, unlabeled, synchronize, reopened]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-label:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- name: Check for PR labels
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const labels = context.payload.pull_request.labels.map(label => label.name);
|
|
||||||
const requiredLabels = ['bugfix', 'enhancement', 'hardware-support', 'dependencies', 'submodules', 'github_actions', 'trunk'];
|
|
||||||
const hasRequiredLabel = labels.some(label => requiredLabels.includes(label));
|
|
||||||
if (!hasRequiredLabel) {
|
|
||||||
core.setFailed(`PR must have at least one of the following labels before it can be merged: ${requiredLabels.join(', ')}.`);
|
|
||||||
}
|
|
||||||
238
.github/workflows/pr_tests.yml
vendored
238
.github/workflows/pr_tests.yml
vendored
@@ -1,238 +0,0 @@
|
|||||||
name: Tests
|
|
||||||
|
|
||||||
# DISABLED: Changed from automatic PR triggers to manual only
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
reason:
|
|
||||||
description: "Reason for manual test run"
|
|
||||||
required: false
|
|
||||||
default: "Manual test execution"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: tests-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
actions: read
|
|
||||||
checks: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
native-tests:
|
|
||||||
name: "🧪 Native Tests"
|
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
uses: ./.github/workflows/test_native.yml
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
actions: read
|
|
||||||
checks: write
|
|
||||||
|
|
||||||
test-summary:
|
|
||||||
name: "📊 Test Results"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [native-tests]
|
|
||||||
if: always()
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
actions: read
|
|
||||||
checks: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Download test artifacts
|
|
||||||
if: needs.native-tests.result != 'skipped'
|
|
||||||
uses: actions/download-artifact@v5
|
|
||||||
with:
|
|
||||||
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Parse test results and create detailed summary
|
|
||||||
id: test-results
|
|
||||||
run: |
|
|
||||||
echo "## 🧪 Test Results Summary" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
# Check overall job status first
|
|
||||||
if [[ "${{ needs.native-tests.result }}" == "success" ]]; then
|
|
||||||
echo "✅ **Overall Status**: PASSED" >> $GITHUB_STEP_SUMMARY
|
|
||||||
elif [[ "${{ needs.native-tests.result }}" == "failure" ]]; then
|
|
||||||
echo "❌ **Overall Status**: FAILED" >> $GITHUB_STEP_SUMMARY
|
|
||||||
elif [[ "${{ needs.native-tests.result }}" == "cancelled" ]]; then
|
|
||||||
echo "⏸️ **Overall Status**: CANCELLED" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Tests were cancelled before completion." >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "⚠️ **Overall Status**: SKIPPED" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Tests were skipped." >> $GITHUB_STEP_SUMMARY
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
# Parse detailed test results if available
|
|
||||||
if [ -f "testreport.xml" ]; then
|
|
||||||
echo "### 🔍 Individual Test Results" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
python3 << 'EOF'
|
|
||||||
import xml.etree.ElementTree as ET
|
|
||||||
import os
|
|
||||||
|
|
||||||
try:
|
|
||||||
tree = ET.parse('testreport.xml')
|
|
||||||
root = tree.getroot()
|
|
||||||
|
|
||||||
total_tests = 0
|
|
||||||
passed_tests = 0
|
|
||||||
failed_tests = 0
|
|
||||||
skipped_tests = 0
|
|
||||||
|
|
||||||
# Parse testsuite elements
|
|
||||||
for testsuite in root.findall('.//testsuite'):
|
|
||||||
suite_name = testsuite.get('name', 'Unknown')
|
|
||||||
suite_tests = int(testsuite.get('tests', '0'))
|
|
||||||
suite_failures = int(testsuite.get('failures', '0'))
|
|
||||||
suite_errors = int(testsuite.get('errors', '0'))
|
|
||||||
suite_skipped = int(testsuite.get('skipped', '0'))
|
|
||||||
|
|
||||||
total_tests += suite_tests
|
|
||||||
failed_tests += suite_failures + suite_errors
|
|
||||||
skipped_tests += suite_skipped
|
|
||||||
passed_tests += suite_tests - suite_failures - suite_errors - suite_skipped
|
|
||||||
|
|
||||||
if suite_tests > 0:
|
|
||||||
status = "✅" if (suite_failures + suite_errors) == 0 else "❌"
|
|
||||||
print(f"**{status} Test Suite: {suite_name}**")
|
|
||||||
print(f"- Total: {suite_tests}")
|
|
||||||
print(f"- Passed: ✅ {suite_tests - suite_failures - suite_errors - suite_skipped}")
|
|
||||||
print(f"- Failed: ❌ {suite_failures + suite_errors}")
|
|
||||||
if suite_skipped > 0:
|
|
||||||
print(f"- Skipped: ⏭️ {suite_skipped}")
|
|
||||||
print("")
|
|
||||||
|
|
||||||
# Show individual test results for failed suites
|
|
||||||
if suite_failures + suite_errors > 0:
|
|
||||||
print("**Failed Tests:**")
|
|
||||||
for testcase in testsuite.findall('testcase'):
|
|
||||||
test_name = testcase.get('name', 'Unknown')
|
|
||||||
failure = testcase.find('failure')
|
|
||||||
error = testcase.find('error')
|
|
||||||
|
|
||||||
if failure is not None:
|
|
||||||
msg = failure.get('message', 'Unknown error')[:100]
|
|
||||||
print(f"- ❌ `{test_name}`: {msg}")
|
|
||||||
elif error is not None:
|
|
||||||
msg = error.get('message', 'Unknown error')[:100]
|
|
||||||
print(f"- ❌ `{test_name}`: ERROR - {msg}")
|
|
||||||
print("")
|
|
||||||
else:
|
|
||||||
# Show passed tests for successful suites
|
|
||||||
passed_count = 0
|
|
||||||
for testcase in testsuite.findall('testcase'):
|
|
||||||
if testcase.find('failure') is None and testcase.find('error') is None:
|
|
||||||
if passed_count < 5: # Limit to first 5 to avoid spam
|
|
||||||
test_name = testcase.get('name', 'Unknown')
|
|
||||||
print(f"- ✅ `{test_name}`: PASSED")
|
|
||||||
passed_count += 1
|
|
||||||
if passed_count > 5:
|
|
||||||
print(f"- ... and {passed_count - 5} more tests passed")
|
|
||||||
print("")
|
|
||||||
|
|
||||||
# Summary statistics
|
|
||||||
print("### 📊 Test Statistics")
|
|
||||||
print(f"- **Total Tests**: {total_tests}")
|
|
||||||
print(f"- **Passed**: ✅ {passed_tests}")
|
|
||||||
print(f"- **Failed**: ❌ {failed_tests}")
|
|
||||||
if skipped_tests > 0:
|
|
||||||
print(f"- **Skipped**: ⏭️ {skipped_tests}")
|
|
||||||
|
|
||||||
if failed_tests > 0:
|
|
||||||
print(f"\n❌ **{failed_tests} tests failed out of {total_tests} total**")
|
|
||||||
else:
|
|
||||||
print(f"\n✅ **All {total_tests} tests passed!**")
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"❌ Error parsing test results: {e}")
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
echo "⚠️ **No detailed test report available**" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "Test artifacts may not have been generated properly." >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "---" >> $GITHUB_STEP_SUMMARY
|
|
||||||
echo "View detailed logs in the [Actions tab](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
||||||
- name: Comment test results on PR
|
|
||||||
if: github.event_name == 'pull_request' && needs.native-tests.result != 'skipped'
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
// Read the step summary to use as PR comment
|
|
||||||
let testSummary = "## 🧪 Test Results Summary\n\n";
|
|
||||||
|
|
||||||
if ("${{ needs.native-tests.result }}" === "success") {
|
|
||||||
testSummary += "✅ **All tests passed!**\n\n";
|
|
||||||
} else if ("${{ needs.native-tests.result }}" === "failure") {
|
|
||||||
testSummary += "❌ **Some tests failed.**\n\n";
|
|
||||||
} else {
|
|
||||||
testSummary += "⚠️ **Tests did not complete normally.**\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
testSummary += `View detailed results: [Actions Run](${context.payload.repository.html_url}/actions/runs/${context.runId})\n\n`;
|
|
||||||
testSummary += "---\n";
|
|
||||||
testSummary += "*This comment will be automatically updated when new commits are pushed.*";
|
|
||||||
|
|
||||||
// Find existing comment
|
|
||||||
const comments = await github.rest.issues.listComments({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number
|
|
||||||
});
|
|
||||||
|
|
||||||
const botComment = comments.data.find(comment =>
|
|
||||||
comment.user.type === 'Bot' &&
|
|
||||||
comment.body.includes('🧪 Test Results Summary')
|
|
||||||
);
|
|
||||||
|
|
||||||
if (botComment) {
|
|
||||||
// Update existing comment
|
|
||||||
await github.rest.issues.updateComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
comment_id: botComment.id,
|
|
||||||
body: testSummary
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Create new comment
|
|
||||||
await github.rest.issues.createComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
body: testSummary
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Set overall status
|
|
||||||
run: |
|
|
||||||
if [[ "${{ needs.native-tests.result }}" == "success" ]]; then
|
|
||||||
echo "All tests passed! ✅"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "Some tests failed! ❌"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
12
.github/workflows/release_channels.yml
vendored
12
.github/workflows/release_channels.yml
vendored
@@ -20,11 +20,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
series:
|
series: [plucky, oracular, noble, jammy]
|
||||||
- jammy # 22.04
|
|
||||||
- noble # 24.04
|
|
||||||
- plucky # 25.04
|
|
||||||
# - questing # 25.10
|
|
||||||
uses: ./.github/workflows/package_ppa.yml
|
uses: ./.github/workflows/package_ppa.yml
|
||||||
with:
|
with:
|
||||||
ppa_repo: |-
|
ppa_repo: |-
|
||||||
@@ -60,7 +56,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
@@ -102,10 +98,8 @@ jobs:
|
|||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
base: ${{ github.event.repository.default_branch }}
|
base: ${{ github.event.repository.default_branch }}
|
||||||
branch: create-pull-request/bump-version
|
|
||||||
labels: github_actions
|
|
||||||
title: Bump release version
|
title: Bump release version
|
||||||
commit-message: Automated version bumps
|
commit-message: automated bumps
|
||||||
add-paths: |
|
add-paths: |
|
||||||
version.properties
|
version.properties
|
||||||
debian/changelog
|
debian/changelog
|
||||||
|
|||||||
3
.github/workflows/sec_sast_semgrep_cron.yml
vendored
3
.github/workflows/sec_sast_semgrep_cron.yml
vendored
@@ -13,7 +13,6 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
semgrep-full:
|
semgrep-full:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container:
|
container:
|
||||||
image: semgrep/semgrep
|
image: semgrep/semgrep
|
||||||
@@ -21,7 +20,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# step 1
|
# step 1
|
||||||
- name: clone application source code
|
- name: clone application source code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# step 2
|
# step 2
|
||||||
- name: full scan
|
- name: full scan
|
||||||
|
|||||||
2
.github/workflows/sec_sast_semgrep_pull.yml
vendored
2
.github/workflows/sec_sast_semgrep_pull.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# step 1
|
# step 1
|
||||||
- name: clone application source code
|
- name: clone application source code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
1
.github/workflows/stale_bot.yml
vendored
1
.github/workflows/stale_bot.yml
vendored
@@ -11,7 +11,6 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale_issues:
|
stale_issues:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
name: Close Stale Issues
|
name: Close Stale Issues
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
12
.github/workflows/test_native.yml
vendored
12
.github/workflows/test_native.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
name: Native Simulator Tests
|
name: Native Simulator Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
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}}
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
name: Native PlatformIO Tests
|
name: Native PlatformIO Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
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}}
|
||||||
@@ -127,7 +127,7 @@ jobs:
|
|||||||
- platformio-tests
|
- platformio-tests
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
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}}
|
||||||
@@ -137,20 +137,20 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Download test artifacts
|
- name: Download test artifacts
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
|
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Test Report
|
- name: Test Report
|
||||||
uses: dorny/test-reporter@v2.1.1
|
uses: dorny/test-reporter@v2.0.0
|
||||||
with:
|
with:
|
||||||
name: PlatformIO Tests
|
name: PlatformIO Tests
|
||||||
path: testreport.xml
|
path: testreport.xml
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
|
|
||||||
- name: Download coverage artifacts
|
- name: Download coverage artifacts
|
||||||
uses: actions/download-artifact@v5
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}.zip
|
pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}.zip
|
||||||
path: code-coverage-report
|
path: code-coverage-report
|
||||||
|
|||||||
11
.github/workflows/tests.yml
vendored
11
.github/workflows/tests.yml
vendored
@@ -5,22 +5,17 @@ on:
|
|||||||
- cron: 0 0 * * * # Run every day at midnight
|
- cron: 0 0 * * * # Run every day at midnight
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
contents: read
|
|
||||||
actions: read
|
|
||||||
checks: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
native-tests:
|
native-tests:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
uses: ./.github/workflows/test_native.yml
|
uses: ./.github/workflows/test_native.yml
|
||||||
|
|
||||||
hardware-tests:
|
hardware-tests:
|
||||||
if: github.repository == 'meshtastic/firmware'
|
|
||||||
runs-on: test-runner
|
runs-on: test-runner
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# - uses: actions/setup-python@v5
|
# - uses: actions/setup-python@v5
|
||||||
# with:
|
# with:
|
||||||
@@ -49,7 +44,7 @@ jobs:
|
|||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 18
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|||||||
2
.github/workflows/trunk_annotate_pr.yml
vendored
2
.github/workflows/trunk_annotate_pr.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Trunk Check
|
- name: Trunk Check
|
||||||
uses: trunk-io/trunk-action@v1
|
uses: trunk-io/trunk-action@v1
|
||||||
|
|||||||
2
.github/workflows/trunk_check.yml
vendored
2
.github/workflows/trunk_check.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Trunk Check
|
- name: Trunk Check
|
||||||
uses: trunk-io/trunk-action@v1
|
uses: trunk-io/trunk-action@v1
|
||||||
|
|||||||
2
.github/workflows/trunk_format_pr.yml
vendored
2
.github/workflows/trunk_format_pr.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
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}}
|
||||||
|
|||||||
5
.github/workflows/update_protobufs.yml
vendored
5
.github/workflows/update_protobufs.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
@@ -33,10 +33,7 @@ jobs:
|
|||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
branch: create-pull-request/update-protobufs
|
|
||||||
labels: submodules
|
|
||||||
title: Update protobufs and classes
|
title: Update protobufs and classes
|
||||||
commit-message: Update protobufs
|
|
||||||
add-paths: |
|
add-paths: |
|
||||||
protobufs
|
protobufs
|
||||||
src/mesh
|
src/mesh
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -38,6 +38,3 @@ release/
|
|||||||
/compile_commands.json
|
/compile_commands.json
|
||||||
src/mesh/raspihttp/certificate.pem
|
src/mesh/raspihttp/certificate.pem
|
||||||
src/mesh/raspihttp/private_key.pem
|
src/mesh/raspihttp/private_key.pem
|
||||||
|
|
||||||
# Ignore logo (set at build time with platformio-custom.py)
|
|
||||||
data/boot/logo.*
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
renovate.json
|
|
||||||
@@ -1,34 +1,34 @@
|
|||||||
version: 0.1
|
version: 0.1
|
||||||
cli:
|
cli:
|
||||||
version: 1.25.0
|
version: 1.22.15
|
||||||
plugins:
|
plugins:
|
||||||
sources:
|
sources:
|
||||||
- id: trunk
|
- id: trunk
|
||||||
ref: v1.7.1
|
ref: v1.6.8
|
||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.461
|
- renovate@40.0.6
|
||||||
- renovate@41.74.0
|
- prettier@3.5.3
|
||||||
- prettier@3.6.2
|
- trufflehog@3.88.27
|
||||||
- trufflehog@3.90.5
|
|
||||||
- yamllint@1.37.1
|
- yamllint@1.37.1
|
||||||
- bandit@1.8.6
|
- bandit@1.8.3
|
||||||
- trivy@0.64.1
|
- terrascan@1.19.9
|
||||||
|
- trivy@0.61.1
|
||||||
- taplo@0.9.3
|
- taplo@0.9.3
|
||||||
- ruff@0.12.7
|
- ruff@0.11.8
|
||||||
- isort@6.0.1
|
- isort@6.0.1
|
||||||
- markdownlint@0.45.0
|
- markdownlint@0.44.0
|
||||||
- oxipng@9.1.5
|
- oxipng@9.1.5
|
||||||
- svgo@4.0.0
|
- svgo@3.3.2
|
||||||
- actionlint@1.7.7
|
- actionlint@1.7.7
|
||||||
- flake8@7.3.0
|
- flake8@7.2.0
|
||||||
- hadolint@2.12.1-beta
|
- hadolint@2.12.1-beta
|
||||||
- shfmt@3.6.0
|
- shfmt@3.6.0
|
||||||
- shellcheck@0.10.0
|
- shellcheck@0.10.0
|
||||||
- black@25.1.0
|
- black@25.1.0
|
||||||
- git-diff-check
|
- git-diff-check
|
||||||
- gitleaks@8.28.0
|
- gitleaks@8.25.1
|
||||||
- clang-format@16.0.3
|
- clang-format@16.0.3
|
||||||
ignore:
|
ignore:
|
||||||
- linters: [ALL]
|
- linters: [ALL]
|
||||||
@@ -38,7 +38,7 @@ runtimes:
|
|||||||
enabled:
|
enabled:
|
||||||
- python@3.10.8
|
- python@3.10.8
|
||||||
- go@1.21.0
|
- go@1.21.0
|
||||||
- node@22.16.0
|
- node@18.20.5
|
||||||
actions:
|
actions:
|
||||||
disabled:
|
disabled:
|
||||||
- trunk-announce
|
- trunk-announce
|
||||||
|
|||||||
24
Dockerfile
24
Dockerfile
@@ -1,9 +1,10 @@
|
|||||||
|
# trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue
|
||||||
# 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(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/DL3008): Do not pin apt package versions
|
||||||
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
||||||
|
|
||||||
FROM python:3.13-slim-trixie AS builder
|
FROM python:3.13-bookworm AS builder
|
||||||
ARG PIO_ENV=native
|
ARG PIO_ENV=native
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
@@ -36,14 +37,7 @@ RUN curl -L "https://github.com/meshtastic/web/releases/download/v$(cat /tmp/fir
|
|||||||
|
|
||||||
##### PRODUCTION BUILD #############
|
##### PRODUCTION BUILD #############
|
||||||
|
|
||||||
FROM debian:trixie-slim
|
FROM debian:bookworm-slim
|
||||||
LABEL org.opencontainers.image.title="Meshtastic" \
|
|
||||||
org.opencontainers.image.description="Debian Meshtastic daemon and web interface" \
|
|
||||||
org.opencontainers.image.url="https://meshtastic.org" \
|
|
||||||
org.opencontainers.image.documentation="https://meshtastic.org/docs/" \
|
|
||||||
org.opencontainers.image.authors="Meshtastic" \
|
|
||||||
org.opencontainers.image.licenses="GPL-3.0-or-later" \
|
|
||||||
org.opencontainers.image.source="https://github.com/meshtastic/firmware/"
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
|
|
||||||
@@ -51,8 +45,8 @@ ENV TZ=Etc/UTC
|
|||||||
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 libgpiod3 libyaml-cpp0.8 libi2c0 libuv1t64 libusb-1.0-0-dev \
|
libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev \
|
||||||
liborcania2.3 libulfius2.7t64 libssl3t64 \
|
liborcania2.3 libulfius2.7 libssl3 \
|
||||||
libx11-6 libinput10 libxkbcommon-x11-0 \
|
libx11-6 libinput10 libxkbcommon-x11-0 \
|
||||||
&& 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 \
|
||||||
@@ -60,8 +54,8 @@ RUN apt-get update && apt-get --no-install-recommends -y install \
|
|||||||
&& mkdir -p /etc/meshtasticd/ssl
|
&& mkdir -p /etc/meshtasticd/ssl
|
||||||
|
|
||||||
# Fetch compiled binary from the builder
|
# Fetch compiled binary from the builder
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/bin/
|
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
||||||
COPY --from=builder /tmp/web /usr/share/meshtasticd/web/
|
COPY --from=builder /tmp/web /usr/share/meshtasticd/
|
||||||
# Copy config templates
|
# Copy config templates
|
||||||
COPY ./bin/config.d /etc/meshtasticd/available.d
|
COPY ./bin/config.d /etc/meshtasticd/available.d
|
||||||
|
|
||||||
@@ -71,8 +65,8 @@ VOLUME /var/lib/meshtasticd
|
|||||||
# Expose Meshtastic TCP API port from the host
|
# Expose Meshtastic TCP API port from the host
|
||||||
EXPOSE 4403
|
EXPOSE 4403
|
||||||
# Expose Meshtastic Web UI port from the host
|
# Expose Meshtastic Web UI port from the host
|
||||||
EXPOSE 9443
|
EXPOSE 443
|
||||||
|
|
||||||
CMD [ "sh", "-cx", "meshtasticd --fsdir=/var/lib/meshtasticd" ]
|
CMD [ "sh", "-cx", "meshtasticd -d /var/lib/meshtasticd" ]
|
||||||
|
|
||||||
HEALTHCHECK NONE
|
HEALTHCHECK NONE
|
||||||
|
|||||||
@@ -37,4 +37,3 @@ Join our community and help improve Meshtastic! 🚀
|
|||||||
## Stats
|
## Stats
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions
|
# trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions
|
||||||
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions
|
||||||
|
|
||||||
FROM python:3.13-alpine3.22 AS builder
|
FROM python:3.13-alpine3.21 AS builder
|
||||||
ARG PIO_ENV=native
|
ARG PIO_ENV=native
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
|
|
||||||
@@ -27,20 +27,13 @@ RUN bash ./bin/build-native.sh "$PIO_ENV" && \
|
|||||||
|
|
||||||
# ##### PRODUCTION BUILD #############
|
# ##### PRODUCTION BUILD #############
|
||||||
|
|
||||||
FROM alpine:3.22
|
FROM alpine:3.21
|
||||||
LABEL org.opencontainers.image.title="Meshtastic" \
|
|
||||||
org.opencontainers.image.description="Alpine Meshtastic daemon" \
|
|
||||||
org.opencontainers.image.url="https://meshtastic.org" \
|
|
||||||
org.opencontainers.image.documentation="https://meshtastic.org/docs/" \
|
|
||||||
org.opencontainers.image.authors="Meshtastic" \
|
|
||||||
org.opencontainers.image.licenses="GPL-3.0-or-later" \
|
|
||||||
org.opencontainers.image.source="https://github.com/meshtastic/firmware/"
|
|
||||||
|
|
||||||
# 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 --no-cache add \
|
||||||
shadow libstdc++ libgpiod yaml-cpp libusb i2c-tools libuv \
|
libstdc++ libgpiod yaml-cpp libusb i2c-tools libuv \
|
||||||
libx11 libinput libxkbcommon \
|
libx11 libinput libxkbcommon \
|
||||||
&& rm -rf /var/cache/apk/* \
|
&& rm -rf /var/cache/apk/* \
|
||||||
&& mkdir -p /var/lib/meshtasticd \
|
&& mkdir -p /var/lib/meshtasticd \
|
||||||
@@ -48,7 +41,7 @@ RUN apk --no-cache add \
|
|||||||
&& mkdir -p /etc/meshtasticd/ssl
|
&& mkdir -p /etc/meshtasticd/ssl
|
||||||
|
|
||||||
# Fetch compiled binary from the builder
|
# Fetch compiled binary from the builder
|
||||||
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/bin/
|
COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/
|
||||||
# Copy config templates
|
# Copy config templates
|
||||||
COPY ./bin/config.d /etc/meshtasticd/available.d
|
COPY ./bin/config.d /etc/meshtasticd/available.d
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ extends = arduino_base
|
|||||||
custom_esp32_kind = esp32
|
custom_esp32_kind = esp32
|
||||||
platform =
|
platform =
|
||||||
# renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32
|
# renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32
|
||||||
platformio/espressif32@6.11.0
|
platformio/espressif32@6.10.0
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
||||||
@@ -49,13 +49,13 @@ lib_deps =
|
|||||||
${environmental_extra.lib_deps}
|
${environmental_extra.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
||||||
https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
|
https://github.com/meshtastic/esp32_https_server/archive/896f1771ceb5979987a0b41028bf1b4e7aad419b.zip
|
||||||
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
|
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
|
||||||
h2zero/NimBLE-Arduino@^1.4.3
|
h2zero/NimBLE-Arduino@^1.4.3
|
||||||
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
||||||
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
||||||
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
|
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
|
||||||
https://github.com/lewisxhe/XPowersLib/archive/v0.3.0.zip
|
lewisxhe/XPowersLib@^0.2.7
|
||||||
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
|
||||||
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
|
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
|
||||||
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ lib_deps =
|
|||||||
${environmental_extra.lib_deps}
|
${environmental_extra.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
|
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
|
||||||
lewisxhe/XPowersLib@0.3.0
|
lewisxhe/XPowersLib@^0.2.7
|
||||||
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
|
||||||
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
|
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
|
||||||
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ build_flags =
|
|||||||
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>
|
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
|
||||||
|
|
||||||
lib_deps=
|
lib_deps=
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
[portduino_base]
|
[portduino_base]
|
||||||
platform =
|
platform =
|
||||||
# renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop
|
# renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop
|
||||||
https://github.com/meshtastic/platform-native/archive/37d986499ce24511952d7146db72d667c6bdaff7.zip
|
https://github.com/meshtastic/platform-native/archive/622341c6de8a239704318b10c3dbb00c21a3eab3.zip
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
@@ -17,6 +17,7 @@ build_src_filter =
|
|||||||
+<mesh/raspihttp/>
|
+<mesh/raspihttp/>
|
||||||
-<mesh/eth/>
|
-<mesh/eth/>
|
||||||
-<modules/esp32>
|
-<modules/esp32>
|
||||||
|
+<../variants/portduino>
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
@@ -29,17 +30,14 @@ lib_deps =
|
|||||||
lovyan03/LovyanGFX@^1.2.0
|
lovyan03/LovyanGFX@^1.2.0
|
||||||
# renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main
|
# renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main
|
||||||
https://github.com/pine64/libch341-spi-userspace/archive/af9bc27c9c30fa90772279925b7c5913dff789b4.zip
|
https://github.com/pine64/libch341-spi-userspace/archive/af9bc27c9c30fa90772279925b7c5913dff789b4.zip
|
||||||
# renovate: datasource=custom.pio depName=adafruit/Adafruit seesaw Library packageName=adafruit/library/Adafruit seesaw Library
|
|
||||||
adafruit/Adafruit seesaw Library@1.7.9
|
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags}
|
${arduino_base.build_flags}
|
||||||
-D ARCH_PORTDUINO
|
|
||||||
-fPIC
|
-fPIC
|
||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
||||||
-DRADIOLIB_EEPROM_UNSUPPORTED
|
-DRADIOLIB_EEPROM_UNSUPPORTED
|
||||||
-DPORTDUINO_LINUX_HARDWARE
|
-DPORTDUINO_LINUX_HARDWARE
|
||||||
-DHAS_UDP_MULTICAST=1
|
-DHAS_UDP_MULTICAST
|
||||||
-lpthread
|
-lpthread
|
||||||
-lstdc++fs
|
-lstdc++fs
|
||||||
-lbluetooth
|
-lbluetooth
|
||||||
@@ -50,7 +48,4 @@ build_flags =
|
|||||||
-std=gnu17
|
-std=gnu17
|
||||||
-std=c++17
|
-std=c++17
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore = Adafruit NeoPixel
|
||||||
Adafruit NeoPixel
|
|
||||||
Adafruit ST7735 and ST7789 Library
|
|
||||||
SD
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform =
|
platform =
|
||||||
# renovate: datasource=custom.pio depName=platformio/ststm32 packageName=platformio/platform/ststm32
|
# renovate: datasource=custom.pio depName=platformio/ststm32 packageName=platformio/platform/ststm32
|
||||||
platformio/ststm32@19.3.0
|
platformio/ststm32@19.1.0
|
||||||
platform_packages =
|
platform_packages =
|
||||||
# TODO renovate
|
# TODO renovate
|
||||||
platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.10.1.zip
|
platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.10.1.zip
|
||||||
@@ -16,27 +16,18 @@ build_flags =
|
|||||||
${arduino_base.build_flags}
|
${arduino_base.build_flags}
|
||||||
-flto
|
-flto
|
||||||
-Isrc/platform/stm32wl -g
|
-Isrc/platform/stm32wl -g
|
||||||
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
-DMESHTASTIC_EXCLUDE_ATAK=1 ; ATAK is quite big, disable it for big flash savings.
|
-DMESHTASTIC_EXCLUDE_INPUTBROKER
|
||||||
-DMESHTASTIC_EXCLUDE_INPUTBROKER=1
|
-DMESHTASTIC_EXCLUDE_I2C
|
||||||
-DMESHTASTIC_EXCLUDE_POWERMON=1
|
-DMESHTASTIC_EXCLUDE_POWERMON
|
||||||
-DMESHTASTIC_EXCLUDE_SCREEN=1
|
-DMESHTASTIC_EXCLUDE_SCREEN
|
||||||
-DMESHTASTIC_EXCLUDE_MQTT=1
|
-DMESHTASTIC_EXCLUDE_MQTT
|
||||||
-DMESHTASTIC_EXCLUDE_BLUETOOTH=1
|
-DMESHTASTIC_EXCLUDE_BLUETOOTH
|
||||||
-DMESHTASTIC_EXCLUDE_WIFI=1
|
-DMESHTASTIC_EXCLUDE_GPS
|
||||||
-DMESHTASTIC_EXCLUDE_TZ=1 ; Exclude TZ to save some flash space.
|
;-DDEBUG_MUTE
|
||||||
-DSERIAL_RX_BUFFER_SIZE=256 ; For GPS - the default of 64 is too small.
|
|
||||||
-DHAS_SCREEN=0 ; Always disable screen for STM32, it is not supported.
|
|
||||||
-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF ; This is REQUIRED for at least traceroute debug prints - without it the length ends up uninitialized.
|
|
||||||
-DDEBUG_MUTE ; You can #undef DEBUG_MUTE in certain source files if you need the logs.
|
|
||||||
-fmerge-all-constants
|
-fmerge-all-constants
|
||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
|
||||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
|
||||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
|
||||||
-DHAL_DAC_MODULE_ONLY
|
|
||||||
-DHAL_RNG_MODULE_ENABLED
|
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/RemoteHardwareModule.cpp> -<platform/nrf52> -<platform/portduino> -<platform/rp2xx0> -<mesh/raspihttp>
|
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/RemoteHardwareModule.cpp> -<platform/nrf52> -<platform/portduino> -<platform/rp2xx0> -<mesh/raspihttp>
|
||||||
@@ -48,9 +39,9 @@ debug_tool = stlink
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
|
|
||||||
# renovate: datasource=git-refs depName=caveman99-stm32-Crypto packageName=https://github.com/caveman99/Crypto gitBranch=main
|
# renovate: datasource=git-refs depName=caveman99-stm32-Crypto packageName=https://github.com/caveman99/Crypto gitBranch=main
|
||||||
https://github.com/caveman99/Crypto/archive/eae9c768054118a9399690f8af202853d1ae8516.zip
|
https://github.com/caveman99/Crypto/archive/eae9c768054118a9399690f8af202853d1ae8516.zip
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
OneButton
|
mathertel/OneButton@2.6.1
|
||||||
|
Wire
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# Set spidev ownership to 'spi' group
|
|
||||||
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
|
||||||
# Allow access to USB CH341 devices
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
|
||||||
# Set gpio ownership to 'gpio' group
|
|
||||||
SUBSYSTEM=="*gpiomem*", GROUP="gpio", MODE="0660"
|
|
||||||
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
|
||||||
@@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware*
|
|||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg install -e $1
|
platformio pkg update -e $1
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
@@ -34,12 +34,11 @@ SRCBIN=.pio/build/$1/firmware.bin
|
|||||||
cp $SRCBIN $OUTDIR/$basename-update.bin
|
cp $SRCBIN $OUTDIR/$basename-update.bin
|
||||||
|
|
||||||
echo "Building Filesystem for ESP32 targets"
|
echo "Building Filesystem for ESP32 targets"
|
||||||
# If you want to build the webui, uncomment the following lines
|
pio run --environment $1 -t buildfs
|
||||||
# pio run --environment $1 -t buildfs
|
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefswebui-$1-$VERSION.bin
|
||||||
# cp .pio/build/$1/littlefs.bin $OUTDIR/littlefswebui-$1-$VERSION.bin
|
# Remove webserver files from the filesystem and rebuild
|
||||||
# # Remove webserver files from the filesystem and rebuild
|
ls -l data/static # Diagnostic list of files
|
||||||
# ls -l data/static # Diagnostic list of files
|
rm -rf data/static
|
||||||
# rm -rf data/static
|
|
||||||
pio run --environment $1 -t buildfs
|
pio run --environment $1 -t buildfs
|
||||||
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$1-$VERSION.bin
|
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$1-$VERSION.bin
|
||||||
cp bin/device-install.* $OUTDIR
|
cp bin/device-install.* $OUTDIR
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ elif (echo $2 | grep -q "nrf52"); then
|
|||||||
elif (echo $2 | grep -q "stm32"); then
|
elif (echo $2 | grep -q "stm32"); then
|
||||||
bin/build-stm32.sh $1
|
bin/build-stm32.sh $1
|
||||||
elif (echo $2 | grep -q "rpi2040"); then
|
elif (echo $2 | grep -q "rpi2040"); then
|
||||||
bin/build-rp2xx0.sh $1
|
bin/build-rpi2040.sh $1
|
||||||
else
|
else
|
||||||
echo "Unknown target $2"
|
echo "Unknown target $2"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ mkdir -p $OUTDIR/
|
|||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
pio pkg install --environment "$PIO_ENV" || platformioFailed
|
pio pkg update --environment "$PIO_ENV" || platformioFailed
|
||||||
pio run --environment "$PIO_ENV" || platformioFailed
|
pio run --environment "$PIO_ENV" || platformioFailed
|
||||||
cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)"
|
cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)"
|
||||||
cp bin/native-install.* $OUTDIR
|
cp bin/native-install.* $OUTDIR
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware*
|
|||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg install -e $1
|
platformio pkg update -e $1
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware*
|
|||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg install -e $1
|
platformio pkg update -e $1
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
@@ -11,7 +11,7 @@ rm -f $OUTDIR/firmware*
|
|||||||
rm -r $OUTDIR/* || true
|
rm -r $OUTDIR/* || true
|
||||||
|
|
||||||
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
|
||||||
platformio pkg install -e $1
|
platformio pkg update -e $1
|
||||||
|
|
||||||
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
|
||||||
rm -f .pio/build/$1/firmware.*
|
rm -f .pio/build/$1/firmware.*
|
||||||
@@ -23,4 +23,4 @@ for BOARD in $BOARDS; do
|
|||||||
CHECK="${CHECK} -e ${BOARD}"
|
CHECK="${CHECK} -e ${BOARD}"
|
||||||
done
|
done
|
||||||
|
|
||||||
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt --inline-suppr" $CHECK --skip-packages --pattern="src/" --fail-on-defect=medium --fail-on-defect=high
|
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt" $CHECK --skip-packages --pattern="src/" --fail-on-defect=medium --fail-on-defect=high
|
||||||
|
|||||||
@@ -96,9 +96,9 @@ Lora:
|
|||||||
### Some devices, like the pinedio, may require spidev0.1 as a workaround.
|
### Some devices, like the pinedio, may require spidev0.1 as a workaround.
|
||||||
# spidev: spidev0.0
|
# spidev: spidev0.0
|
||||||
|
|
||||||
### Deprecated location for User Button:
|
### Define GPIO buttons here:
|
||||||
|
|
||||||
#GPIO:
|
GPIO:
|
||||||
# User: 6
|
# User: 6
|
||||||
|
|
||||||
### Define GPS
|
### Define GPS
|
||||||
@@ -115,6 +115,17 @@ I2C:
|
|||||||
|
|
||||||
Display:
|
Display:
|
||||||
|
|
||||||
|
### Waveshare 1.44inch LCD HAT
|
||||||
|
# Panel: ST7735S
|
||||||
|
# CS: 8 #Chip Select
|
||||||
|
# DC: 25 # Data/Command pin
|
||||||
|
# Backlight: 24
|
||||||
|
# Width: 128
|
||||||
|
# Height: 128
|
||||||
|
# Reset: 27
|
||||||
|
# OffsetX: 0
|
||||||
|
# OffsetY: 0
|
||||||
|
|
||||||
### Adafruit PiTFT 2.8 TFT+Touchscreen
|
### Adafruit PiTFT 2.8 TFT+Touchscreen
|
||||||
# Panel: ILI9341
|
# Panel: ILI9341
|
||||||
# CS: 8
|
# CS: 8
|
||||||
@@ -169,16 +180,6 @@ Input:
|
|||||||
|
|
||||||
# KeyboardDevice: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
|
# KeyboardDevice: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
|
||||||
|
|
||||||
### Standard User Button Config
|
|
||||||
# UserButton: 6
|
|
||||||
|
|
||||||
### Trackball/Joystick input
|
|
||||||
# TrackballUp: 6
|
|
||||||
# TrackballDown: 19
|
|
||||||
# TrackballLeft: 5
|
|
||||||
# TrackballRight: 26
|
|
||||||
# TrackballPress: 13
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
Logging:
|
Logging:
|
||||||
@@ -187,22 +188,11 @@ Logging:
|
|||||||
# AsciiLogs: true # default if not specified is !isatty() on stdout
|
# AsciiLogs: true # default if not specified is !isatty() on stdout
|
||||||
|
|
||||||
Webserver:
|
Webserver:
|
||||||
# Port: 9443 # Port for Webserver & Webservices
|
# Port: 443 # Port for Webserver & Webservices
|
||||||
# RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
|
# RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
|
||||||
# SSLKey: /etc/meshtasticd/ssl/private_key.pem # Path to SSL Key, generated if not present
|
# SSLKey: /etc/meshtasticd/ssl/private_key.pem # Path to SSL Key, generated if not present
|
||||||
# SSLCert: /etc/meshtasticd/ssl/certificate.pem # Path to SSL Certificate, generated if not present
|
# SSLCert: /etc/meshtasticd/ssl/certificate.pem # Path to SSL Certificate, generated if not present
|
||||||
|
|
||||||
|
|
||||||
HostMetrics:
|
|
||||||
# ReportInterval: 30 # Interval in minutes between HostMetrics report packets, or 0 for disabled
|
|
||||||
# Channel: 0 # channel to send Host Metrics over. Defaults to the primary channel.
|
|
||||||
# UserStringCommand: cat /sys/firmware/devicetree/base/serial-number # Command to execute, to send the results as the userString
|
|
||||||
|
|
||||||
|
|
||||||
Config:
|
|
||||||
# DisplayMode: TWOCOLOR # uncomment to force BaseUI
|
|
||||||
# DisplayMode: COLOR # uncomment to force MUI
|
|
||||||
|
|
||||||
General:
|
General:
|
||||||
MaxNodes: 200
|
MaxNodes: 200
|
||||||
MaxMessageQueue: 100
|
MaxMessageQueue: 100
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
### Waveshare 1.44inch LCD HAT
|
|
||||||
Display:
|
|
||||||
Panel: ST7735S
|
|
||||||
spidev: spidev0.0 # Specify either the spidev here, or the CS below
|
|
||||||
# CS: 8 #Chip Select # Optional, as this is the default pin for spidev0.0
|
|
||||||
DC: 25 # Data/Command pin
|
|
||||||
Backlight: 24
|
|
||||||
Width: 128
|
|
||||||
Height: 128
|
|
||||||
Reset: 27
|
|
||||||
OffsetX: 2
|
|
||||||
OffsetY: 1
|
|
||||||
|
|
||||||
|
|
||||||
# OffsetY: 31 # These two options are used to properly flip the screen 180 degrees
|
|
||||||
# OffsetRotate: 3
|
|
||||||
|
|
||||||
|
|
||||||
Input:
|
|
||||||
TrackballUp: 6
|
|
||||||
TrackballDown: 19
|
|
||||||
TrackballLeft: 5
|
|
||||||
TrackballRight: 26
|
|
||||||
TrackballPress: 13
|
|
||||||
TrackballDirection: FALLING
|
|
||||||
# User: 21
|
|
||||||
@@ -6,6 +6,6 @@ Lora:
|
|||||||
IRQ: 16
|
IRQ: 16
|
||||||
Busy: 20
|
Busy: 20
|
||||||
Reset: 24
|
Reset: 24
|
||||||
RXen: 12
|
TXen: 13
|
||||||
DIO2_AS_RF_SWITCH: true
|
DIO2_AS_RF_SWITCH: true
|
||||||
DIO3_TCXO_VOLTAGE: true
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
Lora:
|
|
||||||
|
|
||||||
### RAK13300in Slot 1
|
|
||||||
Module: sx1262
|
|
||||||
IRQ: 22 #IO6
|
|
||||||
Reset: 16 # IO4
|
|
||||||
Busy: 24 # IO5
|
|
||||||
# Ant_sw: 13 # IO3
|
|
||||||
DIO3_TCXO_VOLTAGE: true
|
|
||||||
DIO2_AS_RF_SWITCH: true
|
|
||||||
spidev: spidev0.0
|
|
||||||
# CS: 8
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
Lora:
|
|
||||||
### RAK13300in Slot 2 pins
|
|
||||||
IRQ: 18 #IO6
|
|
||||||
Reset: 24 # IO4
|
|
||||||
Busy: 19 # IO5
|
|
||||||
# Ant_sw: 23 # IO3
|
|
||||||
spidev: spidev0.1
|
|
||||||
# CS: 7
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
Lora:
|
|
||||||
Module: sx1262
|
|
||||||
DIO2_AS_RF_SWITCH: true
|
|
||||||
DIO3_TCXO_VOLTAGE: true
|
|
||||||
gpiochip: 0
|
|
||||||
MOSI: 12
|
|
||||||
MISO: 13
|
|
||||||
IRQ: 1
|
|
||||||
Busy: 23
|
|
||||||
Reset: 22
|
|
||||||
RXen: 0
|
|
||||||
gpiochip: 1
|
|
||||||
CS: 9
|
|
||||||
SCK: 11
|
|
||||||
# TXen: bridge to DIO2 on E22 module
|
|
||||||
SX126X_MAX_POWER: 22
|
|
||||||
spidev: spidev1.0
|
|
||||||
spiSpeed: 2000000
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
# https://www.waveshare.com/pico-lora-sx1262-868m.htm
|
|
||||||
# http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html
|
|
||||||
#
|
|
||||||
# See Orange Pi Zero3 manual, chapter 3.16, page 124 for 26-pin header pinout
|
|
||||||
#
|
|
||||||
# Pin Connection
|
|
||||||
# Waveshare Orange Pi Zero3
|
|
||||||
# 36 3.3V 17
|
|
||||||
# 15 MOSI 19
|
|
||||||
# 16 MISO 21
|
|
||||||
# 14 CLK 23
|
|
||||||
# 38 GND 25
|
|
||||||
# 4 BUSY 18
|
|
||||||
# 20 RESET 22
|
|
||||||
# 5 CS 24
|
|
||||||
# 26 DIO1/IRQ 26
|
|
||||||
|
|
||||||
Lora:
|
|
||||||
Module: sx1262 # Waveshare Raspberry Pico Lora module
|
|
||||||
DIO2_AS_RF_SWITCH: true
|
|
||||||
DIO3_TCXO_VOLTAGE: true
|
|
||||||
# Specify either the spidev1_1 or the CS below, not both!
|
|
||||||
# On DietPi Linux, when using the user overlay dietpi-spi1_1.dtbo, CS will be configured with spidev1.1
|
|
||||||
spidev: spidev1.1 # See Orange Pi Zero3 manual, chapter 3.18.3, page 130
|
|
||||||
# CS: # CS PIN_24 -> chip 1, line 233
|
|
||||||
# pin: 24
|
|
||||||
# gpiochip: 1
|
|
||||||
# line: 233
|
|
||||||
SCK: # SCK PIN_23 -> chip 1, line 230
|
|
||||||
pin: 23
|
|
||||||
gpiochip: 1
|
|
||||||
line: 230
|
|
||||||
Busy: # BUSY PIN_18 -> chip 1, line 78
|
|
||||||
pin: 18
|
|
||||||
gpiochip: 1
|
|
||||||
line: 78
|
|
||||||
MOSI: # MOSI PIN_19 -> chip 1, line 231
|
|
||||||
pin: 19
|
|
||||||
gpiochip: 1
|
|
||||||
line: 231
|
|
||||||
MISO: # MISO PIN_21 -> chip 1, line 232
|
|
||||||
pin: 21
|
|
||||||
gpiochip: 1
|
|
||||||
line: 232
|
|
||||||
Reset: # NRST PIN_22 -> chip 1, line 71
|
|
||||||
pin: 22
|
|
||||||
gpiochip: 1
|
|
||||||
line: 71
|
|
||||||
IRQ: # DIO1 PIN_26 -> chip 1, line 74
|
|
||||||
pin: 26
|
|
||||||
gpiochip: 1
|
|
||||||
line: 74
|
|
||||||
@@ -5,13 +5,13 @@ TITLE Meshtastic device-install
|
|||||||
SET "SCRIPT_NAME=%~nx0"
|
SET "SCRIPT_NAME=%~nx0"
|
||||||
SET "DEBUG=0"
|
SET "DEBUG=0"
|
||||||
SET "PYTHON="
|
SET "PYTHON="
|
||||||
|
SET "WEB_APP=0"
|
||||||
SET "TFT_BUILD=0"
|
SET "TFT_BUILD=0"
|
||||||
SET "BIGDB8=0"
|
SET "BIGDB8=0"
|
||||||
SET "BIGDB16=0"
|
SET "BIGDB16=0"
|
||||||
SET "ESPTOOL_BAUD=115200"
|
SET "ESPTOOL_BAUD=115200"
|
||||||
SET "ESPTOOL_CMD="
|
SET "ESPTOOL_CMD="
|
||||||
SET "LOGCOUNTER=0"
|
SET "LOGCOUNTER=0"
|
||||||
SET "BPS_RESET=0"
|
|
||||||
|
|
||||||
@REM FIXME: Determine mcu from PlatformIO variant, this is unmaintainable.
|
@REM FIXME: Determine mcu from PlatformIO variant, this is unmaintainable.
|
||||||
SET "S3=s3 v3 t-deck wireless-paper wireless-tracker station-g2 unphone"
|
SET "S3=s3 v3 t-deck wireless-paper wireless-tracker station-g2 unphone"
|
||||||
@@ -24,7 +24,7 @@ GOTO getopts
|
|||||||
:help
|
:help
|
||||||
ECHO Flash image file to device, but first erasing and writing system information.
|
ECHO Flash image file to device, but first erasing and writing system information.
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python] [--1200bps-reset]
|
ECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python] (--web)
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Options:
|
ECHO Options:
|
||||||
ECHO -f filename The firmware .bin file to flash. Custom to your device type and region. (required)
|
ECHO -f filename The firmware .bin file to flash. Custom to your device type and region. (required)
|
||||||
@@ -34,16 +34,14 @@ ECHO If not set, ESPTOOL iterates all ports (Dangerous).
|
|||||||
ECHO -P python Specify alternate python interpreter to use to invoke esptool. (default: python)
|
ECHO -P python Specify alternate python interpreter to use to invoke esptool. (default: python)
|
||||||
ECHO If supplied the script will use python.
|
ECHO If supplied the script will use python.
|
||||||
ECHO If not supplied the script will try to find esptool in Path.
|
ECHO If not supplied the script will try to find esptool in Path.
|
||||||
ECHO --1200bps-reset Attempt to place the device in correct mode. (1200bps Reset)
|
ECHO --web Enable WebUI. (default: false)
|
||||||
ECHO Some hardware requires this twice.
|
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Example: %SCRIPT_NAME% -p COM17 --1200bps-reset
|
|
||||||
ECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4.bin -p COM11
|
ECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4.bin -p COM11
|
||||||
ECHO Example: %SCRIPT_NAME% -f firmware-unphone-2.6.0.0b106d4.bin -p COM11
|
ECHO Example: %SCRIPT_NAME% -f firmware-unphone-2.6.0.0b106d4.bin -p COM11 --web
|
||||||
GOTO eof
|
GOTO eof
|
||||||
|
|
||||||
:version
|
:version
|
||||||
ECHO %SCRIPT_NAME% [Version 2.6.2]
|
ECHO %SCRIPT_NAME% [Version 2.6.1]
|
||||||
ECHO Meshtastic
|
ECHO Meshtastic
|
||||||
GOTO eof
|
GOTO eof
|
||||||
|
|
||||||
@@ -59,13 +57,11 @@ IF /I "%~1"=="-f" SET "FILENAME=%~2" & SHIFT
|
|||||||
IF "%~1"=="-p" SET "ESPTOOL_PORT=%~2" & SHIFT
|
IF "%~1"=="-p" SET "ESPTOOL_PORT=%~2" & SHIFT
|
||||||
IF /I "%~1"=="--port" SET "ESPTOOL_PORT=%~2" & SHIFT
|
IF /I "%~1"=="--port" SET "ESPTOOL_PORT=%~2" & SHIFT
|
||||||
IF "%~1"=="-P" SET "PYTHON=%~2" & SHIFT
|
IF "%~1"=="-P" SET "PYTHON=%~2" & SHIFT
|
||||||
IF /I "%~1"=="--1200bps-reset" SET "BPS_RESET=1"
|
IF /I "%~1"=="--web" SET "WEB_APP=1"
|
||||||
SHIFT
|
SHIFT
|
||||||
GOTO getopts
|
GOTO getopts
|
||||||
:endopts
|
:endopts
|
||||||
|
|
||||||
IF %BPS_RESET% EQU 1 GOTO skip-filename
|
|
||||||
|
|
||||||
CALL :LOG_MESSAGE DEBUG "Checking FILENAME parameter..."
|
CALL :LOG_MESSAGE DEBUG "Checking FILENAME parameter..."
|
||||||
IF "__!FILENAME!__"=="____" (
|
IF "__!FILENAME!__"=="____" (
|
||||||
CALL :LOG_MESSAGE DEBUG "Missing -f filename input."
|
CALL :LOG_MESSAGE DEBUG "Missing -f filename input."
|
||||||
@@ -99,9 +95,6 @@ IF NOT "!FILENAME:update=!"=="!FILENAME!" (
|
|||||||
CALL :LOG_MESSAGE DEBUG "We are NOT working with a *update* file. !FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "We are NOT working with a *update* file. !FILENAME!"
|
||||||
)
|
)
|
||||||
|
|
||||||
:skip-filename
|
|
||||||
SET "ESPTOOL_BAUD=1200"
|
|
||||||
|
|
||||||
CALL :LOG_MESSAGE DEBUG "Determine the correct esptool command to use..."
|
CALL :LOG_MESSAGE DEBUG "Determine the correct esptool command to use..."
|
||||||
IF NOT "__%PYTHON%__"=="____" (
|
IF NOT "__%PYTHON%__"=="____" (
|
||||||
SET "ESPTOOL_CMD=!PYTHON! -m esptool"
|
SET "ESPTOOL_CMD=!PYTHON! -m esptool"
|
||||||
@@ -140,16 +133,13 @@ IF "__!ESPTOOL_PORT!__" == "____" (
|
|||||||
)
|
)
|
||||||
CALL :LOG_MESSAGE INFO "Using esptool baud: !ESPTOOL_BAUD!."
|
CALL :LOG_MESSAGE INFO "Using esptool baud: !ESPTOOL_BAUD!."
|
||||||
|
|
||||||
IF %BPS_RESET% EQU 1 (
|
|
||||||
@REM Attempt to change mode via 1200bps Reset.
|
|
||||||
CALL :RUN_ESPTOOL !ESPTOOL_BAUD! --after no_reset read_flash_status
|
|
||||||
GOTO eof
|
|
||||||
)
|
|
||||||
|
|
||||||
@REM Check if FILENAME contains "-tft-" and set target partitionScheme accordingly.
|
@REM Check if FILENAME contains "-tft-" and set target partitionScheme accordingly.
|
||||||
@REM https://github.com/meshtastic/web-flasher/blob/main/types/resources.ts#L3
|
@REM https://github.com/meshtastic/web-flasher/blob/main/types/resources.ts#L3
|
||||||
IF NOT "!FILENAME:-tft-=!"=="!FILENAME!" (
|
IF NOT "!FILENAME:-tft-=!"=="!FILENAME!" (
|
||||||
CALL :LOG_MESSAGE DEBUG "We are working with a *-tft-* file. !FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "We are working with a *-tft-* file. !FILENAME!"
|
||||||
|
IF %WEB_APP% EQU 1 (
|
||||||
|
CALL :LOG_MESSAGE ERROR "Cannot enable WebUI (--web) and MUI." & GOTO eof
|
||||||
|
)
|
||||||
SET "TFT_BUILD=1"
|
SET "TFT_BUILD=1"
|
||||||
) ELSE (
|
) ELSE (
|
||||||
CALL :LOG_MESSAGE DEBUG "We are NOT working with a *-tft-* file. !FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "We are NOT working with a *-tft-* file. !FILENAME!"
|
||||||
@@ -203,8 +193,13 @@ SET "OTA_FILENAME=bleota.bin"
|
|||||||
:end_loop_c3
|
:end_loop_c3
|
||||||
CALL :LOG_MESSAGE DEBUG "Set OTA_FILENAME to: !OTA_FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "Set OTA_FILENAME to: !OTA_FILENAME!"
|
||||||
|
|
||||||
@REM Set SPIFFS filename with "littlefs-" prefix.
|
@REM Check if (--web) is enabled and prefix BASENAME with "littlefswebui-" else "littlefs-".
|
||||||
SET "SPIFFS_FILENAME=littlefs-%BASENAME%"
|
IF %WEB_APP% EQU 1 (
|
||||||
|
CALL :LOG_MESSAGE INFO "WebUI selected."
|
||||||
|
SET "SPIFFS_FILENAME=littlefswebui-%BASENAME%"
|
||||||
|
) ELSE (
|
||||||
|
SET "SPIFFS_FILENAME=littlefs-%BASENAME%"
|
||||||
|
)
|
||||||
CALL :LOG_MESSAGE DEBUG "Set SPIFFS_FILENAME to: !SPIFFS_FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "Set SPIFFS_FILENAME to: !SPIFFS_FILENAME!"
|
||||||
|
|
||||||
@REM Default offsets.
|
@REM Default offsets.
|
||||||
@@ -259,7 +254,6 @@ EXIT /B %ERRORLEVEL%
|
|||||||
IF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG "About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
IF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG "About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
||||||
CALL :RESET_ERROR
|
CALL :RESET_ERROR
|
||||||
!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4
|
!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4
|
||||||
IF %BPS_RESET% EQU 1 GOTO :eof
|
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
CALL :LOG_MESSAGE ERROR "Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
CALL :LOG_MESSAGE ERROR "Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
||||||
EXIT /B %ERRORLEVEL%
|
EXIT /B %ERRORLEVEL%
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PYTHON=${PYTHON:-$(which python3 python | head -n 1)}
|
PYTHON=${PYTHON:-$(which python3 python | head -n 1)}
|
||||||
BPS_RESET=false
|
WEB_APP=false
|
||||||
TFT_BUILD=false
|
TFT_BUILD=false
|
||||||
MCU=""
|
MCU=""
|
||||||
|
|
||||||
@@ -34,9 +34,6 @@ BIGDB_16MB=(
|
|||||||
"station-g2"
|
"station-g2"
|
||||||
"t-eth-elite"
|
"t-eth-elite"
|
||||||
"t-watch-s3"
|
"t-watch-s3"
|
||||||
"elecrow-adv-35-tft"
|
|
||||||
"elecrow-adv-24-28-tft"
|
|
||||||
"elecrow-adv1-43-50-70-tft"
|
|
||||||
)
|
)
|
||||||
S3_VARIANTS=(
|
S3_VARIANTS=(
|
||||||
"s3"
|
"s3"
|
||||||
@@ -46,16 +43,6 @@ S3_VARIANTS=(
|
|||||||
"wireless-tracker"
|
"wireless-tracker"
|
||||||
"station-g2"
|
"station-g2"
|
||||||
"unphone"
|
"unphone"
|
||||||
"t-eth-elite"
|
|
||||||
"mesh-tab"
|
|
||||||
"dreamcatcher"
|
|
||||||
"ESP32-S3-Pico"
|
|
||||||
"seeed-sensecap-indicator"
|
|
||||||
"heltec_capsule_sensor_v3"
|
|
||||||
"vision-master"
|
|
||||||
"icarus"
|
|
||||||
"tracksenger"
|
|
||||||
"elecrow-adv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Determine the correct esptool command to use
|
# Determine the correct esptool command to use
|
||||||
@@ -75,14 +62,14 @@ set -e
|
|||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $(basename "$0") [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME] [--1200bps-reset]
|
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME] [--web]
|
||||||
Flash image file to device, but first erasing and writing system information.
|
Flash image file to device, but first erasing and writing system information.
|
||||||
|
|
||||||
-h Display this help and exit.
|
-h Display this help and exit.
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The firmware .bin file to flash. Custom to your device type and region.
|
-f FILENAME The firmware .bin file to flash. Custom to your device type and region.
|
||||||
--1200bps-reset Attempt to place the device in correct mode. Some hardware requires this twice. (1200bps Reset)
|
--web Enable WebUI. (Default: false)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@@ -105,8 +92,8 @@ while [ $# -gt 0 ]; do
|
|||||||
FILENAME="$2"
|
FILENAME="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--1200bps-reset)
|
--web)
|
||||||
BPS_RESET=true
|
WEB_APP=true
|
||||||
;;
|
;;
|
||||||
--) # Stop parsing options
|
--) # Stop parsing options
|
||||||
shift
|
shift
|
||||||
@@ -120,31 +107,30 @@ while [ $# -gt 0 ]; do
|
|||||||
shift # Move to the next argument
|
shift # Move to the next argument
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $BPS_RESET == true ]]; then
|
[ -z "$FILENAME" -a -n "$1" ] && {
|
||||||
$ESPTOOL_CMD --baud 1200 --after no_reset read_flash_status
|
FILENAME=$1
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -z "$FILENAME" ] && [ -n "$1" ] && {
|
|
||||||
FILENAME="$1"
|
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$FILENAME" != firmware-* ]]; then
|
if [[ $FILENAME != firmware-* ]]; then
|
||||||
echo "Filename must be a firmware-* file."
|
echo "Filename must be a firmware-* file."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if FILENAME contains "-tft-" and set target partitionScheme accordingly.
|
# Check if FILENAME contains "-tft-" and prevent web/mui comingling.
|
||||||
if [[ "${FILENAME//-tft-/}" != "$FILENAME" ]]; then
|
if [[ ${FILENAME//-tft-/} != "$FILENAME" ]]; then
|
||||||
TFT_BUILD=true
|
TFT_BUILD=true
|
||||||
|
if [[ $WEB_APP == true ]] && [[ $TFT_BUILD == true ]]; then
|
||||||
|
echo "Cannot enable WebUI (--web) and MUI."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract BASENAME from %FILENAME% for later use.
|
# Extract BASENAME from %FILENAME% for later use.
|
||||||
BASENAME="${FILENAME/firmware-/}"
|
BASENAME="${FILENAME/firmware-/}"
|
||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
||||||
# Default littlefs* offset.
|
# Default littlefs* offset (--web).
|
||||||
OFFSET=0x300000
|
OFFSET=0x300000
|
||||||
|
|
||||||
# Default OTA Offset
|
# Default OTA Offset
|
||||||
@@ -184,18 +170,22 @@ if [ -f "${FILENAME}" ] && [ -n "${FILENAME##*"update"*}" ]; then
|
|||||||
OTAFILE=bleota-s3.bin
|
OTAFILE=bleota-s3.bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set SPIFFS filename with "littlefs-" prefix.
|
# Check if WEB_APP (--web) is enabled and add "littlefswebui-" to BASENAME else "littlefs-".
|
||||||
|
if [ "$WEB_APP" = true ]; then
|
||||||
|
SPIFFSFILE=littlefswebui-${BASENAME}
|
||||||
|
else
|
||||||
SPIFFSFILE=littlefs-${BASENAME}
|
SPIFFSFILE=littlefs-${BASENAME}
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -f "$FILENAME" ]]; then
|
if [[ ! -f $FILENAME ]]; then
|
||||||
echo "Error: file ${FILENAME} wasn't found. Terminating."
|
echo "Error: file ${FILENAME} wasn't found. Terminating."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ ! -f "$OTAFILE" ]]; then
|
if [[ ! -f $OTAFILE ]]; then
|
||||||
echo "Error: file ${OTAFILE} wasn't found. Terminating."
|
echo "Error: file ${OTAFILE} wasn't found. Terminating."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [[ ! -f "$SPIFFSFILE" ]]; then
|
if [[ ! -f $SPIFFSFILE ]]; then
|
||||||
echo "Error: file ${SPIFFSFILE} wasn't found. Terminating."
|
echo "Error: file ${SPIFFSFILE} wasn't found. Terminating."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -8,13 +8,12 @@ SET "PYTHON="
|
|||||||
SET "ESPTOOL_BAUD=115200"
|
SET "ESPTOOL_BAUD=115200"
|
||||||
SET "ESPTOOL_CMD="
|
SET "ESPTOOL_CMD="
|
||||||
SET "LOGCOUNTER=0"
|
SET "LOGCOUNTER=0"
|
||||||
SET "CHANGE_MODE=0"
|
|
||||||
|
|
||||||
GOTO getopts
|
GOTO getopts
|
||||||
:help
|
:help
|
||||||
ECHO Flash image file to device, but leave existing system intact.
|
ECHO Flash image file to device, but leave existing system intact.
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python] [--change-mode]
|
ECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python]
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Options:
|
ECHO Options:
|
||||||
ECHO -f filename The update .bin file to flash. Custom to your device type and region. (required)
|
ECHO -f filename The update .bin file to flash. Custom to your device type and region. (required)
|
||||||
@@ -24,15 +23,12 @@ ECHO If not set, ESPTOOL iterates all ports (Dangerous).
|
|||||||
ECHO -P python Specify alternate python interpreter to use to invoke esptool. (default: python)
|
ECHO -P python Specify alternate python interpreter to use to invoke esptool. (default: python)
|
||||||
ECHO If supplied the script will use python.
|
ECHO If supplied the script will use python.
|
||||||
ECHO If not supplied the script will try to find esptool in Path.
|
ECHO If not supplied the script will try to find esptool in Path.
|
||||||
ECHO --change-mode Attempt to place the device in correct mode. (1200bps Reset)
|
|
||||||
ECHO Some hardware requires this twice.
|
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Example: %SCRIPT_NAME% -p COM17 --change-mode
|
|
||||||
ECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4-update.bin -p COM11
|
ECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4-update.bin -p COM11
|
||||||
GOTO eof
|
GOTO eof
|
||||||
|
|
||||||
:version
|
:version
|
||||||
ECHO %SCRIPT_NAME% [Version 2.6.2]
|
ECHO %SCRIPT_NAME% [Version 2.6.1]
|
||||||
ECHO Meshtastic
|
ECHO Meshtastic
|
||||||
GOTO eof
|
GOTO eof
|
||||||
|
|
||||||
@@ -48,13 +44,10 @@ IF /I "%~1"=="-f" SET "FILENAME=%~2" & SHIFT
|
|||||||
IF "%~1"=="-p" SET "ESPTOOL_PORT=%~2" & SHIFT
|
IF "%~1"=="-p" SET "ESPTOOL_PORT=%~2" & SHIFT
|
||||||
IF /I "%~1"=="--port" SET "ESPTOOL_PORT=%~2" & SHIFT
|
IF /I "%~1"=="--port" SET "ESPTOOL_PORT=%~2" & SHIFT
|
||||||
IF "%~1"=="-P" SET "PYTHON=%~2" & SHIFT
|
IF "%~1"=="-P" SET "PYTHON=%~2" & SHIFT
|
||||||
IF /I "%~1"=="--change-mode" SET "CHANGE_MODE=1"
|
|
||||||
SHIFT
|
SHIFT
|
||||||
GOTO getopts
|
GOTO getopts
|
||||||
:endopts
|
:endopts
|
||||||
|
|
||||||
IF %CHANGE_MODE% EQU 1 GOTO skip-filename
|
|
||||||
|
|
||||||
CALL :LOG_MESSAGE DEBUG "Checking FILENAME parameter..."
|
CALL :LOG_MESSAGE DEBUG "Checking FILENAME parameter..."
|
||||||
IF "__!FILENAME!__"=="____" (
|
IF "__!FILENAME!__"=="____" (
|
||||||
CALL :LOG_MESSAGE DEBUG "Missing -f filename input."
|
CALL :LOG_MESSAGE DEBUG "Missing -f filename input."
|
||||||
@@ -84,9 +77,6 @@ IF "!FILENAME:update=!"=="!FILENAME!" (
|
|||||||
CALL :LOG_MESSAGE DEBUG "We are working with a *update* file. !FILENAME!"
|
CALL :LOG_MESSAGE DEBUG "We are working with a *update* file. !FILENAME!"
|
||||||
)
|
)
|
||||||
|
|
||||||
:skip-filename
|
|
||||||
SET "ESPTOOL_BAUD=1200"
|
|
||||||
|
|
||||||
CALL :LOG_MESSAGE DEBUG "Determine the correct esptool command to use..."
|
CALL :LOG_MESSAGE DEBUG "Determine the correct esptool command to use..."
|
||||||
IF NOT "__%PYTHON%__"=="____" (
|
IF NOT "__%PYTHON%__"=="____" (
|
||||||
SET "ESPTOOL_CMD=!PYTHON! -m esptool"
|
SET "ESPTOOL_CMD=!PYTHON! -m esptool"
|
||||||
@@ -125,12 +115,6 @@ IF "__!ESPTOOL_PORT!__" == "____" (
|
|||||||
)
|
)
|
||||||
CALL :LOG_MESSAGE INFO "Using esptool baud: !ESPTOOL_BAUD!."
|
CALL :LOG_MESSAGE INFO "Using esptool baud: !ESPTOOL_BAUD!."
|
||||||
|
|
||||||
IF %CHANGE_MODE% EQU 1 (
|
|
||||||
@REM Attempt to change mode via 1200bps Reset.
|
|
||||||
CALL :RUN_ESPTOOL !ESPTOOL_BAUD! --after no_reset read_flash_status
|
|
||||||
GOTO eof
|
|
||||||
)
|
|
||||||
|
|
||||||
@REM Flashing operations.
|
@REM Flashing operations.
|
||||||
CALL :LOG_MESSAGE INFO "Trying to flash update "!FILENAME!" at OFFSET 0x10000..."
|
CALL :LOG_MESSAGE INFO "Trying to flash update "!FILENAME!" at OFFSET 0x10000..."
|
||||||
CALL :RUN_ESPTOOL !ESPTOOL_BAUD! write_flash 0x10000 "!FILENAME!" || GOTO eof
|
CALL :RUN_ESPTOOL !ESPTOOL_BAUD! write_flash 0x10000 "!FILENAME!" || GOTO eof
|
||||||
@@ -151,7 +135,6 @@ EXIT /B %ERRORLEVEL%
|
|||||||
IF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG "About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
IF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG "About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
||||||
CALL :RESET_ERROR
|
CALL :RESET_ERROR
|
||||||
!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4
|
!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4
|
||||||
IF %CHANGE_MODE% EQU 1 GOTO :eof
|
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
CALL :LOG_MESSAGE ERROR "Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
CALL :LOG_MESSAGE ERROR "Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4"
|
||||||
EXIT /B %ERRORLEVEL%
|
EXIT /B %ERRORLEVEL%
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
PYTHON=${PYTHON:-$(which python3 python|head -n 1)}
|
PYTHON=${PYTHON:-$(which python3 python|head -n 1)}
|
||||||
CHANGE_MODE=false
|
|
||||||
|
|
||||||
# Determine the correct esptool command to use
|
# Determine the correct esptool command to use
|
||||||
if "$PYTHON" -m esptool version >/dev/null 2>&1; then
|
if "$PYTHON" -m esptool version >/dev/null 2>&1; then
|
||||||
@@ -18,29 +17,17 @@ fi
|
|||||||
# Usage info
|
# Usage info
|
||||||
show_help() {
|
show_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: $(basename "$0") [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME] [--change-mode]
|
Usage: $(basename $0) [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME]
|
||||||
Flash image file to device, leave existing system intact."
|
Flash image file to device, leave existing system intact."
|
||||||
|
|
||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
||||||
--change-mode Attempt to place the device in correct mode. Some hardware requires this twice. (1200bps Reset)
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for --change-mode and remove it from arguments
|
|
||||||
NEW_ARGS=()
|
|
||||||
for arg in "$@"; do
|
|
||||||
if [ "$arg" = "--change-mode" ]; then
|
|
||||||
CHANGE_MODE=true
|
|
||||||
else
|
|
||||||
NEW_ARGS+=("$arg")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
set -- "${NEW_ARGS[@]}"
|
|
||||||
|
|
||||||
while getopts ":hp:P:f:" opt; do
|
while getopts ":hp:P:f:" opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
@@ -63,19 +50,14 @@ while getopts ":hp:P:f:" opt; do
|
|||||||
done
|
done
|
||||||
shift "$((OPTIND-1))"
|
shift "$((OPTIND-1))"
|
||||||
|
|
||||||
if [ "$CHANGE_MODE" = true ]; then
|
[ -z "$FILENAME" -a -n "$1" ] && {
|
||||||
$ESPTOOL_CMD --baud 1200 --after no_reset read_flash_status
|
FILENAME=$1
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -z "$FILENAME" ] && [ -n "$1" ] && {
|
|
||||||
FILENAME="$1"
|
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then
|
if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then
|
||||||
echo "Trying to flash update ${FILENAME}"
|
printf "Trying to flash update ${FILENAME}"
|
||||||
$ESPTOOL_CMD --baud 115200 write_flash 0x10000 "${FILENAME}"
|
$ESPTOOL_CMD --baud 115200 write_flash 0x10000 ${FILENAME}
|
||||||
else
|
else
|
||||||
show_help
|
show_help
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
"""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
|
|
||||||
from platformio.project.config import ProjectConfig
|
rootdir = "variants/"
|
||||||
|
|
||||||
options = sys.argv[1:]
|
options = sys.argv[1:]
|
||||||
|
|
||||||
@@ -14,59 +16,36 @@ outlist = []
|
|||||||
|
|
||||||
if len(options) < 1:
|
if len(options) < 1:
|
||||||
print(json.dumps(outlist))
|
print(json.dumps(outlist))
|
||||||
exit(1)
|
exit()
|
||||||
|
|
||||||
cfg = ProjectConfig.get_instance()
|
for subdir, dirs, files in os.walk(rootdir):
|
||||||
pio_envs = cfg.envs()
|
for file in files:
|
||||||
|
if file == "platformio.ini":
|
||||||
# Gather all PlatformIO environments for filtering later
|
config = configparser.ConfigParser()
|
||||||
all_envs = []
|
config.read(subdir + "/" + file)
|
||||||
for pio_env in pio_envs:
|
for c in config.sections():
|
||||||
env_build_flags = cfg.get(f"env:{pio_env}", 'build_flags')
|
if c.startswith("env:"):
|
||||||
env_platform = None
|
section = config[c].name[4:]
|
||||||
for flag in env_build_flags:
|
if "extends" in config[config[c].name]:
|
||||||
# Extract the platform from the build flags
|
if config[config[c].name]["extends"] == options[0] + "_base":
|
||||||
# Example flag: -I variants/esp32s3/heltec-v3
|
if "board_level" in config[config[c].name]:
|
||||||
match = re.search(r"-I\s?variants/([^/]+)", flag)
|
if (
|
||||||
if match:
|
config[config[c].name]["board_level"] == "extra"
|
||||||
env_platform = match.group(1)
|
) & ("extra" in options):
|
||||||
break
|
outlist.append(section)
|
||||||
# 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 mutually exclusive with other options (except 'pr')
|
|
||||||
if "check" in options:
|
|
||||||
for env in all_envs:
|
|
||||||
if env['board_check']:
|
|
||||||
if "pr" in options:
|
|
||||||
if env['board_level'] == 'pr':
|
|
||||||
outlist.append(env['name'])
|
|
||||||
else:
|
else:
|
||||||
outlist.append(env['name'])
|
outlist.append(section)
|
||||||
# Filter (non-check) builds by platform
|
# 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):
|
||||||
|
print(json.dumps(random.sample(outlist, 3)))
|
||||||
else:
|
else:
|
||||||
for env in all_envs:
|
print(json.dumps(outlist))
|
||||||
if options[0] == env['platform']:
|
|
||||||
# Always include board_level = 'pr'
|
|
||||||
if env['board_level'] == 'pr':
|
|
||||||
outlist.append(env['name'])
|
|
||||||
# Include board_level = 'extra' when requested
|
|
||||||
elif "extra" in options and env['board_level'] == "extra":
|
|
||||||
outlist.append(env['name'])
|
|
||||||
# If no board level is specified, include in release builds (not PR)
|
|
||||||
elif "pr" not in options and not env['board_level']:
|
|
||||||
outlist.append(env['name'])
|
|
||||||
|
|
||||||
# Return as a JSON list
|
|
||||||
print(json.dumps(outlist))
|
|
||||||
@@ -5,11 +5,10 @@ StartLimitInterval=200
|
|||||||
StartLimitBurst=5
|
StartLimitBurst=5
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
User=root
|
||||||
User=meshtasticd
|
Group=root
|
||||||
Group=meshtasticd
|
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/meshtasticd
|
ExecStart=/usr/sbin/meshtasticd
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cp "release/meshtasticd_linux_$(uname -m)" /usr/bin/meshtasticd
|
cp "release/meshtasticd_linux_$(uname -m)" /usr/sbin/meshtasticd
|
||||||
mkdir -p /etc/meshtasticd
|
mkdir -p /etc/meshtasticd
|
||||||
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
if [[ -f "/etc/meshtasticd/config.yaml" ]]; then
|
||||||
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
cp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml
|
||||||
|
|||||||
@@ -87,42 +87,6 @@
|
|||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
<release version="2.7.6" date="2025-08-12">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.6</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.5" date="2025-08-09">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.5</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.4" date="2025-07-19">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.4</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.3" date="2025-07-10">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.3</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.2" date="2025-07-04">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.2</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.1" date="2025-06-27">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.1</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.7.0" date="2025-06-20">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.0</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.13" date="2025-06-16">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.13</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.12" date="2025-06-15">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.12</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.11" date="2025-06-02">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.11</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.10" date="2025-05-25">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.10</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.9" date="2025-05-15">
|
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.9</url>
|
|
||||||
</release>
|
|
||||||
<release version="2.6.8" date="2025-05-05">
|
<release version="2.6.8" date="2025-05-05">
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.8</url>
|
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.8</url>
|
||||||
</release>
|
</release>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# trunk-ignore-all(flake8/F821): For SConstruct imports
|
# trunk-ignore-all(flake8/F821): For SConstruct imports
|
||||||
import sys
|
import sys
|
||||||
from os.path import join
|
from os.path import join
|
||||||
import subprocess
|
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -93,17 +92,6 @@ prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
|||||||
verObj = readProps(prefsLoc)
|
verObj = readProps(prefsLoc)
|
||||||
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"] + " on " + env.get("PIOENV"))
|
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"] + " on " + env.get("PIOENV"))
|
||||||
|
|
||||||
# get repository owner if git is installed
|
|
||||||
try:
|
|
||||||
r_owner = (
|
|
||||||
subprocess.check_output(["git", "config", "--get", "remote.origin.url"])
|
|
||||||
.decode("utf-8")
|
|
||||||
.strip().split("/")
|
|
||||||
)
|
|
||||||
repo_owner = r_owner[-2] + "/" + r_owner[-1].replace(".git", "")
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
repo_owner = "unknown"
|
|
||||||
|
|
||||||
jsonLoc = env["PROJECT_DIR"] + "/userPrefs.jsonc"
|
jsonLoc = env["PROJECT_DIR"] + "/userPrefs.jsonc"
|
||||||
with open(jsonLoc) as f:
|
with open(jsonLoc) as f:
|
||||||
jsonStr = re.sub("//.*","", f.read(), flags=re.MULTILINE)
|
jsonStr = re.sub("//.*","", f.read(), flags=re.MULTILINE)
|
||||||
@@ -129,7 +117,6 @@ flags = [
|
|||||||
"-DAPP_VERSION=" + verObj["long"],
|
"-DAPP_VERSION=" + verObj["long"],
|
||||||
"-DAPP_VERSION_SHORT=" + verObj["short"],
|
"-DAPP_VERSION_SHORT=" + verObj["short"],
|
||||||
"-DAPP_ENV=" + env.get("PIOENV"),
|
"-DAPP_ENV=" + env.get("PIOENV"),
|
||||||
"-DAPP_REPO=" + repo_owner,
|
|
||||||
] + pref_flags
|
] + pref_flags
|
||||||
|
|
||||||
print ("Using flags:")
|
print ("Using flags:")
|
||||||
@@ -144,33 +131,3 @@ for lb in env.GetLibBuilders():
|
|||||||
if lb.name == "meshtastic-device-ui":
|
if lb.name == "meshtastic-device-ui":
|
||||||
lb.env.Append(CPPDEFINES=[("APP_VERSION", verObj["long"])])
|
lb.env.Append(CPPDEFINES=[("APP_VERSION", verObj["long"])])
|
||||||
break
|
break
|
||||||
|
|
||||||
# Get the display resolution from macros
|
|
||||||
def get_display_resolution(build_flags):
|
|
||||||
# Check "DISPLAY_SIZE" to determine the screen resolution
|
|
||||||
for flag in build_flags:
|
|
||||||
if isinstance(flag, tuple) and flag[0] == "DISPLAY_SIZE":
|
|
||||||
screen_width, screen_height = map(int, flag[1].split("x"))
|
|
||||||
return screen_width, screen_height
|
|
||||||
print("No screen resolution defined in build_flags. Please define DISPLAY_SIZE.")
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
def load_boot_logo(source, target, env):
|
|
||||||
build_flags = env.get("CPPDEFINES", [])
|
|
||||||
logo_w, logo_h = get_display_resolution(build_flags)
|
|
||||||
print(f"TFT build with {logo_w}x{logo_h} resolution detected")
|
|
||||||
|
|
||||||
# Load the boot logo from `branding/logo_<width>x<height>.png` if it exists
|
|
||||||
source_path = join(env["PROJECT_DIR"], "branding", f"logo_{logo_w}x{logo_h}.png")
|
|
||||||
dest_dir = join(env["PROJECT_DIR"], "data", "boot")
|
|
||||||
dest_path = join(dest_dir, "logo.png")
|
|
||||||
if env.File(source_path).exists():
|
|
||||||
print(f"Loading boot logo from {source_path}")
|
|
||||||
# Prepare the destination
|
|
||||||
env.Execute(f"mkdir -p {dest_dir} && rm -f {dest_path}")
|
|
||||||
# Copy the logo to the `data/boot` directory
|
|
||||||
env.Execute(f"cp {source_path} {dest_path}")
|
|
||||||
|
|
||||||
# Load the boot logo on TFT builds
|
|
||||||
if ("HAS_TFT", 1) in env.get("CPPDEFINES", []):
|
|
||||||
env.AddPreAction('$BUILD_DIR/littlefs.bin', load_boot_logo)
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.6.4
|
2.5.3
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"hwids": [["0x2886", "0x0059"]],
|
"hwids": [["0x2886", "0x0059"]],
|
||||||
"usb_product": "XIAO-BOOT",
|
"usb_product": "XIAO-BOOT",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
"variant": "seeed_solar_node",
|
"variant": "Seeed_Solar_Node",
|
||||||
"bsp": {
|
"bsp": {
|
||||||
"name": "adafruit"
|
"name": "adafruit"
|
||||||
},
|
},
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"openocd_target": "nrf52840-mdk-rs"
|
"openocd_target": "nrf52840-mdk-rs"
|
||||||
},
|
},
|
||||||
"frameworks": ["arduino"],
|
"frameworks": ["arduino"],
|
||||||
"name": "seeed_solar_node",
|
"name": "Seeed_Solar_Node",
|
||||||
"upload": {
|
"upload": {
|
||||||
"maximum_ram_size": 248832,
|
"maximum_ram_size": 248832,
|
||||||
"maximum_size": 815104,
|
"maximum_size": 815104,
|
||||||
@@ -48,6 +48,6 @@
|
|||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"wait_for_upload_port": true
|
"wait_for_upload_port": true
|
||||||
},
|
},
|
||||||
"url": "https://www.elecrow.com/thinknode-m1-meshtastic-lora-signal-transceiver-powered-by-nrf52840-with-154-screen-support-gps.html",
|
"url": "FIXME",
|
||||||
"vendor": "ELECROW"
|
"vendor": "ELECROW"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
"core": "esp32",
|
"core": "esp32",
|
||||||
"extra_flags": [
|
"extra_flags": [
|
||||||
"-DBOARD_HAS_PSRAM",
|
"-DBOARD_HAS_PSRAM",
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=0",
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
"-DARDUINO_USB_MODE=1",
|
"-DARDUINO_USB_MODE=0",
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=0"
|
"-DARDUINO_EVENT_RUNNING_CORE=0"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [
|
|
||||||
["0x239A", "0x8029"],
|
|
||||||
["0x239A", "0x0029"],
|
|
||||||
["0x239A", "0x002A"],
|
|
||||||
["0x239A", "0x802A"]
|
|
||||||
],
|
|
||||||
"usb_product": "GAT562 Mesh Trial Tracker",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "gat562_mesh_trial_tracker",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "freertos"],
|
|
||||||
"name": "GAT562 Mesh Trial Tracker",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "nrfutil",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
|
||||||
"use_1200bps_touch": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"wait_for_upload_port": true
|
|
||||||
},
|
|
||||||
"url": "http://www.gat-iot.com/",
|
|
||||||
"vendor": "GAT-IOT"
|
|
||||||
}
|
|
||||||
@@ -10,8 +10,7 @@
|
|||||||
"hwids": [
|
"hwids": [
|
||||||
["0x239A", "0x4405"],
|
["0x239A", "0x4405"],
|
||||||
["0x239A", "0x0029"],
|
["0x239A", "0x0029"],
|
||||||
["0x239A", "0x002A"],
|
["0x239A", "0x002A"]
|
||||||
["0x2886", "0x1667"]
|
|
||||||
],
|
],
|
||||||
"usb_product": "HT-n5262",
|
"usb_product": "HT-n5262",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
@@ -49,6 +48,6 @@
|
|||||||
"require_upload_port": true,
|
"require_upload_port": true,
|
||||||
"wait_for_upload_port": true
|
"wait_for_upload_port": true
|
||||||
},
|
},
|
||||||
"url": "https://heltec.org/project/mesh-node-t114/",
|
"url": "FIXME",
|
||||||
"vendor": "Heltec"
|
"vendor": "Heltec"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v6.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [
|
|
||||||
["0x239A", "0x8029"],
|
|
||||||
["0x239A", "0x0029"],
|
|
||||||
["0x239A", "0x002A"],
|
|
||||||
["0x239A", "0x802A"]
|
|
||||||
],
|
|
||||||
"usb_product": "MeshTiny",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "meshtiny",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "6.1.1",
|
|
||||||
"sd_fwid": "0x00B6"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "freertos"],
|
|
||||||
"name": "MeshTiny",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "nrfutil",
|
|
||||||
"protocols": ["jlink", "nrfjprog", "nrfutil", "stlink"],
|
|
||||||
"use_1200bps_touch": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"wait_for_upload_port": true
|
|
||||||
},
|
|
||||||
"url": "https://github.com/meshtastic/firmware",
|
|
||||||
"vendor": "MTools Tec"
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "nrf52840_s140_v7.ld"
|
|
||||||
},
|
|
||||||
"core": "nRF5",
|
|
||||||
"cpu": "cortex-m4",
|
|
||||||
"extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA",
|
|
||||||
"f_cpu": "64000000L",
|
|
||||||
"hwids": [
|
|
||||||
["0x2886", "0x1668"],
|
|
||||||
["0x2886", "0x1667"]
|
|
||||||
],
|
|
||||||
"usb_product": "TRACKER L1",
|
|
||||||
"mcu": "nrf52840",
|
|
||||||
"variant": "seeed_wio_tracker_L1",
|
|
||||||
"bsp": {
|
|
||||||
"name": "adafruit"
|
|
||||||
},
|
|
||||||
"softdevice": {
|
|
||||||
"sd_flags": "-DS140",
|
|
||||||
"sd_name": "s140",
|
|
||||||
"sd_version": "7.3.0",
|
|
||||||
"sd_fwid": "0x0123"
|
|
||||||
},
|
|
||||||
"bootloader": {
|
|
||||||
"settings_addr": "0xFF000"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"connectivity": ["bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"jlink_device": "nRF52840_xxAA",
|
|
||||||
"svd_path": "nrf52840.svd",
|
|
||||||
"openocd_target": "nrf52840-mdk-rs"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino"],
|
|
||||||
"name": "seeed_wio_tracker_L1",
|
|
||||||
"upload": {
|
|
||||||
"maximum_ram_size": 248832,
|
|
||||||
"maximum_size": 815104,
|
|
||||||
"speed": 115200,
|
|
||||||
"protocol": "nrfutil",
|
|
||||||
"protocols": [
|
|
||||||
"jlink",
|
|
||||||
"nrfjprog",
|
|
||||||
"nrfutil",
|
|
||||||
"stlink",
|
|
||||||
"cmsis-dap",
|
|
||||||
"blackmagic"
|
|
||||||
],
|
|
||||||
"use_1200bps_touch": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"wait_for_upload_port": true
|
|
||||||
},
|
|
||||||
"url": "https://www.seeedstudio.com/Wio-Tracker-L1-p-6477.html",
|
|
||||||
"vendor": "Seeed Studio"
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
"cpu": "cortex-m4",
|
"cpu": "cortex-m4",
|
||||||
"extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA",
|
"extra_flags": "-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA",
|
||||||
"f_cpu": "64000000L",
|
"f_cpu": "64000000L",
|
||||||
"hwids": [["0x2886", "0x0166"]],
|
"hwids": [
|
||||||
|
["0x2886", "0x0166"]
|
||||||
|
],
|
||||||
"usb_product": "XIAO-BOOT",
|
"usb_product": "XIAO-BOOT",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
"variant": "seeed_xiao_nrf52840_kit",
|
"variant": "seeed_xiao_nrf52840_kit",
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "esp32s3_out.ld",
|
|
||||||
"memory_type": "qio_qspi",
|
|
||||||
"partitions": "default_16MB.csv"
|
|
||||||
},
|
|
||||||
"core": "esp32",
|
|
||||||
"extra_flags": [
|
|
||||||
"-DBOARD_HAS_PSRAM",
|
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
|
||||||
"-DARDUINO_USB_MODE=1",
|
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
|
||||||
],
|
|
||||||
"f_cpu": "240000000L",
|
|
||||||
"f_flash": "80000000L",
|
|
||||||
"flash_mode": "qio",
|
|
||||||
"hwids": [["0x303A", "0x1001"]],
|
|
||||||
"mcu": "esp32s3",
|
|
||||||
"variant": "esp32s3"
|
|
||||||
},
|
|
||||||
"connectivity": ["wifi", "bluetooth", "lora"],
|
|
||||||
"debug": {
|
|
||||||
"default_tool": "esp-builtin",
|
|
||||||
"onboard_tools": ["esp-builtin"],
|
|
||||||
"openocd_target": "esp32s3.cfg"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "espidf"],
|
|
||||||
"name": "LilyGo T-Deck Pro S3 (16M Flash 8M QSPI PSRAM )",
|
|
||||||
"upload": {
|
|
||||||
"flash_size": "16MB",
|
|
||||||
"maximum_ram_size": 327680,
|
|
||||||
"maximum_size": 16777216,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 921600
|
|
||||||
},
|
|
||||||
"monitor": {
|
|
||||||
"speed": 115200
|
|
||||||
},
|
|
||||||
"url": "https://lilygo.cc/products/t-deck-pro",
|
|
||||||
"vendor": "LilyGo"
|
|
||||||
}
|
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
["0x239A", "0x8029"],
|
["0x239A", "0x8029"],
|
||||||
["0x239A", "0x0029"],
|
["0x239A", "0x0029"],
|
||||||
["0x239A", "0x002A"],
|
["0x239A", "0x002A"],
|
||||||
["0x239A", "0x802A"],
|
["0x239A", "0x802A"]
|
||||||
["0x2886", "0x0057"]
|
|
||||||
],
|
],
|
||||||
"usb_product": "T1000-E-BOOT",
|
"usb_product": "T1000-E-BOOT",
|
||||||
"mcu": "nrf52840",
|
"mcu": "nrf52840",
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "esp32s3_out.ld",
|
|
||||||
"memory_type": "qio_opi",
|
|
||||||
"partitions": "default_16MB.csv"
|
|
||||||
},
|
|
||||||
"core": "esp32",
|
|
||||||
"extra_flags": [
|
|
||||||
"-DRAK3312",
|
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
|
||||||
"-DARDUINO_USB_MODE=1",
|
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=1",
|
|
||||||
"-DBOARD_HAS_PSRAM"
|
|
||||||
],
|
|
||||||
"f_cpu": "240000000L",
|
|
||||||
"f_flash": "80000000L",
|
|
||||||
"flash_mode": "dio",
|
|
||||||
"hwids": [["0x303A", "0x1001"]],
|
|
||||||
"mcu": "esp32s3",
|
|
||||||
"variant": "rak3312"
|
|
||||||
},
|
|
||||||
"connectivity": ["wifi", "bluetooth"],
|
|
||||||
"debug": {
|
|
||||||
"openocd_target": "esp32s3.cfg"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "espidf"],
|
|
||||||
"name": "WisCore RAK3312 Board",
|
|
||||||
"upload": {
|
|
||||||
"flash_size": "16MB",
|
|
||||||
"maximum_ram_size": 327680,
|
|
||||||
"maximum_size": 16777216,
|
|
||||||
"use_1200bps_touch": true,
|
|
||||||
"wait_for_upload_port": true,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 921600
|
|
||||||
},
|
|
||||||
"url": "https://www.rakwireless.com/en-us",
|
|
||||||
"vendor": "rakwireless"
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Meshtastic Branding / Whitelabeling
|
|
||||||
|
|
||||||
This directory is consumed during the creation of **event** firmware.
|
|
||||||
|
|
||||||
`bin/platformio-custom.py` determines the display resolution, and locates the corresponding `logo_<width>x<height>.png`.
|
|
||||||
|
|
||||||
Ex:
|
|
||||||
|
|
||||||
- `logo_800x480.png`
|
|
||||||
- `logo_480x480.png`
|
|
||||||
- `logo_480x320.png`
|
|
||||||
- `logo_320x480.png`
|
|
||||||
- `logo_320x240.png`
|
|
||||||
|
|
||||||
This file is copied to `data/boot/logo.png` before filesytem image compilation.
|
|
||||||
|
|
||||||
For additional examples see the [`event/defcon33` branch](https://github.com/meshtastic/firmware/tree/event/defcon33).
|
|
||||||
34
debian/changelog
vendored
34
debian/changelog
vendored
@@ -1,4 +1,4 @@
|
|||||||
meshtasticd (2.7.6.0) UNRELEASED; urgency=medium
|
meshtasticd (2.6.8.0) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
[ Austin Lane ]
|
[ Austin Lane ]
|
||||||
* Initial packaging
|
* Initial packaging
|
||||||
@@ -10,34 +10,4 @@ meshtasticd (2.7.6.0) UNRELEASED; urgency=medium
|
|||||||
[ ]
|
[ ]
|
||||||
* GitHub Actions Automatic version bump
|
* GitHub Actions Automatic version bump
|
||||||
|
|
||||||
[ ]
|
-- <github-actions[bot]@users.noreply.github.com> Tue, 06 May 2025 01:32:49 +0000
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ Ubuntu ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
[ ]
|
|
||||||
* GitHub Actions Automatic version bump
|
|
||||||
|
|
||||||
-- <github-actions[bot]@users.noreply.github.com> Tue, 12 Aug 2025 23:48:48 +0000
|
|
||||||
|
|||||||
4
debian/control
vendored
4
debian/control
vendored
@@ -31,9 +31,7 @@ Rules-Requires-Root: no
|
|||||||
|
|
||||||
Package: meshtasticd
|
Package: meshtasticd
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: adduser,
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
${misc:Depends},
|
|
||||||
${shlibs:Depends}
|
|
||||||
Description: Meshtastic daemon for communicating with Meshtastic devices
|
Description: Meshtastic daemon for communicating with Meshtastic devices
|
||||||
Meshtastic is an off-grid text communication platform that uses inexpensive
|
Meshtastic is an off-grid text communication platform that uses inexpensive
|
||||||
LoRa radios.
|
LoRa radios.
|
||||||
1
debian/meshtasticd.dirs
vendored
1
debian/meshtasticd.dirs
vendored
@@ -1,4 +1,3 @@
|
|||||||
var/lib/meshtasticd
|
|
||||||
etc/meshtasticd
|
etc/meshtasticd
|
||||||
etc/meshtasticd/config.d
|
etc/meshtasticd/config.d
|
||||||
etc/meshtasticd/available.d
|
etc/meshtasticd/available.d
|
||||||
|
|||||||
2
debian/meshtasticd.install
vendored
2
debian/meshtasticd.install
vendored
@@ -1,4 +1,4 @@
|
|||||||
.pio/build/native-tft/meshtasticd usr/bin
|
.pio/build/native-tft/meshtasticd usr/sbin
|
||||||
|
|
||||||
bin/config.yaml etc/meshtasticd
|
bin/config.yaml etc/meshtasticd
|
||||||
bin/config.d/* etc/meshtasticd/available.d
|
bin/config.d/* etc/meshtasticd/available.d
|
||||||
|
|||||||
80
debian/meshtasticd.postinst
vendored
80
debian/meshtasticd.postinst
vendored
@@ -1,80 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# postinst script for meshtasticd
|
|
||||||
#
|
|
||||||
# see: dh_installdeb(1)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# summary of how this script can be called:
|
|
||||||
# * <postinst> `configure' <most-recently-configured-version>
|
|
||||||
# * <old-postinst> `abort-upgrade' <new version>
|
|
||||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
||||||
# <new-version>
|
|
||||||
# * <postinst> `abort-remove'
|
|
||||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
||||||
# <failed-install-package> <version> `removing'
|
|
||||||
# <conflicting-package> <version>
|
|
||||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
||||||
# the debian-policy package
|
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
configure|reconfigure)
|
|
||||||
# create spi, gpio groups (for udev rules)
|
|
||||||
# these groups already exist on Raspberry Pi OS
|
|
||||||
getent group spi >/dev/null 2>/dev/null || addgroup --system spi
|
|
||||||
getent group gpio >/dev/null 2>/dev/null || addgroup --system gpio
|
|
||||||
# create a meshtasticd group and user
|
|
||||||
getent passwd meshtasticd >/dev/null 2>/dev/null || adduser --system --home /var/lib/meshtasticd --no-create-home meshtasticd
|
|
||||||
getent group meshtasticd >/dev/null 2>/dev/null || addgroup --system meshtasticd
|
|
||||||
adduser meshtasticd meshtasticd >/dev/null 2>/dev/null
|
|
||||||
adduser meshtasticd spi >/dev/null 2>/dev/null
|
|
||||||
adduser meshtasticd gpio >/dev/null 2>/dev/null
|
|
||||||
# add meshtasticd user to appropriate groups (if they exist)
|
|
||||||
getent group plugdev >/dev/null 2>/dev/null && adduser meshtasticd plugdev >/dev/null 2>/dev/null
|
|
||||||
getent group dialout >/dev/null 2>/dev/null && adduser meshtasticd dialout >/dev/null 2>/dev/null
|
|
||||||
getent group i2c >/dev/null 2>/dev/null && adduser meshtasticd i2c >/dev/null 2>/dev/null
|
|
||||||
getent group video >/dev/null 2>/dev/null && adduser meshtasticd video >/dev/null 2>/dev/null
|
|
||||||
getent group audio >/dev/null 2>/dev/null && adduser meshtasticd audio >/dev/null 2>/dev/null
|
|
||||||
getent group input >/dev/null 2>/dev/null && adduser meshtasticd input >/dev/null 2>/dev/null
|
|
||||||
|
|
||||||
|
|
||||||
# migrate /root/.portduino to /var/lib/meshtasticd/.portduino
|
|
||||||
# should only run once, upon upgrade from < 2.6.9
|
|
||||||
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.6.9; then
|
|
||||||
if [ -d /root/.portduino ] && [ ! -e /var/lib/meshtasticd/.portduino ]; then
|
|
||||||
cp -r /root/.portduino /var/lib/meshtasticd/.portduino
|
|
||||||
echo "Migrated meshtasticd VFS from /root/.portduino to /var/lib/meshtasticd/.portduino"
|
|
||||||
echo "meshtasticd now runs as the 'meshtasticd' user, not 'root'."
|
|
||||||
echo "See https://github.com/meshtastic/firmware/pull/6718 for details"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /var/lib/meshtasticd ]; then
|
|
||||||
chown -R meshtasticd:meshtasticd /var/lib/meshtasticd
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/meshtasticd ]; then
|
|
||||||
chown -R meshtasticd:meshtasticd /etc/meshtasticd
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /usr/share/meshtasticd ]; then
|
|
||||||
chown -R meshtasticd:meshtasticd /usr/share/meshtasticd
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postinst called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
41
debian/meshtasticd.postrm
vendored
41
debian/meshtasticd.postrm
vendored
@@ -1,41 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# postrm script for meshtasticd
|
|
||||||
#
|
|
||||||
# see: dh_installdeb(1)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# summary of how this script can be called:
|
|
||||||
# * <postrm> `remove'
|
|
||||||
# * <postrm> `purge'
|
|
||||||
# * <old-postrm> `upgrade' <new-version>
|
|
||||||
# * <new-postrm> `failed-upgrade' <old-version>
|
|
||||||
# * <new-postrm> `abort-install'
|
|
||||||
# * <new-postrm> `abort-install' <old-version>
|
|
||||||
# * <new-postrm> `abort-upgrade' <old-version>
|
|
||||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
|
||||||
# <overwriter-version>
|
|
||||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
||||||
# the debian-policy package
|
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
||||||
# Only remove /var/lib/meshtasticd on purge
|
|
||||||
if [ "${1}" = "purge" ] ; then
|
|
||||||
rm -rf /var/lib/meshtasticd
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "postrm called with unknown argument \`$1'" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
7
debian/meshtasticd.udev
vendored
7
debian/meshtasticd.udev
vendored
@@ -1,7 +0,0 @@
|
|||||||
# Set spidev ownership to 'spi' group
|
|
||||||
SUBSYSTEM=="spidev", KERNEL=="spidev*", GROUP="spi", MODE="0660"
|
|
||||||
# Allow access to USB CH341 devices
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", MODE="0666"
|
|
||||||
# Set gpio ownership to 'gpio' group
|
|
||||||
SUBSYSTEM=="*gpiomem*", GROUP="gpio", MODE="0660"
|
|
||||||
SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
|
|
||||||
@@ -10,8 +10,6 @@
|
|||||||
# - https://docs.pagure.org/rpkg-util/v3/index.html
|
# - https://docs.pagure.org/rpkg-util/v3/index.html
|
||||||
# - https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
|
# - https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
|
||||||
|
|
||||||
%global meshtasticd_user meshtasticd
|
|
||||||
|
|
||||||
Name: meshtasticd
|
Name: meshtasticd
|
||||||
# Version Ex: 2.5.19
|
# Version Ex: 2.5.19
|
||||||
Version: {{{ meshtastic_version }}}
|
Version: {{{ meshtastic_version }}}
|
||||||
@@ -49,8 +47,6 @@ BuildRequires: pkgconfig(x11)
|
|||||||
BuildRequires: pkgconfig(libinput)
|
BuildRequires: pkgconfig(libinput)
|
||||||
BuildRequires: pkgconfig(xkbcommon-x11)
|
BuildRequires: pkgconfig(xkbcommon-x11)
|
||||||
|
|
||||||
Requires: systemd-udev
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Meshtastic daemon for controlling Meshtastic devices. Meshtastic is an off-grid
|
Meshtastic daemon for controlling Meshtastic devices. Meshtastic is an off-grid
|
||||||
text communication platform that uses inexpensive LoRa radios.
|
text communication platform that uses inexpensive LoRa radios.
|
||||||
@@ -67,25 +63,15 @@ gzip -dr web
|
|||||||
platformio run -e native-tft
|
platformio run -e native-tft
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Install meshtasticd binary
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
install -m 0755 .pio/build/native-tft/program %{buildroot}%{_sbindir}/meshtasticd
|
||||||
install -m 0755 .pio/build/native-tft/program %{buildroot}%{_bindir}/meshtasticd
|
|
||||||
|
|
||||||
# Install portduino VFS dir
|
|
||||||
install -p -d -m 0770 %{buildroot}%{_localstatedir}/lib/meshtasticd
|
|
||||||
|
|
||||||
# Install udev rules
|
|
||||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
|
||||||
install -m 0644 bin/99-meshtasticd-udev.rules %{buildroot}%{_udevrulesdir}/99-meshtasticd-udev.rules
|
|
||||||
|
|
||||||
# Install config dirs
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd
|
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd
|
||||||
install -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml
|
install -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/config.d
|
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/config.d
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
||||||
cp -r bin/config.d/* %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
cp -r bin/config.d/* %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
||||||
|
|
||||||
# Install systemd service
|
|
||||||
install -D -m 0644 bin/meshtasticd.service %{buildroot}%{_unitdir}/meshtasticd.service
|
install -D -m 0644 bin/meshtasticd.service %{buildroot}%{_unitdir}/meshtasticd.service
|
||||||
|
|
||||||
# Install the web files under /usr/share/meshtasticd/web
|
# Install the web files under /usr/share/meshtasticd/web
|
||||||
@@ -94,54 +80,10 @@ cp -r web/* %{buildroot}%{_datadir}/meshtasticd/web
|
|||||||
# Install default SSL storage directory (for web)
|
# Install default SSL storage directory (for web)
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/ssl
|
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/ssl
|
||||||
|
|
||||||
%pre
|
|
||||||
# create spi group (for udev rules)
|
|
||||||
getent group spi > /dev/null || groupadd -r spi
|
|
||||||
# create a meshtasticd group and user
|
|
||||||
getent group %{meshtasticd_user} > /dev/null || groupadd -r %{meshtasticd_user}
|
|
||||||
getent passwd %{meshtasticd_user} > /dev/null || \
|
|
||||||
useradd -r -d %{_localstatedir}/lib/meshtasticd -g %{meshtasticd_user} -G spi \
|
|
||||||
-s /sbin/nologin -c "Meshtastic Daemon" %{meshtasticd_user}
|
|
||||||
# add meshtasticd user to appropriate groups (if they exist)
|
|
||||||
getent group gpio > /dev/null && usermod -a -G gpio %{meshtasticd_user} > /dev/null
|
|
||||||
getent group plugdev > /dev/null && usermod -a -G plugdev %{meshtasticd_user} > /dev/null
|
|
||||||
getent group dialout > /dev/null && usermod -a -G dialout %{meshtasticd_user} > /dev/null
|
|
||||||
getent group i2c > /dev/null && usermod -a -G i2c %{meshtasticd_user} > /dev/null
|
|
||||||
getent group video > /dev/null && usermod -a -G video %{meshtasticd_user} > /dev/null
|
|
||||||
getent group audio > /dev/null && usermod -a -G audio %{meshtasticd_user} > /dev/null
|
|
||||||
getent group input > /dev/null && usermod -a -G input %{meshtasticd_user} > /dev/null
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%triggerin -- meshtasticd < 2.6.9
|
|
||||||
# migrate .portduino (if it exists and hasn’t already been copied)
|
|
||||||
if [ -d /root/.portduino ] && [ ! -e /var/lib/meshtasticd/.portduino ]; then
|
|
||||||
mkdir -p /var/lib/meshtasticd
|
|
||||||
cp -r /root/.portduino /var/lib/meshtasticd/.portduino
|
|
||||||
chown -R %{meshtasticd_user}:%{meshtasticd_user} \
|
|
||||||
%{_localstatedir}/lib/meshtasticd || :
|
|
||||||
# Fix SELinux labels if present (no-op on non-SELinux systems)
|
|
||||||
restorecon -R /var/lib/meshtasticd/.portduino 2>/dev/null || :
|
|
||||||
echo "Migrated meshtasticd VFS from /root/.portduino to /var/lib/meshtasticd/.portduino"
|
|
||||||
echo "meshtasticd now runs as the 'meshtasticd' user, not 'root'."
|
|
||||||
echo "See https://github.com/meshtastic/firmware/pull/6718 for details"
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post
|
|
||||||
%systemd_post meshtasticd.service
|
|
||||||
|
|
||||||
%preun
|
|
||||||
%systemd_preun meshtasticd.service
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%systemd_postun_with_restart meshtasticd.service
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,%{meshtasticd_user},%{meshtasticd_user})
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/meshtasticd
|
%{_sbindir}/meshtasticd
|
||||||
%dir %{_localstatedir}/lib/meshtasticd
|
|
||||||
%{_udevrulesdir}/99-meshtasticd-udev.rules
|
|
||||||
%dir %{_sysconfdir}/meshtasticd
|
%dir %{_sysconfdir}/meshtasticd
|
||||||
%dir %{_sysconfdir}/meshtasticd/config.d
|
%dir %{_sysconfdir}/meshtasticd/config.d
|
||||||
%dir %{_sysconfdir}/meshtasticd/available.d
|
%dir %{_sysconfdir}/meshtasticd/available.d
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ default_envs = tbeam
|
|||||||
|
|
||||||
extra_configs =
|
extra_configs =
|
||||||
arch/*/*.ini
|
arch/*/*.ini
|
||||||
variants/*/*/platformio.ini
|
variants/*/platformio.ini
|
||||||
variants/*/diy/*/platformio.ini
|
|
||||||
src/graphics/niche/InkHUD/PlatformioConfig.ini
|
src/graphics/niche/InkHUD/PlatformioConfig.ini
|
||||||
|
|
||||||
description = Meshtastic
|
description = Meshtastic
|
||||||
@@ -52,7 +51,6 @@ build_flags = -Wno-missing-field-initializers
|
|||||||
-DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1
|
-DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1
|
||||||
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
|
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware
|
||||||
-DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1
|
-DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1
|
||||||
-D MAX_THREADS=40 ; As we've split modules, we have more threads to manage
|
|
||||||
#-DBUILD_EPOCH=$UNIX_TIME
|
#-DBUILD_EPOCH=$UNIX_TIME
|
||||||
#-D OLED_PL=1
|
#-D OLED_PL=1
|
||||||
|
|
||||||
@@ -60,9 +58,9 @@ monitor_speed = 115200
|
|||||||
monitor_filters = direct
|
monitor_filters = direct
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master
|
||||||
https://github.com/meshtastic/esp8266-oled-ssd1306/archive/9573abb64dc9c94f3051348f2bf4fc5cedf03c22.zip
|
https://github.com/meshtastic/esp8266-oled-ssd1306/archive/0119501e9983bd894830b02f545c377ee08d66fe.zip
|
||||||
# renovate: datasource=git-refs depName=meshtastic-OneButton packageName=https://github.com/meshtastic/OneButton gitBranch=master
|
# renovate: datasource=custom.pio depName=OneButton packageName=mathertel/library/OneButton
|
||||||
https://github.com/meshtastic/OneButton/archive/fa352d668c53f290cfa480a5f79ad422cd828c70.zip
|
mathertel/OneButton@2.6.1
|
||||||
# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master
|
||||||
https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip
|
https://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip
|
||||||
# renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master
|
||||||
@@ -102,29 +100,21 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
|
||||||
arcao/Syslog@2.0.0
|
arcao/Syslog@2.0.0
|
||||||
|
|
||||||
; Minimal networking libs for nrf52 (excludes Syslog to save flash)
|
|
||||||
[nrf52_networking_base]
|
|
||||||
lib_deps =
|
|
||||||
# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient
|
|
||||||
thingsboard/TBPubSubClient@2.12.1
|
|
||||||
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
|
|
||||||
arduino-libraries/NTPClient@3.2.1
|
|
||||||
|
|
||||||
[radiolib_base]
|
[radiolib_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
||||||
jgromes/RadioLib@7.2.1
|
jgromes/RadioLib@7.1.2
|
||||||
|
|
||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||||
https://github.com/meshtastic/device-ui/archive/8f5094b248c15ea2f9acf19cedfef6d2248fc1ff.zip
|
https://github.com/meshtastic/device-ui/archive/35576e131e250f259878ea81819a90df837d1307.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO
|
# renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO
|
||||||
adafruit/Adafruit BusIO@1.17.2
|
adafruit/Adafruit BusIO@1.17.1
|
||||||
# renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor
|
# renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor
|
||||||
adafruit/Adafruit Unified Sensor@1.1.15
|
adafruit/Adafruit Unified Sensor@1.1.15
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library
|
# renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library
|
||||||
@@ -132,17 +122,17 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=Adafruit BMP085 packageName=adafruit/library/Adafruit BMP085 Library
|
# renovate: datasource=custom.pio depName=Adafruit BMP085 packageName=adafruit/library/Adafruit BMP085 Library
|
||||||
adafruit/Adafruit BMP085 Library@1.2.4
|
adafruit/Adafruit BMP085 Library@1.2.4
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library
|
# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library
|
||||||
adafruit/Adafruit BME280 Library@2.3.0
|
adafruit/Adafruit BME280 Library@2.2.4
|
||||||
# renovate: datasource=custom.pio depName=Adafruit DPS310 packageName=adafruit/library/Adafruit DPS310
|
# renovate: datasource=custom.pio depName=Adafruit DPS310 packageName=adafruit/library/Adafruit DPS310
|
||||||
adafruit/Adafruit DPS310@1.1.5
|
adafruit/Adafruit DPS310@1.1.5
|
||||||
# renovate: datasource=custom.pio depName=Adafruit MCP9808 packageName=adafruit/library/Adafruit MCP9808 Library
|
# renovate: datasource=custom.pio depName=Adafruit MCP9808 packageName=adafruit/library/Adafruit MCP9808 Library
|
||||||
adafruit/Adafruit MCP9808 Library@2.0.2
|
adafruit/Adafruit MCP9808 Library@2.0.2
|
||||||
# renovate: datasource=custom.pio depName=Adafruit INA260 packageName=adafruit/library/Adafruit INA260 Library
|
# renovate: datasource=custom.pio depName=Adafruit INA260 packageName=adafruit/library/Adafruit INA260 Library
|
||||||
adafruit/Adafruit INA260 Library@1.5.3
|
adafruit/Adafruit INA260 Library@1.5.2
|
||||||
# renovate: datasource=custom.pio depName=Adafruit INA219 packageName=adafruit/library/Adafruit INA219
|
# renovate: datasource=custom.pio depName=Adafruit INA219 packageName=adafruit/library/Adafruit INA219
|
||||||
adafruit/Adafruit INA219@1.2.3
|
adafruit/Adafruit INA219@1.2.3
|
||||||
# renovate: datasource=custom.pio depName=Adafruit PM25 AQI Sensor packageName=adafruit/library/Adafruit PM25 AQI Sensor
|
# renovate: datasource=custom.pio depName=Adafruit PM25 AQI Sensor packageName=adafruit/library/Adafruit PM25 AQI Sensor
|
||||||
adafruit/Adafruit PM25 AQI Sensor@2.0.0
|
adafruit/Adafruit PM25 AQI Sensor@1.2.0
|
||||||
# renovate: datasource=custom.pio depName=Adafruit MPU6050 packageName=adafruit/library/Adafruit MPU6050
|
# renovate: datasource=custom.pio depName=Adafruit MPU6050 packageName=adafruit/library/Adafruit MPU6050
|
||||||
adafruit/Adafruit MPU6050@2.2.6
|
adafruit/Adafruit MPU6050@2.2.6
|
||||||
# renovate: datasource=custom.pio depName=Adafruit LIS3DH packageName=adafruit/library/Adafruit LIS3DH
|
# renovate: datasource=custom.pio depName=Adafruit LIS3DH packageName=adafruit/library/Adafruit LIS3DH
|
||||||
@@ -157,6 +147,8 @@ lib_deps =
|
|||||||
emotibit/EmotiBit MLX90632@1.0.8
|
emotibit/EmotiBit MLX90632@1.0.8
|
||||||
# renovate: datasource=custom.pio depName=Adafruit MLX90614 packageName=adafruit/library/Adafruit MLX90614 Library
|
# renovate: datasource=custom.pio depName=Adafruit MLX90614 packageName=adafruit/library/Adafruit MLX90614 Library
|
||||||
adafruit/Adafruit MLX90614 Library@2.1.5
|
adafruit/Adafruit MLX90614 Library@2.1.5
|
||||||
|
# renovate: datasource=custom.pio depName=Bosch BME68x packageName=boschsensortec/library/BME68x Sensor Library
|
||||||
|
boschsensortec/BME68x Sensor Library@1.2.40408
|
||||||
# renovate: datasource=github-tags depName=INA3221 packageName=KodinLanewave/INA3221
|
# renovate: datasource=github-tags depName=INA3221 packageName=KodinLanewave/INA3221
|
||||||
https://github.com/KodinLanewave/INA3221/archive/1.0.1.zip
|
https://github.com/KodinLanewave/INA3221/archive/1.0.1.zip
|
||||||
# renovate: datasource=custom.pio depName=QMC5883L Compass packageName=mprograms/library/QMC5883LCompass
|
# renovate: datasource=custom.pio depName=QMC5883L Compass packageName=mprograms/library/QMC5883LCompass
|
||||||
@@ -169,14 +161,6 @@ lib_deps =
|
|||||||
robtillaart/INA226@0.6.4
|
robtillaart/INA226@0.6.4
|
||||||
# renovate: datasource=custom.pio depName=SparkFun MAX3010x packageName=sparkfun/library/SparkFun MAX3010x Pulse and Proximity Sensor Library
|
# renovate: datasource=custom.pio depName=SparkFun MAX3010x packageName=sparkfun/library/SparkFun MAX3010x Pulse and Proximity Sensor Library
|
||||||
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2
|
sparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2
|
||||||
# renovate: datasource=custom.pio depName=SparkFun 9DoF IMU Breakout ICM 20948 packageName=sparkfun/library/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
|
|
||||||
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.3.2
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit LTR390 Library packageName=adafruit/library/Adafruit LTR390 Library
|
|
||||||
adafruit/Adafruit LTR390 Library@1.1.2
|
|
||||||
# renovate: datasource=custom.pio depName=Adafruit PCT2075 packageName=adafruit/library/Adafruit PCT2075
|
|
||||||
adafruit/Adafruit PCT2075@1.0.5
|
|
||||||
# renovate: datasource=custom.pio depName=DFRobot_BMM150 packageName=dfrobot/library/DFRobot_BMM150
|
|
||||||
dfrobot/DFRobot_BMM150@1.0.0
|
|
||||||
|
|
||||||
; (not included in native / portduino)
|
; (not included in native / portduino)
|
||||||
[environmental_extra]
|
[environmental_extra]
|
||||||
@@ -186,7 +170,7 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X
|
# renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X
|
||||||
adafruit/Adafruit MAX1704X@1.0.3
|
adafruit/Adafruit MAX1704X@1.0.3
|
||||||
# renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library
|
# renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library
|
||||||
adafruit/Adafruit SHTC3 Library@1.0.2
|
adafruit/Adafruit SHTC3 Library@1.0.1
|
||||||
# renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X
|
# renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X
|
||||||
adafruit/Adafruit LPS2X@2.0.6
|
adafruit/Adafruit LPS2X@2.0.6
|
||||||
# renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library
|
# renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library
|
||||||
@@ -197,15 +181,11 @@ lib_deps =
|
|||||||
adafruit/Adafruit SHT4x Library@1.0.5
|
adafruit/Adafruit SHT4x Library@1.0.5
|
||||||
# renovate: datasource=custom.pio depName=SparkFun Qwiic Scale NAU7802 packageName=sparkfun/library/SparkFun Qwiic Scale NAU7802 Arduino Library
|
# renovate: datasource=custom.pio depName=SparkFun Qwiic Scale NAU7802 packageName=sparkfun/library/SparkFun Qwiic Scale NAU7802 Arduino Library
|
||||||
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6
|
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6
|
||||||
|
# renovate: datasource=custom.pio depName=SparkFun 9DoF IMU Breakout ICM 20948 packageName=sparkfun/library/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library
|
||||||
|
sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.3.0
|
||||||
# renovate: datasource=custom.pio depName=ClosedCube OPT3001 packageName=closedcube/library/ClosedCube OPT3001
|
# renovate: datasource=custom.pio depName=ClosedCube OPT3001 packageName=closedcube/library/ClosedCube OPT3001
|
||||||
ClosedCube OPT3001@1.1.2
|
ClosedCube OPT3001@1.1.2
|
||||||
# renovate: datasource=custom.pio depName=Bosch BSEC2 packageName=boschsensortec/library/bsec2
|
# renovate: datasource=git-refs depName=Bosch BSEC2 packageName=https://github.com/meshtastic/Bosch-BSEC2-Library gitBranch=extra_script
|
||||||
boschsensortec/bsec2@1.10.2610
|
https://github.com/meshtastic/Bosch-BSEC2-Library/archive/e16952dfe5addd4287e1eb8c4f6ecac0fa3dd3de.zip
|
||||||
# renovate: datasource=custom.pio depName=Bosch BME68x packageName=boschsensortec/library/BME68x Sensor Library
|
|
||||||
boschsensortec/BME68x Sensor Library@1.3.40408
|
|
||||||
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
||||||
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
||||||
# renovate: datasource=custom.pio depName=Sensirion Core packageName=sensirion/library/Sensirion Core
|
|
||||||
sensirion/Sensirion Core@0.7.1
|
|
||||||
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
|
||||||
sensirion/Sensirion I2C SCD4x@1.1.0
|
|
||||||
|
|||||||
Submodule protobufs updated: 8985852d75...078ac8dfbe
@@ -9,21 +9,15 @@
|
|||||||
"workarounds:all"
|
"workarounds:all"
|
||||||
],
|
],
|
||||||
"forkProcessing": "enabled",
|
"forkProcessing": "enabled",
|
||||||
"ignoreDeps": [
|
"ignoreDeps": ["protobufs"],
|
||||||
"protobufs"
|
|
||||||
],
|
|
||||||
"git-submodules": {
|
"git-submodules": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"pip_requirements": {
|
"pip_requirements": {
|
||||||
"managerFilePatterns": [
|
"fileMatch": ["bin/bump_metainfo/requirements.txt"]
|
||||||
"/bin/bump_metainfo/requirements.txt/"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"commitMessageTopic": "{{depName}}",
|
"commitMessageTopic": "{{depName}}",
|
||||||
"labels": [
|
"labels": ["dependencies"],
|
||||||
"dependencies"
|
|
||||||
],
|
|
||||||
"customDatasources": {
|
"customDatasources": {
|
||||||
"pio": {
|
"pio": {
|
||||||
"description": "PlatformIO Registry",
|
"description": "PlatformIO Registry",
|
||||||
@@ -38,12 +32,8 @@
|
|||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "Match meshtastic/web version",
|
"description": "Match meshtastic/web version",
|
||||||
"managerFilePatterns": [
|
"fileMatch": ["bin/web.version"],
|
||||||
"/bin/web.version/"
|
"matchStrings": ["(?<currentValue>.+)$"],
|
||||||
],
|
|
||||||
"matchStrings": [
|
|
||||||
"(?<currentValue>.+)$"
|
|
||||||
],
|
|
||||||
"datasourceTemplate": "github-releases",
|
"datasourceTemplate": "github-releases",
|
||||||
"depNameTemplate": "meshtastic/web",
|
"depNameTemplate": "meshtastic/web",
|
||||||
"versioningTemplate": "semver-coerced"
|
"versioningTemplate": "semver-coerced"
|
||||||
@@ -51,9 +41,7 @@
|
|||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "Match normal PIO dependencies",
|
"description": "Match normal PIO dependencies",
|
||||||
"managerFilePatterns": [
|
"fileMatch": [".*\\.ini$"],
|
||||||
"/.*\\.ini$/"
|
|
||||||
],
|
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"# renovate: datasource=(?<datasource>.*?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+?.+?@(?<currentValue>.+?)\\s"
|
"# renovate: datasource=(?<datasource>.*?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+?.+?@(?<currentValue>.+?)\\s"
|
||||||
],
|
],
|
||||||
@@ -62,11 +50,9 @@
|
|||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "Match PIO zipped dependencies with github tag ref",
|
"description": "Match PIO zipped dependencies with github tag ref",
|
||||||
"managerFilePatterns": [
|
"fileMatch": [".*\\.ini$"],
|
||||||
"/.*\\.ini$/"
|
|
||||||
],
|
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"# renovate: datasource=github-tags(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+?https://.+?archive/(?<currentValue>.+?).zip\\s"
|
"# renovate: datasource=github-tags(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+?https:\/\/.+?archive\/(?<currentValue>.+?).zip\\s"
|
||||||
],
|
],
|
||||||
"datasourceTemplate": "github-tags",
|
"datasourceTemplate": "github-tags",
|
||||||
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}"
|
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}"
|
||||||
@@ -74,11 +60,9 @@
|
|||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "Match PIO zipped dependencies with git commit ref",
|
"description": "Match PIO zipped dependencies with git commit ref",
|
||||||
"managerFilePatterns": [
|
"fileMatch": [".*\\.ini$"],
|
||||||
"/.*\\.ini$/"
|
|
||||||
],
|
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"# renovate: datasource=git-refs(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\sgitBranch=(?<gitBranch>.+?)\\s+?https://.+?archive/(?<currentDigest>.+?).zip\\s"
|
"# renovate: datasource=git-refs(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\sgitBranch=(?<gitBranch>.+?)\\s+?https:\/\/.+?archive\/(?<currentDigest>.+?).zip\\s"
|
||||||
],
|
],
|
||||||
"datasourceTemplate": "git-refs",
|
"datasourceTemplate": "git-refs",
|
||||||
"currentValueTemplate": "{{{gitBranch}}}",
|
"currentValueTemplate": "{{{gitBranch}}}",
|
||||||
@@ -87,12 +71,8 @@
|
|||||||
],
|
],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
"matchDepNames": [
|
"matchDepNames": ["meshtastic/device-ui"],
|
||||||
"meshtastic/device-ui"
|
"reviewers": ["mverch67"],
|
||||||
],
|
|
||||||
"reviewers": [
|
|
||||||
"mverch67"
|
|
||||||
],
|
|
||||||
"changelogUrl": "https://github.com/meshtastic/device-ui/compare/{{currentDigest}}...{{newDigest}}"
|
"changelogUrl": "https://github.com/meshtastic/device-ui/compare/{{currentDigest}}...{{newDigest}}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ class AmbientLightingThread : public concurrency::OSThread
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_DEBUG("AmbientLighting init");
|
LOG_DEBUG("AmbientLighting init");
|
||||||
#ifdef HAS_NCP5623
|
#if defined(HAS_NCP5623) || defined(HAS_LP5562)
|
||||||
if (_type == ScanI2C::NCP5623) {
|
if (_type == ScanI2C::NCP5623) {
|
||||||
rgb.begin();
|
rgb.begin();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_LP5562
|
#ifdef HAS_LP5562
|
||||||
if (_type == ScanI2C::LP5562) {
|
} else if (_type == ScanI2C::LP5562) {
|
||||||
rgbw.begin();
|
rgbw.begin();
|
||||||
#endif
|
#endif
|
||||||
#ifdef RGBLED_RED
|
#ifdef RGBLED_RED
|
||||||
@@ -155,9 +155,8 @@ class AmbientLightingThread : public concurrency::OSThread
|
|||||||
rgb.setRed(moduleConfig.ambient_lighting.red);
|
rgb.setRed(moduleConfig.ambient_lighting.red);
|
||||||
rgb.setGreen(moduleConfig.ambient_lighting.green);
|
rgb.setGreen(moduleConfig.ambient_lighting.green);
|
||||||
rgb.setBlue(moduleConfig.ambient_lighting.blue);
|
rgb.setBlue(moduleConfig.ambient_lighting.blue);
|
||||||
LOG_DEBUG("Init NCP5623 Ambient light w/ current=%d, red=%d, green=%d, blue=%d",
|
LOG_DEBUG("Init NCP5623 Ambient light w/ current=%d, red=%d, green=%d, blue=%d", moduleConfig.ambient_lighting.current,
|
||||||
moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red,
|
moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
||||||
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_LP5562
|
#ifdef HAS_LP5562
|
||||||
rgbw.setCurrent(moduleConfig.ambient_lighting.current);
|
rgbw.setCurrent(moduleConfig.ambient_lighting.current);
|
||||||
@@ -184,8 +183,8 @@ class AmbientLightingThread : public concurrency::OSThread
|
|||||||
#endif
|
#endif
|
||||||
pixels.show();
|
pixels.show();
|
||||||
LOG_DEBUG("Init NeoPixel Ambient light w/ brightness(current)=%d, red=%d, green=%d, blue=%d",
|
LOG_DEBUG("Init NeoPixel Ambient light w/ brightness(current)=%d, red=%d, green=%d, blue=%d",
|
||||||
moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red,
|
moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green,
|
||||||
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
moduleConfig.ambient_lighting.blue);
|
||||||
#endif
|
#endif
|
||||||
#ifdef RGBLED_CA
|
#ifdef RGBLED_CA
|
||||||
analogWrite(RGBLED_RED, 255 - moduleConfig.ambient_lighting.red);
|
analogWrite(RGBLED_RED, 255 - moduleConfig.ambient_lighting.red);
|
||||||
@@ -201,12 +200,11 @@ class AmbientLightingThread : public concurrency::OSThread
|
|||||||
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
||||||
#endif
|
#endif
|
||||||
#ifdef UNPHONE
|
#ifdef UNPHONE
|
||||||
unphone.rgb(moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green,
|
unphone.rgb(moduleConfig.ambient_lighting.red, moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
||||||
moduleConfig.ambient_lighting.blue);
|
|
||||||
LOG_DEBUG("Init unPhone Ambient light w/ red=%d, green=%d, blue=%d", moduleConfig.ambient_lighting.red,
|
LOG_DEBUG("Init unPhone Ambient light w/ red=%d, green=%d, blue=%d", moduleConfig.ambient_lighting.red,
|
||||||
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace concurrency
|
} // namespace concurrency
|
||||||
|
|||||||
@@ -47,20 +47,6 @@ class AudioThread : public concurrency::OSThread
|
|||||||
setCPUFast(false);
|
setCPUFast(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void readAloud(const char *text)
|
|
||||||
{
|
|
||||||
if (i2sRtttl != nullptr) {
|
|
||||||
i2sRtttl->stop();
|
|
||||||
delete i2sRtttl;
|
|
||||||
i2sRtttl = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
ESP8266SAM *sam = new ESP8266SAM;
|
|
||||||
sam->Say(audioOut, text);
|
|
||||||
delete sam;
|
|
||||||
setCPUFast(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int32_t runOnce() override
|
int32_t runOnce() override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ extern const uint8_t MESH_SERVICE_UUID_16[], TORADIO_UUID_16[16u], FROMRADIO_UUI
|
|||||||
|
|
||||||
/// Given a level between 0-100, update the BLE attribute
|
/// Given a level between 0-100, update the BLE attribute
|
||||||
void updateBatteryLevel(uint8_t level);
|
void updateBatteryLevel(uint8_t level);
|
||||||
|
void updateLongitude(double longitude);
|
||||||
|
void updateLatitude(double latitude);
|
||||||
|
void updateAltitude(float altitude);
|
||||||
|
|
||||||
class BluetoothApi
|
class BluetoothApi
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,24 +88,10 @@ class BluetoothStatus : public Status
|
|||||||
break;
|
break;
|
||||||
case ConnectionState::CONNECTED:
|
case ConnectionState::CONNECTED:
|
||||||
LOG_DEBUG("BluetoothStatus CONNECTED");
|
LOG_DEBUG("BluetoothStatus CONNECTED");
|
||||||
#ifdef BLE_LED
|
|
||||||
#ifdef BLE_LED_INVERTED
|
|
||||||
digitalWrite(BLE_LED, LOW);
|
|
||||||
#else
|
|
||||||
digitalWrite(BLE_LED, HIGH);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ConnectionState::DISCONNECTED:
|
case ConnectionState::DISCONNECTED:
|
||||||
LOG_DEBUG("BluetoothStatus DISCONNECTED");
|
LOG_DEBUG("BluetoothStatus DISCONNECTED");
|
||||||
#ifdef BLE_LED
|
|
||||||
#ifdef BLE_LED_INVERTED
|
|
||||||
digitalWrite(BLE_LED, HIGH);
|
|
||||||
#else
|
|
||||||
digitalWrite(BLE_LED, LOW);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
458
src/ButtonThread.cpp
Normal file
458
src/ButtonThread.cpp
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
#include "ButtonThread.h"
|
||||||
|
|
||||||
|
#include "configuration.h"
|
||||||
|
#if !MESHTASTIC_EXCLUDE_GPS
|
||||||
|
#include "GPS.h"
|
||||||
|
#endif
|
||||||
|
#include "MeshService.h"
|
||||||
|
#include "PowerFSM.h"
|
||||||
|
#include "RadioLibInterface.h"
|
||||||
|
#include "buzz.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "modules/ExternalNotificationModule.h"
|
||||||
|
#include "power.h"
|
||||||
|
#include "sleep.h"
|
||||||
|
#ifdef ARCH_PORTDUINO
|
||||||
|
#include "platform/portduino/PortduinoGlue.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEBUG_BUTTONS 0
|
||||||
|
#if DEBUG_BUTTONS
|
||||||
|
#define LOG_BUTTON(...) LOG_DEBUG(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define LOG_BUTTON(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace concurrency;
|
||||||
|
|
||||||
|
ButtonThread *buttonThread; // Declared extern in header
|
||||||
|
volatile ButtonThread::ButtonEventType ButtonThread::btnEvent = ButtonThread::BUTTON_EVENT_NONE;
|
||||||
|
|
||||||
|
#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
OneButton ButtonThread::userButton; // Get reference to static member
|
||||||
|
#endif
|
||||||
|
ButtonThread::ButtonThread() : OSThread("Button")
|
||||||
|
{
|
||||||
|
#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
|
||||||
|
#if defined(ARCH_PORTDUINO)
|
||||||
|
if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) {
|
||||||
|
this->userButton = OneButton(settingsMap[user], true, true);
|
||||||
|
LOG_DEBUG("Use GPIO%02d for button", settingsMap[user]);
|
||||||
|
}
|
||||||
|
#elif defined(BUTTON_PIN)
|
||||||
|
#if !defined(USERPREFS_BUTTON_PIN)
|
||||||
|
int pin = config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN; // Resolved button pin
|
||||||
|
#endif
|
||||||
|
#ifdef USERPREFS_BUTTON_PIN
|
||||||
|
int pin = config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN; // Resolved button pin
|
||||||
|
#endif
|
||||||
|
#if defined(HELTEC_CAPSULE_SENSOR_V3) || defined(HELTEC_SENSOR_HUB)
|
||||||
|
this->userButton = OneButton(pin, false, false);
|
||||||
|
#elif defined(BUTTON_ACTIVE_LOW)
|
||||||
|
this->userButton = OneButton(pin, BUTTON_ACTIVE_LOW, BUTTON_ACTIVE_PULLUP);
|
||||||
|
#else
|
||||||
|
this->userButton = OneButton(pin, true, true);
|
||||||
|
#endif
|
||||||
|
LOG_DEBUG("Use GPIO%02d for button", pin);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef INPUT_PULLUP_SENSE
|
||||||
|
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
|
||||||
|
#ifdef BUTTON_SENSE_TYPE
|
||||||
|
pinMode(pin, BUTTON_SENSE_TYPE);
|
||||||
|
#else
|
||||||
|
pinMode(pin, INPUT_PULLUP_SENSE);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
userButton.attachClick(userButtonPressed);
|
||||||
|
userButton.setClickMs(BUTTON_CLICK_MS);
|
||||||
|
userButton.setPressMs(BUTTON_LONGPRESS_MS);
|
||||||
|
userButton.setDebounceMs(1);
|
||||||
|
userButton.attachDoubleClick(userButtonDoublePressed);
|
||||||
|
userButton.attachMultiClick(userButtonMultiPressed, this); // Reference to instance: get click count from non-static OneButton
|
||||||
|
#if !defined(T_DECK) && \
|
||||||
|
!defined( \
|
||||||
|
ELECROW_ThinkNode_M2) // T-Deck immediately wakes up after shutdown, Thinknode M2 has this on the smaller ALT button
|
||||||
|
userButton.attachLongPressStart(userButtonPressedLongStart);
|
||||||
|
userButton.attachLongPressStop(userButtonPressedLongStop);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
#if defined(ELECROW_ThinkNode_M2)
|
||||||
|
this->userButtonAlt = OneButton(BUTTON_PIN_ALT, false, false);
|
||||||
|
#else
|
||||||
|
this->userButtonAlt = OneButton(BUTTON_PIN_ALT, true, true);
|
||||||
|
#endif
|
||||||
|
#ifdef INPUT_PULLUP_SENSE
|
||||||
|
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
|
||||||
|
pinMode(BUTTON_PIN_ALT, INPUT_PULLUP_SENSE);
|
||||||
|
#endif
|
||||||
|
userButtonAlt.attachClick(userButtonPressedScreen);
|
||||||
|
userButtonAlt.setClickMs(BUTTON_CLICK_MS);
|
||||||
|
userButtonAlt.setPressMs(BUTTON_LONGPRESS_MS);
|
||||||
|
userButtonAlt.setDebounceMs(1);
|
||||||
|
userButtonAlt.attachLongPressStart(userButtonPressedLongStart);
|
||||||
|
userButtonAlt.attachLongPressStop(userButtonPressedLongStop);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
userButtonTouch = OneButton(BUTTON_PIN_TOUCH, true, true);
|
||||||
|
userButtonTouch.setPressMs(BUTTON_TOUCH_MS);
|
||||||
|
userButtonTouch.attachLongPressStart(touchPressedLongStart); // Better handling with longpress than click?
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
|
// Register callbacks for before and after lightsleep
|
||||||
|
// Used to detach and reattach interrupts
|
||||||
|
lsObserver.observe(¬ifyLightSleep);
|
||||||
|
lsEndObserver.observe(¬ifyLightSleepEnd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
attachButtonInterrupts();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ButtonThread::switchPage()
|
||||||
|
{
|
||||||
|
#ifdef BUTTON_PIN
|
||||||
|
#if !defined(USERPREFS_BUTTON_PIN)
|
||||||
|
if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) !=
|
||||||
|
moduleConfig.canned_message.inputbroker_pin_press) ||
|
||||||
|
!(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) ||
|
||||||
|
!moduleConfig.canned_message.enabled) {
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(USERPREFS_BUTTON_PIN)
|
||||||
|
if (((config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN) !=
|
||||||
|
moduleConfig.canned_message.inputbroker_pin_press) ||
|
||||||
|
!(moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.rotary1_enabled) ||
|
||||||
|
!moduleConfig.canned_message.enabled) {
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#if defined(ARCH_PORTDUINO)
|
||||||
|
if ((settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) &&
|
||||||
|
(settingsMap[user] != moduleConfig.canned_message.inputbroker_pin_press) ||
|
||||||
|
!moduleConfig.canned_message.enabled) {
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ButtonThread::sendAdHocPosition()
|
||||||
|
{
|
||||||
|
service->refreshLocalMeshNode();
|
||||||
|
auto sentPosition = service->trySendPosition(NODENUM_BROADCAST, true);
|
||||||
|
if (screen) {
|
||||||
|
if (sentPosition)
|
||||||
|
screen->print("Sent ad-hoc position\n");
|
||||||
|
else
|
||||||
|
screen->print("Sent ad-hoc nodeinfo\n");
|
||||||
|
screen->forceDisplay(true); // Force a new UI frame, then force an EInk update
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ButtonThread::runOnce()
|
||||||
|
{
|
||||||
|
// If the button is pressed we suppress CPU sleep until release
|
||||||
|
canSleep = true; // Assume we should not keep the board awake
|
||||||
|
|
||||||
|
#if defined(BUTTON_PIN) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
userButton.tick();
|
||||||
|
canSleep &= userButton.isIdle();
|
||||||
|
#elif defined(ARCH_PORTDUINO)
|
||||||
|
if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC) {
|
||||||
|
userButton.tick();
|
||||||
|
canSleep &= userButton.isIdle();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
userButtonAlt.tick();
|
||||||
|
canSleep &= userButtonAlt.isIdle();
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
userButtonTouch.tick();
|
||||||
|
canSleep &= userButtonTouch.isIdle();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (btnEvent != BUTTON_EVENT_NONE) {
|
||||||
|
switch (btnEvent) {
|
||||||
|
case BUTTON_EVENT_PRESSED: {
|
||||||
|
LOG_BUTTON("press!");
|
||||||
|
// If a nag notification is running, stop it and prevent other actions
|
||||||
|
if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) {
|
||||||
|
externalNotificationModule->stopNow();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#ifdef ELECROW_ThinkNode_M1
|
||||||
|
sendAdHocPosition();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
switchPage();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case BUTTON_EVENT_PRESSED_SCREEN: {
|
||||||
|
LOG_BUTTON("AltPress!");
|
||||||
|
#ifdef ELECROW_ThinkNode_M1
|
||||||
|
// If a nag notification is running, stop it and prevent other actions
|
||||||
|
if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) {
|
||||||
|
externalNotificationModule->stopNow();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switchPage();
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
// turn screen on or off
|
||||||
|
screen_flag = !screen_flag;
|
||||||
|
if (screen)
|
||||||
|
screen->setOn(screen_flag);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case BUTTON_EVENT_DOUBLE_PRESSED: {
|
||||||
|
LOG_BUTTON("Double press!");
|
||||||
|
#ifdef ELECROW_ThinkNode_M1
|
||||||
|
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
sendAdHocPosition();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case BUTTON_EVENT_MULTI_PRESSED: {
|
||||||
|
LOG_BUTTON("Mulitipress! %hux", multipressClickCount);
|
||||||
|
switch (multipressClickCount) {
|
||||||
|
#if HAS_GPS && !defined(ELECROW_ThinkNode_M1)
|
||||||
|
// 3 clicks: toggle GPS
|
||||||
|
case 3:
|
||||||
|
if (!config.device.disable_triple_click && (gps != nullptr)) {
|
||||||
|
gps->toggleGpsMode();
|
||||||
|
if (screen)
|
||||||
|
screen->forceDisplay(true); // Force a new UI frame, then force an EInk update
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#elif defined(ELECROW_ThinkNode_M1) || defined(ELECROW_ThinkNode_M2)
|
||||||
|
case 3:
|
||||||
|
LOG_INFO("3 clicks: toggle buzzer");
|
||||||
|
buzzer_flag = !buzzer_flag;
|
||||||
|
if (!buzzer_flag)
|
||||||
|
noTone(PIN_BUZZER);
|
||||||
|
break;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_EINK) && defined(PIN_EINK_EN) && !defined(ELECROW_ThinkNode_M1) // i.e. T-Echo
|
||||||
|
// 4 clicks: toggle backlight
|
||||||
|
case 4:
|
||||||
|
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#if defined(RAK_4631)
|
||||||
|
// 5 clicks: start accelerometer/magenetometer calibration for 30 seconds
|
||||||
|
case 5:
|
||||||
|
if (accelerometerThread) {
|
||||||
|
accelerometerThread->calibrate(30);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// 6 clicks: start accelerometer/magenetometer calibration for 60 seconds
|
||||||
|
case 6:
|
||||||
|
if (accelerometerThread) {
|
||||||
|
accelerometerThread->calibrate(60);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
// No valid multipress action
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
} // end switch: click count
|
||||||
|
|
||||||
|
break;
|
||||||
|
} // end multipress event
|
||||||
|
|
||||||
|
case BUTTON_EVENT_LONG_PRESSED: {
|
||||||
|
LOG_BUTTON("Long press!");
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
if (screen) {
|
||||||
|
screen->startAlert("Shutting down...");
|
||||||
|
}
|
||||||
|
playBeep();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do actual shutdown when button released, otherwise the button release
|
||||||
|
// may wake the board immediatedly.
|
||||||
|
case BUTTON_EVENT_LONG_RELEASED: {
|
||||||
|
LOG_INFO("Shutdown from long press");
|
||||||
|
playShutdownMelody();
|
||||||
|
delay(3000);
|
||||||
|
power->shutdown();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
case BUTTON_EVENT_TOUCH_LONG_PRESSED: {
|
||||||
|
LOG_BUTTON("Touch press!");
|
||||||
|
if (screen) {
|
||||||
|
// Wake if asleep
|
||||||
|
if (powerFSM.getState() == &stateDARK)
|
||||||
|
powerFSM.trigger(EVENT_PRESS);
|
||||||
|
|
||||||
|
// Update display (legacy behaviour)
|
||||||
|
screen->forceDisplay();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif // BUTTON_PIN_TOUCH
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
btnEvent = BUTTON_EVENT_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Attach (or re-attach) hardware interrupts for buttons
|
||||||
|
* Public method. Used outside class when waking from MCU sleep
|
||||||
|
*/
|
||||||
|
void ButtonThread::attachButtonInterrupts()
|
||||||
|
{
|
||||||
|
#if defined(ARCH_PORTDUINO)
|
||||||
|
if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC)
|
||||||
|
wakeOnIrq(settingsMap[user], FALLING);
|
||||||
|
#elif defined(BUTTON_PIN)
|
||||||
|
// Interrupt for user button, during normal use. Improves responsiveness.
|
||||||
|
attachInterrupt(
|
||||||
|
#if !defined(USERPREFS_BUTTON_PIN)
|
||||||
|
config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN,
|
||||||
|
#endif
|
||||||
|
#if defined(USERPREFS_BUTTON_PIN)
|
||||||
|
config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN,
|
||||||
|
#endif
|
||||||
|
[]() {
|
||||||
|
ButtonThread::userButton.tick();
|
||||||
|
runASAP = true;
|
||||||
|
BaseType_t higherWake = 0;
|
||||||
|
mainDelay.interruptFromISR(&higherWake);
|
||||||
|
},
|
||||||
|
CHANGE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
#ifdef ELECROW_ThinkNode_M2
|
||||||
|
wakeOnIrq(BUTTON_PIN_ALT, RISING);
|
||||||
|
#else
|
||||||
|
wakeOnIrq(BUTTON_PIN_ALT, FALLING);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
wakeOnIrq(BUTTON_PIN_TOUCH, FALLING);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Detach the "normal" button interrupts.
|
||||||
|
* Public method. Used before attaching a "wake-on-button" interrupt for MCU sleep
|
||||||
|
*/
|
||||||
|
void ButtonThread::detachButtonInterrupts()
|
||||||
|
{
|
||||||
|
#if defined(ARCH_PORTDUINO)
|
||||||
|
if (settingsMap.count(user) != 0 && settingsMap[user] != RADIOLIB_NC)
|
||||||
|
detachInterrupt(settingsMap[user]);
|
||||||
|
#elif defined(BUTTON_PIN)
|
||||||
|
#if !defined(USERPREFS_BUTTON_PIN)
|
||||||
|
detachInterrupt(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);
|
||||||
|
#endif
|
||||||
|
#if defined(USERPREFS_BUTTON_PIN)
|
||||||
|
detachInterrupt(config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
detachInterrupt(BUTTON_PIN_ALT);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
detachInterrupt(BUTTON_PIN_TOUCH);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
|
|
||||||
|
// Detach our class' interrupts before lightsleep
|
||||||
|
// Allows sleep.cpp to configure its own interrupts, which wake the device on user-button press
|
||||||
|
int ButtonThread::beforeLightSleep(void *unused)
|
||||||
|
{
|
||||||
|
detachButtonInterrupts();
|
||||||
|
return 0; // Indicates success
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reconfigure our interrupts
|
||||||
|
// Our class' interrupts were disconnected during sleep, to allow the user button to wake the device from sleep
|
||||||
|
int ButtonThread::afterLightSleep(esp_sleep_wakeup_cause_t cause)
|
||||||
|
{
|
||||||
|
attachButtonInterrupts();
|
||||||
|
return 0; // Indicates success
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Watch a GPIO and if we get an IRQ, wake the main thread.
|
||||||
|
* Use to add wake on button press
|
||||||
|
*/
|
||||||
|
void ButtonThread::wakeOnIrq(int irq, int mode)
|
||||||
|
{
|
||||||
|
attachInterrupt(
|
||||||
|
irq,
|
||||||
|
[] {
|
||||||
|
BaseType_t higherWake = 0;
|
||||||
|
mainDelay.interruptFromISR(&higherWake);
|
||||||
|
runASAP = true;
|
||||||
|
},
|
||||||
|
FALLING);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Static callback
|
||||||
|
void ButtonThread::userButtonMultiPressed(void *callerThread)
|
||||||
|
{
|
||||||
|
// Grab click count from non-static button, while the info is still valid
|
||||||
|
ButtonThread *thread = (ButtonThread *)callerThread;
|
||||||
|
thread->storeClickCount();
|
||||||
|
|
||||||
|
// Then handle later, in the usual way
|
||||||
|
btnEvent = BUTTON_EVENT_MULTI_PRESSED;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Non-static method, runs during callback. Grabs info while still valid
|
||||||
|
void ButtonThread::storeClickCount()
|
||||||
|
{
|
||||||
|
#if defined(BUTTON_PIN) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
multipressClickCount = userButton.getNumberClicks();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void ButtonThread::userButtonPressedLongStart()
|
||||||
|
{
|
||||||
|
if (millis() > c_holdOffTime) {
|
||||||
|
btnEvent = BUTTON_EVENT_LONG_PRESSED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ButtonThread::userButtonPressedLongStop()
|
||||||
|
{
|
||||||
|
if (millis() > c_holdOffTime) {
|
||||||
|
btnEvent = BUTTON_EVENT_LONG_RELEASED;
|
||||||
|
}
|
||||||
|
}
|
||||||
91
src/ButtonThread.h
Normal file
91
src/ButtonThread.h
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "OneButton.h"
|
||||||
|
#include "concurrency/OSThread.h"
|
||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#ifndef BUTTON_CLICK_MS
|
||||||
|
#define BUTTON_CLICK_MS 250
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BUTTON_LONGPRESS_MS
|
||||||
|
#define BUTTON_LONGPRESS_MS 5000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BUTTON_TOUCH_MS
|
||||||
|
#define BUTTON_TOUCH_MS 400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class ButtonThread : public concurrency::OSThread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static const uint32_t c_holdOffTime = 30000; // hold off 30s after boot
|
||||||
|
|
||||||
|
enum ButtonEventType {
|
||||||
|
BUTTON_EVENT_NONE,
|
||||||
|
BUTTON_EVENT_PRESSED,
|
||||||
|
BUTTON_EVENT_PRESSED_SCREEN,
|
||||||
|
BUTTON_EVENT_DOUBLE_PRESSED,
|
||||||
|
BUTTON_EVENT_MULTI_PRESSED,
|
||||||
|
BUTTON_EVENT_LONG_PRESSED,
|
||||||
|
BUTTON_EVENT_LONG_RELEASED,
|
||||||
|
BUTTON_EVENT_TOUCH_LONG_PRESSED,
|
||||||
|
};
|
||||||
|
|
||||||
|
ButtonThread();
|
||||||
|
int32_t runOnce() override;
|
||||||
|
void attachButtonInterrupts();
|
||||||
|
void detachButtonInterrupts();
|
||||||
|
void storeClickCount();
|
||||||
|
bool isBuzzing() { return buzzer_flag; }
|
||||||
|
void setScreenFlag(bool flag) { screen_flag = flag; }
|
||||||
|
bool getScreenFlag() { return screen_flag; }
|
||||||
|
|
||||||
|
// Disconnect and reconnect interrupts for light sleep
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
|
int beforeLightSleep(void *unused);
|
||||||
|
int afterLightSleep(esp_sleep_wakeup_cause_t cause);
|
||||||
|
#endif
|
||||||
|
private:
|
||||||
|
#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO) || defined(USERPREFS_BUTTON_PIN)
|
||||||
|
static OneButton userButton; // Static - accessed from an interrupt
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_ALT
|
||||||
|
OneButton userButtonAlt;
|
||||||
|
#endif
|
||||||
|
#ifdef BUTTON_PIN_TOUCH
|
||||||
|
OneButton userButtonTouch;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ARCH_ESP32
|
||||||
|
// Get notified when lightsleep begins and ends
|
||||||
|
CallbackObserver<ButtonThread, void *> lsObserver =
|
||||||
|
CallbackObserver<ButtonThread, void *>(this, &ButtonThread::beforeLightSleep);
|
||||||
|
CallbackObserver<ButtonThread, esp_sleep_wakeup_cause_t> lsEndObserver =
|
||||||
|
CallbackObserver<ButtonThread, esp_sleep_wakeup_cause_t>(this, &ButtonThread::afterLightSleep);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// set during IRQ
|
||||||
|
static volatile ButtonEventType btnEvent;
|
||||||
|
bool buzzer_flag = false;
|
||||||
|
bool screen_flag = true;
|
||||||
|
|
||||||
|
// Store click count during callback, for later use
|
||||||
|
volatile int multipressClickCount = 0;
|
||||||
|
|
||||||
|
static void wakeOnIrq(int irq, int mode);
|
||||||
|
|
||||||
|
static void sendAdHocPosition();
|
||||||
|
static void switchPage();
|
||||||
|
|
||||||
|
// IRQ callbacks
|
||||||
|
static void userButtonPressed() { btnEvent = BUTTON_EVENT_PRESSED; }
|
||||||
|
static void userButtonPressedScreen() { btnEvent = BUTTON_EVENT_PRESSED_SCREEN; }
|
||||||
|
static void userButtonDoublePressed() { btnEvent = BUTTON_EVENT_DOUBLE_PRESSED; }
|
||||||
|
static void userButtonMultiPressed(void *callerThread); // Retrieve click count from non-static Onebutton while still valid
|
||||||
|
static void userButtonPressedLongStart();
|
||||||
|
static void userButtonPressedLongStop();
|
||||||
|
static void touchPressedLongStart() { btnEvent = BUTTON_EVENT_TOUCH_LONG_PRESSED; }
|
||||||
|
};
|
||||||
|
|
||||||
|
extern ButtonThread *buttonThread;
|
||||||
243
src/Power.cpp
243
src/Power.cpp
@@ -20,11 +20,6 @@
|
|||||||
#include "meshUtils.h"
|
#include "meshUtils.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
|
|
||||||
#if defined(ARCH_PORTDUINO)
|
|
||||||
#include "api/WiFiServerAPI.h"
|
|
||||||
#include "input/LinuxInputImpl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Working USB detection for powered/charging states on the RAK platform
|
// Working USB detection for powered/charging states on the RAK platform
|
||||||
#ifdef NRF_APM
|
#ifdef NRF_APM
|
||||||
#include "nrfx_power.h"
|
#include "nrfx_power.h"
|
||||||
@@ -108,7 +103,7 @@ NullSensor ina3221Sensor;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_STM32WL)
|
||||||
#include "modules/Telemetry/Sensor/MAX17048Sensor.h"
|
#include "modules/Telemetry/Sensor/MAX17048Sensor.h"
|
||||||
#include <utility>
|
#include <utility>
|
||||||
extern std::pair<uint8_t, TwoWire *> nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1];
|
extern std::pair<uint8_t, TwoWire *> nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1];
|
||||||
@@ -125,15 +120,6 @@ NullSensor max17048Sensor;
|
|||||||
RAK9154Sensor rak9154Sensor;
|
RAK9154Sensor rak9154Sensor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_PPM
|
|
||||||
// note: XPOWERS_CHIP_XXX must be defined in variant.h
|
|
||||||
#include <XPowersLib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAS_BQ27220
|
|
||||||
#include "bq27220.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAS_PMU
|
#ifdef HAS_PMU
|
||||||
XPowersLibInterface *PMU = NULL;
|
XPowersLibInterface *PMU = NULL;
|
||||||
#else
|
#else
|
||||||
@@ -292,7 +278,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TELEMETRY && !defined(HAS_PMU) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if HAS_TELEMETRY && !defined(ARCH_STM32WL) && !defined(HAS_PMU) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
if (hasINA()) {
|
if (hasINA()) {
|
||||||
return getINAVoltage();
|
return getINAVoltage();
|
||||||
}
|
}
|
||||||
@@ -470,7 +456,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
#ifdef EXT_CHRG_DETECT
|
#ifdef EXT_CHRG_DETECT
|
||||||
return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value;
|
return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value;
|
||||||
#else
|
#else
|
||||||
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(DISABLE_INA_CHARGING_DETECTION)
|
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_STM32WL) && \
|
||||||
|
!defined(DISABLE_INA_CHARGING_DETECTION)
|
||||||
if (hasINA()) {
|
if (hasINA()) {
|
||||||
// get current flow from INA sensor - negative value means power flowing into the battery
|
// get current flow from INA sensor - negative value means power flowing into the battery
|
||||||
// default assuming BATTERY+ <--> INA_VIN+ <--> SHUNT RESISTOR <--> INA_VIN- <--> LOAD
|
// default assuming BATTERY+ <--> INA_VIN+ <--> SHUNT RESISTOR <--> INA_VIN- <--> LOAD
|
||||||
@@ -516,7 +503,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(ARCH_STM32WL)
|
||||||
uint16_t getINAVoltage()
|
uint16_t getINAVoltage()
|
||||||
{
|
{
|
||||||
if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {
|
if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {
|
||||||
@@ -674,16 +661,12 @@ bool Power::analogInit()
|
|||||||
*/
|
*/
|
||||||
bool Power::setup()
|
bool Power::setup()
|
||||||
{
|
{
|
||||||
bool found = false;
|
// initialise one power sensor (only)
|
||||||
if (axpChipInit()) {
|
bool found = axpChipInit();
|
||||||
found = true;
|
if (!found)
|
||||||
} else if (lipoInit()) {
|
found = lipoInit();
|
||||||
found = true;
|
if (!found)
|
||||||
} else if (lipoChargerInit()) {
|
found = analogInit();
|
||||||
found = true;
|
|
||||||
} else if (analogInit()) {
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef NRF_APM
|
#ifdef NRF_APM
|
||||||
found = true;
|
found = true;
|
||||||
@@ -695,61 +678,9 @@ bool Power::setup()
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Power::powerCommandsCheck()
|
|
||||||
{
|
|
||||||
if (rebootAtMsec && millis() > rebootAtMsec) {
|
|
||||||
LOG_INFO("Rebooting");
|
|
||||||
reboot();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shutdownAtMsec && millis() > shutdownAtMsec) {
|
|
||||||
shutdownAtMsec = 0;
|
|
||||||
shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Power::reboot()
|
|
||||||
{
|
|
||||||
notifyReboot.notifyObservers(NULL);
|
|
||||||
#if defined(ARCH_ESP32)
|
|
||||||
ESP.restart();
|
|
||||||
#elif defined(ARCH_NRF52)
|
|
||||||
NVIC_SystemReset();
|
|
||||||
#elif defined(ARCH_RP2040)
|
|
||||||
rp2040.reboot();
|
|
||||||
#elif defined(ARCH_PORTDUINO)
|
|
||||||
deInitApiServer();
|
|
||||||
if (aLinuxInputImpl)
|
|
||||||
aLinuxInputImpl->deInit();
|
|
||||||
SPI.end();
|
|
||||||
Wire.end();
|
|
||||||
Serial1.end();
|
|
||||||
if (screen) {
|
|
||||||
delete screen;
|
|
||||||
screen = nullptr;
|
|
||||||
}
|
|
||||||
LOG_DEBUG("final reboot!");
|
|
||||||
::reboot();
|
|
||||||
#elif defined(ARCH_STM32WL)
|
|
||||||
HAL_NVIC_SystemReset();
|
|
||||||
#else
|
|
||||||
rebootAtMsec = -1;
|
|
||||||
LOG_WARN("FIXME implement reboot for this platform. Note that some settings require a restart to be applied");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void Power::shutdown()
|
void Power::shutdown()
|
||||||
{
|
{
|
||||||
|
LOG_INFO("Shutting down");
|
||||||
#if HAS_SCREEN
|
|
||||||
if (screen) {
|
|
||||||
screen->showSimpleBanner("Shutting Down...", 0); // stays on screen
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if !defined(ARCH_STM32WL)
|
|
||||||
playShutdownMelody();
|
|
||||||
#endif
|
|
||||||
nodeDB->saveToDisk();
|
|
||||||
|
|
||||||
#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040)
|
#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040)
|
||||||
#ifdef PIN_LED1
|
#ifdef PIN_LED1
|
||||||
@@ -761,11 +692,7 @@ void Power::shutdown()
|
|||||||
#ifdef PIN_LED3
|
#ifdef PIN_LED3
|
||||||
ledOff(PIN_LED3);
|
ledOff(PIN_LED3);
|
||||||
#endif
|
#endif
|
||||||
doDeepSleep(DELAY_FOREVER, false, true);
|
doDeepSleep(DELAY_FOREVER, false, false);
|
||||||
#elif defined(ARCH_PORTDUINO)
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
#else
|
|
||||||
LOG_WARN("FIXME implement shutdown for this platform");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -926,7 +853,6 @@ int32_t Power::runOnce()
|
|||||||
#ifndef T_WATCH_S3 // FIXME - why is this triggering on the T-Watch S3?
|
#ifndef T_WATCH_S3 // FIXME - why is this triggering on the T-Watch S3?
|
||||||
if (PMU->isPekeyLongPressIrq()) {
|
if (PMU->isPekeyLongPressIrq()) {
|
||||||
LOG_DEBUG("PEK long button press");
|
LOG_DEBUG("PEK long button press");
|
||||||
if (screen)
|
|
||||||
screen->setOn(false);
|
screen->setOn(false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1232,7 +1158,7 @@ bool Power::axpChipInit()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MAX1704X.h>)
|
#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for an I2C MAX17048 Lipo battery sensor.
|
* Wrapper class for an I2C MAX17048 Lipo battery sensor.
|
||||||
@@ -1309,144 +1235,3 @@ bool Power::lipoInit()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAS_PPM) && HAS_PPM
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adapter class for BQ25896/BQ27220 Lipo battery charger.
|
|
||||||
*/
|
|
||||||
class LipoCharger : public HasBatteryLevel
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
XPowersPPM *ppm = nullptr;
|
|
||||||
BQ27220 *bq = nullptr;
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Init the I2C BQ25896 Lipo battery charger
|
|
||||||
*/
|
|
||||||
bool runOnce()
|
|
||||||
{
|
|
||||||
if (ppm == nullptr) {
|
|
||||||
ppm = new XPowersPPM;
|
|
||||||
bool result = ppm->init(Wire, I2C_SDA, I2C_SCL, BQ25896_ADDR);
|
|
||||||
if (result) {
|
|
||||||
LOG_INFO("PPM BQ25896 init succeeded");
|
|
||||||
// Set the minimum operating voltage. Below this voltage, the PPM will protect
|
|
||||||
// ppm->setSysPowerDownVoltage(3100);
|
|
||||||
|
|
||||||
// Set input current limit, default is 500mA
|
|
||||||
// ppm->setInputCurrentLimit(800);
|
|
||||||
|
|
||||||
// Disable current limit pin
|
|
||||||
// ppm->disableCurrentLimitPin();
|
|
||||||
|
|
||||||
// Set the charging target voltage, Range:3840 ~ 4608mV ,step:16 mV
|
|
||||||
ppm->setChargeTargetVoltage(4288);
|
|
||||||
|
|
||||||
// Set the precharge current , Range: 64mA ~ 1024mA ,step:64mA
|
|
||||||
// ppm->setPrechargeCurr(64);
|
|
||||||
|
|
||||||
// The premise is that limit pin is disabled, or it will
|
|
||||||
// only follow the maximum charging current set by limit pin.
|
|
||||||
// Set the charging current , Range:0~5056mA ,step:64mA
|
|
||||||
ppm->setChargerConstantCurr(1024);
|
|
||||||
|
|
||||||
// To obtain voltage data, the ADC must be enabled first
|
|
||||||
ppm->enableMeasure();
|
|
||||||
|
|
||||||
// Turn on charging function
|
|
||||||
// If there is no battery connected, do not turn on the charging function
|
|
||||||
ppm->enableCharge();
|
|
||||||
} else {
|
|
||||||
LOG_WARN("PPM BQ25896 init failed");
|
|
||||||
delete ppm;
|
|
||||||
ppm = nullptr;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (bq == nullptr) {
|
|
||||||
bq = new BQ27220;
|
|
||||||
bq->setDefaultCapacity(BQ27220_DESIGN_CAPACITY);
|
|
||||||
|
|
||||||
bool result = bq->init();
|
|
||||||
if (result) {
|
|
||||||
LOG_DEBUG("BQ27220 design capacity: %d", bq->getDesignCapacity());
|
|
||||||
LOG_DEBUG("BQ27220 fullCharge capacity: %d", bq->getFullChargeCapacity());
|
|
||||||
LOG_DEBUG("BQ27220 remaining capacity: %d", bq->getRemainingCapacity());
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
LOG_WARN("BQ27220 init failed");
|
|
||||||
delete bq;
|
|
||||||
bq = nullptr;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Battery state of charge, from 0 to 100 or -1 for unknown
|
|
||||||
*/
|
|
||||||
virtual int getBatteryPercent() override
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
// return bq->getChargePercent(); // don't use BQ27220 for battery percent, it is not calibrated
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The raw voltage of the battery in millivolts, or NAN if unknown
|
|
||||||
*/
|
|
||||||
virtual uint16_t getBattVoltage() override { return bq->getVoltage(); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* return true if there is a battery installed in this unit
|
|
||||||
*/
|
|
||||||
virtual bool isBatteryConnect() override { return ppm->getBattVoltage() > 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* return true if there is an external power source detected
|
|
||||||
*/
|
|
||||||
virtual bool isVbusIn() override { return ppm->getVbusVoltage() > 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* return true if the battery is currently charging
|
|
||||||
*/
|
|
||||||
virtual bool isCharging() override
|
|
||||||
{
|
|
||||||
bool isCharging = ppm->isCharging();
|
|
||||||
if (isCharging) {
|
|
||||||
LOG_DEBUG("BQ27220 time to full charge: %d min", bq->getTimeToFull());
|
|
||||||
} else {
|
|
||||||
if (!ppm->isVbusIn()) {
|
|
||||||
LOG_DEBUG("BQ27220 time to empty: %d min (%d mAh)", bq->getTimeToEmpty(), bq->getRemainingCapacity());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return isCharging;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
LipoCharger lipoCharger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Init the Lipo battery charger
|
|
||||||
*/
|
|
||||||
bool Power::lipoChargerInit()
|
|
||||||
{
|
|
||||||
bool result = lipoCharger.runOnce();
|
|
||||||
LOG_DEBUG("Power::lipoChargerInit lipo sensor is %s", result ? "ready" : "not ready yet");
|
|
||||||
if (!result)
|
|
||||||
return false;
|
|
||||||
batteryLevel = &lipoCharger;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
/**
|
|
||||||
* The Lipo battery level sensor is unavailable - default to AnalogBatteryLevel
|
|
||||||
*/
|
|
||||||
bool Power::lipoChargerInit()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user