* check in tuple instead of list
* Update selfdrive/car/toyota/carcontroller.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* Update selfdrive/car/mazda/interface.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default
Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
* Mazda: disable hud alerts for now until we find a way to silence audible warnings
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Mazda: add hud alert for steer lockout
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* show when above min steer speed
* update refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Mazda: send dash alerts
* no actuators
* ldw
* send alerts
* test
* use cam parser
* add generic toggle
* wip
* revert some stuff
* try that
* steer required works
* cleanup
* bump panda
* little more cleanup
* no lane lines
Co-authored-by: Comma Device <device@comma.ai>
On some disengagement events (brake/gas/etc) OP may occasionally
ends up disabling the main cruise control where the driver has
to press the main cruise button before they can engage ACC again.
Try to detect this situation and automatically turn on cruise
when that happens.
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Mazda CX-9 no steer lockout, and newer cars can use more torque
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Mazda CX-9 2021 test route
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* cleanup
* more cleanup
* don't show community features alert if dashcam only
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* mazda: don't passthrough unused signals
Some older models do have these, newer models don't.
Either way, they all work just fine if set to zero.
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* mazda: improve auto resume after full stop. Thanks number1pete
Auto resume doesn't always work after a full stop.
sending RES presses at a higher rate fixes the issue.
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Add Mazda 3 2014 fingerprint
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Merge mazda 3 fingerprints
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Parametrize MIN_CAN_SPEED in car interfaces
* fixed instance in planner.py
* fix typo
* var name change
* changed var name to minSpeedCan for consistency with other uses of CAN in the capnproto files
* added default value to get_std_params, removed unneeded instances from car interface files
* Revert PEP8 autoformat corrections
* update refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Add test routes for CX9 and Mazda3
CX9: "10b5a4b380434151|2020-08-26--17-11-45"
Mazda3: "74f1038827005090|2020-08-26--20-05-50"
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
I thought I was missing a rounding in Mazda code, but it turned
out to be a missing rounding after the recent event refactoring
Python3 interpreter:
>>> print(" %d %d" % (1.6,1.4))
1 1
>>> print(" %d %d" % (round(1.6),round(1.4)))
2 1
>>> print(" %d %d" % (int(round(1.6)),round(1.4)))
2 1
>>> print(" %d %d" % (int(round(1.6)),int(round(1.4))))
2 1
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>