aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread.h13
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c18
2 files changed, 17 insertions, 14 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
index f0dd35da9..f568f9816 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h
@@ -45,7 +45,18 @@ typedef struct
int32_t pulsepermmspring;
int id; //HardwareDancerType
}DancerConfigStruc;
-#define MAX_THREAD_MOTORS_NUM HARDWARE_MOTOR_TYPE__WinderMotor +1
+
+typedef enum threadMotorsEnum
+{
+ FEEDER_MOTOR,
+ DRYER_MOTOR,
+ POOLER_MOTOR,
+ WINDER_MOTOR,
+ SCREW_MOTOR,
+ MAX_THREAD_MOTORS_NUM
+}threadMotorsEnum;
+
+extern uint32_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM];
extern MotorConfigStruc MotorsCfg[MAX_THREAD_MOTORS_NUM];
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 44e5c8936..89ff63363 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -26,6 +26,9 @@ typedef enum
Stop
} ReturnCode;
+
+uint32_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM] = {MOTOR_RDRIVING,MOTOR_DRYER_DRIVING,MOTOR_LDRIVING,MOTOR_WINDER,MOTOR_SCREW};
+
/********************************************************************************************
* functions describes motor operation flow and movement state during profile execution
* used to operate in runtime correct profileflow execution
@@ -282,20 +285,9 @@ bool ThreadPrintingIterate(void *JobDetails)
// screw_movement[gPrintingState[_motorId]]++;
ReturnCode returnCode = state_fun(JobDetails);
- /*if ((_motorId == SCREW_MOTOR)&&(pause_active))
- {
- tick = UsersysTickGet();
- len = usnprintf(str, 60, "\r\n PrintingIterate tick %d state %d retcode %d ",tick, gPrintingState[_motorId],returnCode);
- cb_push_back (str, len);
- //SendInterruptMessageToHost(10+gPrintingState[_motorId],returnCode);
- }*/
gPrintingState = LookupTransitions(gPrintingState, returnCode);
- if (keepstate != gPrintingState){
- tick = UsersysTickGet();
- len = usnprintf(str, 60, "\r\n changed state tick %d state %d retcode %d ", tick, gPrintingState,returnCode);
- cb_push_back (str, len);
-
- }
+// if (keepstate != gPrintingState){
+// }
//
// Enable all interrupts.