Commit Graph

73 Commits (master)

Author SHA1 Message Date
Shane Smiskol 20085620db
Mazda: no steer unavailable alert for cars with full range steering (#23998)
* allow steer if minSteerSpeed is <= 0

* need to understand lkas_blocked, can we just use that?

need to understand lkas_blocked, can we just use that?

* Revert "need to understand lkas_blocked, can we just use that?"

This reverts commit 8793fb562d.

* better

* fix

* little more clear

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-20 16:41:18 -07:00
Adeeb Shihadeh 2219cb4478
cars: cleanup CS usage (#23957) 2022-03-18 15:39:22 -07:00
Shane Smiskol 628eecff06
CARS.md tweaks (#23983)
* CARS.md fixups

* wrong one

* sort footnotes

* Mazda CX-9 has good torque

* Try this

* generate

* yup, os uses native filesystem order
2022-03-17 16:11:03 -07:00
Shane Smiskol 31a6b141d6
Docs: auto-generate supported cars documentation (#23762)
* make CAR class enum, and values.py formatting

* Revert "make CAR class enum, and values.py formatting"

This reverts commit 04d9817e9d.

* stash

* add supported packages and model years

* don't change model years in fps

* move Lexus to info dict and make int enum

* remove sometimes wrong model years from name string

* use enum names

* convert Honda's values

* nice names

* use name

* GM

* Mazda, Ford

* Hyundai: WIP

* finish Hyundai

* fix

* Nissan

* Subaru

* Tesla

* formatting is for another PR

* Chrysler: todo: unify the Pacificas?

* do volkswagen

* this isn't a zoo

* skip enums for now

* Update selfdrive/car/volkswagen/values.py

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>

* set All

* temp cars

* auto-generate CARS.md

* update type hinting

* add generated file

* add longitudinal star to cars that support disabling radar

* add TODO

* add notes

* add min_steer_speed exception for hatchback

* add minimum steering speeds

* Add exceptions and run generator

* Missing Telluride

* fix Prius v

* missing Prius Prime

generate

* start to convert years to strings

* Fixup Hyundai

* convert year sets to strings

* handle this

* missing S3

* Fix and add all missing cars (verified with script

* Supported Package fixes

* add get_tiered_cars

* Check radarOffCan for removing most Honda from op long

* Update for Avalon stop and go update on master

* Fix missing car params

* add my temporary script i'm using to verify new generated DBC

add my temporary script i'm using to verify new generated DBC

* generate with jinja template

* add header and footer

* clean up

* rename

rename

* add exceptions. jinja is nice, but why are its loop indexes starting at 1?

* add list of known car videos

* See how these look

* Add nice table formatting for column description

Add nice table formatting for column description

* generate

* consisten br tag

* small clean up

* temp

* Move car videos into CarInfo

* add new copy and rename to footnotes

* Revert "temp"

This reverts commit 93c3fce1d3.

clean up

* generate

* replace with svg

* simplify a bit

* add footnotes to CarInfo

* move some variables to docs.py

* Add video link for Acadia

* Make Footnote an enum so we don't use random ints

* static analysis fixes

* move to CARS.md

* fix last missing footnote

* add to release files

* rm test file

* use svg

generate

* fix sorting

* not needed

* not sure how this got here

* remove Sedan/Couple and add Diesel footnote

* finish todos

* move make specific footnotes to selfdrive/car/*/values.py

rename

* change to zeros

* align bottom to center

* Apply some suggestions

* Update selfdrive/car/mock/values.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update copy

* Try headers + bullet points

* somehow better

somehow better

* finish updating copy

* move template and add links to sups

* stars shouldn't be clickable

that didn't work

try this

try this

this is better

* add type hints to CarInfo

add more type hinting

* optional needs a type and any covers all (?)

* move good steering torque to */values.py

* dataclasses are much nicer than attr

* use tuple

* Update docs/cars.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* suggestions

* suggestions

* suggestions

remove

* clean up a bit

* add more type hints

* center stars and remove hardcoding from template

* update copy

* Add test

* Fix types

Fix types

* add supported cars documentation test

* clean up

* replace with docs_definitions

* Add back Footnote enums

* Ah so these are like fstrings!

* Update selfdrive/car/CARS_template.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/car/docs.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update year from master merge

* Fix longitudinal star from merge

* sort properly stars by Column enum

* clean up

* HKG: Sorry guys

* Prius V gets FSR star, like others

* Update selfdrive/car/docs.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* update comment

* No Prius docs change for now

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-16 21:27:05 -07:00
Adeeb Shihadeh bae78dd46b
don't read params in car interfaces (#23978) 2022-03-16 15:17:47 -07:00
Adeeb Shihadeh 5c3f3e44bc
break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
2022-03-13 21:42:39 -07:00
Shane Smiskol 629399a449
carControl: add long and lat active fields (#23859)
* proof of concept

* actuators packet describes which actuators are active

* bump cereal

* fixes

* not needed for this PR

* Do Toyota

* add back controlsState.active

* bump cereal

* rest of cars

* in actuators

* add active back

* which

* use controlsState.active for now

* will make an issue

* Update selfdrive/controls/controlsd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* move local lat_active checks into CC.latActive

* remove redundant checks

* move comment

move comment

* fix joystick mode

* get enabled from carcontrol

* do standstill check in controlsd

* make sure we consider the gas press case for GM

* use CC.actuators

* fix

* capitalization

* Bump cereal

Bump cereal

* make intermediate actuators

* similar convention to before

* clean that up

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-13 20:58:44 -07:00
Adeeb Shihadeh b9484a6a99
cars: remove duplicated cancel logic (#23956) 2022-03-13 20:22:49 -07:00
Adeeb Shihadeh 87849f93b1
better steer fault names (#23890)
* better steer fault names

* bump cereal
2022-03-01 22:53:55 -08:00
suryad 12e79761e1
Mazda: add 2017 CX-9 firmware (#23742) 2022-02-10 16:30:00 -08:00
Jafar Al-Gharaibeh 341f5a4ae0
Mazda CX-5 2022 Car port (#23704)
* Mazda CX5 2022 FW

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* CX-5 2022: No lockout and steer down to zero

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* CX-5 2022: No dashcam!

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* CX-5 2022: add to supported cars

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda: stick with 800 max torque for now

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update docs/CARS.md

* Apply suggestions from code review

* Mazda: set car models where needed

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda: set minSteerSpeed per car

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* unused

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* cleanup

* Update selfdrive/car/mazda/interface.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-02-04 23:34:37 -08:00
Shane Smiskol 61de3788ff
CANParser: remove rest of default values (#23676)
* forgot honda somehow!

* forgot some more signal defaults
2022-01-31 17:29:55 -08:00
Jafar Al-Gharaibeh 1c31c9b7a3
Mazda: alert when LKAS is disabled (#23288)
* Mazda: alert when LKAS is disabled

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* update refs

* revert that

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-01-30 21:04:07 -08:00
Adeeb Shihadeh 72e00a0768
No actuation while in pre-enabled state (#23658)
* No actuation while in pre-enabled state

* update refs
2022-01-28 16:03:44 -08:00
Shane Smiskol 3645186d7c
CANParser: remove default values (#23642)
* draft

* remove rest

* bump

* update radar interfaces

* do rest and formatting

* bump

* fix mising check

* try this

* Revert "try this"

This reverts commit 0d26d9a072.

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-01-27 17:06:18 -08:00
Adeeb Shihadeh 2c94f15584
linter: don't allow implicitly concatenated strings (#23513)
* linter: don't allow implicitly concatenated strings

* fix hyundai
2022-01-13 14:19:38 -08:00
Dean Lee a653461dec
check in tuple instead of list (#23477)
* 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>
2022-01-10 16:36:51 +01:00
Ewout ter Hoeven 332f568a82
Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
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>
2021-12-24 11:18:39 -08:00
Adeeb Shihadeh c92199ab1a Revert "Mazda: alert when LKAS is disabled (#23273)"
This reverts commit f25121b736.
2021-12-20 23:02:02 -08:00
Jafar Al-Gharaibeh f25121b736
Mazda: alert when LKAS is disabled (#23273)
* Mazda: alert when LKAS is disabled

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Update selfdrive/controls/lib/events.py

* Update selfdrive/car/mazda/interface.py

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-20 14:58:46 -08:00
Jafar Al-Gharaibeh cd7db7f48e
Mazda CX-5 2021 FW (#23270)
dongle id: 661fdb17fa82339c

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-12-20 14:30:54 -08:00
Jafar Al-Gharaibeh fc7d152dca
Mazda: CX-5 and 3 FW (#23267)
* Mazda 3 2017 fw

dongle id: f7fec643f5178df8

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-5 2020 FW

dongle id: f4b488f06d3b7711

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-12-18 14:47:04 -08:00
Willem Melching 4f1eb4278a
Log actuators after applying rate limits in CarController (#23230)
* return actuators from carcontroller

* log it

* pass to latcontrol

* chrysler

* gm

* honda

* more brands

* rest of the brands

* gm cleanup

* hyundai cleanup

* update ref

* rename field

* fix subaru

* add types

* more subaru fixes #23240

* consistent whitespace

* bump cereal
2021-12-16 13:08:20 +01:00
Willem Melching e6180738fd
add CarParams.wheelSpeedFactor (#23079)
* add CarParams.wheelSpeedFactor

* Fudge speed for Lexus RX

* should have been the TSS2 model

* bump cereal

* refactor into function

* update refs
2021-12-03 14:57:53 +01:00
Adeeb Shihadeh f0f7359f6a mazda: capitalize CX9 like all others cars 2021-11-24 11:53:10 -08:00
Jafar Al-Gharaibeh 787dde003e
Mazda: fix typo in CX-5 fw (#22957) 2021-11-17 13:49:10 -08:00
Jafar Al-Gharaibeh 2492a11661
Mazda: add three new FW FP (#22939) 2021-11-16 21:10:16 -08:00
Jafar Al-Gharaibeh b18661a3a6
Mazda: fix occasional main cruise disable (#22807)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-11-10 21:25:41 -08:00
Jafar Al-Gharaibeh 2621e5301d
Mazda: disable hud alerts until we find a way to silence audible alerts (#22808)
* 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>
2021-11-09 15:24:18 -08:00
Jafar Al-Gharaibeh 8c38e9c49e
Mazda: fix occasional steer fault at initial lkas enable (#22806)
* Mazda: fix occasional steer fault at initial lkas enable

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-08 14:40:26 -08:00
Adeeb Shihadeh 2252c6bba7
Mazda: move CX-9 out of dashcam mode (#22717)
* move cx9 out of dashcam

* no alc below 28

* process replay route
2021-10-31 22:02:36 -07:00
Adeeb Shihadeh 40b7962b93
Mazda: fix up cruise cancellation (#22750)
* also cancel on cruiseControl.cancel

* set counter in button msg
2021-10-30 13:37:52 -07:00
Adeeb Shihadeh 1848fed6e2
Mazda: send dash alerts (#22730)
* 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>
2021-10-30 10:56:30 -07:00
Adeeb Shihadeh f9b6b03f5d Mazda: car state cleanup + comments 2021-10-29 14:40:58 -07:00
Adeeb Shihadeh 4bbeb27f9b
Mazda: allow engaging below min LKAS speed (#22737)
* Mazda: allow engagement below minimum LKAS speed

* bump panda

* bump panda
2021-10-29 13:07:52 -07:00
Adeeb Shihadeh 2b4a655f36
Mazda: fix blinker states (#22718)
* Mazda: fix blinker states

* not lamp

* back to lamp to fix convenience blinkers
2021-10-28 14:05:12 -07:00
Jafar Al-Gharaibeh ca1f96ac72
Mazda: Fix OP steer warning in cars with lockout (#22612)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-10-20 21:36:22 -07:00
Jafar Al-Gharaibeh c898939423
Mazda: fix disabling cruise main on after cancelling cruise (#22193)
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>
2021-10-10 14:24:57 -07:00
Jafar Al-Gharaibeh d19ac7e49b
Mazda: Fix steer lockout issue in CX-9 2021 (#22506)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-10-10 14:19:43 -07:00
Jafar Al-Gharaibeh 2dff0597b7
Mazda: Add CX-9 2021 GT firmware (#22509)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-10-10 10:08:18 -07:00
Robbe Derks 91987f38d4
Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Jafar Al-Gharaibeh b170c1f4e1
Mazda: use cruise speed signal from PCM (#22345)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-24 16:58:32 -07:00
Adeeb Shihadeh 649af76fd4
remove community supported cars from community features (#22330)
* remove community supported cars from community features

* remove bosch and hkg long

* remove test case

* update refs
2021-09-23 17:34:52 -07:00
Jafar Al-Gharaibeh cb63a89dd0
Mazda 3/CX-5 FW (#22087)
* Mazda 3 2017 FW

dongle-id: 2f26dfe847d7c138

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* CX-5 fw

dongle id: 769d87694463b543

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-08-30 22:14:49 -07:00
Jafar Al-Gharaibeh a949a49d5e
Batch of Mazda FW (#22037)
* Mazda CX-9 2021 fw

dongle-id: 09190764dd71c810

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-5 2017 FW

dongle-id: ec9d14ccafd6a5bd

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda 6 2021 FW

dongle-id: afdcf7eee0222886

* Mazda CX-5 2019 Diesel FW

dongle-id: a90d564521cb048e

Co-authored-by: Shubham Arora <shubhama1903@gmail.com>
Co-authored-by: srbaumruk205 <72043516+srbaumruk205@users.noreply.github.com>
2021-08-25 11:16:26 -07:00
Jafar Al-Gharaibeh ff704e18b7
Car Port: Mazda CX-9 2021 (#20864)
* 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>
2021-07-10 23:50:03 -07:00
Jafar Al-Gharaibeh e0ed92c03f
Mazda: Latest FP2 FW roundup (#21529)
* Mazda CX-5 2020 FW

dongle-id: 7158b1c81c34b73a

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-9 2018 fw

dongle-id: b7ac84ce9191f3cb

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-9 2019 fw

dongle id: 30453440af4c0a5a

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* Mazda CX-5  2019 FW

dongle-id: a9a9badda9265c17

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-07-10 13:16:14 -07:00
Adeeb Shihadeh c72d163e14
deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
2021-07-07 14:59:18 -07:00
Jafar Al-Gharaibeh 43ead46a46
Add Mazda CX-5 2018 fw (#21403)
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-06-29 15:43:00 -07:00
Jafar Al-Gharaibeh 56fbf66c20
Add Mazda 6 and new FW for other models (#21167)
* Add support for Mazda6

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>

* New FWs and Mazda 6 test route

Change Mazda to MAZDA
Mazda6 test route
CX-5 2018 FW
CX-5 2019 Australia FW
CX-9 2016 FW
Mazda3 2014 FW

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2021-06-06 14:40:57 -07:00