Merge branch 'master' into parallel-gpiochip-support

This commit is contained in:
Jonathan Bennett 2025-01-06 19:40:24 -06:00 committed by GitHub
commit fb4be803b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 83 additions and 71 deletions

View File

@ -7,7 +7,7 @@ on:
required: true required: true
inputs: inputs:
series: series:
description: 'Ubuntu series to target' description: Ubuntu series to target
required: true required: true
type: string type: string
@ -32,9 +32,9 @@ jobs:
working-directory: meshtasticd working-directory: meshtasticd
run: | run: |
sudo apt-get update -y --fix-missing sudo apt-get update -y --fix-missing
sudo apt-get install -y software-properties-common sudo apt-get install -y software-properties-common build-essential devscripts equivs
sudo add-apt-repository ppa:meshtastic/meshtastic-daily -y sudo add-apt-repository ppa:meshtastic/build-tools -y
sudo apt-get install -y build-essential devscripts equivs sudo apt-get update -y --fix-missing
sudo mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control sudo mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
- name: Import GPG key - name: Import GPG key

View File

@ -17,3 +17,13 @@ jobs:
uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b
with: with:
trunk-token: ${{ secrets.TRUNK_TOKEN }} trunk-token: ${{ secrets.TRUNK_TOKEN }}
package-ppa:
strategy:
fail-fast: false
matrix:
series: [plucky, oracular, noble, jammy]
uses: ./.github/workflows/package_ppa.yml
with:
ppa_repo: daily
series: ${{ matrix.series }}
secrets: inherit

View File

@ -6,8 +6,12 @@ on:
PPA_GPG_PRIVATE_KEY: PPA_GPG_PRIVATE_KEY:
required: true required: true
inputs: inputs:
ppa_repo:
description: Meshtastic PPA to target
required: true
type: string
series: series:
description: 'Ubuntu series to target' description: Ubuntu series to target
required: true required: true
type: string type: string
workflow_dispatch: workflow_dispatch:
@ -65,4 +69,4 @@ jobs:
- name: Publish with dput - name: Publish with dput
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
run: | run: |
dput ppa:meshtastic/meshtastic-daily meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes dput ppa:meshtastic/${{ inputs.ppa_repo }} meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes

20
.github/workflows/release_channels.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Trigger release workflows upon Publish
on:
release:
types: [published]
permissions: read-all
jobs:
package-ppa:
strategy:
fail-fast: false
matrix:
series: [plucky, oracular, noble, jammy]
uses: ./.github/workflows/package_ppa.yml
with:
ppa_repo: |-
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
series: ${{ matrix.series }}
secrets: inherit

4
.gitignore vendored
View File

@ -1,6 +1,8 @@
.pio .pio
.pio_core
pio pio
pio.tar
web
web.tar
# ignore vscode IDE settings files # ignore vscode IDE settings files
.vscode/* .vscode/*

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
meshtasticd (2.5.19) unstable; urgency=medium meshtasticd (2.5.19) UNRELEASED; urgency=medium
* Initial packaging * Initial packaging

View File

@ -1,6 +1,7 @@
#!/usr/bin/bash #!/usr/bin/bash
export DEBEMAIL="github-actions[bot]@users.noreply.github.com" export DEBEMAIL="github-actions[bot]@users.noreply.github.com"
PKG_VERSION=$(python3 bin/buildinfo.py short)
dch --newversion "$(python3 bin/buildinfo.py short)-1" \ dch --newversion "$PKG_VERSION-1" \
--distribution unstable \ --distribution UNRELEASED \
"GitHub Actions Automatic version bump" "GitHub Actions Automatic version bump"

View File

@ -4,17 +4,20 @@ export PLATFORMIO_LIBDEPS_DIR=pio/libdeps
export PLATFORMIO_PACKAGES_DIR=pio/packages export PLATFORMIO_PACKAGES_DIR=pio/packages
export PLATFORMIO_CORE_DIR=pio/core export PLATFORMIO_CORE_DIR=pio/core
# Download libraries to `libdeps` # Download libraries to `pio`
platformio pkg install -e native platformio pkg install -e native
platformio pkg install -t tool-scons -e native platformio pkg install -e native -t platformio/tool-scons@4.40502.0
# Compress `pio` directory to prevent dh_clean from sanitizing it
tar -cf pio.tar pio/ tar -cf pio.tar pio/
rm -rf pio rm -rf pio
# Download the latest meshtastic/web release build.tar to `web.tar`
curl https://github.com/meshtastic/web/releases/download/latest/build.tar -o web.tar
package=$(dpkg-parsechangelog --show-field Source) package=$(dpkg-parsechangelog --show-field Source)
rm -rf debian/changelog rm -rf debian/changelog
dch --create --distribution $SERIES --package $package --newversion $PKG_VERSION~$SERIES \ dch --create --distribution "$SERIES" --package "$package" --newversion "$PKG_VERSION~$SERIES" \
"GitHub Actions Automatic packaging for $PKG_VERSION~$SERIES" "GitHub Actions Automatic packaging for $PKG_VERSION~$SERIES"
# Build the source deb # Build the source deb
debuild -S -nc -k$GPG_KEY_ID debuild -S -nc -k"$GPG_KEY_ID"

6
debian/control vendored
View File

@ -13,7 +13,11 @@ Build-Depends: debhelper-compat (= 13),
libgpiod-dev, libgpiod-dev,
libbluetooth-dev, libbluetooth-dev,
libusb-1.0-0-dev, libusb-1.0-0-dev,
libi2c-dev libi2c-dev,
openssl,
libssl-dev,
libulfius-dev,
liborcania-dev
Standards-Version: 4.6.2 Standards-Version: 4.6.2
Homepage: https://github.com/meshtastic/firmware Homepage: https://github.com/meshtastic/firmware
Rules-Requires-Root: no Rules-Requires-Root: no

View File

@ -1,3 +1,4 @@
etc/meshtasticd etc/meshtasticd
etc/meshtasticd/config.d etc/meshtasticd/config.d
etc/meshtasticd/available.d etc/meshtasticd/available.d
usr/share/meshtasticd/web

View File

@ -4,3 +4,5 @@ bin/config.yaml etc/meshtasticd
bin/config.d/* etc/meshtasticd/available.d bin/config.d/* etc/meshtasticd/available.d
bin/meshtasticd.service lib/systemd/system bin/meshtasticd.service lib/systemd/system
web/* usr/share/meshtasticd/web

5
debian/rules vendored
View File

@ -12,8 +12,11 @@ PIO_ENV:=\
PLATFORMIO_PACKAGES_DIR=pio/packages PLATFORMIO_PACKAGES_DIR=pio/packages
override_dh_auto_build: override_dh_auto_build:
# Build with platformio # Extract tarballs within source deb
tar -xf pio.tar tar -xf pio.tar
tar -xf web.tar web
gunzip web/ -r
# Build with platformio
$(PIO_ENV) platformio run -e native $(PIO_ENV) platformio run -e native
# Move the binary and default config to the correct name # Move the binary and default config to the correct name
mv .pio/build/native/program .pio/build/native/meshtasticd mv .pio/build/native/program .pio/build/native/meshtasticd

View File

@ -1,3 +1,2 @@
pio/libdeps pio.tar
pio/packages web.tar
pio/core

View File

@ -1,2 +1 @@
extend-diff-ignore = "\.pio\w*?$" extend-diff-ignore = "\.pio"
tar-ignore = ""

View File

@ -3,43 +3,7 @@
[platformio] [platformio]
default_envs = tbeam default_envs = tbeam
;default_envs = pico
;default_envs = tbeam-s3-core
;default_envs = tbeam0.7
;default_envs = heltec-v1
;default_envs = heltec-v2_0
;default_envs = heltec-v2_1
;default_envs = heltec-wireless-tracker
;default_envs = chatter2
;default_envs = tlora-v1
;default_envs = tlora_v1_3
;default_envs = tlora-v2
;default_envs = tlora-v2-1-1_6
;default_envs = tlora-v2-1-1_6-tcxo
;default_envs = tlora-v3-3-0-tcxo
;default_envs = tlora-t3s3-v1
;default_envs = t-echo
;default_envs = canaryone
;default_envs = native
;default_envs = nano-g1
;default_envs = pca10059_diy_eink
;default_envs = meshtastic-diy-v1
;default_envs = meshtastic-diy-v1_1
;default_envs = meshtastic-dr-dev
;default_envs = m5stack-coreink
;default_envs = rak4631
;default_envs = rak4631_eth_gw
;default_envs = rak2560
;default_envs = rak11310
;default_envs = rak_wismeshtap
;default_envs = wio-e5
;default_envs = radiomaster_900_bandit_nano
;default_envs = radiomaster_900_bandit_micro
;default_envs = radiomaster_900_bandit
;default_envs = heltec_vision_master_t190
;default_envs = heltec_vision_master_e213
;default_envs = heltec_vision_master_e290
;default_envs = heltec_mesh_node_t114
extra_configs = extra_configs =
arch/*/*.ini arch/*/*.ini
variants/*/platformio.ini variants/*/platformio.ini
@ -124,8 +88,7 @@ lib_deps =
[radiolib_base] [radiolib_base]
lib_deps = lib_deps =
; jgromes/RadioLib@7.1.0 jgromes/RadioLib@7.1.2
https://github.com/jgromes/RadioLib.git#92b687821ff4e6c358d866f84566f66672ab02b8
; Common libs for environmental measurements in telemetry module ; Common libs for environmental measurements in telemetry module
; (not included in native / portduino) ; (not included in native / portduino)

View File

@ -100,29 +100,30 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s
{ {
display->setTextAlignment(TEXT_ALIGN_LEFT); display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(FONT_SMALL); display->setFont(FONT_SMALL);
display->drawString(x, y, "Power Telemetry");
if (lastMeasurementPacket == nullptr) { if (lastMeasurementPacket == nullptr) {
display->setFont(FONT_SMALL); // In case of no valid packet, display "Power Telemetry", "No measurement"
display->drawString(x, y, "Power Telemetry");
display->drawString(x, y += _fontHeight(FONT_SMALL), "No measurement"); display->drawString(x, y += _fontHeight(FONT_SMALL), "No measurement");
return; return;
} }
// Decode the last power packet
meshtastic_Telemetry lastMeasurement; meshtastic_Telemetry lastMeasurement;
uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket); uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket);
const char *lastSender = getSenderShortName(*lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket);
const meshtastic_Data &p = lastMeasurementPacket->decoded; const meshtastic_Data &p = lastMeasurementPacket->decoded;
if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) {
display->setFont(FONT_SMALL); display->drawString(x, y, "Measurement Error");
display->drawString(x, y += _fontHeight(FONT_MEDIUM), "Measurement Error");
LOG_ERROR("Unable to decode last packet"); LOG_ERROR("Unable to decode last packet");
return; return;
} }
// Display "Pow. From: ..."
display->drawString(x, y, "Pow. From: " + String(lastSender) + "(" + String(agoSecs) + "s)");
// Display current and voltage based on ...power_metrics.has_[channel/voltage/current]... flags // Display current and voltage based on ...power_metrics.has_[channel/voltage/current]... flags
display->setFont(FONT_SMALL);
display->drawString(x, y += _fontHeight(FONT_SMALL) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)");
if (lastMeasurement.variant.power_metrics.has_ch1_voltage || lastMeasurement.variant.power_metrics.has_ch1_current) { if (lastMeasurement.variant.power_metrics.has_ch1_voltage || lastMeasurement.variant.power_metrics.has_ch1_current) {
display->drawString(x, y += _fontHeight(FONT_SMALL), display->drawString(x, y += _fontHeight(FONT_SMALL),
"Ch1: " + String(lastMeasurement.variant.power_metrics.ch1_voltage, 2) + "Ch1: " + String(lastMeasurement.variant.power_metrics.ch1_voltage, 2) +