fix: unbrick boot — revert -S6 Clear(), add reentrancy guard, -S7 #9
+6
-1
@@ -139,7 +139,12 @@
|
|||||||
// -S9 restores 8 c2/c3 RX entries (uac/flag/idc/udc per module). -S8 over-
|
// -S9 restores 8 c2/c3 RX entries (uac/flag/idc/udc per module). -S8 over-
|
||||||
// trimmed multi-module Tesla OBC support: CalcTotals was summing only
|
// trimmed multi-module Tesla OBC support: CalcTotals was summing only
|
||||||
// module 1's contribution, so reported pack power was 1/3 of actual delivery.
|
// module 1's contribution, so reported pack power was 1/3 of actual delivery.
|
||||||
#define VERSTR STRINGIFY(4=VER-S9)
|
// -S10 adds udclim RX on 0x212 bytes 1-2. With this, the VCU can force a
|
||||||
|
// hard stop by sending udclim=200V (below pack), which fires the existing
|
||||||
|
// ChargerStateMachine CheckVoltage() exit (udc > udclim → STOP). Closes the
|
||||||
|
// gap where Fix B's contactor-open left the OBC modules drawing ~0.55 kW AC
|
||||||
|
// indefinitely because EVSEACTIVATE had no other exit path.
|
||||||
|
#define VERSTR STRINGIFY(4=VER-S10)
|
||||||
|
|
||||||
/***** enums ******/
|
/***** enums ******/
|
||||||
|
|
||||||
|
|||||||
+17
-5
@@ -100,12 +100,24 @@ void ChargerCAN::MapMessages(CanMap* can)
|
|||||||
can->AddSend(Param::aclim, 0x44c, 16, 16, 1500);
|
can->AddSend(Param::aclim, 0x44c, 16, 16, 1500);
|
||||||
can->AddSend(Param::opmode, 0x44c, 32, 8, 154, 100);
|
can->AddSend(Param::opmode, 0x44c, 32, 8, 154, 100);
|
||||||
|
|
||||||
/***** SKUDAK VCU command RX (0x212) — SKUDAK-516 user ChargeLimit *****/
|
/***** SKUDAK VCU command RX (0x212) — SKUDAK-516 user ChargeLimit + S10 stop *****/
|
||||||
// Byte 0: ChargeLimit_pct (0-100). Bytes 1-7 reserved 0x00.
|
// Byte 0: ChargeLimit_pct (0-100). Param::Change(vcuchglim) translates
|
||||||
// Param::Change(vcuchglim) translates % to udcspnt setpoint (see src/main.cpp).
|
// % to udcspnt setpoint (see src/main.cpp).
|
||||||
// VCU broadcasts every 200 ms once teslacharger detected; charger holds last
|
// Bytes 1-2: udclim_V (uint16 LE, 50-420 V). SKUDAK-S10: VCU drives this
|
||||||
// value if VCU goes silent.
|
// dynamically so it can force-stop the OBC modules when its
|
||||||
|
// BMS-side SOC gate trips. Normally 398 V (= default udclim, no
|
||||||
|
// effect). On the VCU's CHARGE_COMPLETE state it drops to 200 V,
|
||||||
|
// which fires the existing ChargerStateMachine CheckVoltage()
|
||||||
|
// path (udc > udclim → STOP within 1 s). Pre-S10 firmware
|
||||||
|
// ignored these bytes; safe upgrade. NOTE: udclim updates here
|
||||||
|
// are RAM-only — `save` command WHILE the VCU is forcing 200
|
||||||
|
// would persist that value and brick subsequent charging. Don't
|
||||||
|
// issue `save` mid-stop.
|
||||||
|
// Bytes 3-7: reserved 0x00.
|
||||||
|
// VCU broadcasts every 200 ms once teslacharger detected; charger holds
|
||||||
|
// last received values if VCU goes silent (held udclim defaults to 398 V).
|
||||||
can->AddRecv(Param::vcuchglim, 0x212, 0, 8, 1);
|
can->AddRecv(Param::vcuchglim, 0x212, 0, 8, 1);
|
||||||
|
can->AddRecv(Param::udclim, 0x212, 8, 16, 1);
|
||||||
|
|
||||||
/***** SKUDAK VCU telemetry (0x211) — SKUDAK-448 expanded charger telemetry *****/
|
/***** SKUDAK VCU telemetry (0x211) — SKUDAK-448 expanded charger telemetry *****/
|
||||||
// Byte 0: state (0=Off, 1=WaitStart, 2=Enable, 3=Activate, 4=Run, 5=Stop)
|
// Byte 0: state (0=Off, 1=WaitStart, 2=Enable, 3=Activate, 4=Run, 5=Stop)
|
||||||
|
|||||||
Reference in New Issue
Block a user