EV-16: hold the Car Why text while car_over holds and the guard floor flag toggles
checks / unit (pull_request) Successful in 27m49s
infra-pin / fresh (pull_request) Failing after 2s

Display only: the 'are at' / 'give all they can' text changes only when the
other state has stood for 180 s (the car_over off hold); SoC unread is never
'are at'. Cleared when car_over drops, on unplug and with cover off.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude (dev)
2026-11-21 08:54:04 +01:00
parent 8150608317
commit 3b1189cdbf
3 changed files with 387 additions and 1 deletions
+3
View File
@@ -61,6 +61,7 @@ class CarMixin:
self.car_over = False # ... held: the card and row say so
self._car_over_since = None
self._car_over_gone = None
self._car_why_hold = None # EV-16: the held Car Why (display)
self._car_batt_prev = self._car_batt_prev2 = None
self._car_hx_prev = None # EV-19: last cycle's (held, car W)
self._car_need_real = self._car_need_excl = False # EV-10 latches
@@ -398,6 +399,7 @@ class CarMixin:
self._car_over_gone = mono
if mono - self._car_over_gone >= OVER_OFF_HOLD_S:
self.car_over, self._car_over_since = False, None
self._car_why_hold = None # EV-16: display only
self._car_over_gone = None
def _car_explains_alarm(self, real_proj, guard, target_w, w) -> bool:
@@ -497,6 +499,7 @@ class CarMixin:
# The session is over: that is a real end, with no hold.
self.car_over = False
self._car_over_since = self._car_over_gone = None
self._car_why_hold = None # EV-16: display only
if s not in (chargers.NONE_, None) and self._car_prev_state in (
chargers.NONE_, None):
self._car_session += 1