aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-06-11 11:26:29 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-06-11 11:26:29 +0300
commit51d7c41cbbec95d2428a270b3f585011aa9babf3 (patch)
tree16ddd1c5e304d5f02a021a0bd3aeb2b482bfb6a7 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
parent9a8b53c838134dca38816aac28b119a14dae05bd (diff)
downloadTango-51d7c41cbbec95d2428a270b3f585011aa9babf3.tar.gz
Tango-51d7c41cbbec95d2428a270b3f585011aa9babf3.zip
Winder changes, Job stop on dancer extreme move
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index d27b4f94e..e2d492b47 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -17,6 +17,7 @@ HardwarePidControl MotorsControl[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};
+double DancerStopActivityLimit[MAX_THREAD_MOTORS_NUM] = {0};
InternalWinderConfigStruc InternalWinderCfg = {0};
HardwareDancer DancersCfg[MAX_SYSTEM_DANCERS] = {0};
@@ -100,7 +101,8 @@ uint32_t MotorPidRequestMessage(HardwarePidControl* request)
temp=(10*(temp-1)*DancersCfg[ThreadMotorIdToDancerId[Motor_i]].maximalmovementmm);
NormalizedErrorCoEfficient[Motor_i] = NormalizedErrorCoEfficient[Motor_i] / temp;
// uint32_t MotorSamples[MAX_THREAD_MOTORS_NUM][MAX_CONTROL_SAMPLES];
-
+ DancerStopActivityLimit[Motor_i] = ((1<<(DancersCfg[ThreadMotorIdToDancerId[Motor_i]].resolutionbits)*(DancersCfg[ThreadMotorIdToDancerId[Motor_i]].maximalmovementmm)*2));
+ DancerStopActivityLimit[Motor_i] = DancerStopActivityLimit[Motor_i]/(2*PI*DancersCfg[ThreadMotorIdToDancerId[Motor_i]].armlength);
return OK;
}
uint32_t DancerConfigMessage(HardwareDancer * request)