@@ -23,11 +23,6 @@ class RoutineCheckPage(QtWidgets.QWidget):
2323 request_tb_page : typing .ClassVar [QtCore .pyqtSignal ] = QtCore .pyqtSignal (
2424 name = "request-tb-page"
2525 )
26- subscribe_config : typing .ClassVar [QtCore .pyqtSignal ] = QtCore .pyqtSignal (
27- [list , "PyQt_PyObject" ],
28- [str , "PyQt_PyObject" ],
29- name = "on-subscribe-config" ,
30- )
3126
3227 HOMED_AXES = frozenset ("xyz" )
3328
@@ -99,20 +94,9 @@ def on_object_list(self, object_list: list):
9994 if base_name == "fan_generic" or base_name == "fan" :
10095 self .fans .append (obj .removeprefix (base_name + " " ))
10196
102- @QtCore .pyqtSlot (dict , name = "on_object_config" )
103- @QtCore .pyqtSlot (list , name = "on_object_config" )
104- def on_object_config (self , config : dict | list ) -> None :
105- """Handle receiving printer object configurations"""
106- if not config :
107- return
108- self .axis_limits .update (self .parse_axis_limits (config ))
109-
11097 def on_printer_config_received (self , config : dict ) -> None :
111- """Handle printer configuration"""
112- for axis in ("x" , "y" , "z" ):
113- self .subscribe_config [str , "PyQt_PyObject" ].emit (
114- f"stepper_{ axis } " , self .on_object_config
115- )
98+ """Read the stepper travel ranges from the printer configuration."""
99+ self .axis_limits = self .parse_axis_limits (config )
116100
117101 @QtCore .pyqtSlot (str , str , name = "on_toolhead_update" )
118102 def on_toolhead_update (self , field : str , value : str ) -> None :
@@ -288,7 +272,7 @@ def parse_axis_limits(
288272 if pos_min is None and pos_max is None :
289273 continue
290274
291- low = float (pos_min ) if pos_min is not None else - math . inf
275+ low = float (pos_min ) if pos_min is not None else 0.0
292276 high = float (pos_max ) if pos_max is not None else math .inf
293277
294278 endstop_raw = value .get ("position_endstop" )
0 commit comments