diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-25 10:08:01 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-25 10:08:01 +0300 |
| commit | 338edba081dba2a2aefb634811be1cc84ec93d64 (patch) | |
| tree | 0021538796c254a8eab8527e8461a2e831e68c1c /Software/Embedded_SW/Embedded/Drivers | |
| parent | 49ddda1cc22d6cbb72f499b37e5db32c95252dfa (diff) | |
| download | Tango-338edba081dba2a2aefb634811be1cc84ec93d64.tar.gz Tango-338edba081dba2a2aefb634811be1cc84ec93d64.zip | |
merge
Diffstat (limited to 'Software/Embedded_SW/Embedded/Drivers')
15 files changed, 78 insertions, 33 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c index 1528473a1..f8e8d7b9e 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c @@ -11,7 +11,6 @@ #include <DataDef.h> #include "modules/control/millisecTask.h" #include "modules/thread/thread.h" -#include "delay.h" #include "FPGA_GPIO.h" #include "drivers/FPGA/FPGA.h" #include "StateMachines/Printing/PrintingSTM.h" @@ -19,6 +18,7 @@ #include "Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h" #include <Drivers/I2C_Communication/I2C_Task.h> +#include <Utilities/delay.h> FPGA_GPI FPGA_Gpi; @@ -434,6 +434,12 @@ bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch) case GPI_LS_LSPARE2: LM_Status = LS_Left.bits.F1_LS_LSPARE2; break; + case GPI_LS_SPARE2_2: + LM_Status = LS_Spare.bits.F3_LS_SPARE2_2; + break; + case GPI_LS_SPARE1_2: + LM_Status = LS_Spare.bits.F3_LS_SPARE1_2; + break; case I2C_HEADCARD_COVER_LS_FRONT: case I2C_HEADCARD_ARC_LS_ACTUATOR: LM_Status = !(Head_I2C_EXP4_0x46.bits.INPUT_LS_FRONT_ARC_ACT); @@ -537,9 +543,10 @@ uint32_t MagnetCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) if(Head_Type == HEAD_TYPE_FLAT) Trigger_Head_Magnet(DISABLE_MAGNET); //HeadCard_HeadMagnet_Disable(); +#ifndef FOUR_WINDERS else MotorStop(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,Hard_Hiz ); - +#endif if (SafeRemoveControlCallback(MagnetControlId, MagnetCallBackFunction )==OK) MagnetControlId = 0xFF; else @@ -563,6 +570,7 @@ uint32_t ActivateHeadMagnet() F2_CTRL = F2_CTRL_Reg.ushort; #endif } +#ifndef FOUR_WINDERS if (isMotorConfigured(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM)) { if (MotorDriverResponse[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM].DriverType == CombinrdMotDriver) @@ -570,6 +578,7 @@ uint32_t ActivateHeadMagnet() else MotorGoTo(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,DH_LID_CLOSE ); } +#endif MagnetControlId = AddControlCallback(NULL, MagnetCallBackFunction, 2* eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); return OK; } @@ -597,6 +606,7 @@ uint32_t DeActivateHeadMagnet() #endif } Report("DeActivateHeadMagnet - open the lid magnet",__FILE__,__LINE__,(int)HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,RpWarning,(int)DH_LID_CLOSE,0); +#ifndef FOUR_WINDERS if (isMotorConfigured(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM)) { if (MotorDriverResponse[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM].DriverType == CombinrdMotDriver) @@ -605,6 +615,7 @@ uint32_t DeActivateHeadMagnet() MotorGoTo(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM,DH_LID_OPEN ); //MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RLOADARM, DH_LID_OPEN, Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_RLOADARM], NULL,1000); } +#endif //MagnetControlId = AddControlCallback(NULL, MagnetCallBackFunction, 2* eOneSecond, TemplateDataReadCBFunction,0,0, 0 ); Task_sleep(500); return OK; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h index a7999ea2e..e707a9b39 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h @@ -158,6 +158,11 @@ typedef enum GPI_EXTWINDER_Direct_BIT13, //125 GPI_EXTWINDER_Direct_BIT14, //126 GPI_EXTWINDER_Direct_BIT15, //127 + + //LS_Spare + GPI_LS_SPARE2_2, //128 + GPI_LS_SPARE1_2, //129 + //------------------------------- I2C_HEADCARD_COVER_LS_FRONT, I2C_HEADCARD_COVER_LS_REAR, diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/hardware.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/hardware.c index 2e3b3c3ff..549a41477 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/hardware.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/hardware.c @@ -29,13 +29,12 @@ #include <stdio.h> #include <stdint.h> #include <string.h> +#include <Utilities/delay.h> #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "Drivers/FPGA/Full_Vme/FPGA_Programming_Up.h" -#include "delay.h" - #include "vmopcode.h" #include "Drivers/FPGA/Full_vme/FPGA_Programming_Up.h" diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c index 2d2de930b..5bac56231 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c @@ -291,7 +291,7 @@ double Calc_Calibration_MidTank_Liquid(uint32_t VsampleInBits, MidTank_t MidTan } //LOG_ERROR (MidTank_ID,"Wrong MidTank Calibration parameters"); #ifndef DISPESER_TEST - Report("Wrong MidTank Calibration parameters",__FILE__,MidTank_ID,(int)(Initial_Offset_A[MidTank_ID]*100),RpMessage,(int)(Slope_B[MidTank_ID]*100),0); + //Report("Wrong MidTank Calibration parameters",__FILE__,MidTank_ID,(int)(Initial_Offset_A[MidTank_ID]*100),RpMessage,(int)(Slope_B[MidTank_ID]*100),0); #endif } else @@ -483,7 +483,7 @@ uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-5 if (Heater_ID>=NUM_OF_CURRENT_HEATERS) return ERROR; - #warning need to change the hardware://there is overflow in Dyer Head zone 4 with resistor 0.05 + //#warning need to change the hardware://there is overflow in Dyer Head zone 4 with resistor 0.05 const double Resistor[NUM_OF_CURRENT_HEATERS] = {0.025, 0.025, 0.025, 0.025, 0.020, 0.025}; if (Heaters_Current_Read_Enable[Heater_ID] == false) diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c index d9f5385f6..9023f8250 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c @@ -106,8 +106,8 @@ uint32_t Dispenser_EEPROM_Read_Data(uint8_t Dispenser_ID)//0..7 uint32_t test_disp_eeprom(uint8_t Dispenser_ID , uint8_t EEprom_Add)//0..7 { uint32_t status= OK; - uint32_t i; -/* +/* uint32_t i; + Dispenser_struct[Dispenser_ID].Write_Disp_EEPROM.bytes.Dispebser_Data.SN = 0x12345678; Dispenser_struct[Dispenser_ID].Write_Disp_EEPROM.bytes.Nl_Pulse_Value = 0xAB; Dispenser_struct[Dispenser_ID].Write_Disp_EEPROM.bytes.Flow_Pass_Fail = 0xCD; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 45da809af..445d835c5 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -9,11 +9,11 @@ #include <stdbool.h> #include <stdint.h> -#include <delay.h> #include <DataDef.h> #include <Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h> #include <Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h> #include <Drivers/I2C_Communication/I2C.h> +#include <Utilities/delay.h> //TCA9534Regs* Disp_IO_Reg; TCA9534Regs Regs; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.c index 6d34f391d..33d888b14 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.c @@ -770,7 +770,7 @@ bool isActuatorOnLowestLocation(void) // Give indication if the actuator stopped uint32_t HeadCard_Actuators_Relocate_callback(uint32_t IfIndex, uint32_t BusyFlag) // use IfIndex for Act_ID { count_time++; - ReportWithPackageFilter(ThreadFilter,"actuators relocation",__FILE__,msec_millisecondCounter,ActuatorLocating,RpMessage,count_time,0); + //ReportWithPackageFilter(ThreadFilter,"actuators relocation",__FILE__,msec_millisecondCounter,ActuatorLocating,RpMessage,count_time,0); switch (ActuatorLocating) { case ActuatorIdle: diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.c index 9be6a90b9..4057b4912 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.c @@ -10,12 +10,12 @@ #include <stdbool.h> #include <string.h> //memset #include <DataDef.h> -#include "delay.h" #include "driverlib/sysctl.h" #include "driverlib/i2c.h" #include <Drivers/I2C_Communication/I2C.h> #include "drivers/FPGA/FPGA_Comm.h" #include <Drivers/I2C_Communication/RFID_NFC/PN7150/PN7150.h> +#include <Utilities/delay.h> #include "I2C_IFS_Mux.h" #include "NFC_MainBaord.h" #include "Modules/Control/Control.h" diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c index 8da522961..a1139591d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC.c @@ -10,12 +10,12 @@ #include <string.h> //memset #include <DataDef.h> #include "datadef.h" -#include "delay.h" #include "drivers/I2C_Communication/I2C.h" #include "drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.h" #include "drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.h" #include <Drivers/I2C_Communication/RFID_NFC/NFC_MainBaord.h> #include <Drivers/I2C_Communication/RFID_NFC/NFC.h> +#include <Utilities/delay.h> RFID_TAG_State_Machine TagStage = Tag_Idle; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC_MainBaord.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC_MainBaord.c index bc8ef08e0..74b00f4ad 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC_MainBaord.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/NFC_MainBaord.c @@ -14,7 +14,6 @@ #include "driverlib/sysctl.h" #include <Drivers/I2C_Communication/I2C.h> #include "drivers/FPGA/FPGA_Comm.h" -#include "delay.h" #include <Drivers/I2C_Communication/RFID_NFC/PN7150/PN7150.h> #include <Drivers/I2C_Communication/RFID_NFC/Test_RFID.h> #include "drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.h" @@ -22,6 +21,7 @@ #include "Drivers/I2C_Communication/RFID_NFC/NFC.h" #include "driverlib/i2c.h" #include <Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_NFC.h> +#include <Utilities/delay.h> //#include <Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_NFC.h> //#include <Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_NFC_Settings.h> //#include <Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.h> diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c index 3e5ed6ab5..6c2d54111 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.c @@ -267,8 +267,6 @@ bool WHS_PT100_Read(TEMPERATURE_SENSOR_ID_ENUM SensorId) break; } - #warning what to do with the data ??????? //- see TempSensorResponse[SensorId].Temperature_C_mult_by_100 - return Status; } diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c index b974e4c5b..764ef0d44 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c @@ -465,7 +465,7 @@ bool WHS_Set_Blower_Control_Closed_Loop(double Q_value) close_loop_time = 15; if (midtank_cleared < NUM_OF_MIDTANKS) { -#warning open waiting midtank both valves for 15 seconds +//#warning open waiting midtank both valves for 15 seconds Valve_Set(IDS_Id_to_AirValve[midtank_cleared], Atm_MidTank_ON ); //Atm_MidTank_OFF/ON Valve_Set(IDS_Id_to_CartrideValve[midtank_cleared], Atm_MidTank_ON ); //Atm_MidTank_OFF/ON } @@ -475,7 +475,7 @@ bool WHS_Set_Blower_Control_Closed_Loop(double Q_value) { if (midtank_cleared < NUM_OF_MIDTANKS) { -#warning close waiting midtank both valves for 15 seconds +//#warning close waiting midtank both valves for 15 seconds Valve_Set(IDS_Id_to_AirValve[midtank_cleared], Atm_MidTank_OFF ); //Atm_MidTank_OFF/ON Valve_Set(IDS_Id_to_CartrideValve[midtank_cleared], Atm_MidTank_OFF ); //Atm_MidTank_OFF/ON midtank_cleared = NUM_OF_MIDTANKS; @@ -613,7 +613,7 @@ char whs_str[150]; uint32_t WHS_Pid_Testing_Func(double setParam,double measuredParam) { float calculated_speed; - float avreageSampleValue = 0; + //float avreageSampleValue = 0; int i; /*WhsBlowerSamples[WhsBlowerSamplesPointer] = measuredParam;//(-1 * TranslatedReadValue); @@ -634,9 +634,9 @@ uint32_t WHS_Pid_Testing_Func(double setParam,double measuredParam) calculated_speed = volt + 100; if (calculated_speed < (volt - 100)) calculated_speed = volt - 100;*/ - usnprintf(whs_str, 150, "WHS_Pid_Testing_Func meas %d avg %d set %d error %d integral %d blower %d", +/* usnprintf(whs_str, 150, "WHS_Pid_Testing_Func meas %d avg %d set %d error %d integral %d blower %d", (int)(measuredParam*100),(int)(avreageSampleValue*100),(int)(setParam*100),(int)(WHS_ControlData.m_calculatedError*100),(int)(WHS_ControlData.m_integral*100),(int)(calculated_speed)); - Report(whs_str, __FILE__,__LINE__, (int)(calculated_speed), RpMessage, (int)(volt), 0); + Report(whs_str, __FILE__,__LINE__, (int)(calculated_speed), RpMessage, (int)(volt), 0);*/ /*if (fabs(WHS_ControlData.m_calculatedError)>(WHS_ControlData.m_params.MAX/2)) { close_loop_time = 1; diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c index 419c34985..f500104f4 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c @@ -52,6 +52,39 @@ uint32_t MotorTimeLag[NUM_OF_MOTORS]; uint32_t MotorTimeLimit[NUM_OF_MOTORS]; uint32_t MotorControlId[NUM_OF_MOTORS]; uint32_t StoredMotorPosition[NUM_OF_MOTORS]; +#ifdef FOUR_WINDERS +FPGA_GPI_ENUM Motor_Id_to_LS_IdDown[NUM_OF_MOTORS] = { // limit switch for normal homing into working mode + GPI_LS_DH_CLEAN_LEFT , //MOTO_DH_CLEANHEAD = 0, Shlomo Correct setting for machine 7 25/3 + GPI_LS_DH_CLEAN_RIGHT, //MOTO_DH_CLEANMECH = 1, Shlomo Correct setting for machine 7 25/3 + GPI_LS_DH_LID_CLOSED, //MOTO_DH_LID = 2, + MAX_GPI, //MOTO_DRYER_DRIVING = 3, + GPI_LS_DRYER_LID_CLOSED, //MOTO_DRYER_LID = 4, + MAX_GPI, //MOTO_DRYER_LOADARM = 5, + GPI_LS_DISPENSER_DOWN_1, //MOTO_DISPENSER_1 = 6, + GPI_LS_DISPENSER_DOWN_2, //MOTO_DISPENSER_2 = 7, + GPI_LS_DISPENSER_DOWN_3, //MOTO_DISPENSER_3 = 8, + GPI_LS_DISPENSER_DOWN_4, //MOTO_DISPENSER_4 = 9, + GPI_LS_DISPENSER_DOWN_5, //MOTO_DISPENSER_5 = 10, + GPI_LS_DISPENSER_DOWN_6, //MOTO_DISPENSER_6 = 11, + GPI_LS_DISPENSER_DOWN_7, //MOTO_DISPENSER_7 = 12, + GPI_LS_DISPENSER_DOWN_8, //MOTO_DISPENSER_8 = 13, + GPI_LS_SCREW_RIGHT, //MOTO_SCREW = 14, + MAX_GPI, //MOTO_WINDER = 15, + GPI_LS_LDANCER1_DOWN, //MOTO_LDANCER1 = 16, + GPI_LS_LSPARE1, //MOTO_LDANCER2 = 17, + MAX_GPI, //MOTO_LDRIVING = 18, + GPI_LS_LLOADMOTOR_DOWN, //MOTO_LLOADING = 19, + GPI_LS_LPIVOT_DOWN, //MOTO_LPIVOT1 = 20, + GPI_LS_RDANCER_UP, //MOTO_RDANCER = 21, + MAX_GPI, //MOTO_RDRIVING = 22, + GPI_LS_RDANCER_LONG, //MOTO_RLOADARM = 23, + GPI_LS_RLOADMOTOR_DOWN, //MOTO_RLOADING = 24, + GPI_LS_SPARE1_2, //HARDWARE_MOTOR_TYPE__MOTO_SPARE1_1 = 25, + MAX_GPI, //HARDWARE_MOTOR_TYPE__MOTO_SPARE1_2 = 26, + GPI_LS_SPARE2_2, //HARDWARE_MOTOR_TYPE__MOTO_SPARE2_1 = 27, + MAX_GPI, //HARDWARE_MOTOR_TYPE__MOTO_SPARE2_2 = 28, +}; +#else FPGA_GPI_ENUM Motor_Id_to_LS_IdDown[NUM_OF_MOTORS] = { // limit switch for normal homing into working mode GPI_LS_DH_CLEAN_LEFT , //MOTO_DH_CLEANHEAD = 0, Shlomo Correct setting for machine 7 25/3 GPI_LS_DH_CLEAN_RIGHT, //MOTO_DH_CLEANMECH = 1, Shlomo Correct setting for machine 7 25/3 @@ -79,6 +112,7 @@ FPGA_GPI_ENUM Motor_Id_to_LS_IdDown[NUM_OF_MOTORS] = { // limit switch for n GPI_LS_RDANCER_LONG, //MOTO_RLOADARM = 23, GPI_LS_RLOADMOTOR_DOWN, //MOTO_RLOADING = 24, }; +#endif FPGA_GPI_ENUM Motor_Id_to_LS_IdUp[NUM_OF_MOTORS] = { // limit switch for normal homing out of working mode GPI_LS_DH_CLEAN_LEFT , //MOTO_DH_CLEANHEAD = 0, Shlomo Correct setting for machine 7 25/3 GPI_LS_DH_CLEAN_RIGHT, //MOTO_DH_CLEANMECH = 1, Shlomo Correct setting for machine 7 25/3 @@ -190,7 +224,7 @@ uint32_t MotorMoveWithCallback (TimerMotors_t MotorId,bool direction, uint32_t S //MotorStop(MotorId,Hard_Hiz ); MotorMove(MotorId,direction,Steps ); - MotorControlId[MotorId] = AddControlCallback(NULL, MotorMoveCallBackFunction, /*eTenMillisecond*/20, MotorControlGetnBusyState,MotorId, MotorId, 0 ); + MotorControlId[MotorId] = AddControlCallback(NULL, MotorMoveCallBackFunction, /*eTenMillisecond*/20, MotorControlGetnBusyState,(IfTypeMotors*0x100+MotorId), MotorId, 0 ); MotorControlCallback[MotorId] = MotorMoveCallBackFunction; return MotorControlId[MotorId]; } @@ -437,15 +471,15 @@ uint32_t MotorSetSpeedWithCallback (TimerMotors_t MotorId, uint32_t _freq, callb } uint32_t MotorMoveCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) //TODO { - uint32_t MotorId; + uint32_t MotorId,encoder; uint32_t Busy = BusyFlag; - /*if (IfIndex>>8 != IfTypeMotors) + if (IfIndex>>8 != IfTypeMotors) { LOG_ERROR (IfIndex, "Wrong Interface type"); return 0xFFFFFFFF; - }*/ + } + MotorId = IfIndex&0xFF; - MotorId = IfIndex; CallbackCalls++; if (MotorId ==HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM) { @@ -455,7 +489,7 @@ uint32_t MotorMoveCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) //TODO } if (CallbackCalls%200 == 1) { - MotorId = Read_Dryer_ENC_Position(0,0); + encoder = Read_Dryer_ENC_Position(0,0); Report("MotorMoveCallBackFunction",__FILE__,__LINE__,DrierZeroPosition,RpWarning,MotorId,0); } } @@ -475,7 +509,7 @@ uint32_t MotorMoveCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) //TODO printBusy = false; }*/ //stop this control loop - Report("MotorControlGetnBusyState stop",__FILE__,__LINE__,BusyFlag,RpMessage,MotorTimeout[MotorId],0); + Report("MotorControlGetnBusyState stop",__FILE__,MotorId,BusyFlag,RpMessage,MotorTimeout[MotorId],0); SafeRemoveControlCallback(MotorControlId[MotorId], MotorMoveCallBackFunction ); MotorControlCallback[MotorId] = 0; MotorControlId[MotorId] = 0xFF; @@ -688,8 +722,7 @@ uint32_t MotorMovetoLimitSwitch (TimerMotors_t MotorId,bool direction, uint32_t /*if (Head_Type == HEAD_TYPE_FLAT) { Report("Close_actuators",__FILE__,__LINE__,LOW,RpMessage,true,0); - Trigger_Head_Actuators_Control(ACTOT, LOW,false); - //Trigger_Head_Actuators_Control(ACTIN, LOW,false); + Trigger_Head_Actuators_Stub(ACTOT, ENABLE, DOWN); HeadCard_Actuators_Relocate(); }*/ } @@ -901,7 +934,7 @@ void MotorActionsInit(void) MotorDriverResponse[i].Status = 0xFFFFFFFF; StoredMotorPosition[i] = 0; } - if (Head_Type == HEAD_TYPE_FLAT)//adjust the limit switches + if ((Head_Type == HEAD_TYPE_FLAT)||(Head_Type == HEAD_TYPE_ARC))//adjust the limit switches { Motor_Id_to_LS_IdDown[HARDWARE_MOTOR_TYPE__MOTO_DH_LID] = I2C_HEADCARD_COVER_LS_FRONT; Motor_Id_to_LS_IdUp [HARDWARE_MOTOR_TYPE__MOTO_DH_LID] = I2C_HEADCARD_COVER_LS_REAR ; diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h index 6598b88c2..4f864eaca 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h @@ -17,8 +17,8 @@ uint32_t Read_Dryer_Status(HardwareDancerType DancerId); void Loop_SSI(); -void test_dancer_responce_RTFU(bool motor_direction); -void test_dancer_responce_RTFU(); +//void test_dancer_responce_RTFU(bool motor_direction); +void test_dancer_responce_RTFU(void); extern bool test_dancer_direction, test_dancer_flag; diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c index e2d0443b4..3389d941c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.c @@ -245,7 +245,6 @@ void MainCardEEpromReadRequestFunc(MessageContainer* requestContainer) uint32_t status = PASSED; MessageContainer responseContainer; - int32_t EEdata = 0; StubMainCardEEpromReadRequest* request = stub_main_card_eeprom_read_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); |
