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
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

View File

@ -17,3 +17,13 @@ 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:
ppa_repo: daily
series: ${{ matrix.series }}
secrets: inherit

View File

@ -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

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

6
.gitignore vendored
View File

@ -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

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

View File

@ -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"

View File

@ -4,17 +4,20 @@ 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 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/
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)
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"

8
debian/control vendored
View File

@ -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.

View File

@ -1,3 +1,4 @@
etc/meshtasticd
etc/meshtasticd/config.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/meshtasticd.service lib/systemd/system
web/* usr/share/meshtasticd/web

7
debian/rules vendored
View File

@ -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

View File

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

View File

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

View File

@ -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)

View File

@ -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) +