mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-31 13:13:44 +08:00
overflow 20ms
This commit is contained in:
@@ -180,14 +180,14 @@ class CarController(CarControllerBase):
|
||||
self.spoof_mid_sent = True
|
||||
|
||||
# Overflow spoof: insert extra when accumulator allows
|
||||
if self.spoof_accum >= 0.6 and not self.spoof_over_sent and interval_ns > 0:
|
||||
if self.spoof_accum >= 0.5 and not self.spoof_over_sent and interval_ns > 0:
|
||||
slot2_ns = self.prev_steer_ts_ns + (interval_ns * 2) // 3
|
||||
if now_nanos >= slot2_ns and now_nanos - self.last_steer_ts_ns >= 15_000_000:
|
||||
if now_nanos >= slot2_ns and now_nanos - self.last_steer_ts_ns >= 20_000_000:
|
||||
paddle_sends.append(gmcan.create_prndl2_command(self.packer_pt, CanBus.POWERTRAIN, True))
|
||||
paddle_sends.append(gmcan.create_regen_paddle_command(self.packer_pt, CanBus.POWERTRAIN, True))
|
||||
self.last_spoof_ts_ns = now_nanos
|
||||
self.spoof_over_sent = True
|
||||
self.spoof_accum -= 0.6
|
||||
self.spoof_accum -= 0.5
|
||||
# === End Spoof scheduling ===
|
||||
|
||||
# === Off-pulse scheduling on regen release ===
|
||||
|
||||
Reference in New Issue
Block a user