Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions BlocksScreen/lib/panels/filamentTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,9 @@ def on_mmu_state_changed(self, mmu_state):
self._previous_gate_states[gate_info.index] = current_state

if previous_state is False and current_state is True:
self.popup_gates.append({"gate": gate_info.index})
self.handle_popup()
if len(mmu_state.gates) > 1:
self.popup_gates.append({"gate": gate_info.index})
self.handle_popup()
elif previous_state is True and gate_info.status == GateStatus.EMPTY:
self._clear_gate_map(gate_info)

Expand Down
13 changes: 0 additions & 13 deletions BlocksScreen/lib/panels/utilitiesTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class UtilitiesTab(QtWidgets.QStackedWidget):
run_gcode_signal: typing.ClassVar[QtCore.pyqtSignal] = QtCore.pyqtSignal(
str, name="run-gcode"
)
subscribe_config: typing.ClassVar[QtCore.pyqtSignal] = QtCore.pyqtSignal(
[list, "PyQt_PyObject"],
[str, "PyQt_PyObject"],
name="on-subscribe-config",
)
update_available: typing.ClassVar[QtCore.pyqtSignal] = QtCore.pyqtSignal(
bool, name="update-available"
)
Expand Down Expand Up @@ -103,7 +98,6 @@ def __init__(
self.printer.printer_config.connect(
self.routines_page.on_printer_config_received
)
self.routines_page.subscribe_config.connect(self.subscribe_config)
self.on_object_list.connect(self.routines_page.on_object_list)

# --- Axis Maintenance ---
Expand All @@ -126,13 +120,6 @@ def __init__(
# --- Websocket/Printer Signals ---
self.run_gcode_signal.connect(self.ws.api.run_gcode)

self.subscribe_config[str, "PyQt_PyObject"].connect(
self.printer.on_subscribe_config
)
self.subscribe_config[list, "PyQt_PyObject"].connect(
self.printer.on_subscribe_config
)

def ask_input_shaper(self) -> None:
"""Ask whether to run the automatic input shaper."""
self.is_popup.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def showEvent(self, event: QtGui.QShowEvent | None) -> None: # noqa: N802
return super().showEvent(event)

def _setup_ui(self) -> None: # noqa: N802
self.setMaximumHeight(470)
self.setMaximumHeight(410)

size_policy = QtWidgets.QSizePolicy(
QtWidgets.QSizePolicy.Policy.MinimumExpanding,
Expand Down
1 change: 1 addition & 0 deletions BlocksScreen/lib/panels/widgets/PrintTab/filesPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ def _create_header_layout(self) -> QtWidgets.QHBoxLayout:
layout.addStretch(1)

self._sort_combo = BlocksComboBox(parent=self)
self._sort_combo.setMinimumWidth(200)
for name in self.SORTING_TYPES:
self._sort_combo.addItem(name)
self._sort_combo.currentTextChanged.connect(self._on_sort_key_changed)
Expand Down
22 changes: 3 additions & 19 deletions BlocksScreen/lib/panels/widgets/UtilitiesTab/routinePage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ class RoutineCheckPage(QtWidgets.QWidget):
request_tb_page: typing.ClassVar[QtCore.pyqtSignal] = QtCore.pyqtSignal(
name="request-tb-page"
)
subscribe_config: typing.ClassVar[QtCore.pyqtSignal] = QtCore.pyqtSignal(
[list, "PyQt_PyObject"],
[str, "PyQt_PyObject"],
name="on-subscribe-config",
)

HOMED_AXES = frozenset("xyz")

Expand Down Expand Up @@ -99,20 +94,9 @@ def on_object_list(self, object_list: list):
if base_name == "fan_generic" or base_name == "fan":
self.fans.append(obj.removeprefix(base_name + " "))

@QtCore.pyqtSlot(dict, name="on_object_config")
@QtCore.pyqtSlot(list, name="on_object_config")
def on_object_config(self, config: dict | list) -> None:
"""Handle receiving printer object configurations"""
if not config:
return
self.axis_limits.update(self.parse_axis_limits(config))

def on_printer_config_received(self, config: dict) -> None:
"""Handle printer configuration"""
for axis in ("x", "y", "z"):
self.subscribe_config[str, "PyQt_PyObject"].emit(
f"stepper_{axis}", self.on_object_config
)
"""Read the stepper travel ranges from the printer configuration."""
self.axis_limits = self.parse_axis_limits(config)

@QtCore.pyqtSlot(str, str, name="on_toolhead_update")
def on_toolhead_update(self, field: str, value: str) -> None:
Expand Down Expand Up @@ -288,7 +272,7 @@ def parse_axis_limits(
if pos_min is None and pos_max is None:
continue

low = float(pos_min) if pos_min is not None else -math.inf
low = float(pos_min) if pos_min is not None else 0.0
high = float(pos_max) if pos_max is not None else math.inf

endstop_raw = value.get("position_endstop")
Expand Down
Loading