Commit Graph

1835 Commits

Author SHA1 Message Date
Igor Biletskyy ba4b754678
add F4 mcu type to python lib "export" (#703) 2021-08-03 16:26:43 -07:00
Igor Biletskyy 53b49da48f
Remove panda code versioning (#702) 2021-08-03 15:07:53 -07:00
Igor Biletskyy 04d2fbbe64
Cleanup unused functions in boards configs (#701)
Move unused functions to separate file unused_funcs.h to make board setup files cleaner
2021-08-03 10:55:10 -07:00
Igor Biletskyy ad90646001
Support for STM32H7 and Red Panda (#694)
* 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
2021-08-02 20:26:15 -07:00
Igor Biletskyy 74eebb828c
Resources for H7 from STM (#696) 2021-07-18 12:51:09 -07:00
Igor 863993dab9
refactor CAN (#695) 2021-07-16 12:22:28 -07:00
Igor 7157175bd4
uart.h refactor: move uart_send_break to lluart.h (#693) 2021-07-14 15:45:10 -07:00
Igor aaad0c2865
Refactor flasher (#686) 2021-07-14 13:49:28 -07:00
Igor da8a76f1b3
Deprecate bcdDevice and legacy mode from panda lib and tests (#692) 2021-07-14 13:30:59 -07:00
Igor 9f781e9e7e
Abstract MICROSECOND_TIMER (#690) 2021-07-14 10:59:28 -07:00
Igor 11b6d90cd4
Move dac.h to HAL (#691) 2021-07-14 10:31:11 -07:00
Igor 1c498c9e05
Deprecate variable bcdDevice in usb.h (#689) 2021-07-14 10:30:02 -07:00
Igor b98e3deb76
remove can_set_obd (#687)
Remove can_set_obd() from can.h . It was replaced by local to boards set_can_mode()
2021-07-14 10:13:13 -07:00
Robbe Derks a019b9bf4a move tesla back to DEBUG with the other dashcam-only brands 2021-07-14 16:51:48 +02:00
Igor eab9c9ee4c
HAL refactoring part 2 (#682)
* Move harness threshold

* Move interrupt handlers

* timers.h refactor

* rtc.h refactor

* pwm.h and fan.h refactor

* clock_source is hw specific

* refactor uart.h

* macro naming

* minor fixes

* redo rtc
2021-07-13 14:12:07 -07:00
Adeeb Shihadeh 062b2715e2
only set heartbeat lost when in a car safety mode (#684) 2021-07-12 21:53:14 -07:00
robbederks 3815bf8f41
also pulse sensor sync (#683) 2021-07-12 15:58:14 +02:00
Jason Young afd999b283
UDS fingerprinting development tool updates (#681)
* WIP for UDS FP development

* WIP for UDS FP development

* WIP for UDS FP development

* propitiate mypy

* Update examples/query_fw_versions.py

* Update examples/query_fw_versions.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-07-11 00:44:25 -07:00
Adeeb Shihadeh 7f12eb87b7 fix dos identifier 2021-07-08 00:37:14 -07:00
Adeeb Shihadeh b2986180a8 add dos to python lib 2021-07-08 00:36:25 -07:00
Igor ada4f7e177
Add pedal tests to CI (#680)
* Add pedal tests to CI

* Organized as unittest

* Linter and imports

* Ignore 'none' serials

* Force into DFU

* Check in softloader mode

* Pin jungle commit

* Add silent mode to pedal

* Move pedal serial to const

* split CIs

* full path to canhandle

* Revert adding silent mode to pedal

* improve

* increase timeout pedal test
2021-07-06 20:29:51 -07:00
Igor 7d93e5a202
Refactor HAL (#656)
* Let refactoring begin!

* Fix pedal build

* Fix pedal safety tests

* Forgot few TIM2 instances

* Try this way with misra

* More misras...

* More misras...

* Still fighting with misra blindfolded

* Almost got it!

* Last misra error..

* Last misra error..

* Misra works locally..

* Maybe this?

* Looks like it was cppcheck bug, revert changes

* Suggested changes and reverts

* File structure change

* revert includes

* remove spaces

* remove timer delay

* endings

* more typing

* rename early to early_initialization

* Remove delay_us

* Revert RTC default values

* Revert initialization sequence

* Fix quotes

* Revert

* Return TIM6EN

* Alias slow timer to TICK_TIMER

* Refactor files structure

* Remove definition of PANDA

* Abstract timers

* Fix include

* tick_timer_init

* Split usb driver

* Move LL stuff: adc

* Move LL stuff: usb

* Fix include again...

* Will check pedal builds also locally..

* Move LL stuff: CAN

* Move LL stuff: clock

* Rename common to peripherals and move

* Move board HAL

* Change include, not needed for pedal

* llgpio to gpio and new lines fix

* remove board_has_relay, not used

* Remove board_functions.h and add to board struct

* Move include

* Fk MISRA...

* has_onboard_gmlan to has_hw_gmlan

* Typos

* Move board_declarations include

* Shuffle

* More abstraction

* fix paths, fix cppcheck test

* Fix for pedal build with USB
2021-07-02 18:25:35 -07:00
Igor f356825443
Add pedal check to panda lib (#678) 2021-07-02 14:27:04 -07:00
robbederks 9ad4ef5556
add baudrate property and flush method for better compatibility (#677) 2021-07-01 15:34:46 +02:00
Igor b2d28a7123
Fix MISRA 8.2 violations (#675)
* Fix violation 8.2

* Update cppcheck

* Remove inline suppressions

* Change source to upstream
2021-06-30 17:47:41 -07:00
Willem Melching 35b9df4643
Enable siren when heartbeat is lost (#674)
* enable siren when heartbeat is lost

* fix misra?
2021-06-29 16:38:50 +02:00
Willem Melching 6eeb6a44f7
Add safety param to control ELM327 bus multiplexing (#673) 2021-06-24 13:12:17 +02:00
robbederks d8385413c3
New tesla safety (#629)
* WIP: new tesla safety

* fix misra

* add unit test

* use | instead of +

* other angle sensor

* change brake message

* fix cancel safety violation

* fix bus for cancel message

* add support for autopilot passthrough and fix cancel message

* fix tests

* this check fails

* fix build

* fix build on c2

* cleanup

* add back AP status to the check

* bus 2

* this check is dumb

* try this?

* add route to do replay on

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2021-06-23 12:41:43 +02:00
Willem Melching d7b3ae0282
Extra checks for Honda Bosch Longitudinal (#662)
* only allow tester present

* ensure radar is not sending messages

* cleanup

* add honda flags

* Constrain tester present message exactly

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

* little endian

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-22 15:29:47 +02:00
Adeeb Shihadeh 78c24982a9
Remove non-EON panda build (#671)
* 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
2021-06-21 13:54:09 -07:00
Igor 4c57ebd928
Fix possible null ptr dereference (#670) 2021-06-18 20:10:44 -07:00
Igor eccafa3712
Fix MISRA 20.x violations (#668)
* Fix 20.x

* missed one
2021-06-18 17:31:35 -07:00
Igor 736ff9699f
Fix MISRA 12.x violations (#667)
* Fix misra 12.x

* typo
2021-06-18 16:42:49 -07:00
Igor 6b6262c262
Fix MISRA 9.x violations (#666)
* Fix chapter 9

* fix typo
2021-06-18 15:46:40 -07:00
Igor 1fdc3c98db
Fix MIRSA 7.X violations (#665) 2021-06-18 15:11:09 -07:00
Igor ddc25b0611
Update cppcheck and misra, suppress for now (#663)
* Update cppcheck and misra, suppress for now

* Add FIXME to suppression tags

* Missed one spot
2021-06-18 14:24:15 -07:00
Chad Bailey 2da5ea3e4e
Fixup broken links and references in README (#661)
* Fixup broken links and remove references to now-defunct eon gold dashcam devkit

* Update README.md

* Update README.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-16 21:37:34 -07:00
Igor d7a82efbf5
Fix bug in GET_FLAG macro (#660)
* Quick bug fix in llcan.h

* Update board/drivers/llcan.h

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

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-14 15:41:54 -07:00
ShaneSmiskol ad12330d50
Hyundai: add gas pressed signal for hybrids (#655)
* detect safety param and get gas pressed for PHEVs

* misra guidelines

* else no action

* use explicit safety param

* update for full test coverage

* full hyundai gas press test coverage

* panda's out of date

* update commit?

* need to check out all

* need rednose too

* works without

* override _gas_msg method for each class

* update safety

* is define okay?

* misra

* like this convention better

* convention and fixes

* bump to openpilot master

* simplify

* add to non legacy rx checks

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-10 00:21:54 -07:00
Adeeb Shihadeh 3cf5b473c8
CI fixups (#657) 2021-06-09 18:36:07 -07:00
Adeeb Shihadeh e99d41e6cf
add flag to health inidicate heartbeat loss (#654)
* add flag to health inidicate heartbeat loss

* fix len
2021-06-04 22:07:45 -07:00
Adeeb Shihadeh f965146214
Honda Bosch: add alt brake msg to rx checks (#649) 2021-05-18 16:39:50 -07:00
Robbe Derks 54b12251dc fix typo 2021-05-03 16:17:26 +02:00
Robbe Derks 22556b1ddf fix health in python 2021-05-03 14:59:36 +02:00
Willem Melching 9a82ba3892
Disable interrupts in early() (#641)
* Disable interrupts in early()

* enable interrupts before going into DFU mode
2021-04-22 11:24:03 +02:00
Willem Melching a65c45d5e7 uds.py: fix typo in response description 2021-04-17 22:11:30 +02:00
Willem Melching d6225226ac fix panda connect on macOS 2021-04-16 15:32:27 +02:00
Adeeb Shihadeh 7d9fdd1108
Toyota: whitelist LTA message (#638)
* Toyota: whitelist LTA message

* LTA safety

* simple test

* little more test

* misra
2021-04-06 16:56:03 -07:00
Greg Hogan c416419c16
hyundai: TCS13 checksum (#623) 2021-04-05 08:44:16 -07:00
Willem Melching d6d928125b Sconscript: requires on .o not on .elf 2021-04-01 16:40:28 +02:00