* VW button spam: fix safety and add tests
* button spam is actually sent on bus 2
* Fix safety test. Still need to add gas safety test
* added gas safety test to VW and using consistent nomenclature
* style fixes
* 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.
* Fixed UART overrun error
* Added stability test scripts
* Refactored UART code. ESP/GPS now uses DMA in circular mode to directly write into the ring buffer, saving a bunch of interrupts and potential race conditions.
* Changed stability test to use amount of bytes instead of amount of non-zero messages, since the ring buffer pointer is only updated on half or full DMA transfer or on line idle (e.g. no more 1 char messages from the gps)
* Increase data limit. It's too low sometimes in normal operation
* Forgot to set write pointer in ring buffer
* Increased test limit even more
* CDP by default in EON build on white panda
* Cleaned up power mode setting
* send usb power mode in health
* cleaner CDP setting on ignition
* bump panda
* Updated cppcheck ref. New rules to be fixed
* changed 2 MACRO names that had more than 31 characters in common
* Fix newly popped 10.4: same type on arithmetic ops
* Fix 18.4: operators should not be applied to an expression
* ensure a NULL pointer isn't dereferenced
Implement the safety limits
Smarter forwarding:
Detect what msgs are sent by OP and drop corresponding CAM msgs
Detect if Stock CAM is connected
Detect if CAM is in hardware passthrough
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Honda Nidec: fwd stock AEB
* bug
* correct aeb bit
* typo
* Revert "typo"
This reverts commit d424198b1fbc5a783c39b5bdd7d034865ed61a83.
* typo
* bug fix
* don't have tx hook blocking aeb messages from stock system
* typo
* fwd stock brake even if they are the same
* only stop forwarding aeb when aeb flag clears
* Fix safety tests
* Added fwd safety tests
* tiny bit more readable
* Jenkins test refactor and black panda addition
* Added HW types needed by previous commit
* Fixed ignition interrupts when not on EON build
* Added functions for load switches
* More test scripts for black panda
* Added NONE power mode to the code
* Fixed race condition when setting GPIO pins was interrupted.
* Added relay test script
* Fixed flashing with critical sections and GPS load switch
* Fixing critical depth after reboot
* Made the loopback test asserting
* Made critical depth a local variable to avoid race conditions
* Added GPS to power savings mode
* Fixed DFU mode on white panda and bumped version
* Fixed PEDAL_USB compilation error
* Fixed misra compliance of new critical depth code
* Cleaned up heartbeat logic in the testing code. Re-added ALL_CAN_BUT_MAIN_SILENT. Bumped version. Improved critical section code.
* Fixed DFU flashing (once again)
* Fixed VERSION
* Added relay endurance test
* Changed to alloutput on ELM mode for fingerprinting.
* Fixed minor remarks
* late usb
* Added type support for black panda
* Added harness presence and orientation detection
* harness relay driving code
* Added intercept support in black panda code. Switched around can0 and can2
* Disable ADCs after orientation detection. Ignition interrupts via harness
* WIP: Hardware abstraction layer + black panda bringup
* Fixed bootstub build
* Fixed bootstub for pedal
* Fixed infinite loops
* Got CAN buses working on white again
* Fixed pedal build and black can interfaces
* Got CAN buses working on black panda
* Finished loopback test for black panda
* Erase all flash sectors on the panda. Increased binary limit. Added extra python functions.
* Fixed python
* Made new code MISRA compliant
* Cleaned up ignition. Fixed build
* Fixed health packet
* Fixed CAN mode on black bug. Changed OBD to switch on ELM mode
* Fixes from Github review
* Fixed MISRA issue for pedal
* Fixed failing gmlan tests
* ELM327 safety: allow diagnostic on all buses
* Cleaned up EON relay code
* delete only 3 sectors instead of 11 to allow a new build to be flashed. Much faster to flash
* Removed CAN only can0 output mode. Does not make sense on black panda due to reversibility issues.
* Added heartbeat logic for EON code on panda. Go to NOOUTPUT if EON does not send a heartbeat for 5 seconds.
* Remove all CAN buses live on EON startup. Shouldn't be necessary to have this separate case
* Formatting
* Added file I forgot to push
* Added heartbeat to testing code to make sure EON tests don't fail. Should probably find a better way to do this though. Heartbeat thread didn't work, concurrent USB connection issues...
* Safety: support black panda for Honda Bosch
* Disable OBD2 if setting to NOOUTPUT mode
* Run safety tests for all hw_types
* Fail test if subtest fails
* fix safety tests
* RDLR, RDHR gone from safety
* back at not failing misra safety
* fix safety tests
* did not mean this
* Use get-bytes in pedal too
* Ignore Misra 11.5 and Fix 11.8 violaitons
* Fix 11.3 violations
* Neglect Misra 11.4, fix pointer issue in bootstub and rutn on Werror for pedal builds
* Fix Misra 11.6: can't assign number to void pointer
* Fix test after changing honda_moving name
* for loop is better
* Fix bugs from fbck
* gen dependencies
Main.o and bootstub.o were missing headers (like recent power_saving.h). Generate them instead to guarantee makefile re-makes if any dependency is modified.
* Initial version of L-Line Relay
* lline relay fix build, add to health
* Add lline relay to safety
* Lline relay fix build
* Fix tests
* Add lline safety init. Dont fwd with relay closed
* Turn on relay with CAN
* relay hook
* More reliable lline relay
* Longer LLine timeout
* Only turn on wifi if not eon
* Dont disable ESP in early
* Allow CAN to be turned off
- CAN is turned off via USB.
- CAN is turned on when either try to transmit or can is received
- If only transmit is asleep, all messages should send okay
- If receive is alseep, will miss first message while waking up
- Sometimes will report error on second message while CAN perif wakes up
- Saves 130mW!
* Power Saver Mode
- Gray Panda power consumption 650mw -> 325mW
- Turns off CAN, GMLAN, LIN, GPS when no activity for 10s
- No acitvity is no CAN send, CAN Recv, Write to GPS
* Fix power_saving to better turn off can
- On some cars when the can is turned off, it triggers a wakeup.
Delaying the automatic wakeup seems to fix this
* Don't save power in pedal
* Fix relay clicking on startup
* Fix duplicate include
* consistent relay setting
* relay_status can be added when needed, as it's started_alt was consumed in other places
* need to skip forwarding only if relay control is claimed
* unneded change
* make lline_relay.h not depending on can.h
* less spaghetti I guess
* less lines
* reset pedal changes
* no unused input
* update version
* chrysler: forward bus 0 to bus 2
This keeps the stock LKAS camera active so that we can copy data from its messages.
* Only forward if giraffe switches are 1 0.
Forward LKAS_HEARTBIT messages from stock camera to bus 0.
* Only turn on wifi if not eon
* Dont disable ESP in early
* Allow CAN to be turned off
- CAN is turned off via timeout
- CAN is turned on when either try to transmit or can is received
- If only transmit is asleep, all messages should send okay
- If receive is alseep, will miss first message while waking up
- Sometimes will report error on second message while CAN perif wakes up
- Saves 130mW!
* Power Saver Mode
- Gray Panda power consumption 650mw -> 325mW
- Turns off CAN, GMLAN, LIN, GPS when no activity for 10s
- No acitvity is no CAN send, CAN Recv, Write to GPS
* Fix power_saving to better turn off can
- On some cars when the can is turned off, it triggers a wakeup.
Delaying the automatic wakeup seems to fix this
* Don't save power in pedal
* Cleanup power saving
In fd233832ef
the linker flag -lgcc might not work on EON as it does not have the
correct library.
The fix was a workaround in sha.c such that we no longer need to import
function __aeabi_llsr from library, by replacing right shift operation
with const argument.
E.g.,
uint64_t a = b >> i // requires __aeabi_llsr from libgcc
uint64_t a = b >> 2 // does not require external library
Resolves: #522
* added safety_ascm
* better using one funciton
* GM_ASCM safety mode by default
* fixced ign bug and passing everything for now
* blocking 0x152-0x154 and reforwarding 0x153
* gotta fwd 152 as well on CH bus
* adding braking message block
* blocking gas cmd as well
* allow cadillac supercruise to pass through
* no more hardcoded ascm safety mode
* optimize board build for size to avoid going over the limit.
Here are the sizes of board/obj/panda.bin with different settings:
-O2 32228
-Og 30172
-Os 28028
* warning if panda.bin is over the panda's limit
* if bin is too big, error out
* Chrysler safety model and tests.
* fix comments
* when ACC is canceled, disallow controls
* update SAFETY_CHRYSLER value in Python API and add other SAFETY values
* Honda: forwarding CAN0 to camera, so camera can stay on
* forward cam on toyota
* fwd some honda camera msgs
* add crv and rdx steering msg to honda fwd filter
* only fwd cam on toyota if frc is connected
* toyota: remove unused variables
* toyota: don't forward frc bus when switch 1 is high
* toyota: check when switch 1 is high
* Honda: forwarding CAN0 to camera, so camera can stay on
* forward cam on toyota
* fwd some honda camera msgs
* add crv and rdx steering msg to honda fwd filter
* only fwd cam on toyota if frc is connected
* toyota: remove unused variables
* toyota: don't forward frc bus when switch 1 is high
* Added Tesla safety changes.
* Use generic interpolate function from safety.h
* Moved Tesla safety include to within IFDEF PANDA as legacy neo boards don't support floats used in Tesla safety code
* Remove double-pull code and time tracking from CAN message.
Better enclose Tesla-relevant code in ifdef PANDA due to use of floats
* Changes as per requests by @rbiasini from conversations in https://github.com/commaai/panda/pull/132
* Removed unused variable
Do interpolation check at every step (not every 25)
Change tesla safety constant number to 8, not 7
* Add the HYUNDAI safety number
* Remove unused struct and function (fsample)
* fix build
* Add stub gmlan implementations in safety tests
* This compiles, and steers the car, but no unit tests performed (yet)
* Updates
225 for max torque after discussions with users in #hyundai
Fixed violation disable as requested
* Hyundai Auto-Detect which CAN bus Camera is on