aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-08 09:44:28 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-08 09:44:28 +0300
commitc8807df7010acb129997cb7ca130e6b7928ce809 (patch)
tree49f3d9b16e1ecf3664081da761dbf49abef3a239 /Software/Embedded_SW/Embedded/Modules/Thread
parentc4a7508f4fb6e282204f8322ff4fc1b6645cc514 (diff)
downloadTango-c8807df7010acb129997cb7ca130e6b7928ce809.tar.gz
Tango-c8807df7010acb129997cb7ca130e6b7928ce809.zip
reports in dancer control
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c8
1 files changed, 8 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 6740d6304..cfff7773b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -286,7 +286,15 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue)
{
DancerId = ThreadMotorIdToDancerId[index];
if (ReadValue < 10)
+ {
+ REPORT_MSG(ReadValue, "Dancer value read too small.");
return OK;
+ }
+ if (ReadValue == 0x3FFF)
+ {
+ LOG_ERROR(index, "Dancer value invalid.");
+ return OK;
+ }
TranslatedReadValue = ReadValue - DancersCfg[DancerId].zeropoint;
if (index == POOLER_MOTOR)
{