diff --git a/ks_includes/locales/KlipperScreen.pot b/ks_includes/locales/KlipperScreen.pot index 9f755486..d4cf7ddc 100644 --- a/ks_includes/locales/KlipperScreen.pot +++ b/ks_includes/locales/KlipperScreen.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-31 14:57+0800\n" +"POT-Creation-Date: 2025-01-14 16:25+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -853,10 +853,7 @@ msgstr "" msgid "Restores your print job after a power outage" msgstr "" -msgid "Restoring Left extruder temperature, this may take some time" -msgstr "" - -msgid "Restoring Right extruder temperature, this may take some time" +msgid "Restoring activated extruder temperature, this may take some time." msgstr "" msgid "Resume" @@ -1013,6 +1010,9 @@ msgstr "" msgid "The last print job was not completed continue printing?" msgstr "" +msgid "The new value is not within the valid range." +msgstr "" + msgid "The system doesn't meet the minimum requirement" msgstr "" diff --git a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo index a546ab58..171336a2 100644 Binary files a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo and b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo differ diff --git a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po index 970db6fd..7d7efb49 100644 --- a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po +++ b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po @@ -1010,6 +1010,9 @@ msgstr "温度" msgid "The last print job was not completed continue printing?" msgstr "上一个打印任务未完成,是否继续打印?" +msgid "The new value is not within the valid range." +msgstr "新值不在有效范围内。" + msgid "The system doesn't meet the minimum requirement" msgstr "" diff --git a/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.mo b/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.mo index 3c7f507d..dba832dc 100644 Binary files a/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.mo and b/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.mo differ diff --git a/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.po b/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.po index f22f4751..7519f50e 100644 --- a/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.po +++ b/ks_includes/locales/zh_TW/LC_MESSAGES/KlipperScreen.po @@ -1010,6 +1010,9 @@ msgstr "溫度" msgid "The last print job was not completed continue printing?" msgstr "上一個打印任務未完成,是否繼續打印?" +msgid "The new value is not within the valid range." +msgstr "新值不在有效範圍內。" + msgid "The system doesn't meet the minimum requirement" msgstr "" diff --git a/panels/zcalibrate.py b/panels/zcalibrate.py index e2310d5d..97c6f75a 100644 --- a/panels/zcalibrate.py +++ b/panels/zcalibrate.py @@ -285,9 +285,18 @@ class Panel(ScreenPanel): def move(self, widget, direction): self._screen._ws.klippy.gcode_script(f"TESTZ Z={direction}{self.distance}") + def is_z_within_range(self): + position = self._printer.get_stat("toolhead", "position") + z_cur_pos = position[2] + if z_cur_pos - self.z_offset > 0: + self._screen.show_popup_message(_("The new value is not within the valid range.")) + return False + return True + def accept(self, widget): - logging.info("Accepting Z position") - self._screen._ws.klippy.gcode_script("ACCEPT") + if self.is_z_within_range(): + logging.info("Accepting Z position") + self._screen._ws.klippy.gcode_script("ACCEPT") def buttons_calibrating(self): self.buttons['start'].get_style_context().remove_class('color3')