diff --git a/.github/workflows/hook_copr.yml b/.github/workflows/hook_copr.yml index 94d9d095f..c30038d6b 100644 --- a/.github/workflows/hook_copr.yml +++ b/.github/workflows/hook_copr.yml @@ -38,38 +38,24 @@ jobs: project_name = "${{ inputs.copr_project }}" if project_name == "daily": - hook_secret = "${{ secrets.COPR_HOOK_DAILY }}" - project_id = 160277 + hook_secret = "${{ secrets.COPR_HOOK_DAILY }}" + project_id = 160277 elif project_name == "alpha": - hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}" - project_id = 160278 + hook_secret = "${{ secrets.COPR_HOOK_ALPHA }}" + project_id = 160278 elif project_name == "beta": - hook_secret = "${{ secrets.COPR_HOOK_BETA }}" - project_id = 160279 + hook_secret = "${{ secrets.COPR_HOOK_BETA }}" + project_id = 160279 else: - raise ValueError(f"Unknown COPR project: {project_name}") + 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]" - } + "ref": "${{ github.ref }}", + "after": "${{ github.sha }}", + "repository": { + "clone_url": "${{ github.server_url }}/${{ github.repository }}.git", } } - r = requests.post(webhook_url, json=copr_payload) + r = requests.post(webhook_url, json=copr_payload, headers={"X-GitHub-Event": "push"}) r.raise_for_status() diff --git a/.github/workflows/release_channels.yml b/.github/workflows/release_channels.yml index 8891826d2..afb7319ed 100644 --- a/.github/workflows/release_channels.yml +++ b/.github/workflows/release_channels.yml @@ -4,7 +4,9 @@ on: release: types: [published, released] -permissions: read-all +permissions: + contents: write + packages: write jobs: package-ppa: diff --git a/debian/changelog b/debian/changelog index 8b1799c52..a1a359cfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,5 +2,6 @@ meshtasticd (2.5.20.0) UNRELEASED; urgency=medium * Initial packaging * GitHub Actions Automatic version bump + * GitHub Actions Automatic version bump - -- Austin Lane Mon, 13 Jan 2025 19:24:14 +0000 + -- Austin Lane Wed, 15 Jan 2025 14:08:54 +0000 diff --git a/src/SafeFile.cpp b/src/SafeFile.cpp index 825ba3028..f874164ae 100644 --- a/src/SafeFile.cpp +++ b/src/SafeFile.cpp @@ -9,7 +9,9 @@ static File openFile(const char *filename, bool fullAtomic) LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic); #ifdef ARCH_NRF52 lfs_assert_failed = false; - return FSCom.open(filename, FILE_O_WRITE); + File file = FSCom.open(filename, FILE_O_WRITE); + file.seek(0); + return file; #endif if (!fullAtomic) FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists) @@ -59,6 +61,9 @@ bool SafeFile::close() return false; spiLock->lock(); +#ifdef ARCH_NRF52 + f.truncate(); +#endif f.close(); spiLock->unlock(); diff --git a/src/modules/Telemetry/EnvironmentTelemetry.cpp b/src/modules/Telemetry/EnvironmentTelemetry.cpp index 2fc9bab0b..fe1d0d2a9 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.cpp +++ b/src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -278,8 +278,18 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt static bool scrollingDown = true; static uint32_t lastScrollTime = millis(); - // Draw up to 3 sensor data lines - int linesToShow = min(3, sensorCount); + // Determine how many lines we can fit on display + // Calculated once only: display dimensions don't change during runtime. + static int maxLines = 0; + if (!maxLines) { + const int16_t paddingTop = _fontHeight(FONT_SMALL); // Heading text + const int16_t paddingBottom = 8; // Indicator dots + maxLines = (display->getHeight() - paddingTop - paddingBottom) / _fontHeight(FONT_SMALL); + assert(maxLines > 0); + } + + // Draw as many lines of data as we can fit + int linesToShow = min(maxLines, sensorCount); for (int i = 0; i < linesToShow; i++) { int index = (scrollOffset + i) % sensorCount; display->drawString(x, y += _fontHeight(FONT_SMALL), sensorData[index]); diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index 541e90ab2..b98620f33 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -210,7 +210,10 @@ void NRF52Bluetooth::shutdown() LOG_INFO("NRF52 bluetooth disconnecting handle %d", i); Bluefruit.disconnect(i); } - delay(100); // wait for ondisconnect; + // Wait for disconnection + while (Bluefruit.connected()) + yield(); + LOG_INFO("All bluetooth connections ended"); } Bluefruit.Advertising.stop(); }