aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
authorShai Frieder <Shai.Frieder@twine-s.com>2019-10-07 13:10:29 +0300
committerShai Frieder <Shai.Frieder@twine-s.com>2019-10-07 13:10:29 +0300
commitf6b0a945f86ee91cebd2d6726c06db93cdad0934 (patch)
tree4709cbac40191b5b2fe7002eaf3901041e7023fe /Software/Embedded_SW/Embedded/Modules
parent032b53897657f88e674d83ae06b76d0ac4d09abc (diff)
downloadTango-f6b0a945f86ee91cebd2d6726c06db93cdad0934.tar.gz
Tango-f6b0a945f86ee91cebd2d6726c06db93cdad0934.zip
fixed IFS WHS pump valve direction
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste.h7
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c10
3 files changed, 12 insertions, 6 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index 5b4074a52..061f6b3a3 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -145,6 +145,7 @@ uint32_t HWConfigurationInit(void)
IDS_Dispenser_Content_Init();
//ProcessParamsInit();
Buttons_Init();
+ WHS_init();
ADC_MUX_Init();
GeneralHwReady = true;
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
index 9235acf48..a2b3cace2 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste.h
@@ -124,6 +124,11 @@ typedef enum
waste_cartridge2
} cartridge_name;
+typedef enum
+{
+ VALVE_DIR_WAST_CARTRIDGE1 = 0,
+ VALVE_DIR_WAST_CARTRIDGE2
+} valve_cartridge_name;
struct WHS_sensors_status
@@ -162,7 +167,7 @@ struct WHS_information
struct cartridge_params cartridge_1, cartridge_2;
struct WHS_sensors_status WHS_sensors;
struct pump_params WHS_pump;
- bool WHS_valve;
+ valve_cartridge_name WHS_valve;
WHS_sensor event;
cartridge_name active_cartridge;
uint32_t Cartridge_Ink_device_Id;
diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
index f22ce46ac..e854a817a 100644
--- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_init.c
@@ -448,8 +448,8 @@ bool SetValveDirection()
* */
bool ret = notOK;
//if (WHS_info.WHS_valve != no_waste_cartridge)
- if (WHS_info.active_cartridge == waste_cartridge1) WHS_info.WHS_valve = 1;
- else WHS_info.WHS_valve = 2;
+ if (WHS_info.active_cartridge == waste_cartridge1) WHS_info.WHS_valve = VALVE_DIR_WAST_CARTRIDGE1;
+ else WHS_info.WHS_valve = VALVE_DIR_WAST_CARTRIDGE2;
{
Valve_Set(VALVE_WASTE_TANK, WHS_info.WHS_valve);
ret = OK;
@@ -463,10 +463,10 @@ bool SetValveDirection()
U8 CartridgeWasteFilling(bool status)
{
bool ret = notOK;
-
+ SetValveDirection();
if ((status == ON) && (WHS_info.active_cartridge != no_waste_cartridge))
{
- Valve_Set(VALVE_WASTE_TANK, WHS_info.active_cartridge); //set the valve direction
+ //SetValveDirection();//Valve_Set(VALVE_WASTE_TANK, WHS_info.active_cartridge); //set the valve direction
//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;
@@ -476,7 +476,7 @@ U8 CartridgeWasteFilling(bool status)
else // stop Waste cartridge filling
{
SetWastePump(CLOSE);
- Valve_Set(VALVE_WASTE_TANK, waste_cartridge2); //set the valve direction set to low POWER !!!
+ //Valve_Set(VALVE_WASTE_TANK, VALVE_DIR_WAST_CARTRIDGE1); //set the valve direction set to low POWER !!!
switch (WHS_info.active_cartridge)
{