diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-17 16:49:50 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-17 16:49:50 +0300 |
| commit | 8d9c3c149cfc89178859bf0a36a14d5e851be96f (patch) | |
| tree | 5bedd6ca49bb232da8880f4edf0fe0e493af9ff6 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | f4aad3bc7f9d4c457805a233f969938ef341b22c (diff) | |
| download | Tango-8d9c3c149cfc89178859bf0a36a14d5e851be96f.tar.gz Tango-8d9c3c149cfc89178859bf0a36a14d5e851be96f.zip | |
fix length calculation. read break sensor and log error
change communication tasks priorities
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 15 |
1 files changed, 13 insertions, 2 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..6a0bac394 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,7 +196,6 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) } else { - TotalProcessedLength+= (length/100); SendJobProgress(TotalProcessedLength,0,false, "Progress"); } @@ -353,7 +353,18 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) avreageSampleValue += MotorSamples[index][i]; avreageSampleValue = avreageSampleValue / MotorsControl[index].pvinputfilterfactormode; //Stop Execution if the dancer moves too much - + 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" ); + } + } + } 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); |
