summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/main.c
diff options
context:
space:
mode:
authormb <mb@frink.(none)>2009-05-03 12:55:59 +0200
committermb <mb@frink.(none)>2009-05-03 12:55:59 +0200
commit117c46526241b433abd2ce198d9a9e03c1587e7f (patch)
treed582826e918acfaaf711505557d3adec7b36a2f3 /pressure_control/firmware/main.c
parentf6164dcedbd3c6d9ad094fd34a0ec031692385cb (diff)
downloadcnc-117c46526241b433abd2ce198d9a9e03c1587e7f.tar.xz
cnc-117c46526241b433abd2ce198d9a9e03c1587e7f.zip
pressure_control: Disarm auto-idle while pressure is low.
Signed-off-by: mb <mb@frink.(none)>
Diffstat (limited to 'pressure_control/firmware/main.c')
-rw-r--r--pressure_control/firmware/main.c8
1 files changed, 8 insertions, 0 deletions
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;
bues.ch cgit interface