From 70076a4b27193276ad22cd132c2c1e5f178d4920 Mon Sep 17 00:00:00 2001 From: isseysandei Date: Mon, 6 Jan 2025 16:14:52 +0100 Subject: [PATCH 1/8] Improved Power Telemetry page readability even more (#5770) * increased buffer size to 1024 * better readability * better readability 2 --------- Co-authored-by: BuildTools --- src/modules/Telemetry/PowerTelemetry.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/modules/Telemetry/PowerTelemetry.cpp b/src/modules/Telemetry/PowerTelemetry.cpp index f1df2d361..9c794e31e 100644 --- a/src/modules/Telemetry/PowerTelemetry.cpp +++ b/src/modules/Telemetry/PowerTelemetry.cpp @@ -100,29 +100,30 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s { display->setTextAlignment(TEXT_ALIGN_LEFT); display->setFont(FONT_SMALL); - display->drawString(x, y, "Power Telemetry"); + 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"); return; } + // Decode the last power packet meshtastic_Telemetry lastMeasurement; - uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket); const char *lastSender = getSenderShortName(*lastMeasurementPacket); const meshtastic_Data &p = lastMeasurementPacket->decoded; if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) { - display->setFont(FONT_SMALL); - display->drawString(x, y += _fontHeight(FONT_MEDIUM), "Measurement Error"); + display->drawString(x, y, "Measurement Error"); LOG_ERROR("Unable to decode last packet"); 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->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) { display->drawString(x, y += _fontHeight(FONT_SMALL), "Ch1: " + String(lastMeasurement.variant.power_metrics.ch1_voltage, 2) + From 35cd600c54d7ad760a1b06d4c91d1dc5b35a3ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 6 Jan 2025 17:08:12 +0100 Subject: [PATCH 2/8] update to 7.1.2 and remove the obsolete default_envs. (#5771) --- platformio.ini | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/platformio.ini b/platformio.ini index cd32ed179..6a4466c01 100644 --- a/platformio.ini +++ b/platformio.ini @@ -3,43 +3,7 @@ [platformio] 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 = arch/*/*.ini variants/*/platformio.ini @@ -124,8 +88,7 @@ lib_deps = [radiolib_base] lib_deps = - ; jgromes/RadioLib@7.1.0 - https://github.com/jgromes/RadioLib.git#92b687821ff4e6c358d866f84566f66672ab02b8 + jgromes/RadioLib@7.1.2 ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From ca328898939edb22d50d0b3d62f475e352d29069 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 6 Jan 2025 12:23:08 -0600 Subject: [PATCH 3/8] Specify scons version --- debian/ci_pack_sdeb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 605ddd288..07737ea31 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -6,7 +6,7 @@ export PLATFORMIO_CORE_DIR=pio/core # Download libraries to `libdeps` platformio pkg install -e native -platformio pkg install -t tool-scons -e native +platformio pkg install -t platformio/tool-scons@4.40801.0 tar -cf pio.tar pio/ rm -rf pio From 78371dfdb7a8892e9bc9a45d432eef8c799ac747 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 6 Jan 2025 12:26:17 -0600 Subject: [PATCH 4/8] Add PPA to nightly --- .github/workflows/nightly.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e249823a7..5010707de 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,3 +17,12 @@ jobs: uses: trunk-io/trunk-action@782e83f803ca6e369f035d64c6ba2768174ba61b with: trunk-token: ${{ secrets.TRUNK_TOKEN }} + package-ppa: + strategy: + fail-fast: false + matrix: + series: [plucky, oracular, noble, jammy] + uses: ./.github/workflows/package_ppa.yml + with: + series: ${{ matrix.series }} + secrets: inherit From 4c3a3ca47d4ee50e2d946956fe614d6e7549df8a Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 6 Jan 2025 13:02:53 -0600 Subject: [PATCH 5/8] Specify the *correct* scons version --- debian/ci_pack_sdeb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 07737ea31..427e9c79b 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -6,7 +6,7 @@ export PLATFORMIO_CORE_DIR=pio/core # Download libraries to `libdeps` platformio pkg install -e native -platformio pkg install -t platformio/tool-scons@4.40801.0 +platformio pkg install -t platformio/tool-scons@4.40502.0 tar -cf pio.tar pio/ rm -rf pio From e5dbcf5bcee1fd6fe8f4a71ea0105ce211c54d36 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 6 Jan 2025 17:20:05 -0500 Subject: [PATCH 6/8] meshtasticd-debian: parameterize target PPA (#5776) --- .github/workflows/build_debian_src.yml | 8 ++++---- .github/workflows/nightly.yml | 1 + .github/workflows/package_ppa.yml | 8 ++++++-- debian/ci_pack_sdeb.sh | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_debian_src.yml b/.github/workflows/build_debian_src.yml index 9bb7dfb9c..b2fcb5262 100644 --- a/.github/workflows/build_debian_src.yml +++ b/.github/workflows/build_debian_src.yml @@ -7,7 +7,7 @@ on: required: true inputs: series: - description: 'Ubuntu series to target' + description: Ubuntu series to target required: true type: string @@ -32,9 +32,9 @@ jobs: working-directory: meshtasticd run: | sudo apt-get update -y --fix-missing - sudo apt-get install -y software-properties-common - sudo add-apt-repository ppa:meshtastic/meshtastic-daily -y - sudo apt-get install -y build-essential devscripts equivs + sudo apt-get install -y software-properties-common build-essential devscripts equivs + sudo add-apt-repository ppa:meshtastic/build-tools -y + 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 - name: Import GPG key diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5010707de..b7cf4bfc6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,5 +24,6 @@ jobs: series: [plucky, oracular, noble, jammy] uses: ./.github/workflows/package_ppa.yml with: + ppa_repo: daily series: ${{ matrix.series }} secrets: inherit diff --git a/.github/workflows/package_ppa.yml b/.github/workflows/package_ppa.yml index f716fdff4..5705c6d49 100644 --- a/.github/workflows/package_ppa.yml +++ b/.github/workflows/package_ppa.yml @@ -6,8 +6,12 @@ on: PPA_GPG_PRIVATE_KEY: required: true inputs: + ppa_repo: + description: Meshtastic PPA to target + required: true + type: string series: - description: 'Ubuntu series to target' + description: Ubuntu series to target required: true type: string workflow_dispatch: @@ -65,4 +69,4 @@ jobs: - name: Publish with dput if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} 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 diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 427e9c79b..3099b6569 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -13,8 +13,8 @@ rm -rf pio package=$(dpkg-parsechangelog --show-field Source) 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" # Build the source deb -debuild -S -nc -k$GPG_KEY_ID +debuild -S -nc -k"$GPG_KEY_ID" From 57766d47a8f9bc01c57a5e10e7fc40f7e4065e42 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 6 Jan 2025 19:45:59 -0500 Subject: [PATCH 7/8] GitHub Actions: Trigger PPA stable builds upon release (#5777) --- .github/workflows/release_channels.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/release_channels.yml diff --git a/.github/workflows/release_channels.yml b/.github/workflows/release_channels.yml new file mode 100644 index 000000000..d572568de --- /dev/null +++ b/.github/workflows/release_channels.yml @@ -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 From 86170171a7a093e06423e8c78841b91a6cce2b26 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 6 Jan 2025 20:25:05 -0500 Subject: [PATCH 8/8] meshtasticd-debian: Include web components (#5778) --- .gitignore | 6 ++++-- debian/changelog | 2 +- debian/ci_changelog.sh | 7 ++++--- debian/ci_pack_sdeb.sh | 7 +++++-- debian/control | 8 ++++++-- debian/meshtasticd.dirs | 1 + debian/meshtasticd.install | 2 ++ debian/rules | 7 +++++-- debian/source/include-binaries | 5 ++--- debian/source/options | 3 +-- 10 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index d44374919..803aee139 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .pio -.pio_core pio +pio.tar +web +web.tar # ignore vscode IDE settings files .vscode/* @@ -32,4 +34,4 @@ release/ .vscode/extensions.json /compile_commands.json src/mesh/raspihttp/certificate.pem -src/mesh/raspihttp/private_key.pem +src/mesh/raspihttp/private_key.pem \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 5dd6fb1c0..79c444aca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -meshtasticd (2.5.19) unstable; urgency=medium +meshtasticd (2.5.19) UNRELEASED; urgency=medium * Initial packaging diff --git a/debian/ci_changelog.sh b/debian/ci_changelog.sh index 56688f99b..7925ad5eb 100755 --- a/debian/ci_changelog.sh +++ b/debian/ci_changelog.sh @@ -1,6 +1,7 @@ #!/usr/bin/bash export DEBEMAIL="github-actions[bot]@users.noreply.github.com" +PKG_VERSION=$(python3 bin/buildinfo.py short) -dch --newversion "$(python3 bin/buildinfo.py short)-1" \ - --distribution unstable \ - "GitHub Actions Automatic version bump" +dch --newversion "$PKG_VERSION-1" \ + --distribution UNRELEASED \ + "GitHub Actions Automatic version bump" diff --git a/debian/ci_pack_sdeb.sh b/debian/ci_pack_sdeb.sh index 3099b6569..d45593c50 100755 --- a/debian/ci_pack_sdeb.sh +++ b/debian/ci_pack_sdeb.sh @@ -4,11 +4,14 @@ export PLATFORMIO_LIBDEPS_DIR=pio/libdeps export PLATFORMIO_PACKAGES_DIR=pio/packages export PLATFORMIO_CORE_DIR=pio/core -# Download libraries to `libdeps` +# Download libraries to `pio` platformio pkg install -e native -platformio pkg install -t platformio/tool-scons@4.40502.0 +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/ 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) diff --git a/debian/control b/debian/control index 9814933e3..097f85859 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,11 @@ Build-Depends: debhelper-compat (= 13), libgpiod-dev, libbluetooth-dev, libusb-1.0-0-dev, - libi2c-dev + libi2c-dev, + openssl, + libssl-dev, + libulfius-dev, + liborcania-dev Standards-Version: 4.6.2 Homepage: https://github.com/meshtastic/firmware Rules-Requires-Root: no @@ -23,4 +27,4 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Meshtastic daemon for communicating with Meshtastic devices Meshtastic is an off-grid text communication platform that uses inexpensive - LoRa radios. + LoRa radios. \ No newline at end of file diff --git a/debian/meshtasticd.dirs b/debian/meshtasticd.dirs index cf1ba7a37..5f57ff7be 100644 --- a/debian/meshtasticd.dirs +++ b/debian/meshtasticd.dirs @@ -1,3 +1,4 @@ etc/meshtasticd etc/meshtasticd/config.d etc/meshtasticd/available.d +usr/share/meshtasticd/web \ No newline at end of file diff --git a/debian/meshtasticd.install b/debian/meshtasticd.install index 04bf34daf..da1b0685d 100644 --- a/debian/meshtasticd.install +++ b/debian/meshtasticd.install @@ -4,3 +4,5 @@ bin/config.yaml etc/meshtasticd bin/config.d/* etc/meshtasticd/available.d bin/meshtasticd.service lib/systemd/system + +web/* usr/share/meshtasticd/web \ No newline at end of file diff --git a/debian/rules b/debian/rules index 28961fd10..31221dd80 100755 --- a/debian/rules +++ b/debian/rules @@ -12,9 +12,12 @@ PIO_ENV:=\ PLATFORMIO_PACKAGES_DIR=pio/packages override_dh_auto_build: - # Build with platformio + # Extract tarballs within source deb tar -xf pio.tar + tar -xf web.tar web + gunzip web/ -r + # Build with platformio $(PIO_ENV) platformio run -e native # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd - cp bin/config-dist.yaml bin/config.yaml + cp bin/config-dist.yaml bin/config.yaml \ No newline at end of file diff --git a/debian/source/include-binaries b/debian/source/include-binaries index aef4a7027..0c9848b72 100644 --- a/debian/source/include-binaries +++ b/debian/source/include-binaries @@ -1,3 +1,2 @@ -pio/libdeps -pio/packages -pio/core \ No newline at end of file +pio.tar +web.tar \ No newline at end of file diff --git a/debian/source/options b/debian/source/options index 2f3670cba..0553b485d 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1,2 +1 @@ -extend-diff-ignore = "\.pio\w*?$" -tar-ignore = "" +extend-diff-ignore = "\.pio" \ No newline at end of file