aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-27 15:16:39 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-27 15:16:39 +0200
commit84d06b05bb02a35bde4507832ad850ac3183dfe6 (patch)
tree3ca88b66495848f90821616a082f700e9132a273 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
parentaa41735a62ec39e33c7cbed34dc2f0d1c80910d6 (diff)
downloadTango-84d06b05bb02a35bde4507832ad850ac3183dfe6.tar.gz
Tango-84d06b05bb02a35bde4507832ad850ac3183dfe6.zip
Version 1.3.8.12 printing function calls with segments info. ids - no valves. improved winding. dispensers pressure build on startup. try not to touch valves during job
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index c277dd5df..4454565c1 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -22,6 +22,9 @@
MotorDriverConfigStruc MotorsCfg[NUM_OF_MOTORS]={0};
HardwarePidControl MotorsControl[MAX_THREAD_MOTORS_NUM] = {0};
+int32_t MotorSpeedSamples[MAX_THREAD_MOTORS_NUM][MAX_CONTROL_SAMPLES] = {0};
+int MotorSpeedSamplePointer[MAX_THREAD_MOTORS_NUM] = {0};
+
int32_t MotorSamples[MAX_THREAD_MOTORS_NUM][MAX_CONTROL_SAMPLES] = {0};
int MotorSamplePointer[MAX_THREAD_MOTORS_NUM] = {0};
double NormalizedErrorCoEfficient[MAX_THREAD_MOTORS_NUM] = {0};
@@ -104,7 +107,10 @@ uint32_t MotorPidRequestMessage(HardwarePidControl* request)
MotorsControl[Motor_i].pvinputfilterfactormode = 10; //test longer control
#endif
for (i = 0;i < MotorsControl[Motor_i].pvinputfilterfactormode; i++)
+ {
MotorSamples[Motor_i][i] = 0; //reset the samples value for control beginning
+ MotorSpeedSamples[Motor_i][i] = 0;
+ }
NormalizedErrorCoEfficient[Motor_i] = (2*PI*DancersCfg[ThreadMotorIdToDancerId[Motor_i]].armlength);
temp = 1<<(DancersCfg[ThreadMotorIdToDancerId[Motor_i]].resolutionbits);
temp=(10*(temp-1)*DancersCfg[ThreadMotorIdToDancerId[Motor_i]].maximalmovementmm);