set canValid for mock car

old-commit-hash: ea06941d4d
commatwo_master
Adeeb Shihadeh 5 years ago
parent ac3422fc0f
commit bc5a293de9
  1. 4
      selfdrive/car/mock/interface.py

@ -63,6 +63,7 @@ class CarInterface(CarInterfaceBase):
# create message
ret = car.CarState.new_message()
ret.canValid = True
# speeds
ret.vEgo = self.speed
@ -82,9 +83,6 @@ class CarInterface(CarInterfaceBase):
curvature = self.yaw_rate / max(self.speed, 1.)
ret.steeringAngle = curvature * self.CP.steerRatio * self.CP.wheelbase * CV.RAD_TO_DEG
events = []
ret.events = events
return ret.as_reader()
def apply(self, c):

Loading…
Cancel
Save