Commit Graph

1188 Commits (f9053f5df4f2a0be475d5b76c84d371f0b26b7b0)

Author SHA1 Message Date
rbiasini 4886b6b984
Misra 12.1: The precedence of operators within expressions should be made explicit (#227)
* Fixed all misra 12.1 violations
2019-06-26 16:16:35 -07:00
Riccardo 3fd6b337f9 ops, bug 2019-06-26 15:59:32 -07:00
Riccardo e3c5e7da8c Fix Misra 15_5 violations 2019-06-26 15:52:34 -07:00
Riccardo 52838e1c2a WIP 2019-06-26 14:47:06 -07:00
Willem Melching 03d1c8ab3e make dfu.py compatible with latest libusb1 2019-06-26 13:56:02 -07:00
rbiasini 73ae4f6acf
Misra 14.4: The controlling expression of an if statement and the controlling expression of an iteration‑statement shall have essentially Boolean type (#225)
* Fixed 14.4 Misra violations
2019-06-26 13:13:16 -07:00
Riccardo 8a45958dfe Misra 17.7: puts function should have void output 2019-06-26 13:05:31 -07:00
Riccardo 97a11115bb hardwired input param is now a boolean 2019-06-26 12:18:06 -07:00
George Hotz fd96c02215 disable SPI on the EON variant 2019-06-26 12:01:57 -07:00
George Hotz 0e67890ac7
Merge pull request #224 from commaai/misra_13_3
Fixed Misra 13.3: A full expression containing an increment (++) or d…
2019-06-26 11:51:50 -07:00
George Hotz 2d45e89c3d
Merge pull request #223 from commaai/misra_12_3
The comma operator should not be used
2019-06-26 11:51:13 -07:00
Riccardo c4311a7fee Wifi saturation test: allow 15 instead of 20 to avoid false positive failures 2019-06-24 20:11:32 -07:00
Riccardo e41b5a4c4f Fixed Misra 13.3: A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator 2019-06-24 19:23:53 -07:00
Riccardo 541f8beee3 Fix bad bug 2019-06-24 19:16:53 -07:00
Riccardo 6a9ae3b7c3 The comma operator should not be used 2019-06-24 18:12:23 -07:00
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