Files
stm32-openinverter-teslacha…/include
Bastian de Byl 1803f9b41d
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 58s
fix: rebuild stale CAN map on firmware upgrade (new tmpobcmax canary)
The openinverter single-shot MapMessages() guard was using Param::hwaclim
as a "is the map valid" canary. hwaclim has been in every firmware version
for years, so on every upgrade the guard finds it in the saved flash map
and short-circuits — new AddRecv/AddSend entries in chargercan.cpp never
make it into the live canMap.

Symptom on the -S5 bench (verified via openinverter web UI spot values):
tmpobcmax, c1*/c2*/c3* per-module receives, and canenable/idcspnt/udclim
CHAdeMO RX entries were all unmapped despite being in current source.
The Polarity app saw zero charger temperature, zero per-module
current/voltage, and tmpobcmax=0 on 0x211 byte 7.

Fix: switch the canary from hwaclim -> tmpobcmax (added in -S5, never
present in older saved maps) and uncomment canMap->Clear() so the
rebuild starts clean. The early-return guard still kicks in on every
subsequent boot once tmpobcmax is in the map, preserving the original
intent of letting user customizations persist across reboots.

Also bumps VERSTR S5 -> S6 so the openinverter web UI labels this
firmware distinctly from the prior -S5 flash.

#minor

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:06:52 -04:00
..
2022-10-10 11:46:30 +01:00
2023-12-15 17:56:07 +01:00
2022-10-10 11:46:30 +01:00
2022-10-10 11:46:30 +01:00
2023-12-15 17:56:07 +01:00
2022-10-10 11:46:30 +01:00