aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-26 16:33:46 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-26 16:33:46 +0300
commit47ab5344d38f85eceeb7a80dbb64ef9ed5de974b (patch)
tree15562988afb5a6671e3572372b518142e4c4eff6 /Software/Embedded_SW/Embedded/Modules/Thread
parentec15b0db11cf4229ff216792ad9245f126bda660 (diff)
parent5b62ede4ce233b17205b54281130d19f846535b7 (diff)
downloadTango-47ab5344d38f85eceeb7a80dbb64ef9ed5de974b.tar.gz
Tango-47ab5344d38f85eceeb7a80dbb64ef9ed5de974b.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread.h7
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
index aea0dd93a..1f2da8dc0 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
@@ -17,6 +17,7 @@
#include "../control/pidalgo.h"
#include "thread_ex.h"
+#include "drivers/SSI_Comm/SSI_Comm.h"
#define NORMAL_COEF_DIVIDER 100
typedef struct
@@ -56,7 +57,13 @@ typedef struct
#define MAX_SYSTEM_DANCERS (HARDWARE_DANCER_TYPE__RightDancer+1)
extern TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM];
+
+#ifdef FOUR_WINDERS
+extern Dancers_4_Winders ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM];
+#else
extern HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM];
+#endif
+
extern HardwarePidControlType ThreadMotorIdToControlId[MAX_THREAD_MOTORS_NUM];
extern bool BreakSensorenabled;
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 98147f6b2..79832120b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -37,6 +37,8 @@
#include "Control/MillisecTask.h"
#include "drivers/Flash_ram/MCU_E2Prom.h"
+#include "drivers/SSI_Comm/SSI_Comm.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
@@ -45,7 +47,11 @@
double CurrentControlledSpeed[MAX_THREAD_MOTORS_NUM] = {0};
TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM] = {HARDWARE_MOTOR_TYPE__MOTO_RDRIVING,HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,HARDWARE_MOTOR_TYPE__MOTO_LDRIVING,HARDWARE_MOTOR_TYPE__MOTO_WINDER,HARDWARE_MOTOR_TYPE__MOTO_SCREW};
+#ifdef FOUR_WINDERS
+Dancers_4_Winders ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM] = {FEEDER_DANCER,NUM_OF_DANCERS,POOLER_DANCER,WINDER_DANCER,NUM_OF_DANCERS};
+#else
HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM] = {FEEDER_DANCER,NUM_OF_DANCERS,POOLER_DANCER,WINDER_DANCER,NUM_OF_DANCERS};
+#endif
uint32_t ControlIdtoMotorId [MAX_THREAD_MOTORS_NUM] = {0xFF,0xFF,0xFF,0xFF,0xFF};
uint32_t SpeedControlId=0xFF;
uint32_t PoolerSpeedControlId=0xFF;