aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-07-24 18:11:19 +0300
committerAvi Levkovich <avi@twine-s.com>2019-07-24 18:11:19 +0300
commit0e448553af26885f648b41fed4001bcbdab9fbee (patch)
treeb6c2b0ee89cc334f3d04e829f0ec551743e4cc88 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
parent33cebf98be02ede27ee22ca98ee21f3525bfd8b9 (diff)
parentfd81643e32328a0d548c7cebdba008050ae03673 (diff)
downloadTango-0e448553af26885f648b41fed4001bcbdab9fbee.tar.gz
Tango-0e448553af26885f648b41fed4001bcbdab9fbee.zip
merge conflict
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index eb1b751bb..528b83c1c 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -539,6 +539,25 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
}
BreakSensorCounter = 0;
}
+ if (CurrentControlledSpeed[index] < (OriginalMotorSpd_2PPS[index]/3))
+ {
+ BreakSensorCounter++;
+ BreakSensorLatchCounter++;
+ if (BreakSensorCounter>=BreakSensordebouncetimemilli)
+ {
+ //consider applying the debouce parameters later
+ usnprintf(TMessage, 60, "thread speed too low");
+ JobEndReason = JOB_THREAD_BREAK;
+ ThreadControlActive = false;
+ SendJobProgress(0.0,0,false, TMessage);
+ SendSegmentFail();
+ //AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true);
+ //EndState(CurrentJob,"ReadBreakSensor Error" );
+ LOG_ERROR(index, "thread speed too low Error");
+ return OK;
+ }
+ }
+
}
}
}