|
|
|
@ -138,6 +138,7 @@ class CarController: |
|
|
|
|
self.gas = 0.0 |
|
|
|
|
self.brake = 0.0 |
|
|
|
|
self.last_steer = 0.0 |
|
|
|
|
self.stop_sending_acc = False |
|
|
|
|
|
|
|
|
|
def update(self, CC, CS, now_nanos): |
|
|
|
|
actuators = CC.actuators |
|
|
|
@ -234,6 +235,9 @@ class CarController: |
|
|
|
|
|
|
|
|
|
stopping = actuators.longControlState == LongCtrlState.stopping |
|
|
|
|
self.stopping_counter = self.stopping_counter + 1 if stopping else 0 |
|
|
|
|
if CC.enabled: |
|
|
|
|
self.stop_sending_acc = True |
|
|
|
|
if not self.stop_sending_acc: |
|
|
|
|
can_sends.extend(hondacan.create_acc_commands(self.packer, CC.enabled, CC.longActive, self.accel, self.gas, |
|
|
|
|
self.stopping_counter, self.CP.carFingerprint)) |
|
|
|
|
else: |
|
|
|
|