aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-08-07 10:36:45 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-08-07 10:36:45 +0300
commit2ad0535760d78d0aaf2fe555a63c1fea86bf2710 (patch)
treed3f8335d40c1d0adcb31d1aa2b621e7e8ce6cf9d /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
parent8c9dcb78af71f508c6ac70e0ca602727a5325b90 (diff)
parentd3aab2244dc51f3f8f8e0dea2d1514f79ff3b95c (diff)
downloadTango-2ad0535760d78d0aaf2fe555a63c1fea86bf2710.tar.gz
Tango-2ad0535760d78d0aaf2fe555a63c1fea86bf2710.zip
remote
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
index c5f45da78..1b960dada 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c
@@ -7,6 +7,7 @@
#include "PMR/Hardware/HardwareMotor.pb-c.h"
#include "PMR/Hardware/HardwareDancer.pb-c.h"
#include "PMR/Hardware/HardwareWinder.pb-c.h"
+#include "PMR/Hardware/HardwareBreakSensor.pb-c.h"
#include "PMR/Printing/JobSpool.pb-c.h"
#include "PMR/common/MessageContainer.pb-c.h"
@@ -20,6 +21,9 @@ double NormalizedErrorCoEfficient[MAX_THREAD_MOTORS_NUM] = {0};
int DancerStopActivityLimit[MAX_THREAD_MOTORS_NUM] = {0};
HardwareDancer DancersCfg[MAX_SYSTEM_DANCERS] = {0};
+bool BreakSensorenabled;
+int32_t BreakSensordebouncetimemilli;
+
HardwarePidControlType ThreadMotorIdToControlId[MAX_THREAD_MOTORS_NUM] = {HARDWARE_PID_CONTROL_TYPE__MotorFeeder,HARDWARE_PID_CONTROL_TYPE__MotorDryer,HARDWARE_PID_CONTROL_TYPE__MotorPooler,HARDWARE_PID_CONTROL_TYPE__MotorWinder,0};
//********************************************************************************************************************
@@ -96,7 +100,14 @@ uint32_t DancerConfigMessage(HardwareDancer * request)
return Dancer_i;
}
+uint32_t ThreadConfigBreakSensor(void *request)
+{
+ HardwareBreakSensor *SensorCfg = (HardwareBreakSensor*)request;
+ BreakSensorenabled = SensorCfg->enabled;
+ BreakSensordebouncetimemilli = SensorCfg->debouncetimemilli;
+ return OK;
+}
uint32_t thread_init(void)
{
//memset (MotorsCfg,0,sizeof(MotorsCfg));