diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-03-19 12:08:17 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-03-19 12:08:17 +0200 |
| commit | cc4129c557405accb3ced68f7b6cb19dbdb87a24 (patch) | |
| tree | f86827ef77a6ef6733805f8190bd961934543e5c /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 9d04bbb2b4a2eb2eb14cc813103c856b7bde975a (diff) | |
| download | Tango-cc4129c557405accb3ced68f7b6cb19dbdb87a24.tar.gz Tango-cc4129c557405accb3ced68f7b6cb19dbdb87a24.zip | |
Driver structures and prototypes
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread.h | 8 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 10 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 475f63795..f0dd35da9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -1,3 +1,7 @@ + +#ifndef MODULES_THREAD_THREAD_H_ +#define MODULES_THREAD_THREAD_H_ + #include "PMR/common/MessageContainer.pb-c.h" #include "PMR/Hardware/HardwareMotor.pb-c.h" #include "PMR/Hardware/HardwareMotorType.pb-c.h" @@ -53,3 +57,7 @@ uint32_t MotorsConfigMessage(HardwareMotor * request); uint32_t InternalWindingConfigMessage(JobSpool* request); uint32_t DancerConfigMessage(HardwareDancer * request); + + +#endif //MODULES_THREAD_THREAD_H_ + diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 13c81fb39..44e5c8936 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -10,6 +10,9 @@ #include "../control/pidalgo.h" #include "PMR/Hardware/HardwareMotor.pb-c.h" #include "PMR/Hardware/HardwareMotorType.pb-c.h" +#include "drivers/Motors/Motor.h" +#include "drivers/Heater/TemperatureSensor.h" +#include "drivers/Heater/Heater.h" ////////////////////////////////State machine operation//////////////////////////////////// //the state machine operation is used to operate in runtime correct profile flow execution //by recieved esign flow of the user from the UI @@ -186,8 +189,9 @@ static ReturnCode PrepareState(void *JobDetails) MotorControlConfig[Motor_i].m_mesuredParam = 0; MotorControlConfig[Motor_i].m_preError = 0; MotorControlConfig[Motor_i].m_SetParam = 0;//need to update SetParams on presegment stage - AddControlCallback(DeviceId2Motor[Motor_i], ThreadControlCBFunction, eOneMillisecond,TemplateDataReadCBFunction,Motor_i); + AddControlCallback(ThreadControlCBFunction, eOneMillisecond,TemplateDataReadCBFunction,Motor_i,0); } + //set 3 dancers to the profile positions return NextState; } @@ -196,10 +200,10 @@ static ReturnCode PrepareState(void *JobDetails) static ReturnCode PreSegmentState(void *JobDetails) { - int Motor_i; + TimerMotors_t Motor_i; for (Motor_i = 0;Motor_i < MAX_THREAD_MOTORS_NUM;Motor_i++) { - MotorControlConfig[Motor_i].m_SetParam = getMotorFreq(Motor_i);//need to update SetParams on presegment stage + MotorControlConfig[Motor_i].m_SetParam = MotorGetSpeed(getMotorId(Motor_i));//need to update SetParams on presegment stage } // set the new speed in the dryer motor to the speed of the new segment // activate control fr all motors |
