bed_mesh and zcalibrate remove easy manual transition when no probe due to raising use unknwown probe commands, and always show what is the default if there is only 1 command in zcal close #1403

This commit is contained in:
Alfredo Monclus committed 2024-06-20 23:23:50 -03:00
1 parent 8ef5ff7289
commit 468901d99b
2 files changed
+4 -4

No files matched your search

-4
View File
@@ -241,12 +241,8 @@ class Panel(ScreenPanel):
self._screen.show_popup_message(_("Calibrating"), level=1)
if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script("G28")
self._screen._send_action(widget, "printer.gcode.script", {"script": "BED_MESH_CALIBRATE"})
# Load zcalibrate to do a manual mesh
if not self._printer.get_probe():
self.menu_item_clicked(widget, {"name": _("Mesh calibrate"), "panel": "zcalibrate"})
def send_clear_mesh(self, widget):
self._screen._send_action(widget, "printer.gcode.script", {"script": "BED_MESH_CLEAR"})
+4
View File
@@ -4,6 +4,7 @@ import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango
from ks_includes.screen_panel import ScreenPanel
from ks_includes.KlippyGtk import find_widget
class Panel(ScreenPanel):
@@ -157,6 +158,9 @@ class Panel(ScreenPanel):
self.buttons['start'].connect("clicked", self.on_popover_clicked)
else:
self.buttons['start'].connect("clicked", self.start_calibration, functions[0])
new_label = self.buttons['start'].get_label()
label = find_widget(self.buttons['start'], Gtk.Label)
label.set_text(new_label + '\n' + self.prettify(functions[0]))
logging.info(f"Available functions for calibration: {functions}")
@staticmethod