feat: broadcast worst-case OBC temperature on 0x211 byte 7
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 59s
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 59s
The Tesla OBC hardware already publishes 9 temperature probes (3
modules × {tmp1, tmp2, tmpin}) on CAN 0x237/0x239/0x23B which the
teslacharger receives as c[123]tmp[12,in]. Until now none of these
were forwarded downstream — the Polarity VCU's STATUS_SCREEN OBC-temp
and DCDC-temp fields rendered 0 °C on OI-OBC cars.
This commit:
- Adds Param::tmpobcmax — derived value computed each Ms100Task tick
as the max across the 9 probes, skipping any that read -40 °C
(sensor absent / module not present).
- Maps it to 0x211 byte 7 (previously reserved, the last unused byte
of the 7-byte frame). Wire encoding uses the Tesla OBC convention
of offset 40 (wire = °C + 40), matching c[123]tmp* upstream so
receivers can decode with the same formula.
- Bumps VERSTR to -S5 so the right firmware is visually confirmable
in the OpenInverter web UI.
The new byte is purely additive — existing 0x211 consumers that read
only bytes 0-6 continue to work unchanged.
The Polarity VCU's 0x211 RX handler grows a corresponding decode +
display path in a paired stm32-hal-vcu commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -47,7 +47,7 @@
|
||||
3. Display values
|
||||
*/
|
||||
//Next param id (increase when adding new parameter!): 24
|
||||
//Next value Id: 2051
|
||||
//Next value Id: 2052
|
||||
/* category name unit min max default id */
|
||||
#define PARAM_LIST \
|
||||
PARAM_ENTRY(CAT_CHARGER, idclim, "A", 0, 45, 45, 3 ) \
|
||||
@@ -108,6 +108,7 @@
|
||||
VALUE_ENTRY(c3iac, "A", 2034 ) \
|
||||
VALUE_ENTRY(c3udc, "V", 2035 ) \
|
||||
VALUE_ENTRY(c3idc, "A", 2036 ) \
|
||||
VALUE_ENTRY(tmpobcmax, "°C", 2051 ) \
|
||||
VALUE_ENTRY(test_time, "s", 3000 ) \
|
||||
VALUE_ENTRY(test_timer_flag, "X", 3001 ) \
|
||||
VALUE_ENTRY(test_timer_icvalue, "X", 3002 ) \
|
||||
@@ -128,7 +129,7 @@
|
||||
// SKUDAK customization suffix: bump on every Skudak-side change so the OpenInverter
|
||||
// web UI shows a distinct version (e.g. "4=1.20.R-S4") and we can visually confirm
|
||||
// the right firmware is flashed. Match the stm32-sine -S<N> convention.
|
||||
#define VERSTR STRINGIFY(4=VER-S4)
|
||||
#define VERSTR STRINGIFY(4=VER-S5)
|
||||
|
||||
/***** enums ******/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user