Commit Graph

835 Commits (spacecruft)

Author SHA1 Message Date
George Hotz 19d7149e6f factor out DFU code 2017-08-23 12:49:56 -07:00
George Hotz 5db091d7d2 clean up LEDs 2017-08-23 12:36:03 -07:00
George Hotz 0b7f10abe5 add release flasher 2017-08-23 10:43:40 -07:00
George Hotz bb4ec716b1 0xe6 command is only for rev c 2017-08-23 10:01:02 -07:00
Vehicle Researcher 63d34bc120 add support for setting usb power 2017-08-23 09:28:52 -07:00
Firmware Batman 91e19756be bugfix for legacy board 2017-08-22 14:44:01 -07:00
Firmware Batman bc2b0782d7 set controls allowed on safety inits 2017-08-22 13:44:11 -07:00
Firmware Batman ea4e92944c blue led is used for can receiving now 2017-08-22 13:36:20 -07:00
Firmware Batman 0400267cd9 teach panda to breathe 2017-08-22 09:44:08 -07:00
Firmware Batman 72d9247ce0 refactor boardesp and version build 2017-08-22 09:08:24 -07:00
Firmware Batman e30a712c21 first pass at charging state machine 2017-08-22 08:27:00 -07:00
Firmware Batman 748c2e45c4 style 2017-08-21 19:34:11 -07:00
Firmware Batman 1ea061a713 test 5 doesn't fail anymore 2017-08-21 16:40:38 -07:00
Firmware Batman 52a2dc7fe2 add semantic versioning 2017-08-21 14:35:38 -07:00
Firmware Batman ddbcd570bc fixup can silent on elm327 mode 2017-08-21 14:28:33 -07:00
edsammy 7de0385e97 Merge pull request #34 from diamondman/feature/ELM327_support
Feature/elm327 support
2017-08-21 13:56:36 -07:00
Firmware Batman 71d81ed916 some computers are slow to enumerate 2017-08-21 13:32:28 -07:00
Jessy Diamond Exum 5ca692e8d3 ELM327: incoming messages cleared before commands to prevent congestion. 2017-08-19 00:31:11 -07:00
Jessy Diamond Exum ad79b7f4d2 ELM327: Safety code for LIN transmissions. Tests as well. 2017-08-19 00:31:11 -07:00
Jessy Diamond Exum 09ee296550 ELM327: Panda safety mode for ELM327 (passes ISO 15765-4 11&29 bit messages) 2017-08-19 00:31:11 -07:00
Firmware Batman 37b3327c28 test 5 still SPI receive failed sometimes 2017-08-13 12:31:03 +01:00
Firmware Batman f832f34413 fix GMLAN bad toggle issue 2017-08-13 01:28:23 +01:00
Riccardo b3694bfc42 safety_honda: reverting change to disallow controls when brake switch is triggered. Such bit appears to have spurious activations, so it will only be considered by controls 2017-08-10 17:28:42 -07:00
Riccardo 61b57685de SAFETY: disallowing controls on brake switch as this is the main cancellation bit considered by cruise in pcm 2017-08-07 11:57:32 -07:00
Firmware Batman 798f942346 fix legacy build issue, add build test, fix warnings 2017-08-01 03:00:53 +02:00
Firmware Batman 8c4005ffdb st wifi flash is failing 2017-07-30 08:49:53 -07:00
Firmware Batman 991ad5be20 add wifi tests 2017-07-30 08:26:48 -07:00
Firmware Batman 9e2d49e225 and fixed a UART noise bug 2017-07-29 19:53:09 -07:00
Firmware Batman 1066c2d1b0 fixed SPI, so much subtlety 2017-07-29 19:19:43 -07:00
Firmware Batman 0d11b01cce debugging SPI 2017-07-29 19:04:58 -07:00
Firmware Batman 6b9ba40089 remove some dumb prints 2017-07-29 18:16:08 -07:00
Firmware Batman 0ee6e4741c move llgpio to drivers 2017-07-29 17:53:39 -07:00
Firmware Batman 9ed4516318 move dac to drivers, add sleep 2017-07-29 17:49:53 -07:00
Firmware Batman 7b6e176368 make new flasher the default for make 2017-07-29 17:21:22 -07:00
Firmware Batman d5e3805671 add uart to spi flasher 2017-07-27 15:54:55 -07:00
Firmware Batman 5630e71813 fixes during vegas trip 2017-07-27 14:33:49 -07:00
Firmware Batman 0474c7aa31 should be what we are doing 2017-07-24 15:41:33 -07:00
Firmware Batman 9a1c1b692f write soft flasher 2017-07-24 15:16:22 -07:00
Firmware Batman 0a5a8ab5ec refactor SPI and make flasher reliable 2017-07-24 12:31:47 -07:00
Firmware Batman a2523f2d3a clean up flasher 2017-07-24 10:39:08 -07:00
Firmware Batman 66c0ba5ea4 fix bootstub 2017-07-22 14:28:11 -07:00
Firmware Batman 5fd041e011 tests pass, not building recover 2017-07-22 14:18:00 -07:00
Firmware Batman d9fc3b372c refactoring 2017-07-21 11:48:03 -07:00
Firmware Batman 9783a2ab13 refactor drivers into drivers.h 2017-07-21 11:30:07 -07:00
Firmware Batman 6b722c43e6 fix debugging print corruption 2017-07-21 00:07:34 -07:00
Firmware Batman 07dac7e75d move out the uart ring process 2017-07-20 23:54:45 -07:00
Firmware Batman 2dd6c3f90c big refactor to drivers 2017-07-20 23:45:48 -07:00
Firmware Batman 9b0b54f4a1 refactor continues 2017-07-20 23:42:19 -07:00
Firmware Batman 65809f25f4 refactoring 2017-07-20 23:36:06 -07:00
Firmware Batman 22da59f663 minor cleanups 2017-07-20 23:19:53 -07:00
Firmware Batman 58e2fc2382 fix legacy tests 2017-07-20 23:16:11 -07:00
Firmware Batman ad2c0e632a start the refactor 2017-07-20 23:14:27 -07:00
Firmware Batman bf57cf25cb make the st ota flasher reliable 2017-07-20 15:34:45 -07:00
Firmware Batman 3e01310f1b support switching usb modes 2017-07-20 13:41:21 -07:00
Firmware Batman 362c9d8aa9 move early back to header 2017-07-19 17:21:47 -07:00
Firmware Batman c8c8601751 well that's a concern, O2 breaks comm over SPI 2017-07-19 17:09:55 -07:00
Firmware Batman 64495a0018 all tests passing, clean up usb power 2017-07-18 23:07:19 -07:00
Firmware Batman 4d879f7e47 tests work on legacy board 2017-07-18 21:14:38 -07:00
Firmware Batman 639ea617b8 cleanly put GMLAN on bus 3, love tests 2017-07-18 21:05:09 -07:00
Firmware Batman 9ed2524be3 add debug mode, more locks, fix test 2017-07-18 12:29:16 -07:00
Firmware Batman 56786dac17 serial echo test is failing 2017-07-18 12:15:19 -07:00
Firmware Batman bd57d8be56 enable O2 2017-07-18 10:28:41 -07:00
Firmware Batman 595c07aaf5 aha, fixed clearing request done bit. tests passed 2017-07-18 10:25:00 -07:00
Firmware Batman 6a56dd1ad2 clean up interrupts more 2017-07-18 10:19:42 -07:00
Firmware Batman b1c4418f51 move the gnu11 2017-07-17 23:05:03 -07:00
Firmware Batman b737d987cb clean up can interrupts, still failing 2017-07-17 22:44:02 -07:00
Firmware Batman e8b38fc426 hmm, reliability test fails... 2017-07-17 21:26:37 -07:00
Firmware Batman 85c0940cf9 support can speed, and test it 2017-07-17 19:43:30 -07:00
Firmware Batman 7f63a23de7 update honda safety to block bad messages from being sent 2017-07-17 18:54:50 -07:00
Firmware Batman c7a9263361 refactor safety and enable tests 2017-07-17 15:29:31 -07:00
Firmware Batman e391a7b5dd remove broken accord support 2017-07-17 11:11:45 -07:00
Firmware Batman 8c83533ba6 better docs, improve safety code 2017-07-17 10:48:16 -07:00
Firmware Batman f38c573113 why were we not using a modern c standard? 2017-07-17 10:27:34 -07:00
Firmware Batman 2aee9315ca separate out controls allowed and safety mode 2017-07-17 10:24:35 -07:00
Firmware Batman e5d255447b clean up safety code 2017-07-17 10:20:08 -07:00
George Hotz 2eecb08304 Merge pull request #23 from commaai/redux/modular_safety
Modularize safety modes to encourage 3rd party safety code contribution.
2017-07-17 10:15:02 -07:00
Firmware Batman 74d602eda8 need to check for error pipe as well 2017-07-17 10:12:47 -07:00
Jessy Diamond Exum a0358414e5 Re-differentiating CAN silence from controls_allowed. Updated incorrect comments. 2017-07-17 00:52:01 -07:00
Jessy Diamond Exum 528b8ae067 Modularize safety modes to encourage 3rd party safety code contribution. 2017-07-17 00:41:26 -07:00
Jessy Diamond Exum 0b6971f091 Declaration of function changed in 'sane can ids'.
can loopback called the function with the old parameters.
2017-07-16 16:03:16 -07:00
George Hotz 7b664b298d Merge pull request #24 from commaai/redux/runtime_can_loopback
Can loopback now runtime configurable.
2017-07-16 15:41:41 -07:00
Jessy Diamond Exum 3a415ab870 Can loopback now runtime configurable.
Useful for board tests, customer troubleshooting, and linux driver loopback support.
2017-07-14 20:32:48 -07:00
Jessy Diamond Exum c98739b66e Can bus numbers now sequential (0,1,2 not 0,1,4).
Can bus numbers are 7 bit numbers with the 8th bit marking receipt busses (0x80,0x81,0x82 not 2,3,6).
2017-07-14 13:55:38 -07:00
Vehicle Researcher 0dc8d4607b fix legacy build 2017-07-12 11:38:00 -07:00
George Hotz 7733b09288 Revert commits that broke USB for openpilot.
Revert "fix openpilot board flashing"

This reverts commit 8ff93ad5da.

Revert "Fixed output_enabled led not turning off when mode changed to no output."

This reverts commit 27a8af1107.

Revert "Fixed loopback test for new GMLAN 'can4' behavior."

This reverts commit 59592f599a.

Revert "GMLAN is now always mapped through CAN4 (index 3)"

This reverts commit 329c091024.

Revert "Removed compile time config for CAN loopback, implemented as usb message."

This reverts commit e1a4c32985.

Revert "Change all output safety mode identifier to prevent user mistakes."

This reverts commit 6b363e2e92.

Revert "untabify"

This reverts commit 191f67b083.

Revert "Refactor of safety to support more modular additions of safety policies."

This reverts commit e5b524eddc.

Revert "Split up some more header files into compilation units."

This reverts commit e2a78912f5.

Revert "Enabled emulated control writes over USB."

This reverts commit 133cfe9703.

Revert "Moved CAN and USART code out of main.c and into more appropriate files."

This reverts commit daad2dc062.

Revert "Large Panda CAN cleanup. Restrict GMLAN to valid baud rates."

This reverts commit a0616a2bc2.

Revert "Panda library now correctly sends USB direction bit."

This reverts commit 1712c901d4.

Revert "Board makefile now automatically calculates header file dependencies."

This reverts commit 4a8d4e597b.

Revert "Loopback test works over wifi. (Disable trying to send over wifi)"

This reverts commit dae636968a.

Revert "Fix legacy board build"

This reverts commit 62bf4e5756.

Revert "Style cop"

This reverts commit c439f43726.

Revert "Untabify"

This reverts commit 41e5eec621.

Revert "Fixed disabling gmlan."

This reverts commit 5e1e45a4af.

Revert "Removed dead code, standardized canid in more commands, better erroring behavior."

This reverts commit b59aeb6d87.

Revert "loopback test works with new CAN bus ids."

This reverts commit 75970861cf.

Revert "Large reorganization of code and early integration of can bitrate setting."

This reverts commit a1ed7b62ee.
2017-07-12 11:27:16 -07:00
George Hotz 8ff93ad5da fix openpilot board flashing 2017-07-12 02:54:20 -07:00
Jessy Diamond Exum 27a8af1107 Fixed output_enabled led not turning off when mode changed to no output. 2017-07-11 18:43:32 -07:00
Jessy Diamond Exum 329c091024 GMLAN is now always mapped through CAN4 (index 3) 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum e1a4c32985 Removed compile time config for CAN loopback, implemented as usb message. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 6b363e2e92 Change all output safety mode identifier to prevent user mistakes. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 191f67b083 untabify 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum e5b524eddc Refactor of safety to support more modular additions of safety policies. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum e2a78912f5 Split up some more header files into compilation units. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 133cfe9703 Enabled emulated control writes over USB. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum daad2dc062 Moved CAN and USART code out of main.c and into more appropriate files. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum a0616a2bc2 Large Panda CAN cleanup. Restrict GMLAN to valid baud rates.
Work towards removing/centralizing ifdefs for CAN3 and PANDA
2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 4a8d4e597b Board makefile now automatically calculates header file dependencies. 2017-07-11 16:55:36 -07:00
Vasily Tarasov 62bf4e5756 Fix legacy board build 2017-07-11 16:55:36 -07:00
Vasily Tarasov c439f43726 Style cop 2017-07-11 16:55:36 -07:00
Vasily Tarasov 41e5eec621 Untabify 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 5e1e45a4af Fixed disabling gmlan. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum b59aeb6d87 Removed dead code, standardized canid in more commands, better erroring behavior. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum 75970861cf loopback test works with new CAN bus ids. 2017-07-11 16:55:36 -07:00
Jessy Diamond Exum a1ed7b62ee Large reorganization of code and early integration of can bitrate setting. 2017-07-11 16:55:36 -07:00
George Hotz 311d133288 Merge pull request #17 from commaai/detect_revc
Detect revc
2017-06-28 22:08:04 -07:00
George Hotz cffe6f3ff1 placeholder 2017-06-28 13:17:04 -07:00
Jessy Diamond Exum 431080403d Panda firmware auto detects REV C hardware. 2017-06-27 19:27:24 -07:00
Jessy Diamond Exum 7694b61617 Cleaned up stray spaces. 2017-06-20 23:54:58 -07:00
Jessy Diamond Exum bf1b8f6191 Added define to make usb sending logic clearer. 2017-06-20 17:48:08 -07:00
Jessy Diamond Exum cdd1b18374 Added alt interface setting to panda firmware to support can read via bulk or int EP. 2017-06-20 17:33:48 -07:00
Jessy Diamond Exum 28d2f04853 Changing poll frequency to 5 frames from 10 frames on geohot's request. 2017-06-20 17:33:48 -07:00
Jessy Diamond Exum 3cdf76221d Changed USB EP 1 from bulk to interrupt and made it NAK when do data is in thering buffer. 2017-06-20 17:33:48 -07:00
George Hotz dd75b6170e Merge pull request #10 from diamondman/python_restructure
Created python package and implemented industry best practices.
2017-06-20 11:31:47 -07:00
Jessy Diamond Exum c37f87818f Reformatted usb descriptor table for understandability. Removed trailing whitespace in usb.h 2017-06-19 20:46:34 -07:00
Jessy Diamond Exum bbe0d2217f More consistent make rule for c files in 'board'. 2017-06-19 20:46:07 -07:00
Jessy Diamond Exum 6a25791fea Created python package and implemented industry best practices.
Supports python 2 and 3 (to the best of my testing ability at the time)
2017-06-14 12:00:04 -07:00
Jessy Diamond Exum 0e46ca4a5d Removed remaining inline definitions and split early.h into a header and a c file. 2017-06-14 09:26:04 -07:00
Jessy Diamond Exum 923dc197f0 Initial cleanup for inline issue. 2017-06-14 09:26:04 -07:00
Ted Slesinski 7164a730d8 Add steering safety check for cr-v 2017-06-14 09:25:00 -07:00
Jessy Diamond Exum f39aaec298 Added dependencies to get_sdk.sh. Cleaned up code in enter_download_mode.py and made compatible with py2 and py3. 2017-06-09 16:48:15 -07:00
Firmware Batman 2fd475d365 support GMLAN multiplexing with CAN3 on rev c panda 2017-06-09 14:11:37 -07:00
George Hotz cf865bd975 move silent mode code 2017-05-30 09:46:21 -07:00
Firmware Batman 1b81a2e600 flash esp fast like a nascar 2017-05-29 23:03:11 -07:00
Firmware Batman 6a6b69ea78 setting controls allowed disables silent mode 2017-05-29 21:33:05 -07:00
George Hotz b7b2b97783 CAN forwarding. logically works, but it's too slow to keep up...we need to hire a firmware engineer 2017-05-26 21:38:57 -07:00
George Hotz 6c9c97a4f9 fix issue with ford instrument cluster, default can to silent mode 2017-05-26 11:20:52 -07:00
Firmware Batman f90b6bb6e4 typo in comment 2017-05-26 11:08:52 -07:00
George Hotz 7b0ebd46da not C4, is B4 2017-05-22 10:41:38 -07:00
Firmware Batman 0205f8de22 oops, forgot a file 2017-05-18 14:18:45 -07:00
Firmware Batman 4175227663 gpio refactor continues 2017-05-17 11:22:48 -07:00
Firmware Batman c35720fe82 okay fine big gpio refactor, untested on legacy 2017-05-17 11:12:59 -07:00
Firmware Batman b7bcc2d200 minor refactor of led code 2017-05-17 10:32:38 -07:00
Firmware Batman 5409c51041 just revc things 2017-05-16 22:15:52 -07:00
Firmware Batman ac162e3aa9 increase the size of the can rx fifo 2017-05-16 21:33:28 -07:00
George Hotz d42335075c make panda leds more sensible 2017-05-16 10:33:50 -07:00
Vasily Tarasov dfdd601dae Fix can bus speed calculation 2017-05-08 00:18:16 -07:00
Firmware Batman be7d2ee397 add usb failure mode to st bootstub 2017-05-03 22:28:22 -07:00
Firmware Batman 57ff14bf15 fix make gitversion 2017-05-03 19:53:04 -07:00
George Hotz a5df04e444 support get serial request in the flasher 2017-05-03 17:07:06 -07:00
George Hotz 43b64091ef add handshake to flasher 2017-05-03 16:05:05 -07:00
George Hotz e38cbaae20 spi handshaking take 1 2017-05-03 15:54:47 -07:00
Firmware Batman 4a889828a0 support flash w/o dfu mode entry 2017-05-02 10:07:27 -07:00
George Hotz 6cd08d6022 controls not allowed by default 2017-05-01 23:40:49 -07:00
George Hotz 8f859ceec6 fix warnings in board build 2017-05-01 22:59:10 -07:00
George Hotz 266b4114db fix vuln in esp flasher, allow send only on hardwired 2017-05-01 22:46:12 -07:00
George Hotz 2969e509c7 add panda safety 2017-05-01 20:23:47 -07:00
George Hotz 7956cc7af7 fix need to make clean for different boards 2017-05-01 12:05:51 -07:00
George Hotz 2097fbb000 ota2 is deprecated 2017-04-29 00:20:19 -07:00
George Hotz 674fa669df flashing over http ugh 2017-04-29 00:09:08 -07:00
George Hotz 8fd0d7f01c okay, release stuff is good 2017-04-28 20:13:00 -07:00
George Hotz 7f66bf6456 remove unneeded resets 2017-04-28 19:53:52 -07:00
George Hotz 1c2b08cf2d remove old st ota code 2017-04-28 19:50:19 -07:00
George Hotz 7e47cd72b9 make flashing over SPI work 2017-04-28 19:32:09 -07:00
George Hotz 36ab1def6d support on device dongle secret 2017-04-28 17:49:55 -07:00
George Hotz 30395e2c7a support serial number fetching 2017-04-28 16:56:40 -07:00
George Hotz 16547a133a add release cert support 2017-04-28 15:06:01 -07:00
George Hotz 08d12a7380 refactor safety hook 2017-04-28 09:56:01 -07:00
George Hotz 39522310e1 only support bootloader entry when hardwired 2017-04-28 09:45:58 -07:00
George Hotz 61a5690c7b disable bootloader locking for now 2017-04-28 09:29:31 -07:00
George Hotz df7f90f6fc sign the esp images as well 2017-04-27 22:11:54 -07:00
George Hotz 234a514b46 add crypto stuff to ESP as well 2017-04-27 22:06:31 -07:00
George Hotz dbeb250b4e add release cert 2017-04-27 20:40:50 -07:00
George Hotz 34aeb335e8 add bootloader lock support 2017-04-27 20:32:30 -07:00
George Hotz 9d08c2b22c parity needs one more bit 2017-04-26 18:39:26 -07:00
George Hotz 354903f280 pointers are hard 2017-04-26 18:30:40 -07:00
George Hotz dd676652b5 support fake LIN sending 2017-04-26 16:30:01 -07:00
George Hotz 00791dcea8 support ESP power down 2017-04-26 12:38:33 -07:00
George Hotz e42f03d58e whoever invented tabs should swim in a bathtub full of space bars 2017-04-26 10:44:24 -07:00
George Hotz bdc3a05a93 signature checking works on ST 2017-04-26 10:41:57 -07:00
George Hotz e6352e6e12 accord framing callback works 2017-04-25 20:23:05 -07:00
George Hotz 203c60ea16 add accord framing callback 2017-04-25 19:36:01 -07:00
George Hotz c27d449e11 minor bug fixes to uart 2017-04-25 18:06:44 -07:00
George Hotz fbddedb264 signing is coming along 2017-04-25 18:03:58 -07:00
George Hotz 2b93c6d85a add baud and parity control 2017-04-25 15:16:23 -07:00
George Hotz 526a52c845 put include before extern 2017-04-24 19:21:17 -07:00
George Hotz ad1290d32d fix build on phones 2017-04-24 19:18:08 -07:00
Firmware Batman 15099f77a2 oops, 0x80 doesn't fit in a FS USB packet 2017-04-18 07:38:39 -07:00
Firmware Batman c1dfed5299 loopback test is working over wifi 2017-04-18 07:34:56 -07:00
Firmware Batman 1b3d3c9b3e fix bug in switch statement refactor, fix serial_write 2017-04-18 01:12:04 -07:00
Firmware Batman efca3f7093 fix reset bug on bootloader, refactor USB api preparing for SPI USB proxy 2017-04-17 18:17:34 -07:00
Firmware Batman c4d10bc447 set ESP ODR before MODER 2017-04-17 16:04:11 -07:00
George Hotz a3045252ab remove some dead code, move comment 2017-04-17 15:28:28 -07:00
George Hotz 5959729227 add mock stuff for signing 2017-04-17 14:52:30 -07:00
George Hotz 99a2266f88 refactor libc, add crypto libraries to bootstub 2017-04-17 13:57:34 -07:00
George Hotz e07f9b111e initial commit 2017-04-06 18:11:36 -07:00