* simple chunking
* make pylint happy
* misra happy?
* good practice anyways since we cast to a uint32_t later
* fix bug dropping packets
* minor fixes + prepare for shared lib testing
* working library now
* first queue test
* can send test
* fix running in github actions?
* add big rx test and fix it
* don't complain about empty buffers
* disable for now
* comment
* test runs
* some cleanup
* merge those
* test works
* rm that
* comment
* proper logging
* makes things too slow
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* cleanup external debug serial
* wip: bring up uart7
* more wip
* this does something
* this works
* increase fifo size
* fix misra
* cleanup
* fix misra again
* add SOM debug enum
* reduce SOM buffer on F4
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Allow brake TX on PT bus
* Initial Panda GM cam harness support
* Complete rewrite / simplification
* Add param for cam harness (default is OBD2)
- Forward btw 0 and 2
- Filter LKAS and optionally ACC from cam
* Add param for stock ACC
- Allows ACC on PT bus when set, not otherwise
- Allows ACC from cam when set, not otherwise
* Add temporary WIP EPS timing workaround in ifdef
* Remove keepalive; regen == braking
* Fix MISRA violations
* EPS timing opt-in by param
* Minor clean up
* remove timing code for readability
fix and formatting
* we only need to send one message if cam harness and stock long
* Simplify params
* Removed dup brake msg
* revised params, split 3-ways
* add test
* clean up a bit, no need to send ACC yet
like this
* split out button enable and pcm enable into seperate tests
* some formatting
some formatting
* GM CAM uses PCM cruise for controls_allowed
* fix gas safety tests
* misra
* fix static analysis
comment
* fix brake pressed
* Add OP VOACC override stock cam
* Add VOACC safetyparam to init.py
* openpilot long safety
* do this in another PR
* add back
* add safety tests
* rename
* struct for safety
* not used
* temporary fault fix
* adjust max gas
* allow PSCMStatus in long mode
* stash
* fix max gas
* fix and clean up tests
* clean up longitudinal tests into a common class
* fix pylint
* subclass
* clean that up
* rm
* blocking
* comment
* comment
* lower case
* brake bus
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* temporarily disable Jenkins
* firmware
* python lib
* tests
* ..
* usb load switch to high
* it is still red
* usb power mode remove
* Revert "temporarily disable Jenkins"
This reverts commit a911cfad8d.
* forgot this
* common periph
* change name
* board tick
* add V2 to CI
* update known bootstub
* Hyundai: Car Port for Tucson Hybrid 2022
* Remove test comments
* Fix fwd_hook
* Allow tx on 0x1a0
* Fix byte counts
* Send LFA and HDA icons based on engageability
* Add FLAG_HYUNDAI_CANFD_HDA2 flag
* Update __init__.py
* Allow tx with CRUISE_INACTIVE
* Panda safety cleanup
* Include bus 0 in rx checks
* Missed one
* Remove redundant check
* Add comments
* start cleanup
* little more
* more cleanup
* tests
* one more test case
* rename
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* fast rpm measurement
* fix indentation
* this seems stable
* clip fan integral
* fix misra
* add fan power to health
* board-specific max rpm
* refactor fan enable
* cleanup
* stall detection and reset
Co-authored-by: Comma Device <device@comma.ai>
* VW PQ: Updated checksum and counter handling
* first pass PQ long control safety
* refactor stock test to prep for long test
* long control tests
* falling edge enable logic and tests
* accidentally worked but this is better
* test misra/cppcheck evaluation of debug build
* Revert "test misra/cppcheck evaluation of debug build"
This reverts commit 7594fc5e2f.
* allow use of manufacturer ramp-up rate
* soften wheel-touch threshold
* fix tests
* check/test ACC main switch state
* fix CRC for Motor_5
* derp
* retry CI
* try that again
* fuuuu
* fix Motor_5 checksum validation
* use existing acc_main_on global
* re-pin opendbc
* no need for resume spam in longitudinal mode
* concise
* consistency cleanup
* comment and whitespace cleanup
* more cleanup
* more
* restore driver torque threshold
* add long control replay route
* obsolete comment
* proper flag name
* wild to mild-ish
* bump openpilot ref
* Update test_safety_replay.py
* handle non existent routes
* comment consistency/polish
* flip comparison order for falling edge clarity
* restore refs
* read the diff next time, speedy
* srsly
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Allow brake TX on PT bus
* Initial Panda GM cam harness support
* Complete rewrite / simplification
* Add param for cam harness (default is OBD2)
- Forward btw 0 and 2
- Filter LKAS and optionally ACC from cam
* Add param for stock ACC
- Allows ACC on PT bus when set, not otherwise
- Allows ACC from cam when set, not otherwise
* Add temporary WIP EPS timing workaround in ifdef
* Remove keepalive; regen == braking
* Fix MISRA violations
* EPS timing opt-in by param
* Minor clean up
* remove timing code for readability
fix and formatting
* we only need to send one message if cam harness and stock long
* Simplify params
* Removed dup brake msg
* revised params, split 3-ways
* add test
* clean up a bit, no need to send ACC yet
like this
* split out button enable and pcm enable into seperate tests
* some formatting
some formatting
* GM CAM uses PCM cruise for controls_allowed
* fix gas safety tests
* misra
* fix static analysis
comment
* fix brake pressed
* Add OP VOACC override stock cam
* Add VOACC safetyparam to init.py
* Revert "Add VOACC safetyparam to init.py"
This reverts commit 2e46f8746f.
* Revert "Add OP VOACC override stock cam"
This reverts commit a4b096cc1e.
* better comments
* better comments
better comments
fix
* move non-base msg definitions to subclass
* various comments
* TODO: add button safety
* add button safety
* use new pcm_cruise_check
* revert regen braking change
* only cancel button allowed
* Apply suggestions from code review
* Update board/safety/safety_gm.h
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* fix suggestion
* Fix tests
* Revert "Fix tests"
This reverts commit 500577921f.
* this is a much simpler fix, do full fix in another PR
* tx button safety
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Hyundai: Car Port for 2022 Kona Electric Camera SCC
* add missing flag
* set camera_scc in other safety modes
* Add safety test
* this will be a stock longitudinal port for now
* common cruise check
make this check common
* Fix comment typo
* Camera SCC HKG send CLU11 on bus 2
* Update CLU11 comment
* fix button test when txing
* just add bus 2 to existing addr checks
* actually no, this will never be on bus 2
* CLU11 is always on bus 0
line
* consistent param ordering
* fix test
fix test
* this is fine
* Mistook SCC for CLU, fix
* try to make this a little more clear
* add comment
* fix that
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* civic 2022
* remove
* maybe not the right way
* Honda Radarless: add tests
* update
* different bus
* other bus
* Revert "other bus"
This reverts commit 691e045f87.
* add new HUD message
* add
* different bus
* correct freq
* small updates
* comma
* remove
* remove for now
* missing
* not needed
* make into a safety param and clean up
* this can be reverted
* clean up tests (something's broken)
* fix some errors
* this message doesn't exist on any bus
* this car doesn't have BRAKE_MODULE
* make safety more explicit and fix button safety
* fix some tests
* fix tests
formatting
clean up
* radarless uses SCM_FEEDBACK too
* fix tx msgs, clean up, make test common between bosch tests
* misra
* Fix python linting errors
add comment
* not sure where that came from
* add comments
add comments
* we can guarantee honda_bosch_long is true only if not radarless
* these are the same! 🎉
* use updated route with correct tx msgs
* helper pt bus function
* this is explained above
* use function
* no more blocked messages!
* bump openpilot
* comment
* line too long
* needs system
* send on bus 0
* Camera needs bus 2 for buttons
This reverts commit f90db5d359.
* fix button tests
* bump openpilot
* move this down
* make this explicit
* comments
Co-authored-by: vanillagorillaa <ntmccoy@yahoo.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
* block lkas
* taco time
* local changes
* start
* tx checks
* counter + vehicle moving
* support big can fd
* check crc
* add torque to rx checks
* tests
* little more
* little more
* get some misra coverage
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* safety for non-longitudinal
* flip around param for easily replaying old logs on new panda
* fix misra: a function parameter should not be modified
* safety
* the toyota tests all share common messages
* fixup tests
* update comment
* same as tesla test
* check if subset
* update comments
update comments
* make safety_param unsigned
* final one
* uint32_t
* change flags as well
* Revert "change flags as well"
This reverts commit ed8897dd86.
* unsigned
* update health packet version
update health packet version
* update struct H->I
* bump health version
* actually used
* safety mode for body
* move to 27
* dmm...
* misra..
* add faw to safety list
* missing safety modes in python lib
* dmm
* change address to 250
* add 0x1 addr for can flasehr
* whitespace
* alternative experiences
* not unsafe
* more renames
more renames
* not yet true
* I think we import from panda now
* update comments and test
* not needed
* bump health pkt version
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Add RTC with LSI for BP, GP, WP
* disable jenkins temporarily, REVERT!
* experiments
* cleanup is still needed
* cppcheck unused suppress
* raise deepsleep limit timeout to 120sec
* more experiments on usb_enumerated
* continue
* soft_disconnect
* almost done
* not enough
* no ignition
* still don't like it..
* rename to has_rtc_battery
* clock_source on the way!?
* delay 3 sec
* works on C3, needs test on C2
* And this is for C2
* disable bootkick
* misra 10.4
* ..
* ..
* set power state the right way
* change that
* seems don't need that? check on C2/C3
* partially works on RP...
* comments (will work after rebase)
* change fault name
* switch to manual activation mode
* Revert "disable jenkins temporarily, REVERT!"
This reverts commit 578d425fa7.
* my dear pedal!
* add unsafe_mode to health packet
this compiles
update health packet
fixes
ahh forgot to set it!
not actually needed
update indices
* fix struct
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* cleanup python lib
* remove wifi leftovers from firmware
* few spots in firmware
* forgot
* remove usb to wifi test
* linter
* more cleanup in flasher.h
* more found
* check in tests too
* linter
* tesla safety cleanup + long WIP
* more long safety
* longitudinal safety tests
* fix misra
* add safety for main bus DAS_control
* acc_state is not enabled
* fix tests
* we don't want this
* fix Tesla common test
* python: disable power save by default when setting safety mode
* no need to set power save manually
* Update python/__init__.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Extend ISO-TP subsequent frame timeout, add response pending timeout and extra debug info
* Change response_pending to local variable, move response_pending_timeout to UdsClient, update ISO-TP debug output
* Set UDS request pending timeout to 6 seconds (ISO 14229-2:2013 section 7.2 recommended value + 1 second latency)
* manage response pending in single location
* more generous response pending timeout
* add tx timeout
* fix lint error
* fix rx addr for 29 bit addrs
* fix linting issue
Co-authored-by: Martin Lillepuu <martin@mlp.ee>
* H7 drivers
* Include H7 into the code
* fix flash write for H7
* get serial from flasher.h from F4 and H7
* flash.sh and recover.sh for gen3
* add set_data_speed for BRS CAN FD
* build all fws
* gen3 to panda lib
* gen3 name in scons project
* disable fd can and brs
* gen3 to CI tests
* jenkins fix for new tests and build_all
* fix pedal test
* pedal in panda tests again...
* cleanup llfdcan.h
* cleanup clock.h
* Add LDORDY bit check instead of delay
* missing define in stm32h735xx.h lib
* board_id helper
* enable debug detection again
* clean gpio inits
* fix board_id helper, make cleaner
* comment MCUs in stm lib for faster misra
* target MCU
* misra-5.5
* improve headers and misra speed
* cleanup CI tests
* change naming from gen3 to h7
* readable if statement
* cleanup llusb.h
* only cycle one transceifer in bus-off
* move unused funcs to common header
* bus_off_err reset
* misra 10.4 fdcan
* extern to can_data_speed variable
* limit can_data_speed array size to 3
* reinit fd can on data speed change
* Improve test with ELM327 and extaddr check
* bugfix for fdcan
* panda python config naming
* abstracted init request in llfdcan
* misra fdcan
* Improve llusb.h for H7
* Remove non-EON panda build
* missed that
* fixup readme
* more readme
* simplify ci
* add USB command to disable heartbeat checks in debug mode
* clean that up too
* more cleanup
* fix path
* disable heartbeat in set_safety_mode
* more red
* remove one more EON ref
* remove unused wifi tests
* remove that one too
* no bootmode from ESP
* clean that up
* remove two more wifi tests
* remove boardesp and esptool
* esp_gps -> gps
* missed those
* remove esptool refs
* remove esp certs
* no more wifi
* that was old
* cleanup jenkins dockerfile
* fix linter
* remove more wifi refs
* clone panda jungle from github
* no copy
* always default esp to off
* k-line slow init
* k-line slow init LED bit blink
* fix misra violations
* better names for k-line methods
* debug prints match names
* switch to timer
* use TIM4 until I figure out TIM5
* tickle faster
* fix bit bug and add stop bit
* TIM5 working
* USB return after addr sent
* fix l-line reset
* fix misra violations
* blink for the ones instead of the zeros
* k-line 5 baud fault type
* lin check
* use TIM5 or wakeup
* better names
* enable UART RX interrupts
* update debug prints for python3
* improve kline functions and fix checksum
* k-line wake-up conforming to KWP2000 fast init
* fix timing
* toggle k and l line together by default
* k-line wakeup using timer
* k and l were flipped
* fix misra compliance
* fix W391
* E262
* E703
* W293
* some E
* E231
* some more E
* E225
* more E
* E252
* no tabs
* more tabs
* E701
* uds.py
* almost all of them
* only e265 left
* not sure why this is triggering on commented out code
* ignore esptool
* Add pre commit checks
* untested but should work
* fix typo in dockerfile
* add sqlite
* add pylintrc to ignore usb1 members
* Typo in stage name
* Move to requirements
* wait for tx slots before clearing nak
* fix bootstub
* Fixed misra
* Cleanup
* Added bulk write test to test USB NAK on bulk CAN messages
* Added automated bulk tx test
* Fixed linter
* Fixed latency test influence
* Added timeout to python API
* Disabled can write timeout in bulk write test
Co-authored-by: Robbe <robbe.derks@gmail.com>
* Align with VW Community port 0.7.4-devel
* Import of PQ35/PQ46/NMS safety work
* Add safety replay drive for PQ35/PQ46/NMS
* Unwind community port hax for upstream, bump Panda ver
* Update comment
* Reduce whitespace diff
* Reduce whitespace diff
* Don't test the drive until it's uploaded
* Propitiate MISRA
* Ixnay on the VERSION LF
* Remove VERSION LF, update safety_replay with PQ drive
* Freshen cereal ref to include fields used in VW PQ test drive
* Remove superfluous return
* Bypass Docker caching issue
* Checkpoint Panda refactoring updates
* Rename MQB safety tests in preparation for PQ
* Refactor MQB tests, add missing torque test
* Bring in MQB init without CRC LUT setup
* Fix to ACC_06 test case
* Fix to ACC_06 test case
* Tweak comment for clarity
* Drop superfluous return
* Commands to get signature from panda
* does this make misra happy?
* Can I do this in misra?
* this works and makes misra happy
* Add jenkins test for get signature
* Remove comments
* Add comment about code size
* Fix firmware file path
* Exit power saving also for CAN based ingition detection and replace interrup with simple state machine. a bit of delay it's fine
* bug fixes and also CDP set on start
* sorry misra
* move comment
* typo
* remove ignition interrupts
* Power saving state machine should be done by boardd, which also sets safety modes and usb power modes
* typo
* Added usb command for power save state setting
* Added power save enabled packet
* Added power_save_enabled to python lib too
* Added uno
* Added usb switch support
* Added PWM and IR power functions
* Implemented bootkick
* Added uno as a new hw type
* Bumped version
* Added fan control and tach readout
* WIP: RTC support
* Working RTC
* Fixed python
* Misra compliance
* Added USB control messages for fan/IR power
* Added USB commands + tests for fan & IR control. Fixed bootstub and pedal compilation
* Added IR and fan to power saving mode
* Changed defaults
* Fix safety considering uno
* passing safety now
* Minor UNO tweaks
* Fixed version
* More minor temporary tweaks
* Removed usb load switch from uno
* Added power control for shutting down the fan completely
* Disable IR LEDs by default
* Fixed linter issue
* Linter fix#2
* make ignition logic common for all cars
* ignition_can is not a safety thing. move it to can drivers
* bump version
* gm safety passive is deprecated
* move tx 1 on logic into board specific headers.
* Added pyflakes and Pylint for python
* Actually run linter in CI
* some simple pyflakes changes
* Add flake8 to panda reqs for linter test
* flake8 errors are fixed
* run flake8 in regression tests
* meant to run flake8
* hack to ignore unused import
* bug
* fix bugs in tucan_loopback
* Another fix by using set_safety_mode
* added pylintrc file
* more fixes and enabled pylint as well
* Fix pylint in circleci
* added linter to readme
* Panda safety code for Volkswagen, Audi, SEAT, and Škoda.
* First pass at MISRA compliance.
* Second pass at MISRA compliance.
* Fix scope of violation boolean.
* MISRA doesn't care for implicit cast of unsigned int to boolean.
* Remove superfluous newline.
* Remove unused VW ignition hook code, preserve commentary.
* Add 50% padding to max delta check.
* Add 50% padding to max delta check.
* Add clarity around the origin of our safety constants.
* Update test RT delta to match safety.