sensors: INA shunt set at runtime -- sensor set ina.shunt <mOhm>, kept in prefs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-12 13:58:39 +01:00
1 parent ad4f53016c
commit 507842cea2
12 files changed
+106 -7

No files matched your search

+18
View File
@@ -1271,6 +1271,24 @@ Covers serial NMEA receivers (`MicroNMEALocationProvider`).
---
#### Set the INA current sensor's shunt resistor
**Usage:**
- `sensor get ina.shunt`
- `sensor set ina.shunt <mOhm>`
**Parameters:**
- `mOhm`: the shunt on the module, in milliohms (`10` for a shunt marked `R010`,
`100` for `R100`); `0` = the build's value (100 mOhm unless the build sets
`TELEM_INA219_SHUNT_VALUE` / `TELEM_INA226_SHUNT_VALUE` / `TELEM_INA3221_SHUNT_VALUE`)
**Note:** Listed only when an INA219, INA226 or INA3221 was detected at boot.
Saved, applies at once and survives a reboot; it also works over the mesh as
admin, and on a companion as the custom variable `ina.shunt`. With the wrong value
the current is off by the ratio -- LaskaKit's INA226 modules carry 10 mOhm, the
default assumes 100. Current is reported in steps of 1 mA (CayenneLPP).
---
### Bridge (When bridge support is compiled in)
#### View the compiled bridge type