Docs: the HMC5883L heading — ESPHome's atan2(-x, y) is −180..180, the node now adds 360 to the negatives (they arrived as 0 in its 0..360 encoding)

This commit is contained in:
randy committed 2026-11-30 18:42:50 +01:00
1 parent 190a8ad334
commit f65eb98d18
2 files changed
+6 -3

No files matched your search

+3 -1
View File
@@ -186,7 +186,9 @@ already reaches the home MQTT broker (`mqtt_ext`) from ESPHome nodes in `~/espho
*** [x] The compass (HMC5883L on node 0x21, TPDO 0x221) as `imu.heading` + `mag.x/y/z` in
`can.json` — for orienting while standing; driving uses the GNSS course
*** [ ] Tilt compensation (pitch/roll from the IMU) and hard-/soft-iron calibration of the
heading — ESPHome's is a plain `atan2(y, x)`; in the node, like the levelling
heading — ESPHome's is a plain `atan2(-x, y)`; in the node, like the levelling
*** [x] The node sent the heading encoded 0..360 but ESPHome's is −180..180, negatives arrived
as 0 — fixed in the node (`x < 0 ? x + 360 : x` filter on `heading:`, 2026-11-30)
*** [ ] IMU every 100–200 ms (the node reads it every 5 s today) and levelling done by the
node itself, set by an SDO write from a button in `/can.html` — design in home-gitops
`docs/canopen-nodes.adoc` ("Nulovanie náklonu a rýchlosť IMU")