diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-07-18 17:52:17 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-07-18 17:52:17 +0300 |
| commit | e0d570b8994b5d8ac3733075df9aa4d25e723131 (patch) | |
| tree | 261ebcd32f07ec43cf29030036c077258d8c03a7 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | e0c19a620f338848b130ad6d2bd0ce8d5a52ca93 (diff) | |
| parent | df566bfe8b0f5ab0978dc3fa600052cd300fc577 (diff) | |
| download | Tango-e0d570b8994b5d8ac3733075df9aa4d25e723131.tar.gz Tango-e0d570b8994b5d8ac3733075df9aa4d25e723131.zip | |
merge build date
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 5bf666383..ad3c731cb 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -184,6 +184,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) if (MotorDataIndex == 99) MotorDataIndex = 0; static int pooler_counter = 0; pooler_counter++; + TotalProcessedLength+= (length/100); if (pooler_counter%10 == 0) { if (PrepareState == true) @@ -195,8 +196,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) } else { - TotalProcessedLength+= (length/100); - SendJobProgress(TotalProcessedLength,0,false, "Progress"); + SendJobProgress(TotalProcessedLength,0,false, NULL); } } @@ -352,12 +352,25 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) for (i=0;i<MotorsControl[index].pvinputfilterfactormode;i++) avreageSampleValue += MotorSamples[index][i]; avreageSampleValue = avreageSampleValue / MotorsControl[index].pvinputfilterfactormode; + /* + if (index == POOLER_MOTOR) + { + if (JobCounter > eOneSecond) + { + if (ReadBreakSensor()==ERROR) + { + LOG_ERROR(index, "ReadBreakSensor Error"); + //SendJobProgress(0.0,0,false, "ReadBreakSensor Error"); + //EndState(CurrentJob,"ReadBreakSensor Error" ); + } + } + } + */ //Stop Execution if the dancer moves too much - if ((abs(avreageSampleValue)> DancerStopActivityLimit[index])&&(JobCounter > eOneSecond)) { - usnprintf(Message, 60, "Dancer %d limit %d value %d Zero %d",DancerId,DancerStopActivityLimit[index],avreageSampleValue,DancersCfg[DancerId].zeropoint); - + usnprintf(Message, 60, "Dancer %d limit %d value %d Zero %d",DancerId,DancerStopActivityLimit[index],avreageSampleValue,DancersCfg[DancerId].zeropoint); + JobAbortedByUser = true; EndState(CurrentJob,Message ); } NormalizedError = avreageSampleValue*NormalizedErrorCoEfficient[index]; |
