aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-12 18:50:24 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-12 18:50:24 +0200
commitfc1f93d66a43c5d304eeb32238cc186d14598c84 (patch)
tree39be58942d7100ba702faf043f75368824b51288 /Software/Embedded_SW/Embedded/Modules/Thread
parent32e58dfd83a96add18a89f40add3c3883d4ac004 (diff)
parenteee8a19447eaeb87fd38d11354a4adc29148963a (diff)
downloadTango-fc1f93d66a43c5d304eeb32238cc186d14598c84.tar.gz
Tango-fc1f93d66a43c5d304eeb32238cc186d14598c84.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 22f54eb50..3b17cd5dd 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -5,6 +5,7 @@
* operating the dispensers according to predefined dispensing rate from the UI
**************************************************************************************************************************/
#include "include.h"
+#include <DataDef.h>
#include "thread.h"
#include "thread_ex.h"
#include "../control/control.h"
@@ -315,13 +316,15 @@ uint32_t ThreadControlSpeedReadFunction(uint32_t IfIndex, uint32_t ReadValue)
}
//double eNormalizedError[100];
//int TranslatedreadValue[100];
-#define MAX_THREAD_CONTROL_LOG 500
-double calculatedError[MAX_THREAD_CONTROL_LOG];
-int MotorId[MAX_THREAD_CONTROL_LOG];
-int readValue[MAX_THREAD_CONTROL_LOG];
-int AveragereadValue[MAX_THREAD_CONTROL_LOG];
-int calculatedspeed[MAX_THREAD_CONTROL_LOG];
-int timestamp[MAX_THREAD_CONTROL_LOG];
+#define MAX_THREAD_CONTROL_LOG 300
+double calculatedError[MAX_THREAD_CONTROL_LOG+1];
+double NormError[MAX_THREAD_CONTROL_LOG+1];
+double Integral[MAX_THREAD_CONTROL_LOG+1];
+int MotorId[MAX_THREAD_CONTROL_LOG+1];
+int readValue[MAX_THREAD_CONTROL_LOG+1];
+int AveragereadValue[MAX_THREAD_CONTROL_LOG+1];
+int calculatedspeed[MAX_THREAD_CONTROL_LOG+1];
+int timestamp[MAX_THREAD_CONTROL_LOG+1];
int controlIndex = 0;
bool keepdata = true;
/*int32_t KeepReadValue = 0;
@@ -475,7 +478,9 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
readValue[controlIndex] = ReadValue;
AveragereadValue[controlIndex] = avreageSampleValue;
calculatedspeed[controlIndex] = calculated_speed;
- timestamp[controlIndex] = HibernateRTCSSGet();
+ timestamp[controlIndex] = msec_millisecondCounter;
+ NormError[controlIndex]= NormalizedError;
+ Integral[controlIndex] = MotorControlConfig[index].m_integral;
if (controlIndex++>=MAX_THREAD_CONTROL_LOG)
controlIndex = 0;
}