aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-12-02 16:28:43 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-12-02 16:28:43 +0200
commitc577ef90fecd0b8c019dc96c1b425c8a14f8ef8b (patch)
treee9f0aaf0615fe53bcfb2d191952890bd4ec30d19 /Software/Embedded_SW/Embedded
parent2cbc3deb559323ac366e84b3e0ba40d27447347e (diff)
downloadTango-c577ef90fecd0b8c019dc96c1b425c8a14f8ef8b.tar.gz
Tango-c577ef90fecd0b8c019dc96c1b425c8a14f8ef8b.zip
valve improved and fixed
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
index 6c9255466..cc1c946dc 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
@@ -339,9 +339,12 @@ uint32_t Valve3WayCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
EnableDisableDispenserValve((Valves_t)ValveId, DISABLE);
//stop this control loop
if (RemoveControlCallback(Valve3WayControlId[ValveId], Valve3WayCallBackFunction )==OK)
- Valve3WayControlId[ValveId] == 0xFF;
- else
+ {
LOG_ERROR(ValveId, "Remove control callback");
+ Valve3WayControlId[ValveId] = 0xFF;
+ }
+ else
+ LOG_ERROR(ValveId, "Remove control callback failed");
//call the module callback
if (Valve3WayModuleCallback[ValveId])
@@ -361,14 +364,14 @@ uint32_t Control3WayValvesWithCallback (Valves_t _ValveId, bool direction, callb
Valve3WayModuleCallback[_ValveId] = callback;
Valve3WayControlId[_ValveId] = AddControlCallback( Valve3WayCallBackFunction, eTenMillisecond, FPGA_GetDispenserValveBusyOCD,(IfTypeDisopenser*0x100+_ValveId), _ValveId, 0 );
- /*if (Valve3WayControlId[_ValveId] == 0xFF)
- LOG_ERROR(_ValveId, "Add control callback failed");
+ if (Valve3WayControlId[_ValveId] == 0xFF)
+ LOG_ERROR(Valve3WayControlId[_ValveId], "Add control callback failed");
else
- LOG_ERROR(_ValveId, "Add control callback");*/
+ LOG_ERROR(Valve3WayControlId[_ValveId], "Add control callback");
EnableDisableDispenserValve(_ValveId, ENABLE);
- SysCtlDelay(1);//Need Small delay (0.1-1)ms
+ SysCtlDelay(3);//Need Small delay (0.1-1)ms
Valve_Set(_ValveId, direction);