Merge branch 'master' into rework-ch341

This commit is contained in:
Ben Meadors 2025-01-16 06:38:01 -06:00 committed by GitHub
commit e92bad5e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 39 additions and 32 deletions

View File

@ -51,25 +51,11 @@ jobs:
webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/" webhook_url = f"https://copr.fedorainfracloud.org/webhooks/github/{project_id}/{hook_secret}/meshtasticd/"
copr_payload = { copr_payload = {
"event": "push",
"payload": {
"ref": "${{ github.ref }}", "ref": "${{ github.ref }}",
"after": "${{ github.sha }}", "after": "${{ github.sha }}",
"repository": { "repository": {
"id": "${{ github.repository_id }}", "clone_url": "${{ github.server_url }}/${{ github.repository }}.git",
"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, headers={"X-GitHub-Event": "push"})
r = requests.post(webhook_url, json=copr_payload)
r.raise_for_status() r.raise_for_status()

View File

@ -4,7 +4,9 @@ on:
release: release:
types: [published, released] types: [published, released]
permissions: read-all permissions:
contents: write
packages: write
jobs: jobs:
package-ppa: package-ppa:

3
debian/changelog vendored
View File

@ -2,5 +2,6 @@ meshtasticd (2.5.20.0) UNRELEASED; urgency=medium
* Initial packaging * Initial packaging
* GitHub Actions Automatic version bump * GitHub Actions Automatic version bump
* GitHub Actions Automatic version bump
-- Austin Lane <github-actions[bot]@users.noreply.github.com> Mon, 13 Jan 2025 19:24:14 +0000 -- Austin Lane <github-actions[bot]@users.noreply.github.com> Wed, 15 Jan 2025 14:08:54 +0000

View File

@ -9,7 +9,9 @@ static File openFile(const char *filename, bool fullAtomic)
LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic); LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic);
#ifdef ARCH_NRF52 #ifdef ARCH_NRF52
lfs_assert_failed = false; 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 #endif
if (!fullAtomic) if (!fullAtomic)
FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists) FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists)
@ -59,6 +61,9 @@ bool SafeFile::close()
return false; return false;
spiLock->lock(); spiLock->lock();
#ifdef ARCH_NRF52
f.truncate();
#endif
f.close(); f.close();
spiLock->unlock(); spiLock->unlock();

View File

@ -278,8 +278,18 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
static bool scrollingDown = true; static bool scrollingDown = true;
static uint32_t lastScrollTime = millis(); static uint32_t lastScrollTime = millis();
// Draw up to 3 sensor data lines // Determine how many lines we can fit on display
int linesToShow = min(3, sensorCount); // 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++) { for (int i = 0; i < linesToShow; i++) {
int index = (scrollOffset + i) % sensorCount; int index = (scrollOffset + i) % sensorCount;
display->drawString(x, y += _fontHeight(FONT_SMALL), sensorData[index]); display->drawString(x, y += _fontHeight(FONT_SMALL), sensorData[index]);

View File

@ -210,7 +210,10 @@ void NRF52Bluetooth::shutdown()
LOG_INFO("NRF52 bluetooth disconnecting handle %d", i); LOG_INFO("NRF52 bluetooth disconnecting handle %d", i);
Bluefruit.disconnect(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(); Bluefruit.Advertising.stop();
} }