diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-07-28 13:24:28 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-07-28 13:24:28 +0300 |
| commit | 230ea9b597a2932f5d16572d94ee14c862d5b419 (patch) | |
| tree | 7e260db879dd815f5350e11a4a85ca04514237b7 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | 16cc209e80498a0b39c1ad57d4f36be906cbb313 (diff) | |
| parent | 30759321e22e22363eda9387e178b4d48b7d9088 (diff) | |
| download | Tango-230ea9b597a2932f5d16572d94ee14c862d5b419.tar.gz Tango-230ea9b597a2932f5d16572d94ee14c862d5b419.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 19 |
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; + } + } + } } } |
