diff --git a/happy_hare/iter_calibration.conf b/happy_hare/iter_calibration.conf index 396f7aa66..3503df67f 100644 --- a/happy_hare/iter_calibration.conf +++ b/happy_hare/iter_calibration.conf @@ -3,3 +3,6 @@ name: {{ gettext('Calibrate #{i}') }} icon: mmu_calibrate method: printer.gcode.script params: { "script":"MMU_CALIBRATE_GATES GATE={i}" } +enable: {{ printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} +show_disabled: True +refresh_on: printer.mmu.action diff --git a/happy_hare/iter_check_gates.conf b/happy_hare/iter_check_gates.conf index f8cd81f4e..e57460829 100644 --- a/happy_hare/iter_check_gates.conf +++ b/happy_hare/iter_check_gates.conf @@ -3,6 +3,6 @@ name: {{ gettext('Check Gate #{i}') }} icon: mmu_checkgate{i} method: printer.gcode.script params: { "script":"MMU_CHECK_GATE GATE={i} QUIET=1" } -enable: {{ printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.action diff --git a/happy_hare/iter_config_select_gates.conf b/happy_hare/iter_config_select_gates.conf index 93cc9031b..72614f092 100644 --- a/happy_hare/iter_config_select_gates.conf +++ b/happy_hare/iter_config_select_gates.conf @@ -3,6 +3,6 @@ name: {{ gettext('Select Gate #{i}') }} icon: mmu_select_gate method: printer.gcode.script params: { "script":"MMU_SELECT GATE={i}" } -enable: {{ printer.mmu.gate != {i} and printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.gate != {i} and printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.gate, printer.mmu.action diff --git a/happy_hare/iter_eject_gates.conf b/happy_hare/iter_eject_gates.conf index e4b2a54ed..084ce2477 100644 --- a/happy_hare/iter_eject_gates.conf +++ b/happy_hare/iter_eject_gates.conf @@ -3,6 +3,6 @@ name: {{ gettext('Eject Gate #{i}') }} icon: mmu_eject method: printer.gcode.script params: { "script":"MMU_EJECT GATE={i}" } -enable: {{ printer.mmu.action == "Idle" and printer.mmu.gate_status[{i}] != 0 }} +enable: {{ printer.mmu.action == "Idle" and printer.mmu.gate_status[{i}] != 0 and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.gate, printer.mmu.action diff --git a/happy_hare/iter_load_tools.conf b/happy_hare/iter_load_tools.conf index 653766966..fa9873deb 100644 --- a/happy_hare/iter_load_tools.conf +++ b/happy_hare/iter_load_tools.conf @@ -3,6 +3,6 @@ name: {{ gettext('T{i}') }} icon: mmu_t{i} method: printer.gcode.script params: { "script":"MMU_CHANGE_TOOL TOOL={i} QUIET=1" } -enable: {{ (printer.mmu.tool != {i} or (printer.mmu.tool == {i} and printer.mmu.filament != "Loaded")) and printer.mmu.gate_status[{i}] != 0 and printer.mmu.action == "Idle" }} +enable: {{ (printer.mmu.tool != {i} or (printer.mmu.tool == {i} and printer.mmu.filament != "Loaded")) and printer.mmu.gate_status[{i}] != 0 and printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.tool, printer.mmu.gate_status, printer.mmu.filament, printer.mmu.action diff --git a/happy_hare/iter_preload_gates.conf b/happy_hare/iter_preload_gates.conf index 5b7a12e8d..e7621cf78 100644 --- a/happy_hare/iter_preload_gates.conf +++ b/happy_hare/iter_preload_gates.conf @@ -3,6 +3,6 @@ name: {{ gettext('Preload Gate #{i}') }} icon: mmu_reset method: printer.gcode.script params: { "script":"MMU_PRELOAD GATE={i}" } -enable: {{ printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.action diff --git a/happy_hare/iter_select_gates.conf b/happy_hare/iter_select_gates.conf index 21f5a32fa..e262c2153 100644 --- a/happy_hare/iter_select_gates.conf +++ b/happy_hare/iter_select_gates.conf @@ -3,6 +3,6 @@ name: {{ gettext('Select Gate #{i}') }} icon: mmu_select_gate method: printer.gcode.script params: { "script":"MMU_SELECT GATE={i}" } -enable: {{ printer.mmu.gate != {i} and printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.gate != {i} and printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.gate, printer.mmu.action diff --git a/happy_hare/iter_select_tools.conf b/happy_hare/iter_select_tools.conf index b706ab185..6d8118241 100644 --- a/happy_hare/iter_select_tools.conf +++ b/happy_hare/iter_select_tools.conf @@ -3,6 +3,6 @@ name: {{ gettext('Select Tool T{i}') }} icon: mmu_t{i} method: printer.gcode.script params: { "script":"MMU_SELECT TOOL={i}" } -enable: {{ printer.mmu.tool != {i} and printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.tool != {i} and printer.mmu.action == "Idle" and printer.mmu.num_gates > {i} }} show_disabled: True refresh_on: printer.mmu.tool, printer.mmu.action diff --git a/happy_hare/menus.conf b/happy_hare/menus.conf index e745649c9..bcd62c857 100644 --- a/happy_hare/menus.conf +++ b/happy_hare/menus.conf @@ -105,9 +105,9 @@ name: {{ gettext('Select Bypass') }} icon: mmu_select_bypass method: printer.gcode.script params: {"script":"MMU_SELECT_BYPASS"} -enable: {{ printer.mmu.gate != -2 and printer.mmu.action == "Idle" }} +enable: {{ printer.mmu.gate != -2 and printer.mmu.action == "Idle" and printer.mmu.has_bypass }} show_disabled: True -refresh_on: printer.mmu.gate, printer.mmu.action +refresh_on: printer.mmu.gate, printer.mmu.action, printer.mmu.has_bypass MMU_iter_select_gates @@ -238,6 +238,8 @@ name: {{ gettext('Home') }} icon: home method: printer.gcode.script params: {"script":"MMU_HOME"} +enable: {{ printer.mmu.selector_type and printer.mmu.selector_type != "VirtualSelector" }} +show_disabled: True [menu __main more mmu_calib select_gates] name: {{ gettext('Select Gate...') }} @@ -262,7 +264,7 @@ name: {{ gettext('Servo UP') }} icon: arrow-up method: printer.gcode.script params: {"script":"MMU_SERVO POS=up"} -enable: {{ printer.mmu.servo != "Up" }} +enable: {{ printer.mmu.selector_type and printer.mmu.selector_type != "VirtualSelector" and printer.mmu.servo != "Up" }} show_disabled: True refresh_on: printer.mmu.servo @@ -271,7 +273,7 @@ name: {{ gettext('Servo MOVE') }} icon: arrow-right method: printer.gcode.script params: {"script":"MMU_SERVO POS=move"} -enable: {{ printer.mmu.servo != "Move" }} +enable: {{ printer.mmu.selector_type and printer.mmu.selector_type != "VirtualSelector" and printer.mmu.servo != "Move" }} show_disabled: True refresh_on: printer.mmu.servo @@ -280,7 +282,7 @@ name: {{ gettext('Servo DOWN') }} icon: arrow-down method: printer.gcode.script params: {"script":"MMU_SERVO POS=down"} -enable: {{ printer.mmu.servo != "Down" }} +enable: {{ printer.mmu.selector_type and printer.mmu.selector_type != "VirtualSelector" and printer.mmu.servo != "Down" }} show_disabled: True refresh_on: printer.mmu.servo