From 2a446dabc61d1f3139058c55c4bbac0bf43e9eac Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 12 Feb 2019 00:34:18 +0200 Subject: fix hw init, add motor goto in thread load, unify dummy control calls --- Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 3af29a043..cc9bb099f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -220,7 +220,7 @@ MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_LID].directionthreadwize, 200, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DH_LID], Thread_Load_HomingCallback,10000); CallbackCounter++; //MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 200, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); - MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 2, Thread_Load_HomingCallback,10000); + MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID, 2, Thread_Load_HomingCallback,4000); return OK; } uint32_t Thread_Load_Lift_Dancers(void) @@ -284,7 +284,7 @@ MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_LID,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_LID].directionthreadwize, 200, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DH_LID], Thread_Load_HomingCallback,10000); CallbackCounter++; // MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 200, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000); - MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 0, Thread_Load_HomingCallback,10000); + MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID, 0, Thread_Load_HomingCallback,4000); return OK; } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 76d4b090a..34387785c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -546,10 +546,6 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) return OK; } bool InitialProcess = false; -uint32_t ThreadEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue) -{ - return OK; -} //******************************************************************************************************************** uint32_t ThreadPrepareState(void *JobDetails) @@ -650,7 +646,7 @@ uint32_t ThreadEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue) ControlIdtoMotorId[Motor_i] = AddControlCallback(ThreadControlCBFunction, eOneMillisecond,Control_Read_Dancer_Position,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToDancerId[Motor_i],Motor_i); } // if (HW_Motor_Id == HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled -// AddControlCallback(ThreadSpeedControlCBFunction, eOneMillisecond,ThreadEmptyCBFunction,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],0); +// AddControlCallback(ThreadSpeedControlCBFunction, eOneMillisecond,TemplateDataReadCBFunction,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],0); if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled continue; } -- cgit v1.3.1 From a42f2ebe0053a912ac8c14fd05831b8fae8e0506 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 14 Feb 2019 11:02:28 +0200 Subject: version 1.3.7.1: cancel cone presence checks, load dancer middle point from file, tech board support for drier head, --- Software/Embedded_SW/Embedded/.cproject | 2 +- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/DataDef.h | 7 +- .../Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 19 -- .../Embedded_SW/Embedded/Drivers/Motors/Motor.h | 2 +- .../Embedded/Drivers/Motors/MotorActions.c | 7 +- Software/Embedded_SW/Embedded/Main.c | 11 +- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 59 +++--- .../Embedded_SW/Embedded/Modules/Control/control.h | 4 +- .../Modules/Diagnostics/DiagnosticActions.c | 1 + .../Embedded/Modules/Diagnostics/Diagnostics.c | 4 +- .../Modules/Diagnostics/DiagnosticsHoming.c | 26 ++- .../Embedded/Modules/General/GeneralHardware.c | 11 +- .../Embedded/Modules/Heaters/Heaters_print.c | 20 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 2 + .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 4 +- .../Embedded/Modules/Thread/ThreadLoad.c | 23 ++- .../Embedded/Modules/Thread/Thread_Winder.c | 5 +- .../StateMachines/Initialization/InitSequence.c | 207 +++++++++++++++++++++ .../StateMachines/Initialization/InitSequence.h | 16 ++ .../PMR/Messages/Debugging/DebugLogCategory.proto | 2 +- .../stubs/ProcessParametersBuild.cs | 45 +++++ 22 files changed, 390 insertions(+), 89 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c create mode 100644 Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.h create mode 100644 Software/Stubs Collection/stubs/ProcessParametersBuild.cs (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/.cproject b/Software/Embedded_SW/Embedded/.cproject index d1abfd6c1..7e5ec8096 100644 --- a/Software/Embedded_SW/Embedded/.cproject +++ b/Software/Embedded_SW/Embedded/.cproject @@ -14,7 +14,7 @@ - +