main: disallow fresh open when gate is active

This commit is contained in:
Thomas Schoebel-Theuer 2021-01-06 09:41:01 +01:00 committed by Thomas Schoebel-Theuer
parent 3aaeb73dfc
commit 1e18140c01
1 changed files with 2 additions and 0 deletions

View File

@ -6373,6 +6373,8 @@ int make_gate(struct mars_rotate *rot, struct mars_dent *dent)
_gate_brick->rewire = true;
inhibit_mask = _check_allow(rot->parent_path, "gate-mask");
rot->gate_brick->inhibit_mask = inhibit_mask;
if (rot->if_brick)
rot->if_brick->busy_open = (inhibit_mask != 0);
/* early reporting when gate has changed */
if (inhibit_mask != rot->old_inhibit_mask) {
_show_gate(rot);