Commit Graph

1665 Commits

Author SHA1 Message Date
Robbe Derks
d5ddd4a03e added is_internal() 2021-10-08 12:10:28 +02:00
Igor Biletskyy
a292d8f09d Increase data element size for STM32H7 CAN FD TX/RX buffers (#735)
* Change CAN element data size and quantity

* check this way

* ...

* Get ready for CAN FD

* fix MISRA
2021-10-07 11:19:25 -07:00
Igor Biletskyy
87f81b96a5 Move CAN buffers rx_q and txgmlan_q to RAM D1 on STM32H7 (#734)
* Add RAM D1 to linker script

* Check idea with bigger buffers

* Move rx_q and txgmlan to RAM D1 on H7
2021-10-07 11:07:19 -07:00
Igor Biletskyy
0aed173fb5 Build panda for both target mcpus (#732)
* Edit SCons

* No need for H7 env

* also build panda when building pedal

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-04 12:13:29 +02:00
Robbe Derks
1808dca51f message_drop_test: send only what hasn't been sent yet 2021-10-01 16:08:56 +02:00
Robbe Derks
c67fd935d7 fix pylint for real 2021-10-01 14:47:37 +02:00
Robbe Derks
0bdd5699f7 drop test: send in blocks 2021-10-01 14:39:39 +02:00
Robbe Derks
8e17c107b2 fix pylint 2021-10-01 13:57:44 +02:00
Robbe Derks
1d0e876e37 message drop test 2021-10-01 13:51:11 +02:00
Robbe Derks
4bfa9c16f6 add jungle support to bulk test 2021-10-01 12:39:05 +02:00
martinl
92f6a9bb1d Misra artifacts upload (#731)
* Update misra artifact upload workflow

* Update misra artifact upload filenames
2021-09-30 21:47:14 +02:00
martinl
5ab46ab70a Subaru Global: use better brake pressed signal (#651)
* Change Subaru Global brake_pressed signal to Brake_Status Brake

* Change safety test to use Brake_Status Brake

* Use GET_BYTE for brake_pressed

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

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-28 21:26:04 -07:00
Alfonso Hernandez
9062d93f50 VW PQ: use Bremse_3 for ego speed (#730)
* Change VW PQ speed RX from Bremse_3 to Bremse_1

* Removed MSG_BREMSE_3 definitions since message is not used anymore
2021-09-27 09:39:59 -07:00
Greg Hogan
7e99d5245f expose DEBUG flag and improve debug console output (#728)
* expose debug flags and improve debug console output

* puth4

* other flags need to be set more locally

* fix misra violations

* fix misra violation

* fix misra violation
2021-09-25 21:46:19 -07:00
Greg Hogan
fcd064345a python: disable power save by default when setting safety mode (#725)
* 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>
2021-09-23 23:12:36 -07:00
Greg Hogan
2570770f7b UDS: add response pending timeout (#723)
* 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>
2021-09-23 18:21:21 -07:00
Adeeb Shihadeh
85e896f116 gate honda bosch and hyundai long behind debug flag (#719) 2021-09-15 11:23:41 -07:00
Willem Melching
dd22fafc3c Hyundai longitudinal (#711)
* Hyundai longitudinal

* return right addr checks

* add flag to pythong

* fix define

* check for stock ecu

* add rx check for buttons

* Block FCA11 actuation

* misra

* review 1

* comment about scaling

* clean up buttons

* use define for flag

* more extensive button checking

* check for AEB in scc12

* unsigned

* add knockout tests

* more unsigned

* cleaner
2021-09-13 20:41:10 -07:00
Dange
1befaad8b0 Fix assert error when flashing release (#717) 2021-09-10 08:19:13 -07:00
Willem Melching
fb8f452d68 Try resuming outep3 on can buffer clear (#716)
* try resuming outep3 on can buffer clear

* simplify

* more cleanup

Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
2021-09-08 10:59:00 -07:00
Adeeb Shihadeh
fb890465d5 enable siren if controls allowed within 30s of lost heartbeat (#715)
* enable siren if controls allowd within 30s of lost heartbeat

* cleanup

Co-authored-by: Comma Device <device@comma.ai>
2021-09-07 15:19:42 -07:00
Willem Melching
d1b104950a Toyota: always allow -3.5 to 2.0 m/s^2 according to ISO 15622:2018 (#714) 2021-09-06 16:36:30 -07:00
Willem Melching
a723686fe2 Make all tx/rx LENs a define (#713) 2021-09-03 17:39:09 -07:00
Willem Melching
30ec981a6a fix Hyundai legacy rx checks (#712)
* fix hyundai legacy rx checks

* set there
2021-09-03 12:13:56 -07:00
Willem Melching
8ba9b7cd37 support using safety mode param to control rx checks (#709)
Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
2021-09-03 11:45:17 -07:00
Jason Young
033170750f VW MQB and PQ: Fix controls entry conditions and tests (#707)
* use common tests for cruise and ACC state

* enter controls on rising edge of ACC

* oops

* remove old comment

* another

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-01 16:46:10 -07:00
Adeeb Shihadeh
8c687ecfb4 Revert "Honda Bosch: Support extended LKAS_HUD IDs (#615)" (#708)
This reverts commit 46593af619.
2021-08-28 21:11:37 -07:00
Chris Souers
46593af619 Honda Bosch: Support extended LKAS_HUD IDs (#615)
* Add support for new Honda Bosch vehicles

- Support extended LKAS_HUD IDs on Honda Bosch

- Support extended ID checksum on incoming frames in safety hook (currently unused).

condense

Cleaner. Don't need to store the value in checksum at the return.

Co-Authored-By: Adeeb Shihadeh <adeebshihadeh@users.noreply.github.com>

* revert checksum change

* use full space

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-21 23:34:51 -07:00
Igor Biletskyy
db4a43f8ce set bcdDevice to hardware type (#705) 2021-08-04 14:58:27 -07:00
Igor Biletskyy
1b301600ee add few mcu config consts, add exports (#704) 2021-08-03 18:26:33 -07:00
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