Commit Graph

23 Commits (spacecruft)

Author SHA1 Message Date
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
Adeeb 20eb68b179
Add pre-commit hooks (#551)
* add more pre-commit hooks

* revert misra coverage table

* fix coverage table exclusion
2020-06-03 15:08:57 -07:00
robbederks 82cafd10ea
Allow fan control in power saving (#429) 2020-01-23 16:54:34 -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
robbederks 6cccf969ab
Fan and IR at 0 when in power savings mode (#309) 2019-10-29 12:36:47 -07:00
Robbe 1965817d30 Changed default values for testing 2019-10-25 16:24:53 -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
robbederks 6f532c6d51 Black panda Jenkins (#256)
* 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
2019-08-28 12:57:42 -07:00
rbiasini 59f5813173
Black (#254)
* 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
2019-07-23 15:07:06 -07:00
rbiasini 3c3aba3dbc
Misra 10.4: Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category (#240)
* Almost done with 10.4, a couple of non-obvious violations remaining
2019-07-04 01:04:58 -07:00
Riccardo ec3d0386c2 refactor set_power_save_state 2019-06-26 18:24:21 -07:00
Riccardo e3c5e7da8c Fix Misra 15_5 violations 2019-06-26 15:52:34 -07:00
rbiasini e2d781380a
Strict compiler (#222)
have no Wall warnings from the strict compiler and enforcing it in the regression test.
2019-06-24 10:25:30 -07:00
George Hotz dfce5f6e36 minor fixes, and no more autobaud 2019-05-23 12:39:54 -07:00
George Hotz a74f001ba7 refactor power savings to depend on car started bit 2019-05-23 12:39:54 -07:00
George Hotz 6255097a10 new style power savings 2019-05-23 12:39:22 -07:00
George Hotz 047bd725e0 fix tests and remove rev b support 2019-05-19 09:12:26 -07:00
Riccardo f383eee968 Power saving: wake on RX and don't print durint IRQ 2019-04-08 19:21:37 -07:00
Nigel Armstrong 4276c380e6
Additional Power saving (#170)
* 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
2019-04-01 22:45:00 -07:00