![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
for learning
Diff: CAN/function_CAN.cpp
- Revision:
- 86:b8ed7abddeb2
- Parent:
- 85:a3b46118b5cd
- Child:
- 87:471334725012
diff -r a3b46118b5cd -r b8ed7abddeb2 CAN/function_CAN.cpp --- a/CAN/function_CAN.cpp Sun Jul 12 06:25:51 2020 +0000 +++ b/CAN/function_CAN.cpp Mon Jul 13 00:43:25 2020 +0000 @@ -746,10 +746,10 @@ } x_past[num_array_x_past-1] = pos.sen / ENC_PULSE_PER_POSITION; //mm - for(int i=0;i<num_array_x_future-1;i++){ - x_future[i] = x_future[i+1]; - } - x_future[num_array_x_future-1] = 31.25f; //N +// for(int i=0;i<num_array_x_future-1;i++){ +// x_future[i] = x_future[i+1]; +// } +// x_future[num_array_x_future-1] = pos.sen / ENC_PULSE_PER_POSITION; //mm for(int i=0; i<num_array_f_past-1;i++){ f_past[i] = f_past[i+1]; @@ -769,10 +769,10 @@ } input_NN[ind] = (pos.sen / ENC_PULSE_PER_POSITION) / 60.0f; ind = ind + 1; - for(int i=0;i<numfuture_x;i++){ - input_NN[ind] = x_future[2*i+2] / 60.0f; - ind = ind + 1; - } +// for(int i=0;i<numfuture_x;i++){ +// input_NN[ind] = x_future[2*i+2] / 60.0f; +// ind = ind + 1; +// } for(int i=0;i<numpast_f;i++){ input_NN[ind] = f_past[2*i] / 10000.0f + 0.5f;