EV-20 review round 3: drop the if True wrapper in SolarWriter._close_a (cosmetic, no logic change)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -917,17 +917,17 @@ class SolarWriter(ManualWriter):
|
||||
return want
|
||||
|
||||
def _close_a(self, q, clamp, n_reported):
|
||||
if True:
|
||||
before = self.plan._before
|
||||
if q.get("failed") and not q.get("sel") and before is not None:
|
||||
return before[0] if before[0] >= CH.MIN_A else CH.MIN_A
|
||||
a = self.amps_out(clamp) or CH.MIN_A
|
||||
tgt = self.plan.target_w
|
||||
for n in (q.get("n"), n_reported):
|
||||
b = amps_for(tgt, n, clamp) if n in (1, 3) else None
|
||||
if b is not None:
|
||||
a = min(a, max(b, CH.MIN_A))
|
||||
return a
|
||||
"""`_seq_want`'s value, worked out once per sequence."""
|
||||
before = self.plan._before
|
||||
if q.get("failed") and not q.get("sel") and before is not None:
|
||||
return before[0] if before[0] >= CH.MIN_A else CH.MIN_A
|
||||
a = self.amps_out(clamp) or CH.MIN_A
|
||||
tgt = self.plan.target_w
|
||||
for n in (q.get("n"), n_reported):
|
||||
b = amps_for(tgt, n, clamp) if n in (1, 3) else None
|
||||
if b is not None:
|
||||
a = min(a, max(b, CH.MIN_A))
|
||||
return a
|
||||
|
||||
async def _begin_solar(self, drv, r, cur, n, now, tracker) -> None:
|
||||
"""Step 1 of the safe sequence: 0 A (kept when it already stands).
|
||||
|
||||
Reference in New Issue
Block a user