Skip to content

Add board hooks for variant-specific telemetry and CLI commands - #3131

Open
liekmarflow wants to merge 1 commit into
meshcore-dev:mainfrom
liekmarflow:feature/board-api-hooks
Open

Add board hooks for variant-specific telemetry and CLI commands#3131
liekmarflow wants to merge 1 commit into
meshcore-dev:mainfrom
liekmarflow:feature/board-api-hooks

Conversation

@liekmarflow

Copy link
Copy Markdown

Needed for #3130 (Inhero MR-2 hardware support).

This adds four virtual methods to mesh::MainBoard so a board variant can
expose its own functionality without core changes:

  • tick() — called from the example main loops. Lets a board feed its
    watchdog and run periodic housekeeping. Default: no-op.
  • getCustomGetter() / setCustomSetter() — CommonCLI forwards
    get board.* / set board.* to the board class. Unknown commands reply
    with an error, exactly as before. Default: not handled.
  • queryBoardTelemetry(CayenneLPP&) — simple_repeater asks the board for
    additional telemetry channels (gated by TELEM_PERM_ENVIRONMENT).
    Default: no-op.

All defaults are no-ops, so every existing variant builds and behaves
unchanged. Verified locally: RAK_4631_repeater and Heltec_v3_repeater
(both from the PR build-check matrix) build green on this branch.

The Inhero MR-2 variant that uses these hooks follows in a separate PR.

liekmarflow added a commit to liekmarflow/MeshCore that referenced this pull request Aug 8, 2026
…ev#3131/meshcore-dev#3132) - CONTEXT.md getrackt

Stand-Block neu: Issue + beide PRs mit Branch-Zeigern und Naechster-Schritt-
Ablauf nach Merge von meshcore-dev#3131. Ueberholte Doktrin ('kein PR-Verkehr zu
upstream') entfernt; stattdessen die Sicherungsregel: PR-Branches immer von
upstream/main schneiden. Feature-Branches als live PR-Koepfe markiert
(nicht loeschen). CONTEXT.md aus .gitignore genommen - auf main getrackt
ist sie PR-sicher, weil PR-Branches nie von Fork-main abstammen.
Boards can now expose their own functionality without core changes:

- MainBoard::tick(): called from the example main loops; default no-op.
  Lets a board feed its watchdog and run periodic housekeeping.
- MainBoard::getCustomGetter()/setCustomSetter(): CommonCLI forwards
  'get board.*' / 'set board.*' to the board class; unknown commands
  reply with an error as before. Default no-op returns keep behavior
  identical for all existing boards.
- MainBoard::queryBoardTelemetry(CayenneLPP&): simple_repeater asks the
  board for extra telemetry channels (gated by TELEM_PERM_ENVIRONMENT).

All defaults are no-ops, so existing variants build and behave
unchanged. Used by the Inhero MR-2 variant (separate PR).
@liekmarflow
liekmarflow force-pushed the feature/board-api-hooks branch from 3796c01 to efd8867 Compare August 9, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant