Commit Graph

397 Commits

Author SHA1 Message Date
Robbe Derks 288e14cde9
Simple CAN chunking (#1011)
* 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>
2022-11-30 23:38:00 -08:00
Adeeb Shihadeh 88b30e1a84
CAN comms test (#1181)
* CAN comms test

* remove those

* cleanup

* little more
2022-11-30 22:12:28 -08:00
Adeeb Shihadeh c075050d5d Revert "F4: cleanup clock source (#1160)"
This reverts commit f0f67ccf85.
2022-11-21 20:31:01 -08:00
Adeeb Shihadeh 2e90b6f308 cleanup python lib imports 2022-11-21 16:59:21 -08:00
Adeeb Shihadeh 3df9099660
Misc cleanup (#1161)
* unused python stuff

* green led

* docs cleanup

* little more
2022-11-17 11:46:43 -08:00
Robbe Derks 5aa5f855e4
setup UART for SOM debugging (#1151)
* 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>
2022-11-17 17:59:11 +01:00
Adeeb Shihadeh f0f67ccf85
F4: cleanup clock source (#1160)
* F4: cleanup clock source

* little more

* void
2022-11-17 07:49:26 -08:00
Adeeb Shihadeh 966f7e0539
SPI: fixes + fake bulk transfers (#1150)
* check spi checkusm

* ugh, fix control handler

* fake bulk xfer

* cleanup

* one more

* unused

* fix linter

* some typing

Co-authored-by: Comma Device <device@comma.ai>
2022-11-10 21:34:43 -08:00
Shane Smiskol ca681ff829
Hyundai: CAMERA_SCC works on both safety modes (#1139)
* Make camera SCC work on both safety modes

* update in safety

* move to common
2022-11-07 22:13:17 -08:00
Adeeb Shihadeh 0b86dfa5fb python lib: only import spidev as necessary 2022-11-04 11:35:40 -07:00
Adeeb Shihadeh a42b104c35
SPI handle in python lib (#1131)
* SPI handle in python lib

* add spidev

* unify those

* clean up connect

* clean that up

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2022-11-03 22:18:12 -07:00
Adeeb Shihadeh 49e2034098
tres (#1130)
* tres

* pull out chiplet

* add to python lib
2022-11-03 16:34:18 -07:00
Jason Shuler cf4aa6bb30
GM: longitudinal support for camera-integrated cars (#1014)
* 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>
2022-11-01 00:58:18 -07:00
Adeeb Shihadeh 622ce923e9
Hyundai: share flags with CAN-FD platform (#1099)
* Hyundai: share flags with CAN-FD platform

* update flags there
2022-10-12 20:29:15 -07:00
Greg Hogan 2f3e2825e5
CAN-FD non-ISO support (#1082)
CAN FD non-ISO support
2022-10-12 15:28:20 -07:00
Adeeb Shihadeh ffb3109e28
Hyundai: HDA2 longitudinal control support (#1096)
* ev6 long

* update steering
2022-10-11 20:50:23 -07:00
Shane Smiskol 3334dc21f5
IsoTpMessage: parameterize separation time (#1088)
* parameterize separation time

* take in seconds and convert

* fix

* define once
2022-10-05 16:35:28 -07:00
Shane Smiskol cffc41e878 Specify IsoTpMessage keywords 2022-10-05 16:22:53 -07:00
Shane Smiskol 7d196264a4
IsoTpMessage: param for single frame flow control (#1079)
* iso-tp: request a single frame at a time

* behind param

* this might be more clear

* like this better

* fit the theme

* revert this change
2022-10-05 16:12:24 -07:00
Adeeb Shihadeh e987e6c639
add pandaState.safetyRxChecksInvalid field (#1083)
* add fault for invalid safety RX checks

* fix test build

* debug

* fix debug

* fix test

* just a bool in health
2022-10-03 16:05:16 -07:00
Shane Smiskol 1910db8d4c
IsoTpMessage.send: setup_only argument (#1081)
* some fixes

* some fixes

* revert to tx not done

* this should work

* correct debug prints

* not true

* revert this

* setup_only
2022-09-30 14:29:41 -07:00
Shane Smiskol 51f023bc66
IsoTpMessage: return if message updated (#1078)
* extend timeout for each message/frame (not multi-frame full response)

* linter
2022-09-27 18:08:09 -07:00
Shane Smiskol 11ea112258
IsoTpMessage: add separation time to flow control msg (#1074)
* one frame at a time, 20 ms delay

* send one at a time

* update separation time to 10ms

* comment
2022-09-19 20:47:12 -07:00
Igor Biletskyy 59ede3fe61
CAN health packet: add speed and canfd info (#1071)
in
2022-09-16 20:39:18 -07:00
Igor Biletksyy 046fd58e8d python lib: check get_packets_versions length 2022-09-15 14:54:38 -07:00
Igor Biletskyy f029c99440
health packet: fix confusing variable names (#1068)
* fix naming

* different buffer overflows

* naming
2022-09-15 13:08:46 -07:00
Igor Biletskyy 0eef8cf333
CAN: health message for each CAN module (#1067)
* initial can health pkt

* MISRA: variable scope

* MISRA 10.4

* typo

* add total_fwd_cnt

* check size of can_health_t

* improve

* comment

* that's better

* move

* add health check to tests

* why?

* ...

* revert later

* meh

* Revert "meh"

This reverts commit 0eb8432194.

* Revert "revert later"

This reverts commit 2d98957a8f.

* adjust test
2022-09-15 13:04:10 -07:00
Igor Biletskyy ac21dbe551
H7: add chiplet panda support (RPv2) (#1049)
* 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
2022-09-09 20:13:06 -07:00
Adeeb Shihadeh 13d64d4cc3
USB power mode + bootkick cleanup (#1051)
* remove tick

* remove more

* delete more

* board tick

* update health

* dos bootkicking

* cleanup
2022-08-31 20:46:07 -07:00
Igor Biletksyy 6d2e2bde86 put is_internal() back for openpilot pandad.py 2022-08-31 10:39:05 -07:00
Igor Biletskyy b81dfba8fe
python lib: cleanup hw type check (#1050)
cleanup
2022-08-30 10:46:12 -07:00
Igor Biletskyy 451d6309b5
python lib: check serial length for Panda.list() (#1042)
* known serial length

* rm from pedal test

* rm from helpers

* oopps

* ...

* add warning

* warning
2022-08-23 22:29:35 -07:00
Jason Wen 9d6496ece8
Hyundai CAN-FD: Tucson Hybrid 2022 support (#999)
* 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>
2022-08-19 19:43:58 -07:00
Adeeb Shihadeh d3e2477231 python lib: disable checks on reconnect 2022-08-18 22:01:12 -07:00
Adeeb Shihadeh 7e843b370d
allow disabling heartbeat while in non-car safety mode (#1035)
* allow disabling heartbeat while in non-car safety mode

* simple test

* clean that up

* remove that
2022-08-17 22:42:18 -07:00
Robbe Derks ba8772123f
Simple integrating fan controller (#1022)
* 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>
2022-08-17 20:43:49 -07:00
Igor Biletskyy ba90f6a8c9
CI tests: check app against known good bootstub first (#1033)
* test

* add master bootstub
2022-08-15 20:11:49 -07:00
Igor Biletskyy 54eb42d903
one flash.sh for both H7 and F4 (#1032)
* flash one

* edit readme
2022-08-15 20:11:38 -07:00
Jason Young 199bc10db3
VW PQ: Longitudinal control safety, lateral torque update (#989)
* 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>
2022-08-12 18:50:00 -07:00
Jason Shuler 5e0dde7b48
GM: Add support for cam harness & stock ACC (#962)
* 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>
2022-08-12 15:56:39 -07:00
Adeeb Shihadeh 06592b5c0e
Hyundai: rename HDA2 platform to CANFD (#1027)
* Hyundai: rename HDA2 platform to CANFD

* one more
2022-08-11 22:06:54 -07:00
Adeeb Shihadeh 486af79503
Chrysler: add Ram HD support (#1010)
* ram hd safety

* bump opendbc

* dt prefix

* remove that
2022-08-11 14:41:46 -07:00
Jason Wen 89989abca5
Hyundai: support camera-based SCC cars (#965)
* 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>
2022-08-03 00:54:41 -07:00
Adeeb Shihadeh 7f6ef7cd00
fix flashing H7 in bootstub + tests (#1007)
Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-08-02 22:28:54 -07:00
Robbe Derks 6bdf249d03
Dynamic sector erase (#1006)
* dynamic sector erase

* fix red panda flash

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-02 21:58:56 -07:00
Adeeb Shihadeh fe3ad834c6
improved HITL test reliability (#897)
* improved HITL test reliability

* little more

* revert that

* little speedup

* some speed up

Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-08-02 17:05:47 -07:00
Adeeb Shihadeh 4b86b83991
Subaru: support Outback and Global Gen 2 (#991)
* Subaru: support Outback and Global Gen 2

* send 0x321

* check bus

* fwd that

* gen2 limits

* lower max steer

* update safety replay route
2022-07-29 20:44:41 -07:00
Adeeb Shihadeh fae3ee2e81
Chrysler: Ram 1500 support (#969)
* RamInit

* Some fixes

* ram param

* cleanup steering

* invert

* couple fixups

* tests pass

* check that

* misra fixes

* same limits

* revert that

* remove those

Co-authored-by: Jonathan <jraycec@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-07-06 22:50:29 -07:00
Shane Smiskol 3dbd30864e
Honda Civic 2022 (radarless): car safety (#942)
* 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>
2022-06-16 19:02:44 -07:00
Willem Melching 36c62afa0c
Kia EV6 (#905)
* 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>
2022-05-19 15:59:58 -07:00
Willem Melching d5bd81e5b5 fixes for mypy check for return-any 2022-05-12 14:22:58 +02:00
Shane Smiskol eb662e4e50
Make safety param uint16_t (#931)
* change safety param to uint16_t

* accidental paste
2022-05-02 13:36:19 -07:00
Shane Smiskol 326cc2a8db
Toyota: stock longitudinal safety (#927)
* 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
2022-04-28 22:29:29 -07:00
Shane Smiskol cf8fb0b883
safety param: assume uint16_t (#929) 2022-04-28 17:40:50 -07:00
Adeeb Shihadeh d031d6e283
Toyota: add safety param flag for alt brake message (#925)
* Toyota: add safety param flag for alt brake message

* fix misra

* Update board/safety/safety_toyota.h
2022-04-27 11:31:24 -07:00
Comma Device 5eefc3ad62 allow skipping DFU entrance for recover 2022-04-25 17:11:27 -07:00
Shane Smiskol 7dd9493eb1
safety_param: change to unsigned (#910)
* 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
2022-04-20 23:25:03 -07:00
Robbe Derks cc0fdffee6
Calculate interrupt load and add to health packet (#913)
* calculate interrupt load

* forgot to change this

* being cautious about overflows

* utils

* fix bootstub

* cleanup

* also exclude pedal

* fix misra

Co-authored-by: Comma Device <device@comma.ai>
2022-04-11 11:59:47 +02:00
Shane Smiskol 81246fdac1
move alternative experience class to python module (#909)
* move alternative experience class to common python module

* same formatting
2022-04-04 18:49:56 -07:00
Greg Hogan ab693a22d5 UDS DTC number and status helpers 2022-04-04 17:55:11 -07:00
Igor Biletskyy 93863197dd
add safety mode for body (#901)
* 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
2022-03-31 12:02:19 -07:00
Shane Smiskol 7104818e14
rename unsafeMode to alternativeExperience (#878)
* 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>
2022-03-24 14:31:31 -07:00
Igor Biletksyy 234e436e93 rename to enable_deepsleep 2022-03-07 14:32:14 -08:00
Igor Biletskyy de7e1e7579
Deep sleep(stop) mode for pandas (#832)
* 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!
2022-03-07 14:24:04 -08:00
Adeeb Shihadeh 2806eecea2 python: add safety param arg to set_safety_mode 2022-02-20 19:38:08 -08:00
Adeeb Shihadeh 9d27011ec2
misc CAN FD fixes (#856)
Co-authored-by: Comma Device <device@comma.ai>
2022-02-20 17:13:22 -08:00
Igor Biletskyy 48f8c5f701
Remove CLOCK_SOURCE_MODE_EXTERNAL_SYNC (#847)
* remove CLOCK_SOURCE_MODE_EXTERNAL_SYNC

* remove from python lib
2022-02-09 07:42:44 -08:00
Adeeb Shihadeh 00138a7f66
Add blocked message counter to health packet (#841)
* Add blocked message counter to health packet

* move that

* update python

* fix struct

Co-authored-by: Comma Device <device@comma.ai>
2022-01-27 17:46:24 -08:00
Shane Smiskol 8ee7b62ea2
Add unsafe mode to health packet (#829)
* 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>
2022-01-25 11:35:57 +01:00
Adeeb Shihadeh 6f95a096e6
safety: add controls heartbeat (#806)
* safety: add controls heartbeat

* one more second

* better comments
2021-12-15 17:28:57 -08:00
Igor Biletskyy 493866d15b
Cleanup Wi-Fi leftovers (#804)
* 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
2021-12-06 14:39:28 -08:00
Adeeb Shihadeh c9992a80c0 bosch_harness -> bosch 2021-11-21 14:51:47 -08:00
Robbe Derks ddb3698f9b
Tesla longitudinal safety (#737)
* 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
2021-11-18 13:50:10 +01:00
Adeeb Shihadeh fec966d6fd
Honda: handle ACC state consistent with ISO 15622:2018 (#789) 2021-11-17 17:27:24 -08:00
Igor Biletskyy c8b48ec23a
Enable CAN FD support (#772)
* enable CAN FD

* ...
2021-11-15 16:27:16 -08:00
Igor Biletskyy ae26b75d7b
CAN_FIFOMailBox to CANPacket struct + USB dynamic packet size (#739)
* Squashed commits, no cleanup

* Few fixes

* No init = garbage

* Only receive with new canpacket

* Add send with canpacket

* Revert "Add send with canpacket"

This reverts commit 7d06686ddd6d447c714b5289d31af24403d36931.

* Packet must be aligned to word, or bad performance

* Cleaner

* Fix tests

* Tests...

* MISRA 10.4

* More MISRA

* libpandasafety_py

* cffi

* even more tests...

* typo

* ...

* ...

* ...

* Slight cleanup

* MISRA 6.1

* MISRA 17.7

* Bug in bxcan + even style

* MISRA 10.1

* Revert "MISRA 10.1"

This reverts commit 404ae7fcc39556f80f528de9015702e69f4ea0a5.

* ...

* MISRA 10.1 and 10.4 suppress until next PR

* MISRA 20.1

* ...

* test_honda

* ...

* ...

* test_toyota

* test_volkswagen_mqb

* test_volkswagen_pq

* Sketchy thing...

* Revert "Sketchy thing..."

This reverts commit 3b2e5715bdc1954f7b7b3b7469ba3d0eaa06bdf9.

* remove comment

* bxcan extended address bug

* Concept, experimental dynamic usb packet size

* increase each buffer to 10240 bytes

* raise python bulk read/write limits

* ...

* Move packet size to start

* Experimental send, stream-like

* New receive test, stream-like

* cleanup

* cleanup + rebase fixes

* MISRA

* Extra receive method, stream-like, commented out

* type change

* Revert back to buffer for send, stream commented

* forgot ZLP

* lower buffer, add rx failsafe

* ... remove ZLP

* return ZLP back

* Add tx checks to panda fw

* TX stream with counter

* fix counter overflow

* 13 free slots should be enough

* limit tx usb packet

* ...

* Revert max_bulk_msg doubling

* python lib improve speed

* Stream with counter for RX, dirty, needs cleanup

* Increase chunk length to 4096 bytes

* cleanup fdcan.h

* cleanup __init__.py

* MISRA 12.1

* MISRA 10.8

* remove non-streaming usb functions

* more main.c cleanup

* MISRA 15.6

* MISRA 15.5

* MISRA 18.4 and suppress objectIndex

* handling usb pakcets > 63bytes, naming and cleanup

* Cleanup old from tests and update CANPacket_t struct

* Switch to 4 bit DLC instead of 6 bit length

* ops)

* ...

* pylint

* receive python buffer increase

* USB increase receive packet len

* tweak buffers

* No need for so high limits

* MISRA 20.1 workaround

* performance tweaks

* cleanup, dlc to data_len_code naming

* main.c naming

* comments and cleanup for main.c usb

* clean py lib

* pylint

* do not discard good rx messages on stream fail

* cleanups

* naming

* remove bitstruct lib and lower tx limit

* bitstruct lefovers

* fix bug in VW test

* remove adjusting data size and assert on wrong len

* ...

* test new memcpy before merging

* Revert "test new memcpy before merging"

This reverts commit 399465a264835061adabdd785718c4b6fc18c267.

* macros for to/fromuint8_t array

* MISRA hates me!

* tests.c include macros instead

* move CANPacket to can_definitions.h

* vw_pq python test fix

* new memcpy test, REMOVE

* check without alignment

* revert macros for uint8 arrays

* Revert "revert macros for uint8 arrays"

This reverts commit 581a9db735a42d0d68200bd270d87a8fd34e43fe.

* check assert

* Revert "check assert"

This reverts commit 9e970d029a50597a1718b2bb0260196c050fd77f.

* one more variation

* Revert "one more variation"

This reverts commit f6c0528b7ac7e125750dc0d9445c7ce97f6954b5.

* what about read performance

* Revert "what about read performance"

This reverts commit d2610f90958a816fe7f1822157a84f85e97d9249.

* check struct alignment to word

* check for aligned memcpy again

* cleanup

* add CANPacket structure diagram

* update CANPacket and add USB packet struct

* bugfix + refactoring of EP1

* move dlc_to_len to header

* missed include

* typo...

* MISRA

* fk

* lower MAX_CAN_MSGS_PER_BULK_TRANSFER

* bump CAN_PACKET_VERSION to 2

* bump python lib CAN_PACKET_VERSION to 2

* rename parse_can_buffer to unpack_can_buffer

* CANPacket_t const fields

* Revert "CANPacket_t const fields"

This reverts commit cf91c035b7706a14e317550c5f0501ae3fce7c70.

* test.c relative path

* cleanup

* move macros to safety_declarations

* Refactor pack/unpack funcs and add unittest

* usb_protocol.h

* oops

* Update .github/workflows/test.yaml

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

* remove print from unittest

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-12 16:36:34 -08:00
Igor Biletskyy b4b14593a0
Check panda library and firmware for compatibility (#770)
* check panda lib and firmware compatibility

* skip comp check for pedal

* ...

* guard affected funcs and print to stderr

* ...

* ...

* ..

* decorators

* test workaround

* linter

* ...

* ...

* ...

* change request address

* split

* remove compatible variable

* ...

* remove compatibility_check

* get packets versions on connect

* fix linter

* use RuntimeError

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-11 14:30:52 +01:00
Greg Hogan 605980ea03
CAN calibration protocol (CCP) python library (#640)
* CAN calibration protocol lib

* fix bugs

* allow specifying byte order

* enum for endian

* fix linting issues

* fix linting issues
2021-10-31 15:06:47 -07:00
Adeeb Shihadeh 5f5f30eedc remove forwarding from python lib 2021-10-29 11:18:42 -07:00
Greg Hogan c5adfa4ece
Fix bulk transfer dropping messages sometimes (#729)
* fix max messages per bulk transfer

* retry on partial send

* need 2x the packet size for some reason

* improve bulk write test
2021-10-15 18:14:55 -07:00
Greg Hogan 288cbf65d1
uds: update security access and i/o control services (#738) 2021-10-10 00:45:59 -07:00
Robbe Derks e3dd1622c3 add get_usb_serial() 2021-10-08 12:17:06 +02:00
Robbe Derks d5ddd4a03e added is_internal() 2021-10-08 12:10:28 +02: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
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
Igor Biletskyy 1b301600ee
add few mcu config consts, add exports (#704) 2021-08-03 18:26:33 -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 da8a76f1b3
Deprecate bcdDevice and legacy mode from panda lib and tests (#692) 2021-07-14 13:30:59 -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 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
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
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
Robbe Derks 22556b1ddf fix health in python 2021-05-03 14:59:36 +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
Willem Melching ad9ecefe65
Switch panda to scons builder (#635)
* add scons builder

* cleanup 1

* remove building from python code

* add pedal build

* fixup flags

* add EON flag

* change github actions to scons

* fixup automated tests

* move flashing scripts

* fix indent

* remove version.mk

* fix not in git

* fix linker script filename

* untested pedal flashing scripts

* add release option

* better asserts

* swap condition

* enable usb and fix flash script

* usb flash is not supported

* use button to enable dfu mode

* no usb because misra

* remove sleep
2021-03-24 14:44:32 +01:00
Jason Young 3bb0408ee6
Add support for variable UDS RX offsets (#631) 2021-03-07 20:33:55 -08:00
George Hotz e035fa1d09
green led on 0xf7 (#619)
* green led on 0xf7

* add python interface

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
2021-01-05 14:51:58 +01:00
Robbe Derks 09997428f3 Fixed transceiver spelling 2020-09-28 16:19:09 +02:00
Robbe Derks 229047d7c2 fix flash_release 2020-09-07 10:26:27 +02:00
Adeeb Shihadeh 8b41ed3b81
Deprecate ESP (#592)
* 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
2020-08-26 15:37:50 -07:00
robbederks 1515ec8bf5
Siren (#594)
* siren

* fix pedal

* update fault rate

Co-authored-by: Tici <robbe@comma.ai>
2020-08-17 15:04:01 +02:00
robbederks c3b02f3a74
Clock source driver (#580)
* Initial clock source implementation

* fix misra?

* Working now. Still need to fix board detection though

* Always stop pulse

* revert board detection bodge

Co-authored-by: Tici <robbe@comma.ai>
2020-08-17 13:02:41 +02:00
Greg Hogan 390b8bce81
k-line 5 baud init (#565)
* 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
2020-07-10 14:18:24 -07:00
Greg Hogan 31f8a0d862
K line fix (#559)
* 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
2020-06-18 11:17:00 -07:00
Greg Hogan 63fe9f73c3 kline_ll_recv return bytes 2020-06-14 09:22:39 -07:00
Adeeb d0442fd1e4
add hyundai legacy safety mode (#554) 2020-06-12 18:03:31 -07:00
openpilot laptop 74c607f79a isotp_send fix bus and add slow mode 2020-06-11 16:42:21 -07:00
Adeeb Shihadeh 6848c7576b use same flake8 config as openpilot 2020-06-03 16:22:30 -07:00
Willem Melching e0a706e4f0
Stricter pylint (#550)
* stricter pylint

* Add as argument
2020-06-02 16:27:07 -07:00
Adeeb d7f7b14118
Enable almost all Flake8 checks (#548)
* 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
2020-06-01 01:49:26 -07:00
Adeeb Shihadeh f70ef291f9 whitespace fix 2020-05-31 17:49:37 -07:00
Adeeb Shihadeh 9102c16118 two spaces before inline comment 2020-05-31 14:07:01 -07:00
Willem Melching b8267341a1
Add pre commit checks + CI (#545)
* 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
2020-05-29 11:52:03 -07:00
Willem Melching a618e64d1a fix typing errors 2020-05-28 14:06:13 -07:00
Willem Melching 5307bf7277 Fix multi message iso tp requests 2020-05-18 19:48:47 -07:00
bkralik c2bea78f6d
Fix python library on Windows (#523)
On Windows, setAutoDetachKernelDriver is not supported (http://libusb.sourceforge.net/api-1.0/group__libusb__dev.html#ga5e0cc1d666097e915748593effdc634a) and causes libusb to get stuck (simple try-catch is not working). This prevents any issues when running both at native windows python and cygwined python...
2020-05-02 12:18:26 -07:00
robbederks ba59ada0e9
No ESP in non-white (#514) 2020-04-20 17:49:52 -07:00
Willem Melching f07a6ee7c5
panda recover should go through bootstub first (#498) 2020-04-13 15:12:06 -07:00
Adeeb 8cc3a35700
remove cadillac (#496) 2020-04-13 14:43:46 -07:00
Greg Hogan da8e00f115
TX message guaranteed delivery (#421)
* 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>
2020-04-06 16:49:42 -07:00
Shreyansh Chandak 0c2c149490
Fixing libusb busy error (#174)
Detaching all kernels before attempting to claim the usb
2020-04-02 10:12:03 -07:00
Jason Young 08ef92d585
Safety model for Volkswagen PQ35/PQ46/NMS (#474)
* 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
2020-04-01 12:38:27 -07:00
rbiasini b2dbb504dc
remove toyota ipas safety code and tests (#460) 2020-03-04 10:54:13 -08:00
rbiasini dfa6b079de
separating subary legacy safety mode from global (#452)
* separating subary legacy safety mode from global

* added explicit tests for subaru legacy, which were absent before
2020-02-27 15:28:24 -08:00
Andre Volmensky db94a5b813
Added Nissan safety (#244)
* Added Nissan safety
2020-02-26 11:11:56 -08:00
Jason Young ccf75c456f
Volkswagen safety updates: Phase 1 (#444)
* 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
2020-02-19 12:37:38 -08:00
Greg Hogan 73a60d5c9c uds: clear rx buffer on drain 2020-02-05 23:34:00 -08:00
Greg Hogan 3b20804b6f uds: rx message buffering 2020-02-05 23:25:34 -08:00
Willem Melching 38fc1d39ff add option to not do a clean st build 2019-12-20 19:39:50 -08:00
Riccardo d19fd3e6bd better differentation of honda safety modes 2019-12-20 15:51:32 -08:00
Riccardo 01244d7557 Fix panda libs 2019-12-20 14:34:59 -08:00
Riccardo 268ab9acf3 send can_rx_errs in health 2019-12-19 18:17:09 -08:00
Willem Melching ad10c8c7ee get_signature return bytes instead of bytearray 2019-12-18 17:03:31 -08:00
Willem Melching ded4b3f743 UDS: handle remote addressing 2019-12-16 15:54:30 -08:00
Willem Melching 7c13bec09f
Command to get signature (#399)
* 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
2019-12-09 10:54:48 -08:00
Robbe ca39a5d8f6 Added faults integer to health packet 2019-11-26 17:07:51 -08:00
Robbe 22464356c3 Fixed health struct size. We should really get an automated test for this 2019-11-22 16:02:08 -08:00
robbederks f458d67a7c Add uptime counter to the health packet (#391)
* Added uptime counter to the health packet

* fix tests by setting power save on on EON build
2019-11-21 16:47:49 -08:00
rbiasini 1192d934a0
Power saving refactor (#389)
* 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
2019-11-21 12:53:00 -08:00
rbiasini 597436d32a
NOOUTPUT safety mode is now SILENT. NOOUTPUT still exists but keeps C… (#388)
* NOOUTPUT safety mode is now SILENT. NOOUTPUT still exists but keeps CAN live

* README mention of 'no output'

* mispelled
2019-11-20 11:56:26 -08:00
Greg Hogan 02d579a537 functional addr handling 2019-11-17 09:30:06 -08:00
Greg Hogan 8138fc14c8 uds: handle function addrs and fw version query example 2019-11-16 18:54:28 -08:00
Robbe 6626a54241 Fixed python health api 2019-11-15 21:01:46 -08:00
Greg Hogan b9b79e8b77 uds zero second timeout 2019-11-15 13:52:25 -08:00
Greg Hogan f239b996db single addr was better 2019-11-14 13:34:25 -08:00
Greg Hogan b3e1a133ae uds: better debug prints 2019-11-12 22:22:49 -08:00
Greg Hogan 68c39fb3e2 uds: no need for threads if you always drain rx 2019-11-12 18:52:41 -08:00
Greg Hogan ff86db6553 improve uds message processing 2019-11-06 13:50:32 -08:00
Greg Hogan 501db8d199 uds drain before send and use has_obd() 2019-11-05 18:40:21 -08:00
Robbe f2cbec161e Added has_obd() to python library 2019-11-05 18:25:42 -08:00
robbederks e0762c2e77
Add Python & USB API for controlling phone power (#313)
* Added interface for phone power

* Add power function in python

* Fixed struct
2019-11-04 17:26:37 -08:00
Robbe ba9fb69f65 New health packet struct also in the python libs 2019-10-31 17:08:02 -07:00
rbiasini a12a148d5f Uno (#274)
* 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
2019-10-25 16:22:42 -07:00
rbiasini 1102e69652
make ignition logic common for all cars (#303)
* 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.
2019-10-22 15:10:43 -07:00
Greg Hogan 55957d6e4e proper python3 exception inheritance 2019-10-16 00:15:16 -07:00
Greg Hogan 6ba0f47b56 fix linter errors 2019-10-15 23:52:52 -07:00
Greg Hogan 5c49fe050e
Merge pull request #145 from gregjhogan/uds
Unified Diagnostic Services (UDS) panda library (ISO 14229)
2019-10-15 23:42:22 -07:00
Greg Hogan 0f361999bd timeout is float 2019-10-15 23:38:24 -07:00
rbiasini fce38a91d7
Linter python (#299)
* 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
2019-10-15 14:03:31 -07:00
Greg Hogan 711810d2f0 more uds debug 2019-10-15 12:14:09 -07:00
Greg Hogan 4454e3a6bb better CAN comm abstraction 2019-10-15 12:07:19 -07:00
rbiasini 6b1f28f574
fix more encoding and some bytes cleanup (#300) 2019-10-15 12:05:33 -07:00
Greg Hogan 43adad3116 fix WARNING_INDICATOR_REQUESTED name 2019-10-14 17:32:23 -07:00
Greg Hogan 9c857da379 0x 2019-10-14 17:32:23 -07:00
Greg Hogan b64d6fa5d2 typing 2019-10-14 17:32:23 -07:00
Greg Hogan 768fdf7e19 bytes() > chr().encode() 2019-10-14 17:32:23 -07:00
Greg Hogan 1be15ea934 custom errors from thread 2019-10-14 17:32:23 -07:00
Greg Hogan 68da8315f3 more python3 2019-10-14 17:32:23 -07:00
Greg Hogan 4f288586d5 updates for python3 2019-10-14 17:32:23 -07:00
Greg Hogan 932745f62b support tx flow control for chunked messages 2019-10-14 17:32:23 -07:00
Greg Hogan b1c371292c add timeout param 2019-10-14 17:32:23 -07:00
Greg Hogan cdf2f626ba bug fixes 2019-10-14 17:32:23 -07:00
Greg Hogan b1a3195770 fix rx message filtering bug 2019-10-14 17:32:23 -07:00
Greg Hogan 80fb6a6fa0 convert uds lib to class 2019-10-14 17:32:23 -07:00
Greg Hogan 59cd2b47f9 handle separation time in microseconds 2019-10-14 17:32:23 -07:00
Greg Hogan 4429600d8e fix separation time parsing 2019-10-14 17:32:23 -07:00
Greg Hogan c641e66f72 fix typo 2019-10-14 17:32:23 -07:00
Greg Hogan 48b8dcc6f9 fix flow control delay scale 2019-10-14 17:32:23 -07:00
Greg Hogan 78f413d88f flow control delay 2019-10-14 17:32:23 -07:00
Greg Hogan 33a5167d93 bug fixes 2019-10-14 17:32:23 -07:00
Greg Hogan 8ee89a091d multi-frame tx 2019-10-14 17:32:23 -07:00
Greg Hogan 5e89a9c728 clear rx buffer and numeric error ids 2019-10-14 17:32:23 -07:00
Greg Hogan 9662300632 fix remaining size calculation 2019-10-14 17:32:23 -07:00
Greg Hogan 01ef1fae36 zero pad messages before sending 2019-10-14 17:32:23 -07:00
Greg Hogan 1ddc9735d1 uds can communication 2019-10-14 17:32:23 -07:00
Greg Hogan dca176e717 syntax errors 2019-10-14 17:32:23 -07:00
Greg Hogan 95be4811ef SERVICE_TYPE enum 2019-10-14 17:32:23 -07:00
Greg Hogan 98e73b51d2 more UDS message type implementation 2019-10-14 17:32:23 -07:00
Greg Hogan c1c5b0356b uds lib 2019-10-14 17:32:23 -07:00
rbiasini 162f4853df
fix chr to bytes conversions (#298) 2019-10-13 18:15:04 -07:00
rbiasini f9053f5df4
more Python 3 fixes, attempting to fix jenkins wifi regresison test (#295)
* more Python 3 fixes, attempting to fix jenkins wifi regresison test. Not successful, but closer.
2019-10-10 12:34:52 -07:00
Jason Young 2f9e076289 Panda safety code for Volkswagen, Audi, SEAT, and Škoda (#293)
* 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.
2019-10-09 13:54:22 -07:00
rbiasini ffbdb87a8d
python2 -> 3 fixes to pedal flasher (#292)
* python2 -> 3 fixes to pedal flasher

* fix Debug flash as well

* Fixes to wifi-test
2019-10-08 19:07:59 -07:00
Robbe 736c2cbf7b Fixed sending of bytes over PandaSerial 2019-10-07 14:26:44 -07:00