Commit Graph

242 Commits (22556b1ddfc0e4b5c71406ce78668f99ebed4c67)

Author SHA1 Message Date
Robbe Derks 22556b1ddf fix health in python 2021-05-03 14:59:36 +02:00
Willem Melching d572c012cb
add safetyParam to health (#633)
* add safetyParam to health

* move copies together
2021-03-17 14:19:22 +01: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
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
robbederks 387fd681dd
USB enumeration detection fix (#566)
* testing

* Looks fixed now

* Cleanup
2020-07-02 00:23:12 +02: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
robbederks d6668fe4ef
Turn on fan if panda is enumerated but not receiving heartbeat (#553)
* fix linter

* Turn on fan if panda is enumerated but not receiving heartbeat

* Upped to 50%
2020-06-11 18:14:41 -07:00
robbederks a38925a0a4
this fixes the fw on newer compilers. haven't figured out why it broke yet (#549) 2020-06-02 14:21:41 -07:00
robbederks ccf13b7afd
No more infinite while loops in CAN init (#499) 2020-04-13 20:32:53 -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
Jason Young 51e0a55d6d
Support code for unsafe mode unit tests (#478)
* Support code for unsafe mode tests

* Fix pre-existing MISRA warning while I'm here
2020-04-01 10:17:51 -07:00
George Hotz 5325b62bbe current_safety_mode 2020-03-31 16:31:01 -07:00
George Hotz 7908b72244 update updating unsafe mode 2020-03-31 16:30:08 -07:00
George Hotz 4556e7494c enable unsafe mode, toggle for use by forks that so choose 2020-03-30 18:18:54 -07:00
robbederks d034f3e9c0
Added the option to turn on IR in power savings mode (#431) 2020-01-30 19:23:19 -08:00
robbederks 82cafd10ea
Allow fan control in power saving (#429) 2020-01-23 16:54:34 -08:00
rbiasini d301a59d64
WIP: Checksum checks (#403)
* add lag message check for all supported cars
* add checksum and counter checks for toyota and honda
* add rx hook regression tests
2019-12-21 10:25:54 +01:00
Riccardo 110ca03160 remove long_controls_allowed unused param and reduce technical debt 2019-12-20 16:17:37 -08:00
Riccardo 268ab9acf3 send can_rx_errs in health 2019-12-19 18:17:09 -08:00
George Hotz 39818691dd setting long_controls_allowed is only possible on debug builds 2019-12-14 08:32:24 -08:00
George Hotz eadb0dbb1d
security upgrades (#397)
* security upgrades

* Gated DFU entry from debug console as well
2019-12-10 08:14: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
Willem Melching dad439a46e
static assert on size of health packet (#398) 2019-12-09 10:39:04 -08:00
Riccardo df4159c846 Revert "Revert "Register readback on most modules. Still need to convert the other ones (#396)""
This reverts commit 56ec215024.
2019-12-05 14:19:29 -08:00
Riccardo 56ec215024 Revert "Register readback on most modules. Still need to convert the other ones (#396)"
This reverts commit 893e486194.
2019-12-05 13:55:20 -08:00
robbederks 893e486194
Register readback on most modules. Still need to convert the other ones (#396)
* Added an initial working implementation of the register readback and applied it to the LLCAN registers. Also fixed an init bug in CAN.

* Locally disable pylint import error

* Reverted change to CAN-obj->FA1R setting

* Fixed misra compliance

* Changed hash function name

* Fixed CAN filter setting

* Added voltage health test

* Converted ADC to register functions

* Converted clock to use register setters

* Added check to see if fault status is zero after running test

* Converted DAC to use register setters

* Converted fan to use register setters

* Converted gmlan bitbanging to use register setters

* Changed over interrupt driver to use register setters. Also moved some includes and definition places for critical sections

* Fixed build

* Converted LLGPIO to use register setters

* Converted pwm to use register setters

* Fixed cold boot

* Fixed health fault check in automated tests

* Added comment for the future (issue #367)

* Converted RTC driver to use register setters

* Converted SPI to use register setters

* Converted timer driver to use register setters

* Fixed register fault on white pandas and disabled showing of fault for release

* Bump version
2019-12-04 20:42:57 -08:00
Riccardo 1bcc351f29 ignition_can: set it to False after 2s of not seeing CAN msgs 2019-12-03 16:44:55 -08:00
robbederks 656f99b080
Interrupt refactor (NVIC_SM_1: #334) and Fault handling (#377) (PR #373) 2019-11-27 18:11:21 -08:00
Riccardo 2d4cb05cf1 add a safety mode counter 2019-11-26 21:20:04 -08:00
Robbe ca39a5d8f6 Added faults integer to health packet 2019-11-26 17:07:51 -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
Riccardo 16624811c4 enable CAN transcievers outside the set_safety_mode function, which is not related 2019-11-21 13:42:36 -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
Riccardo d58d08fbbf Fix Misra 17.8: can't mod function params 2019-11-20 15:13:26 -08:00
Riccardo bc685ac91b Minor indent 2019-11-20 14:04:07 -08:00
Riccardo a54b86c4ba Failure of set_safety_mode falls back to SILENT. Failure to set silent results in hanging 2019-11-20 13:36:29 -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
rbiasini d229f8dcd3
ESP forced off in EON build. this prevents ESP to be turned on when e… (#387)
* ESP forced off in EON build. this prevents ESP to be turned on when exiting power mode: 0.5W power save! Also, boardd does not need to set ESP to off anymore

* don't touch ESP uart

* Refactored ESP/GPS initting

* Fixed white detection
2019-11-19 18:41:59 -08:00
rbiasini 4d1edc068b
skip tx_hook if a message is forwarded (#379) 2019-11-13 23:50:42 -08:00
Riccardo df2ff04583 bump version 2019-11-13 16:11:50 -08:00
Riccardo 168461d5e4 added fault state to health packet 2019-11-13 16:01:20 -08:00
Robbe 32725cc385 Fixed misra compliance 2019-11-09 14:22:16 -08:00
Riccardo 312ba62d43 minor comment cleanupo 2019-11-07 12:42:29 -08:00
Riccardo 0e72c18378 always stop executing if safety mode fails to be set (suggested by jyoung8607) 2019-11-06 14:45:32 -08:00
Riccardo e8d7ed1d90 Rename function name to not confuse safety_set_mode and set_safety_mode 2019-11-06 14:30:22 -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