From 117c46526241b433abd2ce198d9a9e03c1587e7f Mon Sep 17 00:00:00 2001 From: mb Date: Sun, 3 May 2009 12:55:59 +0200 Subject: pressure_control: Disarm auto-idle while pressure is low. Signed-off-by: mb --- pressure_control/firmware/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pressure_control/firmware/main.c') diff --git a/pressure_control/firmware/main.c b/pressure_control/firmware/main.c index af779a7..01933ce 100644 --- a/pressure_control/firmware/main.c +++ b/pressure_control/firmware/main.c @@ -169,6 +169,14 @@ static void check_pressure(void) report_change = (cur_state != VALVES_IDLE); valves_global_switch(VALVES_IDLE); } + if (state.mbar < 800) { + /* If the pressure in the reservoir is low, + * the feedforward of the pneumatic valve for + * flow-out might not work correctly. So force poke + * the valves again until we reach a good pressure. */ + __valves_global_switch(valves_get_global_state()); + valves_disarm_auto_idle(); + } } if (abs((int32_t)state.mbar - (int32_t)state.reported_mbar) >= 100) report_change = 1; -- cgit v1.2.3