From 33319aa4e25c1078bcff3c4cd5747d4d2d803394 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 07:30:03 -0500 Subject: [PATCH 1/3] Upgrade trunk (#10451) Co-authored-by: vidplace7 <1779290+vidplace7@users.noreply.github.com> --- .trunk/trunk.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 558d67d9c..00649f7ff 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -4,11 +4,11 @@ cli: plugins: sources: - id: trunk - ref: v1.8.0 + ref: v1.9.0 uri: https://github.com/trunk-io/plugins lint: enabled: - - checkov@3.2.527 + - checkov@3.2.528 - renovate@43.150.0 - prettier@3.8.3 - trufflehog@3.95.2 From 9bc25b34fd98f70e65a86d64ba4d9789cdc51660 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 11 May 2026 07:42:04 -0500 Subject: [PATCH 2/3] Add guidance to use Throttle for time-based rate limiting in agent instructions --- .github/copilot-instructions.md | 1 + AGENTS.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8980aca1a..8573b5f45 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -197,6 +197,7 @@ firmware/ - Use `assert()` for invariants that should never fail - C++17 features are available (`std::optional`, structured bindings, `if constexpr`, etc.) - **Keep code comments minimal — one or two lines, max.** Comment only when the _why_ isn't obvious from the code; never restate what the next line does. No multi-paragraph block comments explaining straightforward changes. The diff and commit message carry the rationale; the code carries the behavior. +- **Use `Throttle` for time-based rate limiting, not raw `millis()` math.** `src/mesh/Throttle.h` provides `Throttle::isWithinTimespanMs(lastMs, intervalMs)` (returns true while inside the cooldown) and `Throttle::execute(&lastMs, intervalMs, func)` (function-pointer form that updates the timestamp on fire). Use these for any "did N ms pass since X" check — raw `millis() > lastMs + N` is rollover-unsafe (breaks after ~49.7 days) and inconsistent with the rest of the codebase. The helpers compute `now - lastMs` with unsigned subtraction, which wraps correctly. ### Naming Conventions diff --git a/AGENTS.md b/AGENTS.md index 113f12591..82912f252 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,6 +67,7 @@ Key rotation to never trigger casually: only the **full** factory reset (`factor - **Run `trunk fmt` before proposing a commit.** The `trunk_check` CI gate will reject unformatted code. - **`confirm=True` on destructive MCP tools is a real gate, not a formality.** Don't bypass it via auto-approve settings. - **Keep code comments minimal — one or two lines, max.** Comment only when the _why_ isn't obvious from the code; never restate what the next line does. No multi-paragraph block comments explaining straightforward changes. The diff and commit message carry the rationale; the code carries the behavior. +- **Use `Throttle` for time-based rate limiting, not raw `millis()` math.** `src/mesh/Throttle.h` provides `Throttle::isWithinTimespanMs(lastMs, intervalMs)` (returns true while inside the cooldown) and `Throttle::execute(&lastMs, intervalMs, func)` (function-pointer form that updates the timestamp on fire). Use these for any "did N ms pass since X" check — raw `millis() > lastMs + N` is rollover-unsafe (breaks after ~49.7 days) and inconsistent with the rest of the codebase. The helpers compute `now - lastMs` with unsigned subtraction, which wraps correctly. ## Typical agent workflows From dfcb6859637d034a5af782eea58d75deece8b976 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 11 May 2026 08:08:15 -0500 Subject: [PATCH 3/3] Update protos --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 2 ++ src/mesh/generated/meshtastic/telemetry.pb.h | 10 +++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/protobufs b/protobufs index 1d6f1a71f..03eb5347d 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 1d6f1a71ff329fa52ad8bb7899951e96f8280a1f +Subproject commit 03eb5347de9fbabc3bb57423236def3cc8b9481d diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index f22825030..facf00a7f 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -317,6 +317,8 @@ typedef enum _meshtastic_HardwareModel { meshtastic_HardwareModel_THINKNODE_M9 = 131, /* The Heltec-V4-R8 uses an ESP32S3R8 chip, plus an SX1262. */ meshtastic_HardwareModel_HELTEC_V4_R8 = 132, + /* The HELTEC_MESH_NODE_T1 uses an NRF52840 chip, plus an SX1262. */ + meshtastic_HardwareModel_HELTEC_MESH_NODE_T1 = 133, /* ------------------------------------------------------------------------------------------------------------------------------------------ Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. ------------------------------------------------------------------------------------------------------------------------------------------ */ diff --git a/src/mesh/generated/meshtastic/telemetry.pb.h b/src/mesh/generated/meshtastic/telemetry.pb.h index 8c0fdd563..e8d337049 100644 --- a/src/mesh/generated/meshtastic/telemetry.pb.h +++ b/src/mesh/generated/meshtastic/telemetry.pb.h @@ -115,7 +115,11 @@ typedef enum _meshtastic_TelemetrySensorType { /* SHT family of sensors for temperature and humidity */ meshtastic_TelemetrySensorType_SHTXX = 50, /* DS248X Bridge for one-wire temperature sensors */ - meshtastic_TelemetrySensorType_DS248X = 51 + meshtastic_TelemetrySensorType_DS248X = 51, + /* MMC5983MA 3-Axis Digital Magnetic Sensor */ + meshtastic_TelemetrySensorType_MMC5983MA = 52, + /* ICM-42607-P 6‑Axis IMU */ + meshtastic_TelemetrySensorType_ICM42607P = 53 } meshtastic_TelemetrySensorType; /* Struct definitions */ @@ -496,8 +500,8 @@ extern "C" { /* Helper constants for enums */ #define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET -#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_DS248X -#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_DS248X+1)) +#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_ICM42607P +#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_ICM42607P+1))