[Feature request] T-Echo Card: compass heading page using the onboard ICM-20948

Aperta
#4,028 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Read the companion-tiny UI and the board or EnvironmentSensorManager code to identify where a page and sensor access fit; first check how build flags and prefs are handled. The proposal names the ICM-20948 and AK09916, but leaves the integration point undecided. Done means a T-Echo Card compass page with tilt-compensated heading, on-page sensor use, calibration with saved offsets, and a build flag.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Use case: the LilyGo T-Echo Card has an ICM-20948 9-axis IMU (accelerometer, gyro and AK09916 magnetometer) at I2C 0x68, but no firmware uses it. A compass heading would help when hiking with the card: which way to walk, or where to point a directional antenna. GPS course-over-ground only works while you're moving.

Proposed behaviour (companion, T-Echo Card first):

  • A new "Compass" page in the companion-tiny UI: large heading in degrees plus a cardinal point (e.g. 127° SE).
  • The magnetometer and accelerometer run only while that page is showing, so there's no idle power cost.
  • Tilt compensation from the accelerometer, so the reading holds when the card isn't flat.
  • A calibration step for hard-iron offsets (rotate the card in all directions for ~15 s), started from the page or with a CLI command, with the offsets saved in prefs.
  • Behind a build flag (e.g. ENV_INCLUDE_COMPASS) so other boards aren't affected and could opt in later.

Implementation idea: a small register-level driver (ICM-20948 in I2C bypass mode, AK09916 read directly at 0x0C) rather than pulling in a full library, to keep flash use small.

Before I start on it: would a PR along these lines be welcome, and is there a preferred place for it (board class vs EnvironmentSensorManager)?

Lingua principale
C
Stelle
3.9k
Fork
1.5k
Merge medio
2g 7h
PR unite (30g)
56

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di meshcore-dev/MeshCore

Tutte le issue di meshcore-dev/MeshCore

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.