diff options
| author | Shai Frieder <Shai.Frieder@twine-s.com> | 2019-09-02 15:09:23 +0300 |
|---|---|---|
| committer | Shai Frieder <Shai.Frieder@twine-s.com> | 2019-09-02 15:09:23 +0300 |
| commit | 62905aaa550ea584f29feae2ba35fc6df6c42c8f (patch) | |
| tree | c02ea77b61359715ca8b9245e574e5bdc0ef1525 /Software/Embedded_SW/Embedded | |
| parent | 401103a9f735c0179d53144b7cee3c88e3445240 (diff) | |
| download | Tango-62905aaa550ea584f29feae2ba35fc6df6c42c8f.tar.gz Tango-62905aaa550ea584f29feae2ba35fc6df6c42c8f.zip | |
add IFS system, fix reading MidTank capacity
Diffstat (limited to 'Software/Embedded_SW/Embedded')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c | 8 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h | 2 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Main.c | 2 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 2 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/IFS/ifs.c | 341 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/IFS/ifs.h | 50 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_MidTankPressureSensor.c | 4 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Waste/Waste.h | 72 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c | 772 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/src/makefile.libs | 4 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/src/sysbios/makefile | 24 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f | bin | 1817446 -> 1817078 bytes |
12 files changed, 834 insertions, 447 deletions
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 567ccc516..815e2191c 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 @@ -249,7 +249,7 @@ void Disable_MidTank_Pressure_Reading(MidTank_t MidTank_ID) //0-7 assert (MidTank_ID<NUM_OF_MIDTANKS); MidTank_Pressure_Read_Enable[MidTank_ID] = false; } -uint32_t Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 +double Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 { uint32_t Status = OK; uint32_t I2C_Slave_Add; @@ -304,10 +304,12 @@ uint32_t Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 Status = I2C_ADC_Config(I2C_Slave_Add, Channel); SysCtlDelay(1); - Status = I2C_ADC_Set_For_Read_Ch(I2C_Slave_Add); + Status |= I2C_ADC_Set_For_Read_Ch(I2C_Slave_Add); SysCtlDelay(1); VsampleInBits = I2C_ADC_Read_Ch(I2C_Slave_Add); + if (Status) + LOG_ERROR(Status, "I2C actions failed"); MidTank_Pressure_Bits[MidTank_ID] = VsampleInBits;//just for debug //MidTank_Pressure[MidTank_ID] = Calculate_Pressure(VsampleInBits) - MidThankReadingOffset; @@ -316,7 +318,7 @@ uint32_t Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 MidTank_Pressure[MidTank_ID] = Calculate_MidTank_Liquid(VsampleInBits , Factor);//According to Gal (email 28-Aug-19) - return Status; + return MidTank_Pressure[MidTank_ID]; } double Get_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 { diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h index 6d1d9a1d5..03df1d041 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h @@ -43,7 +43,7 @@ extern double Heaters_Current[9]; extern uint32_t Heaters_Current_Bits[9]; -uint32_t Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID); +double Read_MidTank_Pressure_Sensor(MidTank_t MidTank_ID); double Get_MidTank_Pressure_Sensor(MidTank_t MidTank_ID); //0-7 int Get_MidTank_Int100_Sensor(MidTank_t MidTank_ID); //0-7 void MidTankPressureCorrection(double Offset); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 301d0d6c3..04595999b 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -289,7 +289,7 @@ int main(void) //calibration(); //test vme communication - FRESULT iFResult = Init_Flash_File_System(false); + FRESULT iFResult = Init_Flash_File_System(false);// true if(iFResult != FR_OK) { LOG_ERROR (iFResult, "Error during init Flash File System"); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 77e0efeef..746182def 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -1544,9 +1544,9 @@ uint32_t IDS_StartLubrication(void) } uint32_t IDS_StopLubrication(void) { + Lubricant_2Way_Valve (STOP); IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); CurrentDispenserSpeed[LUBRICANT_DISPENSER] = 0; REPORT_MSG (lubricant_speed, "IDS_StopLubrication"); - Lubricant_2Way_Valve (STOP); return OK; } diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index 347808d5e..0e18ffdad 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -1,9 +1,13 @@ -/* - * ifs.c +/** + * @file ifs.h * - * Created on: Jul 8, 2019 - * Author: shlomo + * @date Jul 8, 2019 + * @author Shlomo + * + * @date 26.8.2019 + * @author Shai */ + #include "PMR/Diagnostics/CartridgeSlot.pb-c.h" #include "PMR/Diagnostics/CartridgeTagContent.pb-c.h" #include "RfidTagContent.h" @@ -12,6 +16,20 @@ #include <DataDef.h> #include "include.h" +#include "Modules/Waste/Waste.h" +#include "Modules/IFS/ifs.h" +#include "Modules/AlarmHandling/AlarmHandling.h" +#include "CartridgeValidationRequest.pb-c.h" +#include "CartridgeValidationResponse.pb-c.h" +#include <PMR/Diagnostics/EventType.pb-c.h> +#include "drivers/Valves/Valve.h" +#include "Modules/Waste/Waste.h" + +bool IFS_TimeOutAlarm(); +bool ColorMatch(); +bool MidTankValvesAction(bool action); + + RfidTagContent TagContent[MAX_CARTRIDGES]; NFC_Tag NFCTag[MAX_CARTRIDGES]; void TagInitialize(RfidTagContent* TagContent); @@ -29,3 +47,318 @@ void TagInitialize(RfidTagContent* TagContent) { } + + + + + + +/** + * + * @brief detect changes in cartridge INK presence + * this function detect changes in IFS presence cartridge + * when changes are happens it update the presence status + * and the correct event + * @return IFS_INK_presence_sensor or WHS_no_event event + */ + +WHS_sensor CartridgeInkCallBackFunction() +{ + uint32_t parameter = 6 ; + + WHS_sensor ret = WHS_no_event; + + if (IFS_info.IFS_Ink_precense_sensor != RdInkCartridgeSensor()) + { + REPORT_MSG(parameter," ------------ find : IFS_Ink_presence_sensor event ----------------- "); + WHS_info.event = IFS_INK_presence_sensor; + IFS_info.IFS_Ink_precense_sensor = !IFS_info.IFS_Ink_precense_sensor; + ret = IFS_INK_presence_sensor; + } + return ret; +} + +/** + * + * @brief detect TimeOut + * we have 2 way to stop filling: + * 1. time out + * 2. detect Midtank is full. + * + * 1. time out process is: + * 1. detect timeout after 5 minutes + * 2. close and open the valves + * 3. count 5 minutes again + *2. measure MidTank capacity + * if MidTank is full stop count + * + * @return IFS_INK_presence_sensor or WHS_no_event event + */ +WHS_sensor CartridgeInkTimeOutCallBackFunction() +{ + WHS_sensor ret = WHS_no_event; + double MidTank_Pressure = 0; + + MidTank_Pressure = Read_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color);// Get_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color); + ReportWithPackageFilter(WasteFilter,"------------ IFS_info.Ink.time_out and Pressure -----------------", __FILE__,__LINE__,(IFS_info.Ink.time_out * SECONDS_5), RpMessage, (int)(MidTank_Pressure*1000), 0); + + if (IFS_info.Ink.time_out) IFS_info.Ink.time_out += 1; /*** counter ***/ + + +#ifdef timeout_capacity + /*** detect the MidTank capacity is full ***/ + //Read_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color); + if (MidTank_Pressure >= IFS_info.MidTank_capacity + CARTRIDGE_CAPATICY) + { + IFS_info.Ink.time_out = 0; + WHS_info.event = IFS_MidTankFull; + return IFS_MidTankFull; + } +#endif + /*** first TimeOut ***/ + if (IFS_info.Ink.time_out == CARTRIDGE_INK_TIMEOUT) + { + ReportWithPackageFilter(WasteFilter,"------------ first IFS_info.Ink.time_out -----------------", __FILE__, __LINE__, (IFS_info.Ink.time_out * SECONDS_5), RpMessage, MidTank_Pressure, 0); + //IFS_info.Ink.time_out = 0; + //return IFS_info.event = IFS_Timeout; + + REPORT_MSG(WHS_emptying," ------------ IFS_Timeout close valves----------------- "); + // try again : + // start timeout + // close and open the correct valves + + MidTankValvesAction(Cartridge_MidTank_OFF); + } + + if (IFS_info.Ink.time_out == (CARTRIDGE_INK_TIMEOUT + 1)) //need to open the valve for second chance + { + ReportWithPackageFilter(WasteFilter,"------------ IFS_Timeout open valves for second timeout -----------------", __FILE__, __LINE__, (IFS_info.Ink.time_out * SECONDS_5), RpMessage, MidTank_Pressure, 0); + MidTankValvesAction(Cartridge_MidTank_ON); + } + + if (IFS_info.Ink.time_out >= (CARTRIDGE_INK_TIMEOUTx2 + 1)) + { + REPORT_MSG(WHS_full," ------------ IFS_Timeout_Second_Time ----------------- "); + IFS_info.Ink.time_out = 0; + WHS_info.event = IFS_Timeout_Second; + return IFS_Timeout_Second; + } + return ret; +} + +/** + * + * @brief IFS Time Out Alarm + * + * @return OK + */ +bool IFS_TimeOutAlarm() +{ + bool ret = OK; + switch (IFS_info.Ink.cart_color) //todo enter the correct color from RFID + { + case 1 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_1_FILL_TIMEOUT, true); + break; + case 2 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_2_FILL_TIMEOUT, true); + break; + case 3 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_3_FILL_TIMEOUT, true); + break; + case 4 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_4_FILL_TIMEOUT, true); + break; + case 5 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_5_FILL_TIMEOUT, true); + break; + case 6 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_6_FILL_TIMEOUT, true); + break; + case 7 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_7_FILL_TIMEOUT, true); + break; + case 8 : + AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_8_FILL_TIMEOUT, true); + break; + default: //wrong color + ret = notOK; + break; + } + + return ret; +} + +/** + * + * @brief MidTank Valves Action + * the MidTank have 2 Valves: + * 1. Ink Color Valve to get INK from the INK Cartridge to Midtank + * 2. Air valve to get INK in the Midtank we have to open the Air valve so the air can go out + * + * @return action to open the Valve use: Cartridge_MidTank_ON/Atm_MidTank_ON + * to close the Valve use : Cartridge_MidTank_OFF/Atm_MidTank_OFF + */ +bool MidTankValvesAction(bool action) //Cartridge_MidTank_ON of Cartridge_MidTank_OFF +{ + bool ret = false; + if (action == Cartridge_MidTank_ON) + { + Enable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); + } + else + { + Disable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); + } + Valve_Set(IDS_Id_to_AirValve[IFS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON + Valve_Set(IDS_Id_to_CartrideValve[IFS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON + + ret = true; + return ret; +} + +bool ColorMatch() +{ + bool ret = false; + + ret = true; + return ret; +} + +char CartridgeRequestToken[36+1]; +int CartridgeRequestId = 0x01010101; + + +/** + * + * @brief create massege to PPC + * temporary message RFID will replace that message. + * send a request to PPC to know the MidTank number + * @return OK + */ +uint32_t ReadCartridgeData(cartridge_name cart_name) +{ + //this function triggers reading and validation of the cartridge information + // for now it sends a request to the tablet to inquire for the ink color/midtank id + MessageContainer responseContainer; + CartridgeValidationRequest ValidationReq = CARTRIDGE_VALIDATION_REQUEST__INIT; + Cartridge CartridgeData; + + strcpy(CartridgeRequestToken,"Happy days are coming to us, soon"); + memcpy(&CartridgeRequestToken[32],&CartridgeRequestId,sizeof(CartridgeRequestId)); + CartridgeRequestId++; + + cartridge__init(&CartridgeData); + CartridgeData.has_slot = true; + CartridgeData.slot = CARTRIDGE_SLOT__Ink; + CartridgeData.tag = 0; + CartridgeData.has_index = false; + + ValidationReq.has_action = true; + ValidationReq.action = CARTRIDGE_ACTION__Inserted; + + ValidationReq.cartridge = &CartridgeData; + + responseContainer = createContainer(MESSAGE_TYPE__CartridgeValidationRequest, CartridgeRequestToken, true, &ValidationReq, &cartridge_validation_request__pack, &cartridge_validation_request__get_packed_size); + //------------------------------------------------------------------------------------------- + uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + my_free(responseContainer.data.data); + //SendChars((char*)container_buffer, container_size); + + return OK; +} + +/** + * + * @brief PPC answers the MidTank number and call WasteTankCBFunction() function. + * temporary message RFID will replace that message. + * + * @return OK + */ +bool CartridgeValidationResponseFunc(MessageContainer* requestContainer) +{ + bool ret = notOK; + CartridgeValidationResponse* response = cartridge_validation_response__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + + Cartridge *cartridge; +// uint32_t midtankId; +// cartridge_name cart_name; + + // chack the massege: + // 1. the cartridge is valid ( autantication) + // 2. the pointer is not 0 !!! + if (response->cartridge == 0 ) + { + REPORT_MSG(WHS_filling," ------------ IFS_filling message from PPC is null!!! ----------------- "); // write to log error + return ret; + } + + if (response->isvalid == true) + { + REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is valid ----------------- "); // write to log error + cartridge = response->cartridge; +// midtankId = cartridge->index; // midtank 1-8 +// cart_name = cartridge->slot; //cart1(INK),cart2(WASTE1),cart3(WASTE1) + if (cartridge->slot == INK_cartridge) + { + IFS_info.Ink.cart_color = cartridge->index; // midtank 1-8 + WHS_info.event = IFS_INK_authentication_pass; + } + WasteTankCBFunction();//call cart is ok + ret = OK; + } + else + { + REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is not valid !!!----------------- "); // write to log error +// cartridge = response->cartridge; +// mimidtankId = cartridge->index; +// cart_name = cartridge->slot; + WHS_info.event = IFS_INK_authentication_fail; + WasteTankCBFunction();// call cart is INVALID + ret = OK; + } +return ret; +} + + +/** + * + * @brief that response is from STUB. replace the PPC + * use stub : Poweroff_progress.cs from P:\Users - Public\Shai_Frieder + * ProgressRequest progressRequest = new ProgressRequest(); + * progressRequest.Amount = 0xCC; //porgress id is 0xCC + * progressRequest.Delay = 1; //midtank number from 0-7 + * + * + * @return OK + */ +void ResponseDemo(int MidtankId) +{ + WHS_info.event = IFS_INK_authentication_pass; + //global mid tank id = MidtankId; + IFS_info.Ink.cart_color = MidtankId; + WasteTankCBFunction();//call cart is ok +} + +bool INKCartridgeAuthentication(cartridge_name cart_name) +{ + bool ret = notOK; + // TBD; + switch (cart_name) + { + case INK_cartridge: + IFS_info.Ink.autheticate = PASSED; //todo + //Pannel_Leds(CART_1, MODE_ON); + break; + + default: + //WHS_info.cartridge_1.autheticate = FAILED; //todo + // WHS_info.cartridge_2.autheticate = FAILED; //todo + //Pannel_Leds(CART_2, MODE_OFF); + //Pannel_Leds(CART_3, MODE_OFF); + break; + } + ret = OK; + return ret; +} diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h index ade89372d..9e06ad69c 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h @@ -1,8 +1,11 @@ -/* - * ifs.h +/** + * @file ifs.h * - * Created on: Jul 8, 2019 - * Author: shlomo + * @date Jul 8, 2019 + * @author Shlomo + * + * @date 26.8.2019 + * @author Shai */ #ifndef MODULES_IFS_IFS_H_ @@ -10,7 +13,44 @@ -void IFS_Init(void) +//void IFS_Init(void) +#define SECONDS_5 5 /**< 5seconds */ +#define SECONDS_300 300 /**< 300 seconds = 5 minutes */ +#define SECONDS_600 600 /**< 600 seconds = 10 minutes */ +#define SECONDS_2_DLY 0 /**< dly 0 seconds */ +#define CARTRIDGE_INK_TIMEOUT (SECONDS_300 / SECONDS_5) /**< TimeOut (5 minutes) for finishing transfer the Ink from Ink cartridge to MidTank */ +#define CARTRIDGE_INK_TIMEOUTx2 (SECONDS_600 / SECONDS_5) /**< TimeOut (5 minutes) for second try finishing transfer the Ink from Ink cartridge to MidTank */ +#define CartridgeInkTimeOutCallBackTime (eOneSecond * SECONDS_5) +#define CartridgeInkCallBackTime eOneSecond +#define MidTank_Pressure_EMPTY 200 //todo get from Moti the correct number +#define CARTRIDGE_CAPATICY 1500 //todo get from Moti the correct number +#define FULL 1000 //todo get from Moti the correct number + + + +/** + * A structure to represent IFS_information + */ +struct IFS_information +{ + struct cartridge_params Ink; /**< cartridge_params */ + CarteidgPrecenseSensorStatus IFS_Ink_precense_sensor; /**< INK cartridge presence(1) or not_precense(0) */ + uint32_t Cartridge_Ink_device_Id; /**< INK device_Id number for callback */ + uint32_t Cartridge_Ink_TimeOut_device_Id; /**< INK device_Id number for TimeOut callback */ + uint32_t INK_isOK_flag ; /**< INK cartridge pass authentication (from PPC) */ + double MidTank_capacity; /**< MidTank current capacity */ +}; + +struct IFS_information IFS_info; + +WHS_sensor CartridgeInkCallBackFunction(); +WHS_sensor CartridgeInkTimeOutCallBackFunction(); +uint32_t ReadCartridgeData(cartridge_name cart_name); +bool INKCartridgeAuthentication(cartridge_name cart_name); +bool MidTankValvesAction(bool action); //Cartridge_MidTank_ON of Cartridge_MidTank_OFF +bool ColorMatch(); +bool IFS_TimeOutAlarm(); +void ResponseDemo(int MidtankId); #endif /* MODULES_IFS_IFS_H_ */ diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_MidTankPressureSensor.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_MidTankPressureSensor.c index 1f00da9dd..20c4806e6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_MidTankPressureSensor.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_MidTankPressureSensor.c @@ -39,9 +39,7 @@ void Stub_MidTankPressureSensorRequest(MessageContainer* requestContainer) response.midtankid = request->midtankid; response.has_midtankid = true; - Read_MidTank_Pressure_Sensor((MidTank_t)request->midtankid); - - response.pressure = Get_MidTank_Pressure_Sensor((MidTank_t)request->midtankid); + response.pressure = Read_MidTank_Pressure_Sensor((MidTank_t)request->midtankid); response.has_pressure = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h index 39894ce2d..0eba8fa7d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h @@ -1,6 +1,8 @@ #ifndef WASTE_H #define WASTE_H +#include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" + #define temp_funcion 0 #define notOK 1 @@ -22,6 +24,8 @@ #define PRECENSE 1 #define NOTPRECENSE 0 + + typedef unsigned char U8; @@ -41,7 +45,7 @@ typedef enum { CarteidgeNotPrecense = 0, CarteidgePrecense -} WHS_CarteidgPrecenseSensorStatus; +} CarteidgPrecenseSensorStatus; //WHS_CarteidgPrecenseSensorStatus; typedef enum { @@ -68,8 +72,7 @@ typedef enum WHS_emptying, WHS_full, WHS_overflow, - WHS_sttError, - INK_isOK + WHS_sttError } WHS_sttMachin; typedef enum @@ -104,17 +107,6 @@ typedef enum WasteFail } cartridge_status; -//typedef enum -//{ -// midtank1 = 0, -// midtank2, -// midtank3, -// midtank4, -// midtank5, -// midtank6, -// midtank7, -// midtank8 -//} cartridge_color_to_midtank; typedef enum { @@ -133,6 +125,56 @@ typedef enum } cartridge_name; + +struct WHS_sensors_status +{ + WHS_CarteidgeCoverSensorStatus cartridge_cover; /*open(1) ,close(0) */ +// WHS_CarteidgPrecenseSensorStatus IFS_Ink_precense_sensor; /*presence(1) ,not_precense(0) */ +// bool IFS_Ink_precense_sensor_flag; /* 1=event 0=no enent */ + CarteidgPrecenseSensorStatus waste_cartridge1_precense_sensor; /*presence(1) ,not_precense(0) */ + bool waste_cartridge1_precense_sensor_flag; /* 1=event 0=no enent */ + CarteidgPrecenseSensorStatus waste_cartridge2_precense_sensor; /*presence(1) ,not_precense(0) */ + bool waste_cartridge2_precense_sensor_flag; /* 1=event 0=no enent */ + bool waste_tank_filter_sensor; /*presence(1) ,not_precense(0) */ + WHS_EmptySensorStatus waste_tank_empty_sensor; /*enpty(1) ,not_empty(0) */ + WHS_FullSensorStatus waste_tank_full_sensor; /*full(1) ,not_full(0) */ + bool waste_tank_over_flow_sensor; /*over_flow(1) ,not_over_flow(0) */ +}; + +struct cartridge_params +{ + uint32_t serial_number; + cartridge_status status; /*WasteEmpty, WasteFilling, WasteFail, WasteFull....... */ + MidTank_t cart_color; + bool autheticate; + uint32_t time_out; +}; + +struct pump_params +{ + bool status; + uint32_t time; +}; + +struct WHS_information +{ + WHS_sttMachin sttMachine; + struct cartridge_params cartridge_1, cartridge_2; + struct WHS_sensors_status WHS_sensors; + struct pump_params WHS_pump; + bool WHS_valve; + WHS_sensor event; + cartridge_name active_cartridge; + uint32_t Cartridge_Ink_device_Id; + uint32_t Cartridge_Ink_TimeOut_device_Id; + uint32_t Cartridge_Waste1_device_Id; + uint32_t Cartridge_Waste2_device_Id; + uint32_t Cartridge_Cover_device_Id; + //PBcolor Ink_Led, cartridge_1_Led, cartridge_2_Led; + double MidTank_capacity; +}; +struct WHS_information WHS_info; + U8 WHS_init(void); U8 WHS_HW_test(void); bool WHS_IsEmptying(); @@ -154,7 +196,7 @@ bool CartridgeValidationResponseFunc(MessageContainer* requestContainer); void ResponseDemo(int MidtankId); bool RdInkCartridgeSensor(); - +bool WasteTankCBFunction(); #endif diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c index 5dedfda85..62b8288bf 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c @@ -16,36 +16,39 @@ #include "CartridgeValidationRequest.pb-c.h" #include "CartridgeValidationResponse.pb-c.h" #include "Modules/General/buttons.h" +#include "Modules/IFS/ifs.h" +// +//#define CARTRIDGE_INK_TIMEOUT 60 +//#define CARTRIDGE_INK_TIMEOUTx2 120 +//#define CartridgeInkTimeOutCallBackTime eOneSecond +//#define MidTank_Pressure_EMPTY 1000 //todo get from Moti the correct number +//#define CARTRIDGE_CAPATICY 1500 //liters +//#define FULL 1000 -#define CARTRIDGE_INK_TIMEOUT 60 -#define CARTRIDGE_INK_TIMEOUTx2 120 -#define CartridgeInkTimeOutCallBackTime eOneSecond #define WasteTankCallBackTime eOneSecond #define CartridgeCoverCallBackTime eOneSecond #define CartridgeCoverCallBackFastTime eTenMillisecond #define CartridgeWaste1CallBackTime eOneSecond #define CartridgeWaste2CallBackTime eOneSecond +//#define CartridgeInkCallBackTime eOneSecond #define STARTCOUNT 1 #define STOPCOUNT 0 #define PUMPTIMEOUT 1200 // seconds; 20 minutes, per Moty, 15/4/19 -#define MidTank_Pressure_EMPTY 1000 //todo get from Moti the correct number -#define CARTRIDGE_CAPATICY 1500 //liters -#define FULL 1000 /*------------Waste Tank function-----------------------*/ bool initWHS_WasteTank(); bool InitCartStatus(); -bool CartridgeCoverCBFunction(); +//bool CartridgeCoverCBFunction(); U8 CartridgeCoverCallBackFunction(); -WHS_sensor CartridgeInkCallBackFunction(); +// WHS_sensor CartridgeInkCallBackFunction(); WHS_sensor CartridgeWaste1CallBackFunction(); WHS_sensor CartridgeWaste2CallBackFunction(); WHS_sensor WasteTankCallBackFunction(); U8 CartridgeWasteFilling(bool status); -bool WasteTankCBFunction(); -WHS_sensor CartridgeInkTimeOutCallBackFunction(); +//bool WasteTankCBFunction(); +//WHS_sensor CartridgeInkTimeOutCallBackFunction(); U8 CartridgePrecenceCBFunction(); @@ -70,58 +73,58 @@ bool SetActiveWastCartridge(); //bool PowerOffInProcessGetState(); -struct cartridge_params -{ - uint32_t serial_number; - cartridge_status status; /*WasteEmpty, WasteFilling, WasteFail, WasteFull....... */ - MidTank_t cart_color; - bool autheticate; - uint32_t time_out; -}; +//struct cartridge_params +//{ +// uint32_t serial_number; +// cartridge_status status; /*WasteEmpty, WasteFilling, WasteFail, WasteFull....... */ +// MidTank_t cart_color; +// bool autheticate; +// uint32_t time_out; +//}; -struct pump_params -{ - bool status; - uint32_t time; -}; +//struct pump_params +//{ +// bool status; +// uint32_t time; +//}; -struct WHS_sensors_status -{ - WHS_CarteidgeCoverSensorStatus cartridge_cover; /*open(1) ,close(0) */ - WHS_CarteidgPrecenseSensorStatus IFS_Ink_precense_sensor; /*presence(1) ,not_precense(0) */ - bool IFS_Ink_precense_sensor_flag; /* 1=event 0=no enent */ - WHS_CarteidgPrecenseSensorStatus waste_cartridge1_precense_sensor; /*presence(1) ,not_precense(0) */ - bool waste_cartridge1_precense_sensor_flag; /* 1=event 0=no enent */ - WHS_CarteidgPrecenseSensorStatus waste_cartridge2_precense_sensor; /*presence(1) ,not_precense(0) */ - bool waste_cartridge2_precense_sensor_flag; /* 1=event 0=no enent */ - bool waste_tank_filter_sensor; /*presence(1) ,not_precense(0) */ - WHS_EmptySensorStatus waste_tank_empty_sensor; /*enpty(1) ,not_empty(0) */ - WHS_FullSensorStatus waste_tank_full_sensor; /*full(1) ,not_full(0) */ - bool waste_tank_over_flow_sensor; /*over_flow(1) ,not_over_flow(0) */ -}; +//struct WHS_sensors_status +//{ +// WHS_CarteidgeCoverSensorStatus cartridge_cover; /*open(1) ,close(0) */ +// WHS_CarteidgPrecenseSensorStatus IFS_Ink_precense_sensor; /*presence(1) ,not_precense(0) */ +// bool IFS_Ink_precense_sensor_flag; /* 1=event 0=no enent */ +// WHS_CarteidgPrecenseSensorStatus waste_cartridge1_precense_sensor; /*presence(1) ,not_precense(0) */ +// bool waste_cartridge1_precense_sensor_flag; /* 1=event 0=no enent */ +// WHS_CarteidgPrecenseSensorStatus waste_cartridge2_precense_sensor; /*presence(1) ,not_precense(0) */ +// bool waste_cartridge2_precense_sensor_flag; /* 1=event 0=no enent */ +// bool waste_tank_filter_sensor; /*presence(1) ,not_precense(0) */ +// WHS_EmptySensorStatus waste_tank_empty_sensor; /*enpty(1) ,not_empty(0) */ +// WHS_FullSensorStatus waste_tank_full_sensor; /*full(1) ,not_full(0) */ +// bool waste_tank_over_flow_sensor; /*over_flow(1) ,not_over_flow(0) */ +//}; -struct WHS_information -{ - WHS_sttMachin sttMachine; - struct cartridge_params Ink, cartridge_1, cartridge_2; - struct WHS_sensors_status WHS_sensors; - struct pump_params WHS_pump; - bool WHS_valve; - WHS_sensor event; - cartridge_name active_cartridge; - uint32_t Cartridge_Ink_device_Id; - uint32_t Cartridge_Ink_TimeOut_device_Id; - uint32_t Cartridge_Waste1_device_Id; - uint32_t Cartridge_Waste2_device_Id; - uint32_t Cartridge_Cover_device_Id; - //PBcolor Ink_Led, cartridge_1_Led, cartridge_2_Led; - double MidTank_capacity; -}; +//struct WHS_information +//{ +// WHS_sttMachin sttMachine; +// struct cartridge_params cartridge_1, cartridge_2; +// struct WHS_sensors_status WHS_sensors; +// struct pump_params WHS_pump; +// bool WHS_valve; +// WHS_sensor event; +// cartridge_name active_cartridge; +// uint32_t Cartridge_Ink_device_Id; +// uint32_t Cartridge_Ink_TimeOut_device_Id; +// uint32_t Cartridge_Waste1_device_Id; +// uint32_t Cartridge_Waste2_device_Id; +// uint32_t Cartridge_Cover_device_Id; +// //PBcolor Ink_Led, cartridge_1_Led, cartridge_2_Led; +// double MidTank_capacity; +//}; -struct WHS_information WHS_info; +//struct WHS_information WHS_info; RfidTagContent cartridge_info; // function for RFID: @@ -142,67 +145,67 @@ bool WHS_WasteCartridgeMiddlePresent(){return WHS_info.WHS_sensors.waste_cartrid bool WHS_IsPumpActive(){return WHS_info.WHS_pump.status;} bool WHS_IsValveOpen(){return WHS_info.WHS_valve;} bool RD_MID_TANK_Level(){return 0 /* FULL*/ ;} -bool ColorMatch(); -bool MidTankValvesAction(bool action); -bool IFS_TimeOutAlarm(); - -bool IFS_TimeOutAlarm() -{ - bool ret = OK; - switch (WHS_info.Ink.cart_color) //todo enter the correct color from RFID - { - case 1 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_1_FILL_TIMEOUT, true); - break; - case 2 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_2_FILL_TIMEOUT, true); - break; - case 3 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_3_FILL_TIMEOUT, true); - break; - case 4 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_4_FILL_TIMEOUT, true); - break; - case 5 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_5_FILL_TIMEOUT, true); - break; - case 6 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_6_FILL_TIMEOUT, true); - break; - case 7 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_7_FILL_TIMEOUT, true); - break; - case 8 : - AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_8_FILL_TIMEOUT, true); - break; - default: //wrong color - ret = notOK; - break; - } - - return ret; -} - - +//bool ColorMatch(); +//bool MidTankValvesAction(bool action); +//bool IFS_TimeOutAlarm(); -bool MidTankValvesAction(bool action) //Cartridge_MidTank_ON of Cartridge_MidTank_OFF -{ - bool ret = false; +//bool IFS_TimeOutAlarm() +//{ +// bool ret = OK; +// switch (WHS_info.Ink.cart_color) //todo enter the correct color from RFID +// { +// case 1 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_1_FILL_TIMEOUT, true); +// break; +// case 2 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_2_FILL_TIMEOUT, true); +// break; +// case 3 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_3_FILL_TIMEOUT, true); +// break; +// case 4 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_4_FILL_TIMEOUT, true); +// break; +// case 5 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_5_FILL_TIMEOUT, true); +// break; +// case 6 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_6_FILL_TIMEOUT, true); +// break; +// case 7 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_7_FILL_TIMEOUT, true); +// break; +// case 8 : +// AlarmHandlingSetAlarm( EVENT_TYPE__MID_TANK_8_FILL_TIMEOUT, true); +// break; +// default: //wrong color +// ret = notOK; +// break; +// } +// +// return ret; +//} - Valve_Set(IDS_Id_to_AirValve[WHS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON - Valve_Set(IDS_Id_to_CartrideValve[WHS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON - ret = true; - return ret; -} -bool ColorMatch() -{ - bool ret = false; - - ret = true; - return ret; -} +//bool MidTankValvesAction(bool action) //Cartridge_MidTank_ON of Cartridge_MidTank_OFF +//{ +// bool ret = false; +// +// Valve_Set(IDS_Id_to_AirValve[WHS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON +// Valve_Set(IDS_Id_to_CartrideValve[WHS_info.Ink.cart_color], action ); //Atm_MidTank_OFF/ON +// +// ret = true; +// return ret; +//} +// +//bool ColorMatch() +//{ +// bool ret = false; +// +// ret = true; +// return ret; +//} bool WHS_IsEmptying() { @@ -214,92 +217,92 @@ bool WHS_IsEmptying() return ret; } -char CartridgeRequestToken[36+1]; -int CartridgeRequestId = 0x01010101; -/* -------- cartridge function ----*/ -uint32_t ReadCartridgeData(cartridge_name cart_name) -{ - //this function triggers reading and validation of the cartridge information - // for now it sends a request to the tablet to inquire for the ink color/midtank id - MessageContainer responseContainer; - CartridgeValidationRequest ValidationReq = CARTRIDGE_VALIDATION_REQUEST__INIT; - Cartridge CartridgeData; - - strcpy(CartridgeRequestToken,"Happy days are coming to us, soon"); - memcpy(&CartridgeRequestToken[32],&CartridgeRequestId,sizeof(CartridgeRequestId)); - CartridgeRequestId++; - - cartridge__init(&CartridgeData); - CartridgeData.has_slot = true; - CartridgeData.slot = CARTRIDGE_SLOT__Ink; - CartridgeData.tag = 0; - CartridgeData.has_index = false; - - ValidationReq.has_action = true; - ValidationReq.action = CARTRIDGE_ACTION__Inserted; - - ValidationReq.cartridge = &CartridgeData; - - responseContainer = createContainer(MESSAGE_TYPE__CartridgeValidationRequest, CartridgeRequestToken, true, &ValidationReq, &cartridge_validation_request__pack, &cartridge_validation_request__get_packed_size); - //------------------------------------------------------------------------------------------- - uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); - size_t container_size = message_container__pack(&responseContainer, container_buffer); - my_free(responseContainer.data.data); - //SendChars((char*)container_buffer, container_size); - - return OK; -} -void ResponseDemo(int MidtankId) -{ - WHS_info.event = IFS_INK_authentication_pass; - //global mid tank id = MidtankId; - WHS_info.Ink.cart_color = MidtankId; - WasteTankCBFunction();//call cart is ok -} -bool CartridgeValidationResponseFunc(MessageContainer* requestContainer) -{ - bool ret = notOK; - CartridgeValidationResponse* response = cartridge_validation_response__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - - Cartridge *cartridge; - uint32_t midtankId; - cartridge_name cart_name; - - // chack the massege: - // 1. the cartridge is valid ( autantication) - // 2. the pointer is not 0 !!! - if (response->cartridge == 0 ) - { - REPORT_MSG(WHS_filling," ------------ IFS_filling message from PPC is null!!! ----------------- "); // write to log error - return ret; - } - - if (response->isvalid == true) - { - REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is valid ----------------- "); // write to log error - cartridge = response->cartridge; - midtankId = cartridge->index; // midtank 1-8 - cart_name = cartridge->slot; //cart1(INK),cart2(WASTE1),cart3(WASTE1) - if (cartridge->slot == INK_cartridge) - { - WHS_info.Ink.cart_color = cartridge->index; // midtank 1-8 - WHS_info.event = IFS_INK_authentication_pass; - } - WasteTankCBFunction();//call cart is ok - ret = OK; - } - else - { - REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is not valid !!!----------------- "); // write to log error +//char CartridgeRequestToken[36+1]; +//int CartridgeRequestId = 0x01010101; +///* -------- cartridge function ----*/ +//uint32_t ReadCartridgeData(cartridge_name cart_name) +//{ +// //this function triggers reading and validation of the cartridge information +// // for now it sends a request to the tablet to inquire for the ink color/midtank id +// MessageContainer responseContainer; +// CartridgeValidationRequest ValidationReq = CARTRIDGE_VALIDATION_REQUEST__INIT; +// Cartridge CartridgeData; +// +// strcpy(CartridgeRequestToken,"Happy days are coming to us, soon"); +// memcpy(&CartridgeRequestToken[32],&CartridgeRequestId,sizeof(CartridgeRequestId)); +// CartridgeRequestId++; +// +// cartridge__init(&CartridgeData); +// CartridgeData.has_slot = true; +// CartridgeData.slot = CARTRIDGE_SLOT__Ink; +// CartridgeData.tag = 0; +// CartridgeData.has_index = false; +// +// ValidationReq.has_action = true; +// ValidationReq.action = CARTRIDGE_ACTION__Inserted; +// +// ValidationReq.cartridge = &CartridgeData; +// +// responseContainer = createContainer(MESSAGE_TYPE__CartridgeValidationRequest, CartridgeRequestToken, true, &ValidationReq, &cartridge_validation_request__pack, &cartridge_validation_request__get_packed_size); +// //------------------------------------------------------------------------------------------- +// uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); +// size_t container_size = message_container__pack(&responseContainer, container_buffer); +// my_free(responseContainer.data.data); +// //SendChars((char*)container_buffer, container_size); +// +// return OK; +//} +//void ResponseDemo(int MidtankId) +//{ +// WHS_info.event = IFS_INK_authentication_pass; +// //global mid tank id = MidtankId; +// WHS_info.Ink.cart_color = MidtankId; +// WasteTankCBFunction();//call cart is ok +//} +//bool CartridgeValidationResponseFunc(MessageContainer* requestContainer) +//{ +// bool ret = notOK; +// CartridgeValidationResponse* response = cartridge_validation_response__unpack(NULL, requestContainer->data.len, requestContainer->data.data); +// +// Cartridge *cartridge; +// uint32_t midtankId; +// cartridge_name cart_name; +// +// // chack the massege: +// // 1. the cartridge is valid ( autantication) +// // 2. the pointer is not 0 !!! +// if (response->cartridge == 0 ) +// { +// REPORT_MSG(WHS_filling," ------------ IFS_filling message from PPC is null!!! ----------------- "); // write to log error +// return ret; +// } +// +// if (response->isvalid == true) +// { +// REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is valid ----------------- "); // write to log error // cartridge = response->cartridge; -// mimidtankId = cartridge->index; -// cart_name = cartridge->slot; - WHS_info.event = IFS_INK_authentication_fail; - WasteTankCBFunction();// call cart is INVALID - ret = OK; - } -return ret; -} +// midtankId = cartridge->index; // midtank 1-8 +// cart_name = cartridge->slot; //cart1(INK),cart2(WASTE1),cart3(WASTE1) +// if (cartridge->slot == INK_cartridge) +// { +// WHS_info.Ink.cart_color = cartridge->index; // midtank 1-8 +// WHS_info.event = IFS_INK_authentication_pass; +// } +// WasteTankCBFunction();//call cart is ok +// ret = OK; +// } +// else +// { +// REPORT_MSG(WHS_filling," ------------ IFS_filling INK cartridge is not valid !!!----------------- "); // write to log error +//// cartridge = response->cartridge; +//// mimidtankId = cartridge->index; +//// cart_name = cartridge->slot; +// WHS_info.event = IFS_INK_authentication_fail; +// WasteTankCBFunction();// call cart is INVALID +// ret = OK; +// } +//return ret; +//} @@ -343,10 +346,10 @@ bool CartridgeAuthentication(cartridge_name cart_name) // TBD; switch (cart_name) { - case INK_cartridge: - WHS_info.Ink.autheticate = PASSED; //todo - //Pannel_Leds(CART_1, MODE_ON); - break; +// case INK_cartridge: +// WHS_info.Ink.autheticate = PASSED; //todo +// //Pannel_Leds(CART_1, MODE_ON); +// break; case waste_cartridge1: WHS_info.cartridge_1.autheticate = PASSED; //todo //Pannel_Leds(CART_2, MODE_ON); @@ -764,22 +767,33 @@ bool WasteTankCBFunction() break; */ case WHS_cartridge_cover_sensor: + if ( WHS_info.WHS_sensors.cartridge_cover == OPEN ) { - //popup message :"Cartridge cover open" //todo - REPORT_MSG(parameter," Cartridge cover open "); + REPORT_MSG(parameter," Cartridge cover open ");//popup message :"Cartridge cover open" //todo if ( WHS_info.WHS_pump.status == OPEN) { CartridgeWasteFilling(CLOSE); pump_on_flag = OPEN; } + if (cart1.color != colorOFF) + { + IFS_info.Ink.time_out = 0; + MidTankValvesAction(Cartridge_MidTank_OFF); + IFS_info.Cartridge_Ink_TimeOut_device_Id = RemoveControlCallback(IFS_info.Cartridge_Ink_TimeOut_device_Id, WasteTankCBFunction ); + } + if ( !PowerOffInProcessGetState() ) { - WHS_info.Cartridge_Ink_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeWaste1CallBackTime, CartridgeInkCallBackFunction, 0,0,0 ); //eOneSecond + IFS_info.Cartridge_Ink_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeInkCallBackTime , CartridgeInkCallBackFunction , 0,0,0 ); //eOneSecond WHS_info.Cartridge_Waste1_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeWaste1CallBackTime, CartridgeWaste1CallBackFunction, 0,0,0 ); //eOneSecond WHS_info.Cartridge_Waste2_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeWaste2CallBackTime, CartridgeWaste2CallBackFunction, 0,0,0 ); //eOneSecond } + else + { + REPORT_MSG(parameter,"Power down in process");//popup message :"Cartridge cover open" //todo + } @@ -797,47 +811,61 @@ bool WasteTankCBFunction() SetActiveWastCartridge(); if (pump_on_flag == OPEN ) { - CartridgeWasteFilling(OPEN); + WHS_info.WHS_sensors.waste_tank_full_sensor = SENSORnotFULL; // todo + // CartridgeWasteFilling(OPEN); pump_on_flag = CLOSE; } - WHS_info.Cartridge_Waste1_device_Id = RemoveControlCallback(WHS_info.Cartridge_Ink_device_Id, WasteTankCBFunction ); + IFS_info.Cartridge_Ink_device_Id = RemoveControlCallback(IFS_info.Cartridge_Ink_device_Id , WasteTankCBFunction ); WHS_info.Cartridge_Waste1_device_Id = RemoveControlCallback(WHS_info.Cartridge_Waste1_device_Id, WasteTankCBFunction ); WHS_info.Cartridge_Waste2_device_Id = RemoveControlCallback(WHS_info.Cartridge_Waste2_device_Id, WasteTankCBFunction ); - if (WHS_info.sttMachine == INK_isOK) + if ( IFS_info.INK_isOK_flag ) { - REPORT_MSG(WHS_full," ------------ change INK cartridge status to colorUsed ----------------- "); - Enable_MidTank_Pressure_Reading(WHS_info.Ink.cart_color); - Read_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color); - if ( Get_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color) > MidTank_Pressure_EMPTY ) + IFS_info.INK_isOK_flag = false;//0 + REPORT_MSG(WHS_full," ------------ change INK cartridge status to color Used ----------------- "); + MidTankValvesAction(Cartridge_MidTank_ON); + // test the Mid-tank capacity is not at Nadav sequence + // Enable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); + MidTank_Pressure = Read_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color); + if ( MidTank_Pressure > MidTank_Pressure_EMPTY ) { - Disable_MidTank_Pressure_Reading(WHS_info.Ink.cart_color); + ReportWithPackageFilter(WasteFilter,"------------ close door MidTank_Pressure > MidTank_Pressure_EMPTY -----------------", __FILE__,__LINE__,(MidTank_Pressure_EMPTY), RpMessage, (int)(MidTank_Pressure*1000), 0); + MidTankValvesAction(Cartridge_MidTank_OFF); + //Disable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); REPORT_MSG(WHS_full," ------------ Mid-tank not empty ----------------- "); - break; } - MidTankValvesAction(Cartridge_MidTank_ON); + REPORT_MSG(WHS_full," ------------ Mid-tank filling in process ----------------- "); Pannel_Leds(CART_1, MODE_ON); cart1.color = BLINK; //add timeout - WHS_info.Ink.time_out = 1; - WHS_info.Cartridge_Ink_TimeOut_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeInkTimeOutCallBackTime, CartridgeInkTimeOutCallBackFunction, 0,0,0 ); //eOneSecond + IFS_info.Ink.time_out = 1; + IFS_info.Cartridge_Ink_TimeOut_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeInkTimeOutCallBackTime, CartridgeInkTimeOutCallBackFunction, 0,0,0 ); //eOneSecond - //add callback for midtank status is full +// //add callback for midtank status is full +// IFS_info.Cartridge_Ink_TimeOut_device_Id = AddControlCallback( WasteTankCBFunction, CartridgeInkTimeOutCallBackTime, CartridgeInkTimeOutCallBackFunction, 0,0,0 ); //eOneSecond +// Enable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); +// Read_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color); +// if ( Get_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color) > MidTank_Pressure_FULL ) +// { +// Disable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); +// REPORT_MSG(WHS_full," ------------ Mid-tank not empty ----------------- "); +// break; +// } } } break; case IFS_INK_presence_sensor: - if (WHS_info.WHS_sensors.IFS_Ink_precense_sensor == CarteidgePrecense) + if (IFS_info.IFS_Ink_precense_sensor == CarteidgePrecense) { // is power down in process?? //todo if ( !PowerOffInProcessGetState() ) // not in power down proccess { Pannel_Leds(CART_1, MODE_ON); - //cart1.color = BLINK; + cart1.color = colorON; //Pannel_Leds(CART_2, MODE_ON); // cart2.color = fastBILNK; RdCartridgeParam(INK_cartridge); //todo @@ -850,89 +878,30 @@ bool WasteTankCBFunction() } - else + else // Cartridge is out { + IFS_info.INK_isOK_flag = false;//0 Pannel_Leds(CART_1, MODE_OFF); cart1.color = colorOFF; } break; + case IFS_INK_authentication_pass: if (!ColorMatch()) { - // print: "power down in process"; REPORT_MSG(WHS_full," ------------ cartridge color does not match ----------------- "); + Pannel_Leds(CART_1, MODE_ON); + cart1.color = BLINK; break; } REPORT_MSG(WHS_full," ------------ close cartridge cover ----------------- "); - WHS_info.sttMachine = INK_isOK; + IFS_info.INK_isOK_flag = true; // 1 break; + case IFS_INK_authentication_fail: break; - /* - case IFS_INK_presence_sensor: //source IFS_INK_authentication_pass - if (WHS_info.WHS_sensors.IFS_Ink_precense_sensor == CarteidgePrecense) - { - // is power down in process?? //todo - Pannel_Leds(CART_1, MODE_ON); - if ( RdCartridgeParam(INK_cartridge) ) - { - MidTank_Pressure = Get_MidTank_Pressure_Sensor((CMYK_color)cartridge_info.ColorName); - if ( MidTank_Pressure > MidTank_Pressure_EMPTY) - { - REPORT_MSG(WHS_emptying," ------ IFS mid_tank _not _empty remove INK cartridge ---------- "); - break; - } - switch ((CMYK_color)cartridge_info.ColorName) //todo enter the correct color from RFID - { - case CYAN : - Valve_Set( VALVE_2W_CART_MID_1, Cartridge_MidTank_ON); //Cartridge_MidTank_ON Cartridge_MidTank_OFF - Valve_Set( VALVE_2W_MID_AIR_1 , Cartridge_MidTank_ON); - break; - case MAGENTA : - Valve_Set( VALVE_2W_CART_MID_5, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_5 , Cartridge_MidTank_ON); - break; - case YELLOW : - Valve_Set( VALVE_2W_CART_MID_2, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_2 , Cartridge_MidTank_ON); - break; - case BLACK : - Valve_Set( VALVE_2W_CART_MID_6, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_6 , Cartridge_MidTank_ON); - break; - case 4 : - Valve_Set( VALVE_2W_CART_MID_3, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_3 , Cartridge_MidTank_ON); - break; - case 5 : - Valve_Set( VALVE_2W_CART_MID_7, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_7 , Cartridge_MidTank_ON); - break; - case 6 : - Valve_Set( VALVE_2W_CART_MID_4, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_4 , Cartridge_MidTank_ON); - break; - case 7 : - Valve_Set( VALVE_2W_CART_MID_8, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_8 , Cartridge_MidTank_ON); - break; - default: //wrong color - break; - } - - } - else // if the authentication is failed - { - Pannel_Leds(CART_1, MODE_OFF); - } - } - else //ink cart out - { - Pannel_Leds(CART_1, MODE_OFF); - } -*/ case WHS_waste1_presence_sensor : if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor == CarteidgePrecense ) // waste cartridge 1 is inserted . @@ -941,9 +910,9 @@ bool WasteTankCBFunction() Pannel_Leds(CART_2, MODE_ON); cart2.color = colorON; RdCartridgeParam(waste_cartridge1); - SetActiveWastCartridge(); - SetValveDirection(); - if ( CartridgeAuthentication(waste_cartridge1)) // to define authentication +// SetActiveWastCartridge(); +// SetValveDirection(); + if ( CartridgeAuthentication(waste_cartridge1) == PASSED) // to define authentication { //WHS_info.cartridge_1.autheticate = PASSED; //='0' //???WHS_info.WHS_valve = waste_cartridge1; // or we should do it only before pumping???? @@ -951,7 +920,9 @@ bool WasteTankCBFunction() else { //WHS_info.cartridge_1.autheticate = FAILED; //='1' - SetCartridgeLED(waste_cartridge1, led_off); + //SetCartridgeLED(waste_cartridge1, led_off); + Pannel_Leds(CART_2, MODE_OFF); + cart2.color = colorOFF; } } else // waste cartridge 1 take out @@ -959,17 +930,6 @@ bool WasteTankCBFunction() Pannel_Leds(CART_2, MODE_OFF); cart2.color = colorOFF; WHS_info.cartridge_1.autheticate = FAILED; - //???if (WHS_info.cartridge_2.autheticate == PASSED) // or we should do it only before pumping???? - //???{ - //???WHS_info.WHS_valve = waste_cartridge; - //???SetValveDirection(); - //???} - //???else - //???{ - //??? - //???} - //??? RdCartridgeParam(waste_cartridge2); - //???WHS_info.WHS_valve = waste_cartridge1; } //SetActiveWastCartridge(); break; @@ -979,7 +939,7 @@ bool WasteTankCBFunction() Pannel_Leds(CART_3, MODE_ON);//SetCartridgeLED(waste_cartridge2, led_on); cart3.color = colorON; RdCartridgeParam(waste_cartridge2); - if ( CartridgeAuthentication(waste_cartridge2)) // to define authentication + if ( CartridgeAuthentication(waste_cartridge2) == PASSED) // to define authentication { //WHS_info.cartridge_2.autheticate = PASSED; //='0' //???WHS_info.WHS_valve = waste_cartridge2; // or we should do it only before pumping???? @@ -988,7 +948,8 @@ bool WasteTankCBFunction() else { //WHS_info.cartridge_2.autheticate = FAILED; //='1' - SetCartridgeLED(waste_cartridge2, led_off); + Pannel_Leds(CART_3, MODE_OFF);//SetCartridgeLED(waste_cartridge2, led_off); + cart3.color = colorON; } } else // waste cartridge 2 take out @@ -1012,6 +973,7 @@ bool WasteTankCBFunction() } //SetActiveWastCartridge(); break; + case WHS_Timeout: REPORT_MSG(WHS_emptying," ------------ WHS_Timeout ----------------- "); AlarmHandlingSetAlarm( EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT, true); @@ -1031,21 +993,23 @@ bool WasteTankCBFunction() // // break; case IFS_Timeout_Second: - Disable_MidTank_Pressure_Reading(WHS_info.Ink.cart_color); - WHS_info.Cartridge_Ink_TimeOut_device_Id = RemoveControlCallback(WHS_info.Cartridge_Ink_TimeOut_device_Id, WasteTankCBFunction ); +// Disable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); + IFS_info.Cartridge_Ink_TimeOut_device_Id = RemoveControlCallback(IFS_info.Cartridge_Ink_TimeOut_device_Id, WasteTankCBFunction ); REPORT_MSG(WHS_full," ------------ Change cartridge status to Fail ----------------- "); MidTankValvesAction(Cartridge_MidTank_OFF); cart1.color = fastBILNK; REPORT_MSG(WHS_full," ------------ Display Mid-tank # filling fail ----------------- "); REPORT_MSG(WHS_full," ------------ call customer support ----------------- "); - IFS_TimeOutAlarm(); + Pannel_Leds(CART_1, MODE_ON); + cart1.color = fastBILNK; + //IFS_TimeOutAlarm(); break; case IFS_MidTankFull: - Disable_MidTank_Pressure_Reading(WHS_info.Ink.cart_color); +// Disable_MidTank_Pressure_Reading(IFS_info.Ink.cart_color); WHS_info.Cartridge_Ink_TimeOut_device_Id = RemoveControlCallback(WHS_info.Cartridge_Ink_TimeOut_device_Id, WasteTankCBFunction ); - REPORT_MSG(WHS_full," ------------ Change cartridge status to WasteEmpty ----------------- "); + REPORT_MSG(WHS_full," ------------ Change cartridge status to Waste Empty ----------------- "); Pannel_Leds(CART_1, MODE_OFF); cart1.color = colorOFF; MidTankValvesAction(Cartridge_MidTank_OFF); @@ -1106,67 +1070,75 @@ WHS_sensor CartridgeCoverCallBackFunction() WHS_info.WHS_sensors.cartridge_cover = !WHS_info.WHS_sensors.cartridge_cover; ret = WHS_cartridge_cover_sensor; //todo } - return ret; -} - - - -WHS_sensor CartridgeInkTimeOutCallBackFunction() -{ - WHS_sensor ret = WHS_no_event; -// uint32_t time_out_second = 0 ; - - if (WHS_info.Ink.time_out) WHS_info.Ink.time_out += 1; - Read_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color); - if (Get_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color) >= WHS_info.MidTank_capacity + CARTRIDGE_CAPATICY) + else if (( IFS_info.INK_isOK_flag ) && ( WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN))// for Mid-tank filling { - WHS_info.Ink.time_out = 0; - WHS_info.event = IFS_MidTankFull; - return IFS_MidTankFull; + REPORT_MSG(parameter," ------------ Mid-tank Filling : Close cartridge cover ----------------- "); } - if (WHS_info.Ink.time_out == CARTRIDGE_INK_TIMEOUT) + else if(WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN) { - //WHS_info.Ink.time_out = 0; - //return WHS_info.event = IFS_Timeout; - - REPORT_MSG(WHS_emptying," ------------ IFS_Timeout ----------------- "); - // try again : - // start timeout - // close and open the correct valves - REPORT_MSG(WHS_full," ------------ IFS_Timeout_Second_Time ----------------- "); - MidTankValvesAction(Cartridge_MidTank_OFF); + REPORT_MSG(parameter," ------------ Mid-tank Filling : Cartridge door open ----------------- "); } - - if (WHS_info.Ink.time_out == (CARTRIDGE_INK_TIMEOUT+1)) //need to open the valve for second chance - { - MidTankValvesAction(Cartridge_MidTank_ON); - } - - if (WHS_info.Ink.time_out == CARTRIDGE_INK_TIMEOUTx2) - { - WHS_info.Ink.time_out = 0; - WHS_info.event = IFS_Timeout_Second; - return IFS_Timeout_Second; - } return ret; } -WHS_sensor CartridgeInkCallBackFunction() -{ - uint32_t parameter = 6 ; +//WHS_sensor CartridgeInkTimeOutCallBackFunction() +//{ +// WHS_sensor ret = WHS_no_event; +//// uint32_t time_out_second = 0 ; +// +// if (WHS_info.Ink.time_out) WHS_info.Ink.time_out += 1; +// Read_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color); +// if (Get_MidTank_Pressure_Sensor(WHS_info.Ink.cart_color) >= WHS_info.MidTank_capacity + CARTRIDGE_CAPATICY) +// { +// WHS_info.Ink.time_out = 0; +// WHS_info.event = IFS_MidTankFull; +// return IFS_MidTankFull; +// } +// if (WHS_info.Ink.time_out == CARTRIDGE_INK_TIMEOUT) +// { +// //WHS_info.Ink.time_out = 0; +// //return WHS_info.event = IFS_Timeout; +// +// REPORT_MSG(WHS_emptying," ------------ IFS_Timeout ----------------- "); +// // try again : +// // start timeout +// // close and open the correct valves +// REPORT_MSG(WHS_full," ------------ IFS_Timeout_Second_Time ----------------- "); +// MidTankValvesAction(Cartridge_MidTank_OFF); +// } +// +// if (WHS_info.Ink.time_out == (CARTRIDGE_INK_TIMEOUT+1)) //need to open the valve for second chance +// { +// MidTankValvesAction(Cartridge_MidTank_ON); +// } +// +// if (WHS_info.Ink.time_out == CARTRIDGE_INK_TIMEOUTx2) +// { +// WHS_info.Ink.time_out = 0; +// WHS_info.event = IFS_Timeout_Second; +// return IFS_Timeout_Second; +// } +// return ret; +//} - WHS_sensor ret = WHS_no_event; - if (WHS_info.WHS_sensors.IFS_Ink_precense_sensor != RdInkCartridgeSensor()) - { - REPORT_MSG(parameter," ------------ find : IFS_Ink_presence_sensor event ----------------- "); - WHS_info.event = IFS_INK_presence_sensor; - WHS_info.WHS_sensors.IFS_Ink_precense_sensor = !WHS_info.WHS_sensors.IFS_Ink_precense_sensor; - ret = IFS_INK_presence_sensor; - } - return ret; -} + + +//WHS_sensor CartridgeInkCallBackFunction() +//{ +// uint32_t parameter = 6 ; +// +// WHS_sensor ret = WHS_no_event; +// if (WHS_info.WHS_sensors.IFS_Ink_precense_sensor != RdInkCartridgeSensor()) +// { +// REPORT_MSG(parameter," ------------ find : IFS_Ink_presence_sensor event ----------------- "); +// WHS_info.event = IFS_INK_presence_sensor; +// WHS_info.WHS_sensors.IFS_Ink_precense_sensor = !WHS_info.WHS_sensors.IFS_Ink_precense_sensor; +// ret = IFS_INK_presence_sensor; +// } +// return ret; +//} @@ -1217,14 +1189,14 @@ bool InitCartStatus() if (RdInkCartridgeSensor()) { REPORT_MSG(parameter," ------------ INIT : IFS_INK is presence ----------------- "); - WHS_info.WHS_sensors.IFS_Ink_precense_sensor = CarteidgePrecense; + IFS_info.IFS_Ink_precense_sensor = CarteidgePrecense; Pannel_Leds( CART_1, MODE_ON); cart1.color = colorON; } else { REPORT_MSG(parameter," ------------ INIT : IFS_INK is NOT presence ----------------- "); - WHS_info.WHS_sensors.IFS_Ink_precense_sensor = CarteidgeNotPrecense; + IFS_info.IFS_Ink_precense_sensor = CarteidgeNotPrecense; Pannel_Leds( CART_1, MODE_OFF); cart1.color = colorOFF; } @@ -1263,7 +1235,7 @@ bool InitCartStatus() - if (WHS_info.WHS_sensors.IFS_Ink_precense_sensor == CarteidgePrecense) CartridgeAuthentication(INK_cartridge); + if (IFS_info.IFS_Ink_precense_sensor == CarteidgePrecense) CartridgeAuthentication(INK_cartridge); if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor == CarteidgePrecense) CartridgeAuthentication(waste_cartridge1); if (WHS_info.WHS_sensors.waste_cartridge2_precense_sensor == CarteidgePrecense) CartridgeAuthentication(waste_cartridge2); SetActiveWastCartridge(); @@ -1271,7 +1243,7 @@ bool InitCartStatus() if (WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN) { REPORT_MSG(parameter," ------------ WHS_CartridgeCoverOPEN : add callback for cart1 and cart 2 ----------------- "); - WHS_info.Cartridge_Ink_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeInkCallBackFunction, 0,0,0 ); + IFS_info.Cartridge_Ink_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeInkCallBackFunction, 0,0,0 ); WHS_info.Cartridge_Waste1_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeWaste1CallBackFunction, 0,0,0 ); WHS_info.Cartridge_Waste2_device_Id = AddControlCallback( WasteTankCBFunction, eOneSecond, CartridgeWaste2CallBackFunction, 0,0,0 ); } @@ -1374,11 +1346,11 @@ U8 cartridge_handeling() } */ -U8 SetCartridgeLED(cartridge_name name,led_status led) -{ - bool ret = notOK; - return ret; -} +//U8 SetCartridgeLED(cartridge_name name,led_status led) +//{ +// bool ret = notOK; +// return ret; +//} /* U8 CartridgePrecenceCBFunction() @@ -1425,28 +1397,28 @@ U8 CartridgePrecenceCallBackFunction() -bool CartridgeCoverCBFunction() -{ - bool ret = notOK; - if (WHS_info.WHS_sensors.cartridge_cover == OPEN) - { - //if (WHS_info.WHS_pump == ON) - //{ - SetWastePump(CLOSE); //pump OFF - //} - // prevent NEW Job - // Display "Close cartridge cover" - // pop up message in GUI - } - else - { - // can do a NEW Job - // remove message "Close cartridge cover" - // remove pop up message in GUI - } - WHS_info.event = WHS_no_event; - return ret; -} +//bool CartridgeCoverCBFunction() +//{ +// bool ret = notOK; +// if (WHS_info.WHS_sensors.cartridge_cover == OPEN) +// { +// //if (WHS_info.WHS_pump == ON) +// //{ +// SetWastePump(CLOSE); //pump OFF +// //} +// // prevent NEW Job +// // Display "Close cartridge cover" +// // pop up message in GUI +// } +// else +// { +// // can do a NEW Job +// // remove message "Close cartridge cover" +// // remove pop up message in GUI +// } +// WHS_info.event = WHS_no_event; +// return ret; +//} /*------------------------------------------------------------------------------------------------*/ @@ -1463,17 +1435,17 @@ U8 WHS_init(void) } -void midtanktest6_ON(void) -{ - Valve_Set( VALVE_2W_CART_MID_1, Cartridge_MidTank_ON); - Valve_Set( VALVE_2W_MID_AIR_1 , Cartridge_MidTank_ON); -} - -void midtanktest6_OFF(void) -{ - Valve_Set( VALVE_2W_CART_MID_1, Cartridge_MidTank_OFF); - Valve_Set( VALVE_2W_MID_AIR_1 , Cartridge_MidTank_OFF); -} +//void midtanktest6_ON(void) +//{ +// Valve_Set( VALVE_2W_CART_MID_1, Cartridge_MidTank_ON); +// Valve_Set( VALVE_2W_MID_AIR_1 , Cartridge_MidTank_ON); +//} +// +//void midtanktest6_OFF(void) +//{ +// Valve_Set( VALVE_2W_CART_MID_1, Cartridge_MidTank_OFF); +// Valve_Set( VALVE_2W_MID_AIR_1 , Cartridge_MidTank_OFF); +//} diff --git a/Software/Embedded_SW/Embedded/src/makefile.libs b/Software/Embedded_SW/Embedded/src/makefile.libs index f262762ef..6d9bf810f 100644 --- a/Software/Embedded_SW/Embedded/src/makefile.libs +++ b/Software/Embedded_SW/Embedded/src/makefile.libs @@ -1,6 +1,6 @@ # # This file was generated based on the configuration script: -# C:\Tango\Software\Embedded_SW\Embedded\Embedded.cfg +# C:\TFS\Software\Embedded_SW\Embedded\Embedded.cfg # # This makefile may be included in other makefiles that need to build # the libraries containing the compiled source files generated as @@ -14,7 +14,7 @@ # # The absolute path to the generated source directory (at the time the # sources were generated) is: -# C:\Tango\Software\Embedded_SW\Embedded\src +# C:\TFS\Software\Embedded_SW\Embedded\src # GEN_SRC_DIR ?= ../src diff --git a/Software/Embedded_SW/Embedded/src/sysbios/makefile b/Software/Embedded_SW/Embedded/src/sysbios/makefile index 1dec70826..527c48702 100644 --- a/Software/Embedded_SW/Embedded/src/sysbios/makefile +++ b/Software/Embedded_SW/Embedded/src/sysbios/makefile @@ -1,29 +1,29 @@ -XOPTS = -I"C:/TI/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M4F +XOPTS = -I"C:/ti/xdctools_3_32_00_06_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M4F -vpath % C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/ -vpath %.c C:/TI/xdctools_3_32_00_06_core/packages/ +vpath % C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/ +vpath %.c C:/ti/xdctools_3_32_00_06_core/packages/ CCOPTS = --endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -q -ms --opt_for_speed=2 --program_level_compile -o3 -g --optimize_with_debug -Dxdc_FILE=__FILE__ -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_knl_Clock_stopCheckNext__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U -XDC_ROOT = C:/TI/xdctools_3_32_00_06_core/packages/ +XDC_ROOT = C:/ti/xdctools_3_32_00_06_core/packages/ -BIOS_ROOT = C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/ +BIOS_ROOT = C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/ BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=16 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=16 -Dti_sysbios_knl_Task_checkStackFlag__D=TRUE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_PERIODIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=TRUE -BIOS_INC = -I"C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/" +BIOS_INC = -I"C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/" -TARGET_INC = -I"C:/TI/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/" +TARGET_INC = -I"C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/" INCS = $(BIOS_INC) $(TARGET_INC) -CC = C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl -c $(CCOPTS) -I C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include -ASM = C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl -c $(CCOPTS) -I C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include -AR = C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armar rq +CC = C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include +ASM = C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include +AR = C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armar rq -DEL = C:/TI/xdctools_3_32_00_06_core/packages/../bin/rm -f -CP = C:/TI/xdctools_3_32_00_06_core/packages/../bin/cp -f +DEL = C:/ti/xdctools_3_32_00_06_core/packages/../bin/rm -f +CP = C:/ti/xdctools_3_32_00_06_core/packages/../bin/cp -f define RM $(if $(wildcard $1),$(DEL) $1,:) diff --git a/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f b/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f Binary files differindex 6e6411558..f4cc14aed 100644 --- a/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f +++ b/Software/Embedded_SW/Embedded/src/sysbios/sysbios.aem4f |
