aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-07-23 18:30:48 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-07-23 18:30:48 +0300
commit0f9ed0892d136072c1e5b82c14aa401e84a5ce4f (patch)
tree9955c95dd4a08d0e6c3023be0b8d022ee2bee480 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
parent35f8a81cbf2d0d8f946545f5d75ecc5053ae3f9d (diff)
downloadTango-0f9ed0892d136072c1e5b82c14aa401e84a5ce4f.tar.gz
Tango-0f9ed0892d136072c1e5b82c14aa401e84a5ce4f.zip
Version 1.4.2.5 store data in EEPROM, thread loading, IDS datat store, IDS prepare with reduced ink usage
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;
+ }
+ }
+
}
}
}