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

未关闭
#4,028 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
c
领域
embedded-iot

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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)?

主要语言
C
星标
3.9k
派生
1.5k
平均合并
2 天 7 小时
30 天内合并 PR
56

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

meshcore-dev/MeshCore 的其他 Issue

查看 meshcore-dev/MeshCore 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。