summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/main.c
diff options
context:
space:
mode:
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