Hyundai longitudinal prerequisites (#22121)
* panda * bring over changes * dont check car model * remove comment * fix typo * more stuff gated behind long * not * not used * gate that too * try honda tuning * clip accel values * fix up merge * fix stopping * add retry logic around knockout * increase timeout * keep flipping lead bit * true for now * less tuning * update comment * 0.1 s is fine now * merge honda and hyundai knockout * more lead fields * another obj bit * increase timeout * fix stopping flag * only lag compensate for braking * no lead * less tuning * only do knockout if not readonly * try controlling using jerk * tuning * try higher stopping rate * set stopping flag at higher speed * clip upper jerk when stopping * remove comments * tester present 1hz * use positive start accel * 1.0 to maybe improve low speed stuff * no point going over 0 * bump panda * bump panda * revert that change * update refpull/22010/head
parent
0dc45eaf1c
commit
c4bac6bd68
13 changed files with 208 additions and 93 deletions
@ -1 +1 @@ |
||||
Subproject commit 1befaad8b013209aff58145d006d8d047359797e |
||||
Subproject commit dd22fafc3c9f36c9d96dffee5437fb9f56d7ff6d |
@ -0,0 +1,34 @@ |
||||
from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery |
||||
from selfdrive.swaglog import cloudlog |
||||
|
||||
EXT_DIAG_REQUEST = b'\x10\x03' |
||||
EXT_DIAG_RESPONSE = b'\x50\x03' |
||||
|
||||
COM_CONT_RESPONSE = b'' |
||||
|
||||
def disable_ecu(logcan, sendcan, bus=0, addr=0x7d0, com_cont_req=b'\x28\x83\x01', timeout=0.1, retry=10, debug=False): |
||||
"""Silence an ECU by disabling sending and receiving messages using UDS 0x28. |
||||
The ECU will stay silent as long as openpilot keeps sending Tester Present. |
||||
|
||||
This is used to disable the radar in some cars. Openpilot will emulate the radar. |
||||
WARNING: THIS DISABLES AEB!""" |
||||
cloudlog.warning(f"ecu disable {hex(addr)} ...") |
||||
|
||||
for i in range(retry): |
||||
try: |
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, [addr], [EXT_DIAG_REQUEST], [EXT_DIAG_RESPONSE], debug=debug) |
||||
|
||||
for _, _ in query.get_data(timeout).items(): |
||||
cloudlog.warning("communication control disable tx/rx ...") |
||||
|
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, [addr], [com_cont_req], [COM_CONT_RESPONSE], debug=debug) |
||||
query.get_data(0) |
||||
|
||||
cloudlog.warning("ecu disabled") |
||||
return True |
||||
except Exception: |
||||
cloudlog.exception("ecu disable exception") |
||||
|
||||
print(f"ecu disable retry ({i+1}) ...") |
||||
cloudlog.warning("ecu disable failed") |
||||
return False |
@ -1 +1 @@ |
||||
d8ba159971afb46d9b936517d2911bb9d5cd3377 |
||||
68db6ee0d2afb80b0d271788b3028de6db2da45e |
Loading…
Reference in new issue