Commit Graph

1173 Commits

Author SHA1 Message Date
Riccardo 5e3458df72 Fix Misra 20.7: Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses 2019-06-24 17:57:18 -07:00
Riccardo d1e6bd86b1 Fix Misra 16.6 and 16.7 by using a different COMPILE_TIME_ASSERT 2019-06-24 17:50:01 -07:00
Riccardo f03c3a9fb6 Fix Misra 8.11: When an array with external linkage is declared, its size should be explicitly specified 2019-06-24 17:10:14 -07:00
Riccardo 83eccb0b5c Fix obvious 10.1 Misra violations: Operands shall not be of an inappropriate essential type 2019-06-24 16:43:11 -07:00
Adeeb Shihadeh 71877bcfd7 update safety replay after openpilot_tools rename 2019-06-24 14:04:46 -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
Riccardo da59e0cb9a Fix toyota tests 2019-06-20 18:41:41 -07:00
Riccardo 57217027e2 Toyota safety: block LTA message in TSS2 cars 2019-06-20 18:33:28 -07:00
Riccardo 2ef429e656 -pedantic is too much, let's fix wall first 2019-06-17 21:39:00 -07:00
rbiasini 6f672d4421
Misra test now fails if the safety files have any Misra violation in them (#221) 2019-06-17 20:06:46 -07:00
Riccardo c6ec11e17f fixed tab 2019-06-17 20:06:14 -07:00
Riccardo 3c21e14ddb Re-fixed. now misra test should pass 2019-06-17 20:00:42 -07:00
Riccardo 0a77dffc9a change test and see if we get a failure now 2019-06-17 19:50:03 -07:00
Riccardo 6cd5a4fcd0 Update cppcheck commit in test_misra.sh 2019-06-17 18:54:05 -07:00
Riccardo 198a4459cc MAX is now macro and cannot be used as function param 2019-06-17 18:48:38 -07:00
Riccardo 578ef22d52 Misra 12.1 violation in MIN/MAX macros 2019-06-17 18:39:17 -07:00
Riccardo 65fb5a48e7 Macro can trigger Misra violation due redef of var before their use 2019-06-17 15:29:04 -07:00
Riccardo 05487e29d7 More complete Misra check on safety code (better than running cppcheck on sfaety.h only, with broken dependencies) 2019-06-17 14:27:01 -07:00
rbiasini 0a94643321
Misra 15 7 (#219)
* Fixed Misra 15_7 violations

* switch case for buttons
2019-06-17 14:13:50 -07:00
rbiasini a3f65d66e9
capitalize MIN and MAX macros (#220) 2019-06-17 13:48:14 -07:00
rbiasini bacfcd0fd0
Make macros to get msg attributes (#218)
* made GET_ADDR, GET_BUS and GET_LEN macros

* for simplicity, addr is int instead of uint32_t as it can only use up to 29 bits
2019-06-14 19:13:05 -07:00
quillford 19d1e41eed WIP: enhance safety replay test (#211)
* safety replay: add msg length

* add support for individual segments to safety replay

* safety replay: extend segment support to rest of safety modes

* safety replay: add debug flag

* safety replay: return if no steering msgs in segment mode

* minor refactor of safety replay
2019-06-14 16:27:15 -07:00
George Hotz 00ebc16936 track can overflows 2019-06-14 13:33:30 -07:00
George Hotz d33bb4117c oops, have to call that now 2019-06-14 13:28:15 -07:00
George Hotz e0df5c81f6 pull in libc changes from harness branch 2019-06-14 13:26:27 -07:00
George Hotz 96dcfb18d4 pull in uart changes from harness branch 2019-06-14 13:26:01 -07:00
George Hotz 59eaec5dd6 add volatiles to the ring buffer pointers 2019-06-14 13:22:33 -07:00
George Hotz b35285ba7d can push failed only with debug 2019-06-14 13:19:30 -07:00
Riccardo 464f5c2b22 Tesla safety: reduced scope of vars 2019-06-14 12:30:59 -07:00
George Hotz f9d2e8876b can does not sleep 2019-06-14 12:14:21 -07:00
rbiasini 3601212ec5
Removed 10.1 violations (#217) 2019-06-14 12:08:59 -07:00
rbiasini c066c7838c
Misra 10.4 violations (#216) 2019-06-14 10:57:14 -07:00
rbiasini 78308c0bc5
All 14.4 violations are gone (#213) 2019-06-12 20:12:48 -07:00
Riccardo 0dc4f6fd30 cadillac safety: enforcing index not going outside array size 2019-06-12 20:07:42 -07:00
rbiasini 67b831ef45
Misra 15 5 (#210)
Remove 15.5 violations
2019-06-12 18:18:07 -07:00
Riccardo 3b496eefd3 bump version 2019-06-12 17:53:08 -07:00
rbiasini 57a6c493bb
Toyota gas pressed: reconcile panda code with openpilot (#212) 2019-06-12 17:51:47 -07:00
Riccardo 4c9e0af29e simplification of cadillac_get_torque_idx 2019-06-12 13:48:34 -07:00
Riccardo 37576ef3b4 Allow inline suppress for the cppcheck 2019-06-12 13:16:23 -07:00
Riccardo 2f71ba995a Tesla safety now using same line break rules as rest of the code 2019-06-12 13:10:51 -07:00
Riccardo 55679532aa Fix Misra 20.1 violations: Moved safety declarations in its own header and qdded optional input to run misra tests for safety code only. 2019-06-12 06:35:47 -07:00
Riccardo 0e251062c6 Fix Misra 10.8 violations: could not directly cast complex expressions from float to int 2019-06-11 21:46:10 -07:00
rbiasini 23461a176c
Misra 12 1 safety (#209)
* this gets rid of all 12.1 violations
2019-06-11 21:23:48 -07:00
Riccardo 242b3305fe Added fwd hook coverage test for Cadillac and created default_fwd_hook instead of nooutput and alloutput, which were teh same 2019-06-11 19:50:12 -07:00
Riccardo 264de67fe8 Minor clean up to Subaru fwd hook 2019-06-11 19:42:53 -07:00
Riccardo b4c52a1bda Cleaned up subaru FWD hook 2019-06-11 19:40:56 -07:00
Riccardo a605b5720e Also covering fwd hook for Subaru and GM now 2019-06-11 19:37:18 -07:00
Riccardo 133269a1a4 Added fwd test coverage for Toyota, Hyundai and Chrysler too. Removed replay tools for Chrysler, as a generic replay tool has been recently added 2019-06-11 19:24:08 -07:00
Riccardo a4653e2d7f Added fwd hook coverage to safety regression tests 2019-06-11 18:16:48 -07:00
Riccardo f4419b08b9 Simplify get_ts_elapsed 2019-06-11 02:07:02 -07:00