![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LIGHT2
Diff: CAN/function_CAN.cpp
- Revision:
- 99:7bbcb3c0fb06
- Parent:
- 94:44ae3b5a3bff
- Child:
- 101:50159049a518
diff -r cd1b2da4704f -r 7bbcb3c0fb06 CAN/function_CAN.cpp --- a/CAN/function_CAN.cpp Wed Aug 19 02:27:45 2020 +0000 +++ b/CAN/function_CAN.cpp Mon Sep 07 13:24:15 2020 +0000 @@ -23,6 +23,7 @@ extern DigitalOut LED; +extern float u_past[]; extern float x_past[]; extern float x_future[]; extern float f_past[]; @@ -741,6 +742,11 @@ ///////////////Make Data/////////////////// + for(int i=0; i<num_array_u_past-1;i++){ + u_past[i] = u_past[i+1]; + } + u_past[num_array_u_past-1] = output_normalized; + for(int i=0; i<num_array_x_past-1;i++){ x_past[i] = x_past[i+1]; }