diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-18 08:03:17 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-18 08:03:17 +0300 |
| commit | 4b0ca04d68b04507cd0947444936509bda3cb8c8 (patch) | |
| tree | ae9c5d19aa05bf20b1682dbc1ac3441fa2721c67 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | e96d9f083aa58b24d2e64cbbec47e638d0ce84a0 (diff) | |
| parent | 97150bf5a7f5844d9da47523e3136ce87c305ba0 (diff) | |
| download | Tango-4b0ca04d68b04507cd0947444936509bda3cb8c8.tar.gz Tango-4b0ca04d68b04507cd0947444936509bda3cb8c8.zip | |
merge
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); |
