Skip to content

Commit

Permalink
Limit unknown ECU to my vin
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Mar 24, 2020
1 parent 520a1ae commit 5ccaf25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion selfdrive/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ def __init__(self, dbc_name, CP, VM):
params = Params()
try:
cached_fingerprint = params.get('CachedFingerprint')
vin = = params.get('CarVin')
finger = gen_empty_fingerprint()
cached_fingerprint = json.loads(cached_fingerprint)
finger[0] = {int(key): value for key, value in cached_fingerprint[2].items()}
if 0x2FF in finger[0]: self.fake_ecus.add(Ecu.unknown)
if 0x2FF in finger[0] and vin = "JTMWRREV10D058569": self.fake_ecus.add(Ecu.unknown)
except:
pass
self.packer = CANPacker(dbc_name)
Expand Down

0 comments on commit 5ccaf25

Please sign in to comment.