Commit Graph

1641 Commits

Author SHA1 Message Date
Riccardo
d77fa17913 deleted unnecessary subaru safety init and using nooutput_init instead 2019-06-07 15:11:28 -07:00
Riccardo
71099efaba AddedToyota safety test around long_controls_allowed logic and fixed a bug 2019-06-05 15:29:09 -07:00
rbiasini
380b7c75c5 Long allowed (#202)
* added long_controls_allowed to cars safety code. long_controls_allowed init to 1 for now, so safety tests pass
2019-06-05 14:00:07 -07:00
rbiasini
09714e3a44 Toyota gas cancellation (#200)
* cancel on pedal press for toyota.
2019-06-05 13:38:59 -07:00
Riccardo
436b203e0b Honda safety: fixed bug and properly abstracted gas_interceptor_detected variable 2019-06-04 13:36:46 -07:00
Riccardo
220cc8f4b5 Honda safety: this concludes the proper re-naming 2019-06-04 12:43:50 -07:00
Riccardo
a00a50c622 Honda safety: better naming 2019-06-04 12:21:52 -07:00
Commaremote
192fd05318 Toyota safety: fixed rounding logic 2019-06-03 16:06:39 -07:00
George Hotz
b35f6ff566 legacy build is no longer supported 2019-05-23 13:23:21 -07:00
George Hotz
a06af9f2aa always LIVE on EON 2019-05-23 12:39:54 -07:00
George Hotz
dc5979f66a LIVE on EON 2019-05-23 12:39:54 -07:00
George Hotz
0b26645b12 no EON by default 2019-05-23 12:39:54 -07:00
George Hotz
1906a4b769 panda now draws below 100mw in power save mode 2019-05-23 12:39:54 -07:00
George Hotz
e70b44aa57 move that to main.c 2019-05-23 12:39:54 -07:00
George Hotz
dfce5f6e36 minor fixes, and no more autobaud 2019-05-23 12:39:54 -07:00
George Hotz
96a7e3196f a soothing blue in power save mode 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
386d5dfdf2 can wake from sleep is removed, didn't work in the first place 2019-05-23 12:39:54 -07:00
George Hotz
881b1f442b not on pedal chip 2019-05-23 12:39:54 -07:00
George Hotz
0a9f8eb581 remove many ifdef PANDA 2019-05-23 12:39:54 -07:00
George Hotz
506900576b remove nested includes and include guards 2019-05-23 12:39:54 -07:00
George Hotz
3810452a02 WTF WHY WAS THIS SHIT PUT EVERYWHERE 2019-05-23 12:39:54 -07:00
George Hotz
3cf8db9351 can.h always has CAN3 2019-05-23 12:39:22 -07:00
George Hotz
1f97c2189b refactor pedal bootstub to use llcan 2019-05-23 12:39:22 -07:00
George Hotz
58ec63b31f oops, backward 2019-05-23 12:39:22 -07:00
George Hotz
6255097a10 new style power savings 2019-05-23 12:39:22 -07:00
George Hotz
6b282f1c06 tesla doesn't need a special LIN hook 2019-05-23 12:39:22 -07:00
George Hotz
1d2467756e refactor #ifdef EON 2019-05-23 12:39:22 -07:00
George Hotz
4af036e93a fixup puts 2019-05-23 12:39:22 -07:00
George Hotz
2c1e5f6325 the refactor continues 2019-05-23 12:39:22 -07:00
George Hotz
7517f2c174 remove ifdef PANDA from main 2019-05-23 12:39:22 -07:00
George Hotz
aec40ae91c remove fan, as it was only for NEO board 2019-05-23 12:39:22 -07:00
George Hotz
605bb27bce fix bootstub build 2019-05-23 12:39:22 -07:00
George Hotz
c0f1f6e068 move things around for simplicity 2019-05-23 12:39:22 -07:00
George Hotz
f32f0395fd factor out clear_send 2019-05-23 12:39:22 -07:00
George Hotz
8221927215 this is probably broken. refactor out llcan and clock 2019-05-23 12:39:22 -07:00
Riccardo
1114cb1ad3 ELM327 safety mode: re use existing functions 2019-05-22 18:41:26 -07:00
rbiasini
1aa00c95ee Misra c2012 (#192)
* Started making panda misra compliant: this fixes some of 12.1 warnings

* Also added a regression test for strict compiler warning
2019-05-20 22:13:45 -07:00
George Hotz
047bd725e0 fix tests and remove rev b support 2019-05-19 09:12:26 -07:00
Riccardo
3e199cb914 Subaru safety: ES_LKAS message should not be forwarded 2019-05-11 22:27:07 -07:00
dekerr
4a3b587c64 generate dependencies and clean (#184)
* gen dependencies
Main.o and bootstub.o were missing headers (like recent power_saving.h). Generate them instead to guarantee makefile re-makes if any dependency is modified.
2019-05-06 17:33:38 -07:00
Riccardo
005e131049 Toyota Safety: cleaned up logic for TSSP2.0 cars 2019-05-05 20:29:56 -07:00
wocsor
b53fb2715c add ACCEL_CMD to filtering for TSSP2.0 cars (#185) 2019-05-05 20:22:18 -07:00
Riccardo Biasini
3b351b7018 Minor fix to current type 2019-04-23 13:53:43 -07:00
George Hotz
64bcc89a9c Subaru: 545 msg must be generated 2019-04-14 22:52:38 -07:00
Nigel Armstrong
f8ab74a1cc L-line relay (#166)
* Initial version of L-Line Relay

* lline relay fix build, add to health

* Add lline relay to safety

* Lline relay fix build

* Fix tests

* Add lline safety init. Dont fwd with relay closed

* Turn on relay with CAN

* relay hook

* More reliable lline relay

* Longer LLine timeout

* Only turn on wifi if not eon

* Dont disable ESP in early

* Allow CAN to be turned off

 - CAN is turned off via USB.
 - 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

* Fix relay clicking on startup

* Fix duplicate include

* consistent relay setting

* relay_status can be added when needed, as it's started_alt was consumed in other places

* need to skip forwarding only if relay control is claimed

* unneded change

* make lline_relay.h not depending on can.h

* less spaghetti I guess

* less lines

* reset pedal changes

* no unused input

* update version
2019-04-11 21:03:15 -07:00
Riccardo
f383eee968 Power saving: wake on RX and don't print durint IRQ 2019-04-08 19:21:37 -07:00
Riccardo
9540db7445 Chrysler safety: better to mention messages we don't want to forward 2019-04-04 12:50:40 -07:00
Drew Hintz
1049502644 chrysler: forward bus 0 to bus 2 (#177)
* chrysler: forward bus 0 to bus 2
This keeps the stock LKAS camera active so that we can copy data from its messages.

* Only forward if giraffe switches are 1 0.
Forward LKAS_HEARTBIT messages from stock camera to bus 0.
2019-04-04 10:05:00 -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