Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: CAN/function_CAN.cpp
- Revision:
- 101:50159049a518
- Parent:
- 99:7bbcb3c0fb06
- Child:
- 117:7141c0517b82
diff -r ac788a23ab07 -r 50159049a518 CAN/function_CAN.cpp
--- a/CAN/function_CAN.cpp Tue Sep 08 01:14:04 2020 +0000
+++ b/CAN/function_CAN.cpp Tue Sep 08 06:50:02 2020 +0000
@@ -760,8 +760,8 @@
for(int i=0; i<num_array_f_past-1;i++){
f_past[i] = f_past[i+1];
}
- //f_past[num_array_f_past-1] = torq.sen; //N
- f_past[num_array_f_past-1] = torq.ref; //N //For add PI control
+ f_past[num_array_f_past-1] = torq.sen; //N
+ //f_past[num_array_f_past-1] = torq.ref; //N //For add PI control
f_future[0] = torq.sen; //N
for(int i=1;i<num_array_f_future-1;i++){
@@ -769,7 +769,13 @@
}
f_future[num_array_f_future-1] = torq.ref; //N
+
int ind = 0;
+ for(int i=0;i<numpast_u;i++){
+ input_NN[ind] = u_past[2*i];
+ ind = ind + 1;
+ }
+
for(int i=0;i<numpast_x;i++){
input_NN[ind] = x_past[2*i] / 60.0f;
ind = ind + 1;