diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
3 files changed, 11 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 7690b131f..0bda4964b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -15,6 +15,7 @@ #include "drivers/Motors/Motor.h" #include "drivers/Danser_SSI/ssi_comm.h" +#include "thread_ex.h" typedef struct { @@ -37,6 +38,7 @@ typedef enum threadMotorsEnum SCREW_MOTOR, MAX_THREAD_MOTORS_NUM }threadMotorsEnum; + #define MAX_THREAD_FEED_MOTORS WINDER_MOTOR+1 #define MAX_SYSTEM_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 5f49c7d10..3fb78d2f0 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -1,6 +1,15 @@ #ifndef MODULES_THREAD_THREAD_EX_H_ #define MODULES_THREAD_THREAD_EX_H_ + +typedef enum +{ + WINDER_DANCER, + POOLER_DANCER, + FEEDER_DANCER, + NUM_OF_DANCERS +} DANCER_ENUM; + uint32_t ThreadPrepareState(void *JobDetails); uint32_t ThreadPreSegmentState(void *JobDetails); uint32_t ThreadSegmentState(void *JobDetails, int SegmentId); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 0e68a6406..434ac0f21 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -216,7 +216,6 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) avreageSampleValue += MotorSamples[index][i]; avreageSampleValue = avreageSampleValue / MotorsControl[index].pvinputfilterfactormode; NormalizedError = avreageSampleValue*NormalizedErrorCoEfficient[index]; -if (index != 0) return OK; MotorControlConfig[index].m_mesuredParam = NormalizedError; MotorControlConfig[index].m_calculatedError = PIDAlgorithmCalculation((float)MotorControlConfig[index].m_SetParam , (float)MotorControlConfig[index].m_mesuredParam, &MotorControlConfig[index].m_params, &MotorControlConfig[index].m_preError, &MotorControlConfig[index].m_integral); |
