aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-06 01:19:21 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-06 01:19:21 +0200
commit258399bb206839cdb7cd276839675fa14910bc36 (patch)
tree5cafc49a6cf51bbbf965cedc5b6081b604d0239a /Software/Embedded_SW/Embedded/Modules
parentc210f8d477af51fd70af0901315a48e193568059 (diff)
parentb523b20ae1674266d6ba13ac24b1fc8689c4b6fe (diff)
downloadTango-258399bb206839cdb7cd276839675fa14910bc36.tar.gz
Tango-258399bb206839cdb7cd276839675fa14910bc36.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c6
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c172
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c8
5 files changed, 75 insertions, 116 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 828961d17..35065cc2a 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -150,9 +150,10 @@ uint32_t HWConfigurationInit(void)
IDS_Dispenser_Content_Init();
//ProcessParamsInit();
Buttons_Init();
- WHS_init();
if (WHS_Type == WHS_TYPE_NEW)
newWHS_init();
+ WHS_init();
+
ADC_MUX_Init();
GeneralHwReady = true;
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index 96ce9331d..2de6b0641 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -807,7 +807,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue)
if (abs(readValue - HeaterPreviousRead[index])>2000)
{
ReportWithPackageFilter(HeatersFilter,"Temperature Spike",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index);
- if (HeaterSpikeRead[index] = 0)
+ if (HeaterSpikeRead[index] == 0)
{
HeaterSpikeRead[index] = readValue;
}
@@ -993,7 +993,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
ReportWithPackageFilter(HeatersFilter,"AC Temperature Spike",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index);
if (readValue > HeaterCmd[index].targettemperatue)
{
- if (HeaterSpikeRead[index] = 0)
+ if (HeaterSpikeRead[index] == 0)
{
HeaterSpikeRead[index] = readValue;
}
@@ -1200,7 +1200,7 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
{
DeActivateHeater(index);
HeaterRecalculateHeaterParams(index, 0);
- if (HeaterSpikeRead[index] = 0)
+ if (HeaterSpikeRead[index] == 0)
{
HeaterSpikeRead[index] = readValue;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c
index e6e5923c0..c21316318 100644
--- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c
+++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c
@@ -158,7 +158,7 @@ void Stub_ProgressRequest(MessageContainer* requestContainer)
else //
if(request->amount == 0x3EB)
{
- uint16_t tempu16=0;
+ uint16_t tempu16 = 0;
if (WHS_Type == WHS_TYPE_NEW)
{
if (request->delay <= 0x03FF)
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
index 5fcab9c13..d845a128d 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
@@ -328,23 +328,30 @@ bool SetWastePump( bool power)
if ( power == OPEN )
{
if (WHS_Type == WHS_TYPE_UNKNOWN)
- Pumps_Control(WHS_WTANKPUMP2, OPEN); //waste_pump_power_on();
- else //new WHS
- Trigger_SetWHSPump(OPEN);
-
- REPORT_MSG(WHS_empty," ------------ WHS WHS_empty start PUMP ----------------- ");
+ {
+ Pumps_Control(WHS_WTANKPUMP2, OPEN); //waste_pump_power_on();
+ }
+ else //new WHS
+ {
+ Trigger_SetWHSPump(OPEN);
+ }
WHS_info.WHS_pump.status = OPEN;
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_empty start PUMP -----------------", __FILE__, __LINE__, WHS_info.WHS_pump.status, RpMessage, 0, 0);
WHS_info.WHS_pump.time = STARTCOUNT;
ret = OPEN;
}
else
{
if (WHS_Type == WHS_TYPE_UNKNOWN)
- Pumps_Control(WHS_WTANKPUMP2, CLOSE); //waste_pump_power_on();
- else //new WHS
- Trigger_SetWHSPump(CLOSE);
- REPORT_MSG(WHS_empty," ------------ WHS WHS_empty stop PUMP ----------------- ");
- WHS_info.WHS_pump.status = CLOSE;
+ {
+ Pumps_Control(WHS_WTANKPUMP2, CLOSE); //waste_pump_power_on();
+ }
+ else //new WHS
+ {
+ Trigger_SetWHSPump(CLOSE);
+ }
+ WHS_info.WHS_pump.status = CLOSE;
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_empty stop PUMP -----------------", __FILE__, __LINE__, WHS_info.WHS_pump.status, RpMessage, 0, 0);
WHS_info.WHS_pump.time = STOPCOUNT;
ret = CLOSE;
}
@@ -366,12 +373,14 @@ bool SetValveDirection()
if (WHS_info.active_cartridge == waste_cartridge1)
{
WHS_info.WHS_valve = VALVE_DIR_WASTE_CARTRIDGE1;
- }
+ ReportWithPackageFilter(WasteFilter,"------------WHS_info.WHS_valve VALVE_DIR_WASTE_CARTRIDGE1 -----------------", __FILE__, __LINE__, WHS_info.WHS_valve, RpMessage, 0 ,0);
+}
else
{
WHS_info.WHS_valve = VALVE_DIR_WASTE_CARTRIDGE2;
+ ReportWithPackageFilter(WasteFilter,"------------WHS_info.WHS_valve VALVE_DIR_WASTE_CARTRIDGE2 -----------------", __FILE__, __LINE__, WHS_info.WHS_valve, RpMessage, 0 ,0);
}
- ReportWithPackageFilter(WasteFilter,"------------WHS_info.WHS_valve -----------------", __FILE__,__LINE__,WHS_info.WHS_valve, RpMessage, 0 ,0);
+
if (WHS_Type == WHS_TYPE_UNKNOWN)
Valve_Set(VALVE_WASTE_TANK, WHS_info.WHS_valve);
@@ -396,7 +405,6 @@ U8 CartridgeWasteFilling(bool status)
//Pannel_Leds(PANEL_BUTTON_OR_CRAT_ID Pannel_Led_Id, OPERATION_MODE LED_Mode); //set cartridge led color slow blink
SetWastePump(OPEN);
//WHS_info.WHS_pump.time = 0;
- REPORT_MSG(WHS_empty," ------------ WHS WHS_empty start PUMP ----------------- ");
AlarmHandlingSetAlarm( EVENT_TYPE__NO_WASTE_CARTRIDGE_AVAILABLE, false);
ret=OK;
}
@@ -416,16 +424,16 @@ U8 CartridgeWasteFilling(bool status)
case waste_cartridge1:
Pannel_Leds( CART_2, MODE_OFF); //set led color
cart2.color = colorOFF;
- REPORT_MSG(WHS_empty," ------------ WHS waste_cartridge1 is used please replace it ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS waste_cartridge1 is used please replace it -----------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
break;
case waste_cartridge2:
Pannel_Leds( CART_3, MODE_OFF); //set led color
cart3.color = colorOFF;
- REPORT_MSG(WHS_empty," ------------ WHS waste_cartridge2 is used please replace it ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS waste_cartridge2 is used please replace it -----------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
break;
case no_waste_cartridge:
- REPORT_MSG(WHS_empty," ------------ !!!!!WHS No waste cartridge !!!!! ----------------- ");
- REPORT_MSG(WHS_empty," ------------ !!!! WHS insert cartridge!!!! ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ !!!!!WHS No waste cartridge !!!!! -----------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
+ ReportWithPackageFilter(WasteFilter,"------------ !!!! WHS insert cartridge!!!! -----------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
ret = ERROR;
break;
default:
@@ -479,40 +487,20 @@ WHS_sttMachin UpdateStateMachine()
if ( WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORnotFULL)
{
WHS_info.sttMachine = WHS_empty ;
- REPORT_MSG(WHS_empty," ------------ WHS WHS_empty ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_empty -----------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_tank_full_sensor, RpMessage, WHS_info.WHS_sensors.waste_tank_empty_sensor, 0);
}
- else if ((WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL) &&
- (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY))
+ else if ((WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL) &&
+ (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY))
{
WHS_info.sttMachine = WHS_full ;
- REPORT_MSG(WHS_full," ------------ WHS WHS_full ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_full -----------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_tank_full_sensor, RpMessage, WHS_info.WHS_sensors.waste_tank_empty_sensor, 0);
}
else
{
WHS_info.sttMachine = WHS_sttError ;
- REPORT_MSG(WHS_sttError," ------------ WHS sensor Error ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS sensor Error -----------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_tank_full_sensor, RpMessage, WHS_info.WHS_sensors.waste_tank_empty_sensor, 0);
}
-
-/* if (//(WHS_info.WHS_sensors.waste_tank_over_flow_sensor == SENSORnotOVERFLOW) &&
- ( WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORnotFULL) &&
- ((WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY) ||
- (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSOREMPTY)))
- WHS_info.sttMachine = WHS_empty ;
- else if (//(WHS_info.WHS_sensors.waste_tank_over_flow_sensor == SENSORnotOVERFLOW) &&
- (WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL) &&
- (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY))
- WHS_info.sttMachine = WHS_full ;
- else if (//(WHS_info.WHS_sensors.waste_tank_over_flow_sensor == SENSOROVERFLOW) &&
- (WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL) &&
- (WHS_info.WHS_sensors.waste_tank_empty_sensor == SENSORnotEMPTY))
- WHS_info.sttMachine = WHS_overflow ;
- else
- {
- WHS_info.sttMachine = WHS_sttError ;
- REPORT_MSG(WHS_sttError," ------------ WHS sensor Error ----------------- ");
- }
-*/
- return OK;
+ return WHS_info.sttMachine;
}
@@ -526,20 +514,6 @@ bool initWHS_WasteTank()
}
-/*
-WHS_sensor OverflowSensorEvent()
-{
- WHS_sensor ret = WHS_no_event;
- if (RdWasteTankOverFlowSensor() != WHS_info.WHS_sensors.waste_tank_over_flow_sensor)
- {
- WHS_info.event = WHS_overflow_sensor;
- ret = WHS_overflow_sensor;
- WHS_info.WHS_sensors.waste_tank_over_flow_sensor = !(WHS_info.WHS_sensors.waste_tank_over_flow_sensor);
- }
- return ret;
-}
-*/
-
WHS_sensor EmptySensorEvent()
{
WHS_sensor ret = WHS_no_event;
@@ -548,6 +522,7 @@ WHS_sensor EmptySensorEvent()
WHS_info.event = WHS_empty_sensor;
ret = WHS_empty_sensor;
WHS_info.WHS_sensors.waste_tank_empty_sensor = !WHS_info.WHS_sensors.waste_tank_empty_sensor;
+ ReportWithPackageFilter(WasteFilter,"------------ WHS EmptySensorEvent (status) -----------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_tank_full_sensor, RpMessage, WHS_info.WHS_sensors.waste_tank_empty_sensor, 0);
}
return ret;
}
@@ -560,6 +535,7 @@ WHS_sensor FullSensorEvent()
WHS_info.event = WHS_full_sensor;
ret = WHS_full_sensor;
WHS_info.WHS_sensors.waste_tank_full_sensor = 1-WHS_info.WHS_sensors.waste_tank_full_sensor;
+ ReportWithPackageFilter(WasteFilter,"------------ WHS FullSensorEvent (status) -----------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_tank_full_sensor, RpMessage, WHS_info.WHS_sensors.waste_tank_empty_sensor, 0);
}
return ret;
}
@@ -578,6 +554,7 @@ WHS_sensor WasteTankCallBackFunction()
{
WHS_info.WHS_pump.time = 0;
AlarmHandlingSetAlarm( EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT, false);
+ ReportWithPackageFilter(WasteFilter,"------------ WHS PUMPTIMEOUT -----------------", __FILE__, __LINE__, PUMPTIMEOUT, RpMessage, 0, 0);
return WHS_info.event = WHS_Timeout;
}
if ( FullSensorEvent())
@@ -595,7 +572,6 @@ WHS_sensor WasteTankCallBackFunction()
bool WasteTankCBFunction()
{
- uint8_t parameter = 7;
bool ret = notOK;
static bool pump_on_flag = CLOSE;
//uint32_t Cartridge_Cover_device_Id = 0;
@@ -609,11 +585,11 @@ bool WasteTankCBFunction()
if (WHS_info.sttMachine == WHS_empty)
{
WHS_info.sttMachine = WHS_filling;
- REPORT_MSG(WHS_filling," ------------ WHS_filling ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_filling ------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
}
else
{
- REPORT_MSG(WHS_filling," ------------ WHS EMPTY sensor failed !!!!!!! ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS EMPTY sensor failed !!!!!!! ------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
}
}
else //SENSOREMPTY
@@ -621,7 +597,7 @@ bool WasteTankCBFunction()
if (WHS_info.sttMachine == WHS_emptying)
{
WHS_info.sttMachine = WHS_empty;
- REPORT_MSG(WHS_filling," ------------ WHS_empty ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS_empty -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
ret = CartridgeWasteFilling(OFF);
WHS_info.Cartridge_Cover_device_Id = RemoveControlCallback(WHS_info.Cartridge_Cover_device_Id, WasteTankCBFunction );
WHS_info.Cartridge_Cover_device_Id = AddControlCallback("Cartridge Cover Door", WasteTankCBFunction, CartridgeCoverCallBackTime, CartridgeCoverCallBackFunction, 0,0,0 );//eOneSecond
@@ -629,7 +605,7 @@ bool WasteTankCBFunction()
}
else
{
- REPORT_MSG(WHS_emptying," ------------ WHS EMPTY sensor failed !!!!!!! ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS WHS EMPTY sensor failed !!!!!!! -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
}
}
break;
@@ -639,9 +615,9 @@ bool WasteTankCBFunction()
break;
if ((WHS_info.WHS_sensors.cartridge_cover == OPEN) && (WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL))
{
- ReportWithPackageFilter(WasteFilter,"------------ WHS_full , cartridge cover is open cant start the pump!!!! ----------------- ", __FILE__,__LINE__,(int)(WHS_emptying), RpMessage, (int)(WHS_info.WHS_sensors.cartridge_cover), 0);
- ReportWithPackageFilter(WasteFilter,"------------ close the cartridge cover to start the pump!!!! ----------------- ", __FILE__,__LINE__,(int)(WHS_emptying), RpMessage, (int)(WHS_info.WHS_sensors.cartridge_cover), 0);
- //pump_on_flag = OPEN;
+ ReportWithPackageFilter(WasteFilter,"------------ WHS_full , cartridge cover is open cant start the pump!!!! -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.cartridge_cover, 0);
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, close the cartridge cover to start the pump!!!! -------------" , __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.cartridge_cover, 0);
+
AlarmHandlingSetAlarm( EVENT_TYPE__NO_WASTE_CARTRIDGE_AVAILABLE, true);
WHS_info.WHS_sensors.waste_tank_full_sensor = SENSORnotFULL;
@@ -650,7 +626,7 @@ bool WasteTankCBFunction()
if (WHS_info.WHS_sensors.waste_tank_full_sensor == SENSORFULL)
{
WHS_info.sttMachine = WHS_full;
- REPORT_MSG(WHS_emptying," ------------ WHS_full ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, WHS_full -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.waste_tank_full_sensor, 0);
WHS_info.Cartridge_Cover_device_Id = RemoveControlCallback(WHS_info.Cartridge_Cover_device_Id, WasteTankCBFunction );
WHS_info.Cartridge_Cover_device_Id = AddControlCallback("Cartridge Cover Door", WasteTankCBFunction, CartridgeCoverCallBackFastTime , CartridgeCoverCallBackFunction, 0,0,0 );//eTenMillisecond
if (RdRFIDStatus (WHS_info.active_cartridge) == WasteEmpty)
@@ -668,7 +644,7 @@ bool WasteTankCBFunction()
if (ret != OK)
{
- //recreate the full event until cartridge is inserted or atontocation
+ //recreate the full event until cartridge is inserted or authentication
WHS_info.WHS_sensors.waste_tank_full_sensor = 1-WHS_info.WHS_sensors.waste_tank_full_sensor;
}
@@ -679,34 +655,21 @@ bool WasteTankCBFunction()
if (WHS_info.sttMachine == WHS_full)
{
WHS_info.sttMachine = WHS_emptying;
- REPORT_MSG(WHS_emptying," ------------ WHS_emptying ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, WHS_emptying -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.waste_tank_full_sensor, 0);
// can start a new JOB
}
else
{
- REPORT_MSG(WHS_full," ------------ WHS FULL sensor failed !!!!!!! ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, WHS FULL sensor failed !!!!!!! -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.waste_tank_full_sensor, 0);
}
}
break;
-/* case WHS_overflow_sensor:
- if (WHS_info.WHS_sensors.waste_tank_empty_sensor)
- {
-
- // 1.StopMacine
- WHS_info.sttMachine = WHS_overflow;
- }
- else
- {
- WHS_info.sttMachine = WHS_full;
- }
- break;
-*/
case WHS_cartridge_cover_sensor:
if ( WHS_info.WHS_sensors.cartridge_cover == OPEN )
{
- REPORT_MSG(parameter," Cartridge cover open ");//popup message :"Cartridge cover open" //todo
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, Cartridge cover open -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.cartridge_cover, 0);//popup message :"Cartridge cover open" //todo
if ( WHS_info.WHS_pump.status == OPEN)
{
CartridgeWasteFilling(CLOSE);
@@ -726,7 +689,7 @@ bool WasteTankCBFunction()
}
else
{
- REPORT_MSG(parameter,"Power down in process");//popup message :"Cartridge cover open" //todo
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, Power down in process -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, WHS_info.WHS_sensors.cartridge_cover, 0);//popup message :"Cartridge cover open" //todo
}
@@ -755,7 +718,7 @@ bool WasteTankCBFunction()
if ( IFS_info.INK_isOK_flag )
{
IFS_info.INK_isOK_flag = false;//0
- REPORT_MSG(WHS_full," ------------ change INK cartridge status to color Used ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, change INK cartridge status to color Used -------------", __FILE__, __LINE__, IFS_info.INK_isOK_flag, RpMessage, 0, 0);
// test the Mid-tank capacity is not at Nadav sequence
MidTank_Pressure = Get_MidTank_Pressure_Sensor(IFS_info.Ink.cart_color);
if ( MidTank_Pressure > MidTank_Pressure_EMPTY )
@@ -763,11 +726,10 @@ bool WasteTankCBFunction()
ReportWithPackageFilter(WasteFilter,"------------ close door MidTank_Pressure > MidTank_Pressure_EMPTY -----------------", __FILE__,__LINE__,(int)(MidTank_Pressure_EMPTY*1000), 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 ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, Mid-tank not empty -------------", __FILE__, __LINE__, 0, RpMessage, 0, 0);
break;
}
IFS_info.MidTank_capacity = MidTank_Pressure;
- REPORT_MSG(WHS_full," ------------ Mid-tank filling in process ----------------- ");
ReportWithPackageFilter(WasteFilter,"------------ Mid-tank filling in process -----------------", __FILE__,__LINE__,(int)(MidTank_Pressure_EMPTY*1000), RpMessage, (int)(MidTank_Pressure*1000), 0);
Pannel_Leds(CART_1, MODE_ON);
cart1.color = BLINK;
@@ -797,7 +759,7 @@ bool WasteTankCBFunction()
if (IFS_info.IFS_Ink_precense_sensor == CarteidgePrecense)
{
// is power down in process?? //todo
- if ( !PowerOffInProcessGetState() ) // not in power down proccess
+ if ( !PowerOffInProcessGetState() ) // not in power down process
{
Pannel_Leds(CART_1, MODE_ON);
cart1.color = colorON;
@@ -806,10 +768,8 @@ bool WasteTankCBFunction()
else
{
// print: "power down in process";
- REPORT_MSG(WHS_full," ------------ power down in process ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, Power down in process -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, IFS_info.IFS_Ink_precense_sensor, 0);
}
-
-
}
else // Cartridge is out
{
@@ -822,14 +782,13 @@ bool WasteTankCBFunction()
IFS_info.Ink.time_out = 0;
IFS_info.Cartridge_Ink_TimeOut_device_Id = RemoveControlCallback(IFS_info.Cartridge_Ink_TimeOut_device_Id, WasteTankCBFunction );
}
-
}
break;
case IFS_INK_authentication_pass:
if (!ColorMatch())
{
- REPORT_MSG(WHS_full," ------------ cartridge color does not match ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, cartridge color does not match -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
Pannel_Leds(CART_1, MODE_ON);
cart1.color = BLINK;
break;
@@ -919,6 +878,7 @@ bool WasteTankCBFunction()
case WHS_Timeout:
REPORT_MSG(WHS_emptying," ------------ WHS_Timeout ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, WHS_Timeout -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
AlarmHandlingSetAlarm( EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT, true);
CartridgeWasteFilling(OFF);
break;
@@ -938,12 +898,12 @@ bool WasteTankCBFunction()
case IFS_Timeout_Second:
// 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 ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ WHS, Change cartridge status to Fail -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
MidTankValvesAction(Cartridge_MidTank_OFF);
cart1.color = fastBILNK;
- REPORT_MSG(WHS_full," ------------ Display Mid-tank # filling fail ----------------- ");
- REPORT_MSG(WHS_full," ------------ call customer support ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ Display Mid-tank # filling fail -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
+ ReportWithPackageFilter(WasteFilter,"------------ call customer support -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
Pannel_Leds(CART_1, MODE_ON);
cart1.color = fastBILNK;
IFS_TimeOutAlarm(true);
@@ -952,11 +912,11 @@ bool WasteTankCBFunction()
case IFS_MidTankFull:
// 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 Waste Empty ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ Change cartridge status to Waste Empty -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
Pannel_Leds(CART_1, MODE_OFF);
cart1.color = colorOFF;
MidTankValvesAction(Cartridge_MidTank_OFF);
- REPORT_MSG(WHS_full," ------------ Display Mid-tank # filling done ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ Display Mid-tank # filling done -------------", __FILE__, __LINE__, WHS_info.sttMachine, RpMessage, 0, 0);
break;
@@ -977,7 +937,6 @@ bool WasteTankCBFunction()
bool RdCartridgeCoverSensor()
{
- uint32_t parameter = 6 ;
//REPORT_MSG(parameter," ------------ RD Cartridge Cover Sensor ----------------- ");
bool ret = notOK;
@@ -987,11 +946,11 @@ bool RdCartridgeCoverSensor()
ret = Get_COVER_1_State(CartridgesDoor);
if ((ret == OPEN ) && (ret != WHS_info.WHS_sensors.cartridge_cover))
{
- Report(" ------------ RD Cartridge Cover Sensor is = OPEN(1) ----------------- ",__FILE__,__LINE__,ret,RpWarning,ret,0);
+ ReportWithPackageFilter(WasteFilter,"------------ RD Cartridge Cover Sensor is = OPEN(1) -------------", __FILE__, __LINE__, ret, RpMessage, 0, 0);
}
if ((ret == CLOSE ) && (ret != WHS_info.WHS_sensors.cartridge_cover))
{
- REPORT_MSG(parameter," ------------ RD Cartridge Cover Sensor is = CLOSE(0) ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ RD Cartridge Cover Sensor is = CLOSE(0) -------------", __FILE__, __LINE__, ret, RpMessage, 0, 0);
}
return ret;
}
@@ -1001,21 +960,18 @@ bool RdCartridgeCoverSensor()
WHS_sensor CartridgeCoverCallBackFunction()
{
- uint32_t parameter = 6 ;
-
-
WHS_sensor ret = WHS_no_event;
//ret = RdCartridgeCoverSensor();
if ( WHS_info.WHS_sensors.cartridge_cover != RdCartridgeCoverSensor() )
{
- REPORT_MSG(parameter," ------------ find : WHS_cartridge_cover_sensor event ----------------- ");
WHS_info.event = WHS_cartridge_cover_sensor;
WHS_info.WHS_sensors.cartridge_cover = !WHS_info.WHS_sensors.cartridge_cover;
+ ReportWithPackageFilter(WasteFilter,"------------ find : WHS_cartridge_cover_sensor event -------------", __FILE__, __LINE__, WHS_info.WHS_sensors.cartridge_cover, RpMessage, 0, 0);
ret = WHS_cartridge_cover_sensor; //todo
}
else if (( IFS_info.INK_isOK_flag ) && ( WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN))// for Mid-tank filling
{
- REPORT_MSG(parameter," ------------ Mid-tank Filling : Close cartridge cover ----------------- ");
+ ReportWithPackageFilter(WasteFilter,"------------ Mid-tank Filling : Close cartridge cover -------------", __FILE__, __LINE__, WHS_info.WHS_sensors.cartridge_cover, RpMessage, 0, 0);
}
/*else if(WHS_info.WHS_sensors.cartridge_cover == WHS_CartridgeCoverOPEN)
{
@@ -1087,15 +1043,13 @@ WHS_sensor CartridgeCoverCallBackFunction()
WHS_sensor CartridgeWaste1CallBackFunction()
{
- uint32_t parameter = 6 ;
-
WHS_sensor ret = WHS_no_event;
//ret = RdCartridgeCoverSensor();
if (WHS_info.WHS_sensors.waste_cartridge1_precense_sensor != RdWasteCartridge1Sensor())
{
- REPORT_MSG(parameter," ------------ find : WHS_waste1_presence_sensor event ----------------- ");
WHS_info.event = WHS_waste1_presence_sensor;
WHS_info.WHS_sensors.waste_cartridge1_precense_sensor = !WHS_info.WHS_sensors.waste_cartridge1_precense_sensor;
+ ReportWithPackageFilter(WasteFilter,"------------ find : WHS_waste1_presence_sensor event -------------", __FILE__, __LINE__, WHS_info.WHS_sensors.waste_cartridge1_precense_sensor, RpMessage, 0, 0);
ret = WHS_waste1_presence_sensor;
}
return ret;
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
index a255f55a0..99b96ddf3 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/newWHS_init.c
@@ -9,13 +9,13 @@
#include <Drivers/I2C_Communication/WHS_Card/I2C_WHS_Mux.h>
#include <Drivers/I2C_Communication/I2C.h>
#include "Drivers/I2C_Communication/WHS_Card/WHS_data.h"
-#include <Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h>
#include <Drivers/I2C_Communication/WHS_Card/D_EMC2302_Fan/WHS_Fan.h>
#include <Drivers/I2C_Communication/I2C_Task.h>
#include <Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.h>
#include <Drivers/I2C_Communication/WHS_Card/D_ADS122_PT100/WHS_PT100_ADC.h>
#include <Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h>
#include <Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.h>
+#include <Drivers/I2C_Communication/WHS_Card/EEPROM/D_EEPROM.h>
#include <Drivers/I2C_Communication/WHS_Card/IO_Extender_Ports_TCA9555/WHS_IO.h>
bool test_9555(void);
@@ -24,17 +24,21 @@ bool WHS_I2C_EEprom_Write_Ch_shai_taest(void);
bool newWHS_init(void)
{
bool status = OK;
- Main_Mux_Flag = 0;
+
+ //Main_Mux_Flag = 0;
// delayms(4000);
// status = Select_Main_WHS_Mux_Channel();
+
+ //Trigger_Check_WHS_Type_Via_EEPROM();
Trigger_WHS_init_IO();
Trigger_WHS_init_fan();
Trigger_WHS_init_PT100();
Trigger_WHS_init_Blower();
Trigger_WHS_MAX11614_Init();
Trigger_WHS_Rheostat_init();
+
//status |= WHS_IO_Init();
//status |= init_WHS_fan();
//