aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-06-13 09:45:52 +0300
committerAvi Levkovich <avi@twine-s.com>2018-06-13 09:45:52 +0300
commit0d5c2e03b1f0e06cd307eaa2d5b7eaab894126d5 (patch)
tree19119cd31ed779383beafbd12c32424baf5c1f3b /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
parent2d900a86cae2027dc43d73e92da889d6e1aa3f7b (diff)
downloadTango-0d5c2e03b1f0e06cd307eaa2d5b7eaab894126d5.tar.gz
Tango-0d5c2e03b1f0e06cd307eaa2d5b7eaab894126d5.zip
update I2C
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, 2 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index e2d492b47..0e276fe92 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -17,7 +17,6 @@ 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};
@@ -98,11 +97,10 @@ uint32_t MotorPidRequestMessage(HardwarePidControl* request)
MotorSamples[Motor_i][i] = 0; //reset the samples value for control beginning
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);
+ temp=(100*(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)