feat: expand 0x210 telemetry layout (state/udc/idc/uaux@5/soc) for SKUDAK-448
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 59s

Replaces the single uaux-at-byte-0 broadcast (commit d209a47) with a
7-byte expanded telemetry frame. Bench capture on green car showed dual
0x210 frames colliding (DLC=8 simple + DLC=7 expanded) because Kyle's
flashed image had both AddSend sets active; standardising on the
expanded layout eliminates that ambiguity.

Byte layout:
  byte 0     state    (0=Off, 1=WaitStart, 2=Enable, 3=Activate, 4=Run, 5=Stop)
  bytes 1-2  udc      (V, gain=1)
  bytes 3-4  idc      (0.1A, gain=10)
  byte 5     uaux     (decivolts, gain=10) — 12V aux battery rail
  byte 6     soc      (%, gain=1)
  byte 7     reserved

Consumed by stm32-hal-vcu Core/Src/main.c CHARGER_CAN_ID_OI_OBC_AUX
handler. The state byte enables future VCU_IsCharging integration via
state == 4 (Run) without requiring a second CAN ID.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastian de Byl
2026-05-08 16:48:48 -04:00
parent 877508d047
commit 3580123a39
+13 -2
View File
@@ -100,6 +100,17 @@ void ChargerCAN::MapMessages(CanMap* can)
can->AddSend(Param::idc, 0x109, 24, 16, 1);
can->AddSend(Param::opmode, 0x109, 40, 3, 5); //Set charging and connlock at once
/***** Auxiliary TX *****/
can->AddSend(Param::uaux, 0x210, 0, 8, 10); //12V aux battery: byte 0, gain=10 (0.1V/decivolts, SKUDAK-448)
/***** SKUDAK VCU telemetry (0x210) — SKUDAK-448 expanded charger telemetry *****/
// Byte 0: state (0=Off, 1=WaitStart, 2=Enable, 3=Activate, 4=Run, 5=Stop)
// Bytes 1-2: udc (V, gain=1)
// Bytes 3-4: idc (0.1A, gain=10)
// Byte 5: uaux (decivolts, gain=10) — 12V aux battery rail
// Byte 6: soc (%, gain=1)
// Byte 7: reserved
// Consumed by stm32-hal-vcu Core/Src/main.c CHARGER_CAN_ID_OI_OBC_AUX handler.
can->AddSend(Param::state, 0x210, 0, 8, 1);
can->AddSend(Param::udc, 0x210, 8, 16, 1);
can->AddSend(Param::idc, 0x210, 24, 16, 10);
can->AddSend(Param::uaux, 0x210, 40, 8, 10);
can->AddSend(Param::soc, 0x210, 48, 8, 1);
}