EV-16: hold the Car Why text while car_over holds and the guard floor flag toggles
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user