mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-15 15:05:48 +00:00
Compare commits
No commits in common. "89a9e0b99d579df9b97f87a35ba33653f496636e" and "6b1c01ce02e57788873a9f36197e46885b8f11fc" have entirely different histories.
89a9e0b99d
...
6b1c01ce02
75
.github/workflows/hook_copr.yml
vendored
75
.github/workflows/hook_copr.yml
vendored
@ -1,75 +0,0 @@
|
|||||||
name: Trigger COPR build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
secrets:
|
|
||||||
COPR_HOOK_DAILY:
|
|
||||||
COPR_HOOK_ALPHA:
|
|
||||||
COPR_HOOK_BETA:
|
|
||||||
inputs:
|
|
||||||
copr_project:
|
|
||||||
description: COPR project to target
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-copr-hook:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
repository: ${{ github.repository }}
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
pip install requests
|
|
||||||
|
|
||||||
- name: Trigger COPR build
|
|
||||||
shell: python
|
|
||||||
run: |
|
|
||||||
import requests
|
|
||||||
|
|
||||||
project_name = "${{ inputs.copr_project }}"
|
|
||||||
if project_name == "daily":
|
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_DAILY }}"
|
|
||||||
project_id = 160277
|
|
||||||
elif project_name == "alpha":
|
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}"
|
|
||||||
project_id = 160278
|
|
||||||
elif project_name == "beta":
|
|
||||||
hook_secret = "${{ secrets.COPR_HOOK_BETA }}"
|
|
||||||
project_id = 160279
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unknown COPR project: {project_name}")
|
|
||||||
|
|
||||||
webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/"
|
|
||||||
copr_payload = {
|
|
||||||
"event": "push",
|
|
||||||
"payload": {
|
|
||||||
"ref": "${{ github.ref }}",
|
|
||||||
"after": "${{ github.sha }}",
|
|
||||||
"repository": {
|
|
||||||
"id": "${{ github.repository_id }}",
|
|
||||||
"full_name": "${{ github.repository }}",
|
|
||||||
"git_url": "${{ github.repositoryUrl }}",
|
|
||||||
"owner": {
|
|
||||||
"name": "${{ github.repository_owner }}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pusher": {
|
|
||||||
"name": "${{ github.actor }}"
|
|
||||||
},
|
|
||||||
"sender": {
|
|
||||||
"login": "github-actions[bot]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
r = requests.post(webhook_url, json=copr_payload)
|
|
||||||
r.raise_for_status()
|
|
@ -1,4 +1,4 @@
|
|||||||
name: Daily Packaging
|
name: Nightly Debian Packaging
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 9 * * *
|
- cron: 0 9 * * *
|
||||||
@ -8,12 +8,10 @@ on:
|
|||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- debian/**
|
- debian/**
|
||||||
- "*.rpkg"
|
- .github/workflows/nightly_debian.yml
|
||||||
- .github/workflows/nightly_packaging.yml
|
|
||||||
- .github/workflows/build_debian_src.yml
|
- .github/workflows/build_debian_src.yml
|
||||||
- .github/workflows/package_ppa.yml
|
- .github/workflows/package_ppa.yml
|
||||||
- .github/workflows/package_obs.yml
|
- .github/workflows/package_obs.yml
|
||||||
- .github/workflows/hook_copr.yml
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -37,9 +35,3 @@ jobs:
|
|||||||
obs_project: home:meshtastic:daily
|
obs_project: home:meshtastic:daily
|
||||||
series: unstable
|
series: unstable
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
hook-copr:
|
|
||||||
uses: ./.github/workflows/hook_copr.yml
|
|
||||||
with:
|
|
||||||
copr_project: daily
|
|
||||||
secrets: inherit
|
|
7
.github/workflows/release_channels.yml
vendored
7
.github/workflows/release_channels.yml
vendored
@ -27,10 +27,3 @@ jobs:
|
|||||||
series: |-
|
series: |-
|
||||||
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# hook-copr:
|
|
||||||
# uses: ./.github/workflows/hook_copr.yml
|
|
||||||
# with:
|
|
||||||
# copr_project: |-
|
|
||||||
# ${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}
|
|
||||||
# secrets: inherit
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
function meshtastic_version {
|
|
||||||
meshtastic_version=$(python3 bin/buildinfo.py short)
|
|
||||||
echo -n "$meshtastic_version"
|
|
||||||
}
|
|
||||||
function git_commits_num {
|
|
||||||
total_commits=$(git rev-list --all --count)
|
|
||||||
echo -n "$total_commits"
|
|
||||||
}
|
|
||||||
function git_commit_sha {
|
|
||||||
commit_sha=$(git rev-parse --short HEAD)
|
|
||||||
echo -n "$commit_sha"
|
|
||||||
}
|
|
@ -1,91 +0,0 @@
|
|||||||
# meshtasticd spec file for RPM-based distributions
|
|
||||||
#
|
|
||||||
# Build locally with:
|
|
||||||
# ```
|
|
||||||
# sudo dnf install rpkg-util
|
|
||||||
# rpkg local
|
|
||||||
# ```
|
|
||||||
#
|
|
||||||
# See:
|
|
||||||
# - https://docs.pagure.org/rpkg-util/v3/index.html
|
|
||||||
# - https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
|
|
||||||
|
|
||||||
Name: meshtasticd
|
|
||||||
# Version Ex: 2.5.19
|
|
||||||
Version: {{{ meshtastic_version }}}
|
|
||||||
# Release Ex: 9127.daily.gitd7f5f620.fc41
|
|
||||||
Release: {{{ git_commits_num }}}%{?copr_projectname:.%{copr_projectname}}.git{{{ git_commit_sha }}}%{?dist}
|
|
||||||
VCS: {{{ git_dir_vcs }}}
|
|
||||||
Summary: Meshtastic daemon for communicating with Meshtastic devices
|
|
||||||
|
|
||||||
License: GPL-3.0
|
|
||||||
URL: https://github.com/meshtastic/firmware
|
|
||||||
Source0: {{{ git_dir_pack }}}
|
|
||||||
Source1: https://github.com/meshtastic/web/releases/download/latest/build.tar
|
|
||||||
|
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: platformio
|
|
||||||
BuildRequires: python3dist(protobuf)
|
|
||||||
BuildRequires: python3dist(grpcio[protobuf])
|
|
||||||
BuildRequires: python3dist(grpcio-tools)
|
|
||||||
BuildRequires: git-core
|
|
||||||
BuildRequires: gcc-c++
|
|
||||||
BuildRequires: pkgconfig(yaml-cpp)
|
|
||||||
BuildRequires: pkgconfig(libgpiod)
|
|
||||||
BuildRequires: pkgconfig(bluez)
|
|
||||||
BuildRequires: pkgconfig(libusb-1.0)
|
|
||||||
BuildRequires: libi2c-devel
|
|
||||||
# Web components:
|
|
||||||
BuildRequires: pkgconfig(openssl)
|
|
||||||
BuildRequires: pkgconfig(liborcania)
|
|
||||||
BuildRequires: pkgconfig(libyder)
|
|
||||||
BuildRequires: pkgconfig(libulfius)
|
|
||||||
|
|
||||||
%description
|
|
||||||
Meshtastic daemon for controlling Meshtastic devices. Meshtastic is an off-grid
|
|
||||||
text communication platform that uses inexpensive LoRa radios.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
{{{ git_dir_setup_macro }}}
|
|
||||||
# Unpack the web files
|
|
||||||
mkdir -p web
|
|
||||||
tar -xf %{SOURCE1} -C web
|
|
||||||
gzip -dr web
|
|
||||||
|
|
||||||
%build
|
|
||||||
# Use the “native” environment from platformio to build a Linux binary
|
|
||||||
platformio run -e native
|
|
||||||
|
|
||||||
%install
|
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
|
||||||
install -m 0755 .pio/build/native/program %{buildroot}%{_sbindir}/meshtasticd
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd
|
|
||||||
install -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/config.d
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
|
||||||
cp -r bin/config.d/* %{buildroot}%{_sysconfdir}/meshtasticd/available.d
|
|
||||||
|
|
||||||
install -D -m 0644 bin/meshtasticd.service %{buildroot}%{_unitdir}/meshtasticd.service
|
|
||||||
|
|
||||||
# Install the web files under /usr/share/meshtasticd/web
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/meshtasticd/web
|
|
||||||
cp -r web/* %{buildroot}%{_datadir}/meshtasticd/web
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE
|
|
||||||
%doc README.md
|
|
||||||
%{_sbindir}/meshtasticd
|
|
||||||
%dir %{_sysconfdir}/meshtasticd
|
|
||||||
%dir %{_sysconfdir}/meshtasticd/config.d
|
|
||||||
%dir %{_sysconfdir}/meshtasticd/available.d
|
|
||||||
%config(noreplace) %{_sysconfdir}/meshtasticd/config.yaml
|
|
||||||
%config %{_sysconfdir}/meshtasticd/available.d/*
|
|
||||||
%{_unitdir}/meshtasticd.service
|
|
||||||
%dir %{_datadir}/meshtasticd
|
|
||||||
%dir %{_datadir}/meshtasticd/web
|
|
||||||
%{_datadir}/meshtasticd/web/*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
%autochangelog
|
|
@ -253,16 +253,6 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
|
|||||||
display->drawString(x, y += _fontHeight(FONT_SMALL), "IAQ: " + String(lastMeasurement.variant.environment_metrics.iaq));
|
display->drawString(x, y += _fontHeight(FONT_SMALL), "IAQ: " + String(lastMeasurement.variant.environment_metrics.iaq));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastMeasurement.variant.environment_metrics.lux != 0) {
|
|
||||||
display->drawString(x, y += _fontHeight(FONT_SMALL),
|
|
||||||
"Illuminance: " + String(lastMeasurement.variant.environment_metrics.lux, 2) + "lx");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lastMeasurement.variant.environment_metrics.white_lux != 0) {
|
|
||||||
display->drawString(x, y += _fontHeight(FONT_SMALL),
|
|
||||||
"W_Lux: " + String(lastMeasurement.variant.environment_metrics.white_lux, 2) + "lx");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lastMeasurement.variant.environment_metrics.distance != 0)
|
if (lastMeasurement.variant.environment_metrics.distance != 0)
|
||||||
display->drawString(x, y += _fontHeight(FONT_SMALL),
|
display->drawString(x, y += _fontHeight(FONT_SMALL),
|
||||||
"Water Level: " + String(lastMeasurement.variant.environment_metrics.distance, 0) + "mm");
|
"Water Level: " + String(lastMeasurement.variant.environment_metrics.distance, 0) + "mm");
|
||||||
@ -287,10 +277,8 @@ bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPac
|
|||||||
sender, t->variant.environment_metrics.barometric_pressure, t->variant.environment_metrics.current,
|
sender, t->variant.environment_metrics.barometric_pressure, t->variant.environment_metrics.current,
|
||||||
t->variant.environment_metrics.gas_resistance, t->variant.environment_metrics.relative_humidity,
|
t->variant.environment_metrics.gas_resistance, t->variant.environment_metrics.relative_humidity,
|
||||||
t->variant.environment_metrics.temperature);
|
t->variant.environment_metrics.temperature);
|
||||||
LOG_INFO("(Received from %s): voltage=%f, IAQ=%d, distance=%f, lux=%f, white_lux=%f", sender,
|
LOG_INFO("(Received from %s): voltage=%f, IAQ=%d, distance=%f, lux=%f", sender, t->variant.environment_metrics.voltage,
|
||||||
t->variant.environment_metrics.voltage, t->variant.environment_metrics.iaq,
|
t->variant.environment_metrics.iaq, t->variant.environment_metrics.distance, t->variant.environment_metrics.lux);
|
||||||
t->variant.environment_metrics.distance, t->variant.environment_metrics.lux,
|
|
||||||
t->variant.environment_metrics.white_lux);
|
|
||||||
|
|
||||||
LOG_INFO("(Received from %s): wind speed=%fm/s, direction=%d degrees, weight=%fkg", sender,
|
LOG_INFO("(Received from %s): wind speed=%fm/s, direction=%d degrees, weight=%fkg", sender,
|
||||||
t->variant.environment_metrics.wind_speed, t->variant.environment_metrics.wind_direction,
|
t->variant.environment_metrics.wind_speed, t->variant.environment_metrics.wind_direction,
|
||||||
|
Loading…
Reference in New Issue
Block a user