-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
16f16e1
commit f17c4c6
Showing
7 changed files
with
1,237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
/home/coventry/Documents/7166CEM/src/main.c:1:1: warning: system include math.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <math.h> | ||
^~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:2:1: warning: system include stdio.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <stdio.h> | ||
^~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:3:1: warning: system include stdlib.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <stdlib.h> | ||
^~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:4:1: warning: system include string.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <string.h> | ||
^~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:5:1: warning: system include unistd.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <unistd.h> | ||
^~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:7:1: warning: system include linux/can.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <linux/can.h> | ||
^~~~~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:8:1: warning: system include linux/can/raw.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include <linux/can/raw.h> | ||
^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:10:10: error: 'can_wrap.h' file not found [clang-diagnostic-error] | ||
#include "can_wrap.h" | ||
^~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:12:1: warning: system include signal.h not allowed [llvmlibc-restrict-system-libc-headers] | ||
#include "signal.h" | ||
^~~~~~~~~~~~~~~~~~~ | ||
/home/coventry/Documents/7166CEM/src/main.c:17:3: warning: if with identical then and else branches [bugprone-branch-clone] | ||
if (rpm.fl_wheel_speed > rpm.fr_wheel_speed) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:24:3: note: else branch starts here | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:30:3: warning: if with identical then and else branches [bugprone-branch-clone] | ||
if (rpm.rl_wheel_speed > rpm.rr_wheel_speed) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:37:3: note: else branch starts here | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:56:16: warning: variable 'Front_Req' is not initialized [cppcoreguidelines-init-variables] | ||
const float Front_Req = Initilize; | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:57:16: warning: variable 'Steer_Req' is not initialized [cppcoreguidelines-init-variables] | ||
const float Steer_Req = Initilize; | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:58:17: warning: variable 'Rear_req' is not initialized [cppcoreguidelines-init-variables] | ||
const float Rear_req = Initilize; | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:82:16: warning: variable 'Bat_Value' is not initialized [cppcoreguidelines-init-variables] | ||
const double Bat_Value = | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:95:6: warning: function 'RPM_Battery_LIMITER' has cognitive complexity of 68 (threshold 25) [readability-function-cognitive-complexity] | ||
void RPM_Battery_LIMITER() { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:98:3: note: +1, including nesting penalty of 0, nesting level increased to 1 | ||
if (Vol_value.voltage >= 2.8) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:100:5: note: +2, including nesting penalty of 1, nesting level increased to 2 | ||
if (Trq_Req.front_trq_request > 0) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:101:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM > 700) && (Trq_Req.front_trq_request > 50)) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:104:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 700) && (Max_Front_RPM > 600) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:108:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 600) && (Max_Front_RPM > 500) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:113:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 500) && (Max_Front_RPM > 400) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:117:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 400) && (Max_Front_RPM > 300) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:124:5: note: +1, nesting level increased to 2 | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:126:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM > 700) && (abs(Trq_Req.front_trq_request) > 50)) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:129:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 700) && (Max_Front_RPM > 600) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:133:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 600) && (Max_Front_RPM > 500) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:138:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 500) && (Max_Front_RPM > 400) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:142:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Front_RPM <= 400) && (Max_Front_RPM > 300) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:150:5: note: +2, including nesting penalty of 1, nesting level increased to 2 | ||
if (Trq_Req.rear_trq_request > 0) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:151:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM > 700) && (Trq_Req.rear_trq_request > 50)) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:154:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 700) && (Max_Rear_RPM > 600) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:158:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 600) && (Max_Rear_RPM > 500) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:163:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 500) && (Max_Rear_RPM > 400) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:167:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 400) && (Max_Rear_RPM > 300) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:174:5: note: +1, nesting level increased to 2 | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:176:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM > 700) && (abs(Trq_Req.rear_trq_request) > 50)) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:179:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 700) && (Max_Rear_RPM > 600) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:183:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 600) && (Max_Rear_RPM > 500) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:188:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 500) && (Max_Rear_RPM > 400) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:192:7: note: +3, including nesting penalty of 2, nesting level increased to 3 | ||
if ((Max_Rear_RPM <= 400) && (Max_Rear_RPM > 300) && | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:197:5: note: +1, nesting level increased to 1 | ||
} else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:100:5: warning: if with identical then and else branches [bugprone-branch-clone] | ||
if (Trq_Req.front_trq_request > 0) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:124:5: note: else branch starts here | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:150:5: warning: if with identical then and else branches [bugprone-branch-clone] | ||
if (Trq_Req.rear_trq_request > 0) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:174:5: note: else branch starts here | ||
else { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:210:16: warning: variable 'Front_Motor' is not initialized [cppcoreguidelines-init-variables] | ||
const double Front_Motor = | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:215:16: warning: variable 'Rear_Motor' is not initialized [cppcoreguidelines-init-variables] | ||
const double Rear_Motor = | ||
^ | ||
= NAN | ||
/home/coventry/Documents/7166CEM/src/main.c:226:13: warning: variable 'canSocket' is not initialized [cppcoreguidelines-init-variables] | ||
const int canSocket = can_connect(canChannel, false); | ||
^ | ||
= 0 | ||
/home/coventry/Documents/7166CEM/src/main.c:241:3: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops] | ||
for (int i = 0; i < frame0.can_dlc; ++i) | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:241:43: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] | ||
for (int i = 0; i < frame0.can_dlc; ++i) | ||
^ | ||
{ | ||
/home/coventry/Documents/7166CEM/src/main.c:245:38: warning: statement should be inside braces [google-readability-braces-around-statements,hicpp-braces-around-statements,readability-braces-around-statements] | ||
if (!can_write(canSocket, &frame0)) | ||
^ | ||
{ | ||
/home/coventry/Documents/7166CEM/src/main.c:247:3: warning: function is not thread safe [concurrency-mt-unsafe] | ||
sleep(1); | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:272:14: warning: parameter 'argc' is unused [misc-unused-parameters] | ||
int main(int argc, char *argv[]) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:272:26: warning: parameter 'argv' is unused [misc-unused-parameters] | ||
int main(int argc, char *argv[]) { | ||
^ | ||
/home/coventry/Documents/7166CEM/src/main.c:275:13: warning: variable 'canSocket' is not initialized [cppcoreguidelines-init-variables] | ||
const int canSocket = can_connect(canChannel, false); | ||
^ | ||
= 0 |