Skip to content

Commit

Permalink
Merge pull request commaai#192 from commaai/devel
Browse files Browse the repository at this point in the history
Force subaru to assume the stock camera is connected (commaai#849)
  • Loading branch information
sshane authored Oct 14, 2019
2 parents 27da742 + 70d17cd commit 4797e68
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions selfdrive/car/subaru/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from selfdrive.config import Conversions as CV
from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.car.subaru.values import CAR, FINGERPRINTS, ECU_FINGERPRINT, ECU
from selfdrive.car.subaru.values import CAR
from selfdrive.car.subaru.carstate import CarState, get_powertrain_can_parser, get_camera_can_parser
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, is_ecu_disconnected
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase

ButtonType = car.CarState.ButtonEvent.Type
Expand Down Expand Up @@ -48,7 +48,9 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), vin="", has_relay
ret.enableCruise = True
ret.steerLimitAlert = True

ret.enableCamera = is_ecu_disconnected(fingerprint[0], FINGERPRINTS, ECU_FINGERPRINT, candidate, ECU.CAM) or has_relay
# force openpilot to fake the stock camera, since car harness is not supported yet and old style giraffe (with switches)
# was never released
ret.enableCamera = True

ret.steerRateCost = 0.7

Expand Down

0 comments on commit 4797e68

Please sign in to comment.