aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-18 08:03:17 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-18 08:03:17 +0300
commit4b0ca04d68b04507cd0947444936509bda3cb8c8 (patch)
treeae9c5d19aa05bf20b1682dbc1ac3441fa2721c67 /Software/Embedded_SW/Embedded/Modules/Thread
parente96d9f083aa58b24d2e64cbbec47e638d0ce84a0 (diff)
parent97150bf5a7f5844d9da47523e3136ce87c305ba0 (diff)
downloadTango-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.c15
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);