diff --git a/ks_includes/config.py b/ks_includes/config.py index 185dc0f8..04092afa 100644 --- a/ks_includes/config.py +++ b/ks_includes/config.py @@ -159,7 +159,7 @@ class KlipperScreenConfig: bools = strs = numbers = () if section == 'main': bools = ( - 'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop', + '24htime', 'only_heaters', 'show_cursor', 'confirm_estop', 'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard', 'show_heater_power', "show_scroll_steppers", "auto_open_extrude" , 'onboarding' ) @@ -173,9 +173,7 @@ class KlipperScreenConfig: 'print_estimate_compensation', 'width', 'height', ) elif section.startswith('printer '): - bools = ( - 'invert_x', 'invert_y', 'invert_z', - ) + bools = () strs = ( 'moonraker_api_key', 'moonraker_host', 'titlebar_name_type', 'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values', @@ -312,9 +310,6 @@ class KlipperScreenConfig: # Options that are in panels and shouldn't be added to the main settings panel_options = [ - {"invert_x": {"section": "main", "name": _("Invert X"), "type": None, "value": "False"}}, - {"invert_y": {"section": "main", "name": _("Invert Y"), "type": None, "value": "False"}}, - {"invert_z": {"section": "main", "name": _("Invert Z"), "type": None, "value": "False"}}, {"move_speed_xy": {"section": "main", "name": _("XY Move Speed (mm/s)"), "type": None, "value": "50"}}, {"move_speed_z": {"section": "main", "name": _("Z Move Speed (mm/s)"), "type": None, "value": "10"}}, {"print_sort_dir": {"section": "main", "type": None, "value": "name_asc"}}, diff --git a/panels/move.py b/panels/move.py index ffc9c79b..c3b53b9e 100644 --- a/panels/move.py +++ b/panels/move.py @@ -81,12 +81,8 @@ class Panel(ScreenPanel): grid.attach(self.buttons["x-"], 2, 1, 1, 1) grid.attach(self.buttons["y+"], 1, 0, 1, 1) grid.attach(self.buttons["y-"], 1, 1, 1, 1) - if self._config.get_config()["main"].getboolean("invert_z", False): - grid.attach(self.buttons["z+"], 3, 0, 1, 1) - grid.attach(self.buttons["z-"], 3, 1, 1, 1) - else: - grid.attach(self.buttons["z+"], 3, 1, 1, 1) - grid.attach(self.buttons["z-"], 3, 0, 1, 1) + grid.attach(self.buttons["z+"], 3, 1, 1, 1) + grid.attach(self.buttons["z-"], 3, 0, 1, 1) grid.attach(self.buttons["home"], 0, 0, 1, 1) grid.attach(self.buttons["motors_off"], 2, 0, 1, 1) @@ -115,9 +111,7 @@ class Panel(ScreenPanel): if not self._screen.vertical_mode: bottomgrid.attach(adjust, 3, 0, 1, 2) - self.labels["move_menu"] = Gtk.Grid( - row_homogeneous=True, column_homogeneous=True - ) + self.labels["move_menu"] = Gtk.Grid(row_homogeneous=True, column_homogeneous=True) self.labels["move_menu"].attach(grid, 0, 0, 1, 3) self.labels["move_menu"].attach(bottomgrid, 0, 3, 1, 1) self.labels["move_menu"].attach(distgrid, 0, 4, 1, 1) @@ -134,38 +128,6 @@ class Panel(ScreenPanel): self.max_z_velocity = max_velocity configurable_options = [ - { - "invert_x": { - "section": "main", - "name": _("Invert X"), - "type": "binary", - "tooltip": _("This will affect screw positions and mesh graph"), - "value": "False", - "callback": self.reinit_panels, - } - }, - { - "invert_y": { - "section": "main", - "name": _("Invert Y"), - "type": "binary", - "tooltip": _("This will affect screw positions and mesh graph"), - "value": "False", - "callback": self.reinit_panels, - } - }, - { - "invert_z": { - "section": "main", - "name": _("Invert Z"), - "tooltip": _( - "Swaps buttons if they are on top of each other, affects other panels" - ), - "type": "binary", - "value": "False", - "callback": self.reinit_move, - } - }, { "move_speed_xy": { "section": "main", @@ -200,14 +162,6 @@ class Panel(ScreenPanel): self.add_option("options", self.settings, name, option[name]) ) - def reinit_panels(self, value): - self._screen.panels_reinit.append("bed_level") - self._screen.panels_reinit.append("bed_mesh") - - def reinit_move(self, widget): - self._screen.panels_reinit.append("move") - self._screen.panels_reinit.append("zcalibrate") - self.menu.clear() def process_update(self, action, data): if action != "notify_status_update": diff --git a/panels/nozzle_offset.py b/panels/nozzle_offset.py index 3b1a4b86..ac36144c 100644 --- a/panels/nozzle_offset.py +++ b/panels/nozzle_offset.py @@ -85,12 +85,8 @@ class Panel(ScreenPanel): self.grid = Gtk.Grid(column_homogeneous=True) if self._screen.vertical_mode: - if self._config.get_config()["main"].getboolean("invert_z", False): - self.grid.attach(self.buttons["z+"], 0, 1, 1, 1) - self.grid.attach(self.buttons["z-"], 0, 0, 1, 1) - else: - self.grid.attach(self.buttons["z+"], 0, 0, 1, 1) - self.grid.attach(self.buttons["z-"], 0, 1, 1, 1) + self.grid.attach(self.buttons["z+"], 0, 1, 1, 1) + self.grid.attach(self.buttons["z-"], 0, 0, 1, 1) self.grid.attach(self.buttons["start_z_offset"], 1, 0, 1, 1) self.grid.attach(pos, 1, 1, 2, 1) self.grid.attach(self.buttons["start_xy_offset"], 2, 0, 1, 1) @@ -98,12 +94,8 @@ class Panel(ScreenPanel): self.grid.attach(self.buttons["cancel"], 3, 1, 1, 1) self.grid.attach(distances, 0, 2, 4, 1) else: - if self._config.get_config()["main"].getboolean("invert_z", False): - self.grid.attach(self.buttons["z+"], 0, 2, 1, 1) - self.grid.attach(self.buttons["z-"], 0, 1, 1, 1) - else: - self.grid.attach(self.buttons["z+"], 0, 1, 1, 1) - self.grid.attach(self.buttons["z-"], 0, 2, 1, 1) + self.grid.attach(self.buttons["z+"], 0, 2, 1, 1) + self.grid.attach(self.buttons["z-"], 0, 1, 1, 1) self.grid.attach(self.buttons["start_z_offset"], 0, 0, 2, 1) self.grid.attach(self.buttons["start_xy_offset"], 2, 0, 2, 1) self.grid.attach(pos, 1, 1, 2, 2) diff --git a/panels/zcalibrate.py b/panels/zcalibrate.py index 2e76acff..17f748f2 100644 --- a/panels/zcalibrate.py +++ b/panels/zcalibrate.py @@ -86,24 +86,16 @@ class Panel(ScreenPanel): grid = Gtk.Grid(column_homogeneous=True) if self._screen.vertical_mode: - if self._config.get_config()["main"].getboolean("invert_z", False): - grid.attach(self.buttons['zpos'], 0, 2, 1, 1) - grid.attach(self.buttons['zneg'], 0, 1, 1, 1) - else: - grid.attach(self.buttons['zpos'], 0, 1, 1, 1) - grid.attach(self.buttons['zneg'], 0, 2, 1, 1) + grid.attach(self.buttons['zpos'], 0, 2, 1, 1) + grid.attach(self.buttons['zneg'], 0, 1, 1, 1) grid.attach(self.buttons['start'], 0, 0, 1, 1) grid.attach(pos, 1, 0, 1, 1) grid.attach(self.buttons['complete'], 1, 1, 1, 1) grid.attach(self.buttons['cancel'], 1, 2, 1, 1) grid.attach(distances, 0, 3, 2, 1) else: - if self._config.get_config()["main"].getboolean("invert_z", False): - grid.attach(self.buttons['zpos'], 0, 1, 1, 1) - grid.attach(self.buttons['zneg'], 0, 0, 1, 1) - else: - grid.attach(self.buttons['zpos'], 0, 0, 1, 1) - grid.attach(self.buttons['zneg'], 0, 1, 1, 1) + grid.attach(self.buttons['zpos'], 0, 1, 1, 1) + grid.attach(self.buttons['zneg'], 0, 0, 1, 1) grid.attach(self.buttons['start'], 1, 0, 1, 1) grid.attach(pos, 1, 1, 1, 1) grid.attach(self.buttons['complete'], 2, 0, 1, 1)