Compare commits

...
68 Commits
Author SHA1 Message Date
alfrix f6e4e231b1 translation: update all translations 2022-10-27 23:42:23 -03:00
alfrix d536b054b8 translation: update hebrew (Tal Rahav) close #766 2022-10-27 23:40:59 -03:00
alfrix 5d539d0059 translation: update spanish 2022-10-27 23:36:30 -03:00
AntoszHUN 8a82590829 Update Hungarian Language (#762) 2022-10-27 23:19:21 -03:00
alfrix f588571bdd fix PEP E303 2022-10-27 23:18:21 -03:00
northcoastam d27227aede Update fine_tune.py (#765)
Fix for custom z_babystep_values from KlipperScreen.conf not respected
2022-10-27 23:15:45 -03:00
alfrix 7666a91872 splash_screen and job_status title translation 2022-10-27 22:47:01 -03:00
alfrix 51ddee28c3 printer_select: hide action_bar on startup and translate name 2022-10-27 21:24:23 -03:00
alfrix 0620d660f5 Change how the printer state is handled 2022-10-27 20:54:13 -03:00
alfrix b988c3c8c9 limits: fix sliders rescaling and not restoring values when set lower than the max configured value 2022-10-27 12:15:18 -03:00
alfrix d3d7104ec4 languages: refactor
- No full restart requirement just reload
- Fix some systems not loading the language
- Fix RTL not applied if the lang was not set by the system
2022-10-26 22:36:52 -03:00
alfrix 93457b2961 temperature: select all extruders while not printing and the active extruder if printing 2022-10-26 22:36:52 -03:00
alfrix b36e75ec1a temperature: fix #763 2022-10-26 22:36:52 -03:00
alfrix d6e4ad0a35 base_panel: fix macro shorcut not hiding at startup if configured to off 2022-10-26 22:36:52 -03:00
alfrix 0de49ee0cd base_panel: calculate the amount of titlebar items to be shown 2022-10-26 22:36:52 -03:00
alfrix 8cc86dfd7c config: add width and height for development purposes
Do not use this when KS is meant to be fullscreen, this should be used for window size on a desktop
2022-10-26 22:36:52 -03:00
alfrix da9051a9b2 base_panel: create get_icon for show_heaters 2022-10-26 22:36:52 -03:00
alfrix 32fab0482f gtk: add .png icons support close #733 2022-10-26 22:36:52 -03:00
alfrix 792e1bf8bf print: improve initialization performance with async. load of images 2022-10-26 22:36:52 -03:00
alfrix b346d765a2 base_panel: clock simplify also increase margin 2022-10-26 22:36:52 -03:00
alfrix c5413e51c9 config: add printer_data to default config search locations
close #759
2022-10-26 22:36:52 -03:00
alfrix 2121d4a6aa system: updater: hide the end button until the update completes
it's already not sensitive but that is not intuitive sometimes
2022-10-26 22:36:52 -03:00
alfrix 17e4bb704e exclude: fix vertical mode, fix last object cancel and make it exit 2022-10-26 22:36:52 -03:00
alfrix d3281379ee gtk: change scaling of images
This reduces the amount of magic numbers used, some images will scale to bigger sizes, most of the icons and images in vertical mode will be bigger, thumbnails should be bigger in both modes.
2022-10-26 22:36:52 -03:00
alfrix 62fd6b96f8 job_status: change filename max characters
now it's more consistent and takes into account font size
2022-10-26 22:36:52 -03:00
alfrix b9effb5447 screensaver: fix dialogs not hiding 2022-10-26 22:36:52 -03:00
alfrix 70b5532695 bed_mesh: fix issues and improve
Fix sometimes not showing the current mesh
Remove calibrate from the list, (use the top bar)
Minimum Zscale is now -1 to 1 mm
Colorscale is now -0.2 to 0.2 mm tends to clip less on the usable range
Code cleanup and de-duplication
2022-10-21 14:58:07 -03:00
alfrix 1332045128 installer: the workaround for pip 22 should not be needed by now 2022-10-15 18:56:05 -03:00
alfrix 1305b40c41 refactors and cleanup 2022-10-14 13:27:01 -03:00
alfrix e208873e46 temperature: merge nested ifs 2022-10-14 10:19:44 -03:00
alfrix 723662074e Change togglebuttons to regular buttons to simplify code 2022-10-14 10:19:44 -03:00
alfrix 4b7fda9ba0 zcalibrate: fix XY offset not applied if one of them is not defined 2022-10-14 10:19:44 -03:00
alfrix 2e026aef56 extrude: make the speed and distance configurable close #673 2022-10-14 10:19:44 -03:00
alfrix 28fe1bf6d8 Update Locales: Thanks Tal Rahav for the Hebrew translation 2022-10-14 10:19:44 -03:00
alfrix 4076e6349a limits and retraction: infinite sliders 2022-10-14 10:19:44 -03:00
alfrix d0d171e676 print: hide files and directories starting with . 2022-10-14 10:19:44 -03:00
alfrix 978bb72e20 Fix: Printer not connecting if [pause_resume] is missing
fix #752
2022-10-14 10:19:44 -03:00
Ben Konsemüller 74dee10d39 Fix: Heaters not showing their respective power percentages (#747) 2022-10-08 09:52:46 -03:00
Alfredo Monclus a83bbed85a exclude: graph (#743)
Also support name wrapping and remove the object from the list if it was excluded (easier to see)
2022-10-04 10:52:44 -03:00
alfrix c2991364ba fine-tune: fix PEP8 E303 2022-10-01 12:35:01 -03:00
alfrix 2224478ea0 fine-tune: change the labels as soon as the button was pressed, this should give better feedback when the change is delayed by klipper 2022-10-01 12:32:28 -03:00
alfrix 089076c72c docs: zcalibrate: explain move
close #738
2022-09-30 16:14:08 -03:00
alfrix 72413544c8 job_status: animated label compute max characters 2022-09-27 16:49:24 -03:00
alfrix 032638e027 docs: move and improve thumbnail information 2022-09-27 16:49:11 -03:00
alfrix 79b3429837 network: fix panel not loading if the wifi module has not ben initialized
close #736
2022-09-27 15:16:04 -03:00
Selim 35571fce8a Turkish language Update (#734) 2022-09-22 09:50:40 -03:00
Nick Doumaandalfrix 1b758b85c6 Add Desktop file to easily start KlipperScreen on a normal Linux desktop (#713)
Co-authored-by: alfrix <alfredomonclus@gmail.com>
2022-09-21 20:18:22 -03:00
alfrix 2f427f7b82 lint fixes and minor refactorings 2022-09-21 11:54:49 -03:00
dependabot[bot] c061378e62 build(deps): bump websocket-client from 1.4.0 to 1.4.1 (#721)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: websocket-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-21 11:35:06 -03:00
Andriy 1f3fe23716 Correction of the Ukrainian localization (#730) 2022-09-21 11:34:53 -03:00
alfrix b2d7dda30f system: update services allowed to restart 2022-09-16 09:51:59 -03:00
alfrix 5f9bd9648a power: center the list 2022-09-14 10:22:11 -03:00
alfrix 0e353d333c docs: update screenshots, add console to the panel list, order by name 2022-09-14 10:07:05 -03:00
AntoszHUN ebaecedf0d Update KlipperScreen.po (#728) 2022-09-13 00:01:22 -03:00
alfrix 4656be8c16 graph: limit the graph to 0-999
It's not over 9000.
2022-09-12 23:32:41 -03:00
Laurenzandalfrix 2cce477e5b Add current heater power % to job status (#708)
* Add current heater power % to job status

* Add show_heater_power config option and move update_temp()s to ScreenPanel

* Add the option to the UI config instead of the docs

* Prefer extra items on job_status over the power

There is not a lot of space, it's a trade off, and people will likely prefer extra_items

* Remove the comma, none of the other buttons have it

* job_status: inherit the parent config

* screen: create reload_panels to avoid some service restarts

* extrude: fix power breaking multi-extruder setups

* main and temp: remove degrees char from the table

* main and temp: revert removal of the header

Co-authored-by: alfrix <alfredomonclus@gmail.com>
2022-09-09 11:34:50 -03:00
alfrix 069097d2e0 config:fix 2022-09-09 11:32:44 -03:00
alfrix de540402ec screensaver: fix #725
this was caused by focus and hover states introducing extra styling
also remove the active semi-translucent that made the fade-in because,
it sometimes missbehaved not showing some elements of the ui, it's also faster not having animation.
2022-09-08 10:20:57 -03:00
alfrix 1d40b9cf7f config: fix babystepping not being recognized
this is a temporary fix, the list items need to be validated individually
2022-09-06 13:13:44 -03:00
Andriy 81573fbd39 Ukrainian update (#719) 2022-09-05 21:27:28 -03:00
whi-tw 5d428e4999 Ignore include sections when validating the config (#720)
* Don't validate `include` sections.

We need a `continue` here because `include` sections are not 'standard',
and don't have any keys to validate.

`include` sections are tangentially validated later via
`_include_config()`.

* Move checks for non-validated sections to start

Rather than looping through the whole if..elif.. block, fail fast if
we're not actually going to validate the section.
2022-09-05 21:27:09 -03:00
alfrix abe12cca30 printer: fix issue that could cause the panels to not show up on startup if moonraker is not connected 2022-09-05 21:02:04 -03:00
alfrix 43c3a4b20d screensaver fix color 2022-09-05 19:44:26 -03:00
alfrix 856e204750 config: fix validator not recognizing calibrate positions 2022-09-04 11:37:50 -03:00
alfrix 2d7486974c config: validator fix floats 2022-09-03 18:25:57 -03:00
alfrix fd7ff6b0cd Update Spanish 2022-09-02 21:21:48 -03:00
alfrix 2939bbe543 system: fix an issue with the updater dialog getting off screen 2022-09-02 21:19:17 -03:00
alfrix 07b134f1a0 Update translation files 2022-09-02 21:03:19 -03:00
82 changed files with 1633 additions and 959 deletions

No files matched your search

+7 -4
View File
@@ -13,7 +13,7 @@ Write in the file only the options that need to be changed, and restart KlipperS
## Main Options
The options listd here are not changeable from within the ui.
The options listed here are not changeable from within the ui.
```py
[main]
# Time in seconds before the Job Status page closes itself after a successful job/print
@@ -32,8 +32,6 @@ default_printer: Ender 3 Pro
# To define a full set of custom menues (instead of merging user entries with default entries)
# set this to False. See Menu section below.
use_default_menu: True
```
## Printer Options
@@ -83,6 +81,10 @@ screw_positions: ""
# Rotation is useful if the screen is not directly in front of the machine.
# Valid values are 0 90 180 270
screw_rotation: 0
# Define distances and speeds for the extrude panel. CSV list 2 to 4 integers
extrude_distances: 5, 10, 15, 25
extrude_speeds: 1, 2, 5, 25
```
## Preheat Options
@@ -190,7 +192,8 @@ KlipperScreen will search for a configuration file in the following order:
1. _~/KlipperScreen.conf_
2. _${KlipperScreen_Directory}/KlipperScreen.conf_
3. _~/klipper_config/KlipperScreen.conf_
3. _~/printer_data/config/KlipperScreen.conf_
4. _~/klipper_config/KlipperScreen.conf_
If you need a custom location for the configuration file, you can add -c or --configfile to the systemd file and specify
the location of your configuration file.
+24 -18
View File
@@ -21,6 +21,12 @@ panel: bed_mesh
```
![Bed Mesh](img/panels/bed_mesh.png)
### Console
```py
panel: console
```
![Console](img/panels/console.png)
### Extrude
```py
panel: extrude theme:material-dark
@@ -45,6 +51,18 @@ panel: gcode_macros
```
![Gcode Macros Panel](img/panels/gcode_macros.png)
### Input Shapers
```py
panel: input_shaper
```
![Limits](img/panels/input_shaper.png)
### Limits
```py
panel: limits
```
![Limits](img/panels/limits.png)
### Menu
![Menu Panel](img/panels/menu.png)
@@ -72,6 +90,12 @@ panel: print
```
![Print Panel](img/panels/print.png)
### Retraction
```py
panel: retraction
```
![Limits](img/panels/retraction.png)
### Settings
```py
panel: settings
@@ -95,21 +119,3 @@ panel: temperature
panel: zcalibrate
```
![Z Calibrate](img/panels/zcalibrate.png)
### Limits
```py
panel: limits
```
![Limits](img/panels/limits.png)
### Retraction
```py
panel: retraction
```
![Limits](img/panels/retraction.png)
### Input Shapers
```py
panel: input_shaper
```
![Limits](img/panels/input_shaper.png)
+1 -37
View File
@@ -30,44 +30,8 @@ fan1 will show in the interface, but _fan2 will be hidden.
## Thumbnails
KlipperScreen can display thumbnails in the file browser and as previews in the print status.
![Job Status](img/panels/job_status.png)
* [PrusaSlicer](#prusaslicer)
* [SuperSlicer](#superslicer)
* [Cura](#cura)
* [ideaMaker](#ideamaker)
### PrusaSlicer
In “Expert” mode PrusaSlicer has an option in the “Printer Settings” tab to activate previews.
Under General / Firmware.
![PrusaSlicer](img/quicktips/PrusaSlicer-thumbnails.png)
### SuperSlicer
In “Expert” mode SuperSlicer has some very convenient options in the “Printer Settings” tab to activate and customize the previews.
![SuperSlicer](img/quicktips/SuperSlicer-thumbnails.png)
### Cura
The Cura plugin [“Cura2Moonraker”](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin) is required for this.
![Cura](img/quicktips/Cura-thumbnails.png)
### ideaMaker
To enable thumbnails, open the Advanced tab in the printer settings, enable the GCode Thumbnails for Octoprint and Mainsail option and enter your prefered square format image size in the Resolution fields (e.g. 400 X 400). It’s necessary that the thumbnail width and height resolution is equal.
![ideaMaker](img/quicktips/IdeaMaker-thumbnails.png)
Moved to [Thumbnails](Thumbnails.md)
## Layer Progress
+59
View File
@@ -0,0 +1,59 @@
# Thumbnails
KlipperScreen can display thumbnails in the file browser and as previews in the print status.
![Job Status](img/panels/job_status.png)
Recommended sizes for thumbnails:
* 300 x 300 - For the larger previews.
* 32 x 32 - For the smaller thumbnails used in lists.
!!! note
Other sizes should work, but keep in mind bigger thumbnails are slower to load and can produce bigger gcode files.
## Select your slicer:
* [PrusaSlicer](#prusaslicer)
* [SuperSlicer](#superslicer)
* [Cura](#cura)
* [ideaMaker](#ideamaker)
### PrusaSlicer (2.3.0+)
In “Expert” mode PrusaSlicer has an option in the “Printer Settings” tab to activate previews.
Under General / Firmware.
![PrusaSlicer](img/quicktips/PrusaSlicer-thumbnails.png)
### SuperSlicer (2.2.54+)
In “Expert” mode SuperSlicer has some very convenient options in the “Printer Settings” tab to activate and customize the previews.
![SuperSlicer](img/quicktips/SuperSlicer-thumbnails.png)
### Cura
#### Option #1 A post processing script (Cura 4.9+)
1. With Cura open, navigate to Extensions, Post Processing, Modify G-Code
2. Click Add a script, and select Create Thumbnail
3. Set both Width and Height to 300
4. Click Add a script, and select Create Thumbnail
5. Set both Width and Height to 32
6. Click Close
#### Option #2 A plugin (Cura 4.7+)
[Cura2Moonraker](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin)
![Cura](img/quicktips/Cura-thumbnails.png)
### ideaMaker (4.2.1+)
1. Open the Advanced tab in the printer settings
2. Enable "GCode Thumbnails for Octoprint and Mainsail"
3. Set both Width and Height to 300
![ideaMaker](img/quicktips/IdeaMaker-thumbnails.png)
+3
View File
@@ -7,6 +7,9 @@ It's strongly suggested to read Klipper documentation about [Bed level](https://
## Buttons
* "Start" will initiate the only method available, or ask the user if multiple methods are available.
!!! note
KlipperScreen will home if needed and move to the middle of the bed,
but the location can be configured in [KlipperScreen.conf](https://klipperscreen.readthedocs.io/en/latest/Configuration/#printer-options)
* The raise(+) and lower(-) buttons send `TESTZ Z=distance` where distance is selected in the bottom row.
* Accept will send `ACCEPT`
* Abort will send `ABORT`
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

+35 -43
View File
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import contextlib
import gi
import logging
import os
@@ -10,8 +11,6 @@ from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango
class KlippyGtk:
labels = {}
width_ratio = 16
height_ratio = 9.375
def __init__(self, screen, width, height, theme, cursor, fontsize_type):
self.screen = screen
@@ -28,10 +27,10 @@ class KlippyGtk:
self.font_size = round(self.font_size * 0.91)
elif fontsize_type == "large":
self.font_size = round(self.font_size * 1.09)
self.header_size = int(round((self.width / self.width_ratio) / 1.33))
self.titlebar_height = self.font_size * 2
self.img_width = int(round(self.width / self.width_ratio))
self.img_height = int(round(self.height / self.height_ratio))
self.img_scale = self.font_size * 2.5
self.img_width = self.font_size * 3
self.img_height = self.font_size * 3
if self.screen.vertical_mode:
self.action_bar_width = int(self.width)
self.action_bar_height = int(self.height * .1)
@@ -70,15 +69,6 @@ class KlippyGtk:
def get_titlebar_height(self):
return self.titlebar_height
def get_header_size(self):
return self.header_size
def get_image_width(self):
return self.img_width
def get_image_height(self):
return self.img_height
def get_keyboard_height(self):
if (self.height / self.width) >= 3:
# Ultra-tall
@@ -119,37 +109,32 @@ class KlippyGtk:
la.get_style_context().add_class(style)
return la
def Image(self, image_name, scale=1.0):
filename = os.path.join(self.themedir, f"{image_name}.svg")
if os.path.exists(filename):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename,
int(round(self.img_width * scale)),
int(round(self.img_height * scale)),
True)
return Gtk.Image.new_from_pixbuf(pixbuf)
else:
logging.error(f"Unable to find image {filename}")
def Image(self, image_name=None, width=None, height=None):
if image_name is None:
return Gtk.Image()
width = width if width is not None else self.img_width
height = height if height is not None else self.img_height
filename = os.path.join(self.themedir, image_name)
for ext in ["svg", "png"]:
with contextlib.suppress(Exception):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(f"{filename}.{ext}", int(width), int(height))
if pixbuf is not None:
return Gtk.Image.new_from_pixbuf(pixbuf)
logging.error(f"Unable to find image {filename}.{ext}")
return Gtk.Image()
def PixbufFromFile(self, filename, width_scale=1, height_scale=1):
return GdkPixbuf.Pixbuf.new_from_file_at_scale(
filename,
int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)),
True
)
@staticmethod
def PixbufFromFile(filename, width=-1, height=-1):
return GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(width), int(height))
def PixbufFromHttp(self, resource, width_scale=1, height_scale=1):
def PixbufFromHttp(self, resource, width=-1, height=-1):
response = self.screen.apiclient.get_thumbnail_stream(resource)
if response is False:
return None
stream = Gio.MemoryInputStream.new_from_data(response, None)
return GdkPixbuf.Pixbuf.new_from_stream_at_scale(
stream,
int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)),
True
)
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(width), int(height), True)
stream.close_async(2)
return pixbuf
def Button(self, label=None, style=None):
b = Gtk.Button(label=label)
@@ -171,7 +156,8 @@ class KlippyGtk:
b.set_vexpand(True)
b.set_can_focus(False)
if image_name is not None:
b.set_image(self.Image(image_name, scale))
width = height = self.img_scale * scale
b.set_image(self.Image(image_name, width, height))
b.set_image_position(position)
b.set_always_show_image(True)
@@ -212,6 +198,8 @@ class KlippyGtk:
button.get_child().set_line_wrap(True)
button.set_size_request((screen.width - 30) / 3, screen.height / 5)
dialog.connect("response", self.screen.reset_screensaver_timeout)
dialog.connect("response", self.remove_dialog, dialog)
dialog.connect("response", callback, *args)
dialog.get_style_context().add_class("dialog")
@@ -225,20 +213,24 @@ class KlippyGtk:
dialog.show_all()
# Change cursor to blank
if self.cursor:
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.ARROW))
dialog.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.ARROW))
else:
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.BLANK_CURSOR))
dialog.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.BLANK_CURSOR))
self.screen.dialogs.append(dialog)
return dialog
def ToggleButtonImage(self, image_name, label, style=None, scale=1.38):
def remove_dialog(self, widget, response_id, dialog):
logging.info("Removing Dialog")
self.screen.dialogs.remove(dialog)
def ToggleButtonImage(self, image_name, label, style=None, width=None, height=None):
b = Gtk.ToggleButton(label=label)
b.set_hexpand(True)
b.set_vexpand(True)
b.set_can_focus(False)
b.set_image(self.Image(image_name, scale))
b.set_image(self.Image(image_name, width, height))
b.set_image_position(Gtk.PositionType.TOP)
b.set_always_show_image(True)
-2
View File
@@ -64,8 +64,6 @@ class KlippyWebsocket(threading.Thread):
self.connect()
def connect(self):
_ = self._screen.lang.gettext
def ws_on_close(ws, a=None, b=None):
self.on_close(ws)
+86 -45
View File
@@ -40,6 +40,8 @@ class KlipperScreenConfig:
self.config_path = self.get_config_file_location(configfile)
logging.debug(f"Config path location: {self.config_path}")
self.defined_config = None
self.lang = None
self.langs = {}
try:
self.config.read(self.default_config_path)
@@ -101,23 +103,47 @@ class KlipperScreenConfig:
item[name]['moonraker_api_key'] = "redacted"
logging.debug(f"Configured printers: {json.dumps(conf_printers_debug, indent=2)}")
lang = self.get_main_config().get("language", None)
lang = [lang] if lang is not None and lang != "default" else None
logging.info(f"Detected language: {lang}")
self.lang = gettext.translation('KlipperScreen', localedir='ks_includes/locales', languages=lang,
fallback=True)
self.lang.install(names=['gettext', 'ngettext'])
self.create_translations()
self._create_configurable_options(screen)
def create_translations(self):
lang_path = os.path.join(klipperscreendir, "ks_includes", "locales")
self.lang_list = [d for d in os.listdir(lang_path) if not os.path.isfile(os.path.join(lang_path, d))]
self.lang_list.sort()
logging.info(f"Available lang list {self.lang_list}")
for lng in self.lang_list:
self.langs[lng] = gettext.translation('KlipperScreen', localedir=lang_path, languages=[lng], fallback=True)
lang = self.get_main_config().get("language", None)
logging.debug(f"Selected lang: {lang} OS lang: {os.getenv('LANG')}")
self.install_language(lang)
def install_language(self, lang):
if lang is None or lang == "system_lang":
for language in self.lang_list:
if os.getenv('LANG').lower().startswith(language):
logging.debug("Using system lang")
lang = language
if lang not in self.lang_list:
logging.error(f"lang: {lang} not found")
lang = "en"
return
logging.info(f"Using lang {lang}")
self.lang = self.langs[lang]
self.lang.install(names=['gettext', 'ngettext'])
def validate_config(self):
valid = True
bools = strs = numbers = ()
for section in self.config:
if section == 'DEFAULT' or section.startswith('include '):
# Do not validate 'DEFAULT' or 'include*' sections
continue
bools = strs = numbers = ()
if section == 'main':
bools = (
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard'
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
'show_heater_power'
)
strs = (
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size',
@@ -125,18 +151,19 @@ class KlipperScreenConfig:
)
numbers = (
'job_complete_timeout', 'job_error_timeout', 'move_speed_xy', 'move_speed_z',
'print_estimate_compensation'
'print_estimate_compensation', 'width', 'height',
)
elif section.startswith('printer '):
bools = (
'invert_x', 'invert_y', 'invert_z',
)
strs = (
'moonraker_api_key', 'moonraker_host', 'language', 'titlebar_name_type',
'screw_positions', 'power_devices', 'titlebar_items'
'moonraker_api_key', 'moonraker_host', 'titlebar_name_type',
'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values',
'extrude_distances', "extrude_speeds",
)
numbers = (
'moonraker_port', 'move_speed_xy', 'move_speed_z', 'z_babystep_values'
'moonraker_port', 'move_speed_xy', 'move_speed_z',
'calibrate_x_position', 'calibrate_y_position',
)
elif section.startswith('preheat '):
@@ -153,8 +180,6 @@ class KlipperScreenConfig:
elif section.startswith('z_calibrate_position'):
# This section may be deprecated in favor of moving this options under the printer section
numbers = ('calibrate_x_position', 'calibrate_y_position')
elif section == 'DEFAULT':
continue
else:
self.errors.append(f'Section [{section}] not recognized')
@@ -163,7 +188,7 @@ class KlipperScreenConfig:
msg = f'Option "{key}" not recognized for section "[{section}]"'
self.errors.append(msg)
# This most probably is not a big issue, continue to load the config
elif key in numbers and not self.config[section][key].isnumeric() \
elif key in numbers and not self.is_float(self.config[section][key]) \
or key in bools and self.config[section][key] not in ["False", "false", "True", "true"]:
msg = (
f'Unable to parse "{key}" from [{section}]\n'
@@ -173,6 +198,14 @@ class KlipperScreenConfig:
valid = False
return valid
@staticmethod
def is_float(element):
try:
float(element)
return True
except ValueError:
return False
def get_errors(self):
return "".join(f'{error}\n\n' for error in self.errors)
@@ -181,7 +214,7 @@ class KlipperScreenConfig:
self.configurable_options = [
{"language": {
"section": "main", "name": _("Language"), "type": "dropdown", "value": "system_lang",
"callback": screen.restart_warning, "options": [
"callback": screen.change_language, "options": [
{"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}},
{"theme": {
"section": "main", "name": _("Icon Theme"), "type": "dropdown",
@@ -212,7 +245,7 @@ class KlipperScreenConfig:
{"confirm_estop": {"section": "main", "name": _("Confirm Emergency Stop"), "type": "binary",
"value": "False"}},
{"only_heaters": {"section": "main", "name": _("Hide sensors in Temp."), "type": "binary",
"value": "False", "callback": screen.restart_warning}},
"value": "False", "callback": screen.reload_panels}},
{"use_dpms": {"section": "main", "name": _("Screen DPMS"), "type": "binary",
"value": "True", "callback": screen.set_dpms}},
{"print_estimate_compensation": {
@@ -220,7 +253,8 @@ class KlipperScreenConfig:
"range": [50, 150], "step": 1}},
{"autoclose_popups": {"section": "main", "name": _("Auto-close notifications"), "type": "binary",
"value": "True"}},
{"show_heater_power": {"section": "main", "name": _("Show Heater Power"), "type": "binary",
"value": "False", "callback": screen.reload_panels}},
# {"": {"section": "main", "name": _(""), "type": ""}}
]
@@ -236,12 +270,8 @@ class KlipperScreenConfig:
self.configurable_options.extend(panel_options)
lang_path = os.path.join(klipperscreendir, "ks_includes", "locales")
langs = [d for d in os.listdir(lang_path) if not os.path.isfile(os.path.join(lang_path, d))]
langs.sort()
lang_opt = self.configurable_options[0]['language']['options']
for lang in langs:
for lang in self.lang_list:
lang_opt.append({"name": lang, "value": lang})
t_path = os.path.join(klipperscreendir, 'styles')
@@ -336,21 +366,36 @@ class KlipperScreenConfig:
return ["\n".join(user_def), None if saved_def is None else "\n".join(saved_def)]
def get_config_file_location(self, file):
logging.info(f"Passed config file: {file}")
if not path.exists(file):
file = os.path.join(klipperscreendir, self.configfile_name)
if not path.exists(file):
file = self.configfile_name.lower()
if not path.exists(file):
klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config")
file = os.path.join(klipper_config, self.configfile_name)
if not path.exists(file):
file = os.path.join(klipper_config, self.configfile_name.lower())
if not path.exists(file):
file = self.default_config_path
# Passed config (-c) by default is ~/KlipperScreen.conf
if path.exists(file):
return file
logging.info(f"Found configuration file at: {file}")
return file
file = os.path.join(klipperscreendir, self.configfile_name)
if path.exists(file):
return file
file = os.path.join(klipperscreendir, self.configfile_name.lower())
if path.exists(file):
return file
klipper_config = os.path.join(os.path.expanduser("~/"), "printer_data", "config")
file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file):
return file
# OLD config folder
klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config")
file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file):
return file
# fallback
return self.default_config_path
def get_config(self):
return self.config
@@ -379,9 +424,7 @@ class KlipperScreenConfig:
def get_menu_name(self, menu="__main", subsection=""):
name = f"menu {menu} {subsection}" if subsection != "" else f"menu {menu}"
if name not in self.config:
return False
return self.config[name].get('name')
return False if name not in self.config else self.config[name].get('name')
def get_preheat_options(self):
index = "preheat "
@@ -392,15 +435,13 @@ class KlipperScreenConfig:
if name not in self.config:
return False
cfg = self.config[name]
return {opt: cfg.get("gcode", None) if opt == "gcode" else cfg.getint(opt, None) for opt in cfg}
return {opt: cfg.get("gcode", None) if opt == "gcode" else cfg.getfloat(opt, None) for opt in cfg}
def get_printer_config(self, name):
if not name.startswith("printer "):
name = f"printer {name}"
if name not in self.config:
return None
return self.config[name]
return None if name not in self.config else self.config[name]
def get_printer_power_name(self):
return self.config['settings'].get("printer_power_name", "printer")
+2 -4
View File
@@ -135,10 +135,8 @@ class KlippyFiles:
return filename in self.filelist
def file_metadata_exists(self, filename):
if not self.file_exists(filename):
return False
if "slicer" in self.files[filename]:
return True
if self.file_exists(filename):
return "slicer" in self.files[filename]
return False
def get_thumbnail_location(self, filename, small=False):
+16 -7
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-18 23:05-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr ""
@@ -383,9 +386,6 @@ msgstr ""
msgid "Lower Nozzle"
msgstr ""
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr ""
@@ -505,9 +505,15 @@ msgstr ""
msgid "Print Time"
msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr ""
@@ -607,6 +613,12 @@ msgstr ""
msgid "Show"
msgstr ""
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr ""
@@ -622,9 +634,6 @@ msgstr ""
msgid "Small"
msgstr ""
msgid "Sort by: "
msgstr ""
msgid "Sort:"
msgstr ""
Binary file not shown.
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: SRBJ\n"
"Language-Team: \n"
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Er du sikker på, at du vil køre nødstop?"
@@ -204,6 +207,9 @@ msgstr "Fejl"
msgid "Estimated Time Method"
msgstr "Metode til beregning af tid"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Ekstrudér"
@@ -300,6 +306,9 @@ msgstr "Home Z"
msgid "Homing"
msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Værtsnavn"
@@ -491,9 +500,15 @@ msgstr "Print styring"
msgid "Print Time"
msgstr "Printtid"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Printer forbindelser"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Printer"
@@ -593,6 +608,12 @@ msgstr "Indstillinger"
msgid "Show"
msgstr "At vise"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Størrelse"
@@ -608,9 +629,6 @@ msgstr ""
msgid "Small"
msgstr "Lille"
msgid "Sort by: "
msgstr "Sortér efter: "
msgid "Sort:"
msgstr "Sortere: "
@@ -757,6 +775,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Sortér efter: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch fundet anvendt offset"
@@ -785,9 +806,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Ukendt varmelegeme "
#~ msgid "Disconnect"
#~ msgstr "Afbryd forbindelse"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-03-31 10:43-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Sind Sie sicher, dass Sie Not-Aus ausführen möchten?"
@@ -209,6 +212,9 @@ msgstr "Fehler"
msgid "Estimated Time Method"
msgstr "Druckzeit"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Filament fördern"
@@ -305,6 +311,9 @@ msgstr "Achse Z zurücksetzen"
msgid "Homing"
msgstr "Grundposition"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -496,9 +505,15 @@ msgstr "Druck Steuerung"
msgid "Print Time"
msgstr "Druckzeit"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Drucker Verbindungen"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Drucken"
@@ -598,6 +613,12 @@ msgstr "Einstellungen"
msgid "Show"
msgstr "Zeigen"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Größe"
@@ -613,9 +634,6 @@ msgstr ""
msgid "Small"
msgstr "Klein"
msgid "Sort by: "
msgstr "Sortierung: "
msgid "Sort:"
msgstr "Sortieren: "
@@ -764,6 +782,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Sortierung: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch hat angewendeten Offset gefunden"
@@ -792,9 +813,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Unbekannte Heizung "
#~ msgid "Disconnect"
#~ msgstr "Nicht verbunden"
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr ""
@@ -204,6 +207,9 @@ msgstr ""
msgid "Estimated Time Method"
msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr ""
@@ -300,6 +306,9 @@ msgstr ""
msgid "Homing"
msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr ""
@@ -491,9 +500,15 @@ msgstr ""
msgid "Print Time"
msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr ""
@@ -593,6 +608,12 @@ msgstr ""
msgid "Show"
msgstr ""
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr ""
@@ -608,9 +629,6 @@ msgstr ""
msgid "Small"
msgstr ""
msgid "Sort by: "
msgstr ""
msgid "Sort:"
msgstr ""
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"PO-Revision-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-10-27 23:24-0300\n"
"Last-Translator: alfrix\n"
"Language-Team: \n"
"Language: es\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1\n"
"X-Generator: Poedit 3.1.1\n"
#, python-format
msgid "%s will be updated to version"
@@ -63,6 +63,9 @@ msgstr "Aplicar %.2f desfase al final de carrera?"
msgid "Apply %s%.2f offset to Probe?"
msgstr "Aplicar %s%.2f desfase al sensor?"
msgid "Are you sure do you want to exclude the object?"
msgstr "¿Está seguro de excluir este objeto?"
msgid "Are you sure you want to run Emergency Stop?"
msgstr "¿Parada de emergencia?"
@@ -209,6 +212,9 @@ msgstr "Error"
msgid "Estimated Time Method"
msgstr "Método para estimar tiempo"
msgid "Exclude Object"
msgstr "Excluir Objeto"
msgid "Extrude"
msgstr "Extruir"
@@ -305,6 +311,9 @@ msgstr "Origen Z"
msgid "Homing"
msgstr "Origen"
msgid "Host"
msgstr "Anfitrión"
msgid "Hostname"
msgstr "Hostname"
@@ -498,9 +507,15 @@ msgstr "Control de impresión"
msgid "Print Time"
msgstr "Tiempo de impresión"
msgid "Printer"
msgstr "Impresora"
msgid "Printer Connections"
msgstr "Conexiones a impresoras"
msgid "Printer Select"
msgstr "Seleccionar Impresora"
msgid "Printing"
msgstr "Imprimiendo"
@@ -600,6 +615,12 @@ msgstr "Opciones"
msgid "Show"
msgstr "Mostrar"
msgid "Show Heater Power"
msgstr "Mostrar potencia del calentador"
msgid "Shutdown"
msgstr "Apagar"
msgid "Size"
msgstr "Tamaño"
@@ -615,9 +636,6 @@ msgstr "Slicer:"
msgid "Small"
msgstr "Pequeño"
msgid "Sort by: "
msgstr "Ordenar por: "
msgid "Sort:"
msgstr "Ordenar:"
@@ -764,6 +782,12 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Machine"
#~ msgstr "Máquina"
#~ msgid "Sort by: "
#~ msgstr "Ordenar por: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Encontrado Bltouch aplicado desfase"
@@ -792,9 +816,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Calentador Desconocido "
#~ msgid "Disconnect"
#~ msgstr "Desconectar"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-03-31 10:50-0300\n"
"Last-Translator: O. Robardet\n"
"Language-Team: \n"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Êtes-vous sûr de vouloir exécuter l'arrêt d'urgence?"
@@ -209,6 +212,9 @@ msgstr "Erreur"
msgid "Estimated Time Method"
msgstr "Méthode d'estimation du temps"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extruder"
@@ -305,6 +311,9 @@ msgstr "Origine Z"
msgid "Homing"
msgstr "Origine"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -496,9 +505,15 @@ msgstr "Contrôle de l'impression"
msgid "Print Time"
msgstr "Temps d'impression"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Connexions aux imprimantes"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Impression"
@@ -598,6 +613,12 @@ msgstr "Paramètres"
msgid "Show"
msgstr "Montrer"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Dimension"
@@ -613,9 +634,6 @@ msgstr ""
msgid "Small"
msgstr "Petit"
msgid "Sort by: "
msgstr "Trier par: "
msgid "Sort:"
msgstr "Trier:"
@@ -762,6 +780,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Trier par: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch a trouvé le décalage appliqué"
@@ -790,9 +811,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Chauffage inconnu "
#~ msgid "Disconnect"
#~ msgstr "Déconnecter"
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: Klipperscreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-03-31 10:54-0300\n"
"Last-Translator: Emanuel Sharvit <manu7irl@gmail.com>\n"
"Last-Translator: Tal Rahav <talrhv1@gmail.com>\n"
"Language-Team: \n"
"Language: he_IL\n"
"MIME-Version: 1.0\n"
@@ -25,7 +25,7 @@ msgid "%s will be updated to version"
msgstr "%s יעודכן לגרסה"
msgid "(default)"
msgstr "(בְּרִירַת מֶחדָל)"
msgstr "(ברירת מחדל)"
msgid "24 Hour Time"
msgstr "זמן 24 שעות"
@@ -34,13 +34,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FIRMWARE_RESTART עשוי לפתור את הבעיה."
msgid "ADXL Not Configured"
msgstr ""
msgstr "ADXL אינו מוגדר"
msgid "Abort"
msgstr "בטל"
msgid "Acceleration:"
msgstr ""
msgstr "האצה"
msgid "Accept"
msgstr "אשר"
@@ -52,22 +52,24 @@ msgid "Add Printer"
msgstr "הוסף מדפסת"
msgid "Add profile"
msgstr ""
msgstr "הוסף פרופיל"
msgid "Apply"
msgstr ""
msgstr "החל"
#, python-format
msgid "Apply %.2f offset to Endstop?"
msgstr ""
msgstr "הוסף %.2f לתחנת קצה?"
#, python-format
msgid "Apply %s%.2f offset to Probe?"
msgstr "הוסף %.2f לפרוב (בודק)?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr ""
"האם אתה בטוח שברצונך להדפיסהאם אתה בטוח שברצונך להפעיל את עצירת החירום?"
msgstr "האם אתה בטוח שאתה רוצה לבצע עצירת חירום?"
msgid "Are you sure you wish to cancel this print?"
msgstr "האם אתה בטוח שברצונך לבטל את ההדפסה?"
@@ -79,16 +81,16 @@ msgid "Are you sure you wish to reboot the system?"
msgstr "האם אתה בטוח שברצונך לאתחל את המערכת?"
msgid "Are you sure you wish to shutdown the system?"
msgstr "האם אתה בטוח שברצונך לסגור את המערכת?"
msgstr "האם אתה בטוח שברצונך לכבות את המערכת?"
msgid "Auto"
msgstr "אוטומטי"
msgid "Auto-calibrate"
msgstr ""
msgstr "כיול אוטומטי"
msgid "Auto-close notifications"
msgstr ""
msgstr "סגירת התראות אוטומטית"
msgid "Auto-scroll"
msgstr "גלילה אוטומטית"
@@ -100,22 +102,22 @@ msgid "Bed Mesh"
msgstr "מיפוי מיטה"
msgid "Bed screw configuration:"
msgstr ""
msgstr "הגדרת בורג מיטה"
msgid "Calibrate"
msgstr "לְדַרֵג"
msgstr "לכייל"
msgid "Calibrated"
msgstr ""
msgstr "מכויל"
msgid "Calibrated, save configuration to make it permanent"
msgstr "מכויל, שמור את התצורה כדי שהיא תהיה קבועה"
msgid "Calibrating"
msgstr ""
msgstr "מכייל"
msgid "Calibrating..."
msgstr ""
msgstr "מכייל..."
msgid "Can't set above the maximum:"
msgstr "לא ניתן להגדיר מעל המקסימום:"
@@ -136,22 +138,22 @@ msgid "Cannot connect to Moonraker"
msgstr "לא ניתן להתחבר ל-Moonraker"
msgid "Channel"
msgstr "עָרוּץ"
msgstr "ערוץ"
msgid "Check ADXL Wiring"
msgstr ""
msgstr "בדוק את החיווט של ה ADXL"
msgid "Checking for updates, please wait..."
msgstr ""
msgstr "בודק עדכונים, אנא המתן"
msgid "Clear"
msgstr ""
msgstr "נקה"
msgid "Close"
msgstr "סגור"
msgid "Complete"
msgstr "לְהַשְׁלִים"
msgstr "הסתיים"
msgid "Configuration"
msgstr "קונפיגורציה"
@@ -160,32 +162,32 @@ msgid "Confirm Emergency Stop"
msgstr "אשר עצירת חירום"
msgid "Connected"
msgstr "מְחוּבָּר"
msgstr "מחובר"
#, python-format
msgid "Connecting to %s"
msgstr "מתחבר ל- %s"
msgid "Console"
msgstr "לְנַחֵם"
msgstr "קונסול"
msgid "Continue"
msgstr "לְהַמשִׁיך"
msgstr "המשך"
msgid "Cooldown"
msgstr "תירגע"
msgstr "הפעל קירור"
msgid "Date"
msgstr "תַאֲרִיך"
msgstr "תאריך"
msgid "Decrease"
msgstr "לְהַקְטִין"
msgstr "הורד"
msgid "Delete"
msgstr "לִמְחוֹק"
msgstr "מחק"
msgid "Delete File?"
msgstr ""
msgstr "מחק קובץ"
msgid "Deselect"
msgstr "בטל את הבחירה"
@@ -207,13 +209,16 @@ msgid "Elapsed:"
msgstr "זמן שעבר:"
msgid "Error"
msgstr "שְׁגִיאָה"
msgstr "שגיאה"
msgid "Estimated Time Method"
msgstr "שיטת זמן משוערת"
msgid "Exclude Object"
msgstr "ביטול אובייקט"
msgid "Extrude"
msgstr "אקסטרוזיה"
msgstr "הוצא חומר"
msgid "Extrusion +"
msgstr "שיחול +"
@@ -228,25 +233,25 @@ msgid "Fan"
msgstr "מאוורר"
msgid "Filament Used"
msgstr "נימה בשימוש"
msgstr "חומר ששומש"
msgid "Filament total:"
msgstr ""
msgstr "חומר כולל"
msgid "Filament used:"
msgstr ""
msgstr "חומר ששומש:"
msgid "Filament:"
msgstr ""
msgstr "חומר גלם"
msgid "File"
msgstr "קוֹבֶץ"
msgstr "קובץ"
msgid "File:"
msgstr ""
msgid "Finding ADXL"
msgstr ""
msgstr "מחפש ADXL"
msgid "Fine Tuning"
msgstr "כוונון עדין"
@@ -255,41 +260,37 @@ msgid "Finish"
msgstr "סיים"
msgid "Firmware Restart"
msgstr ""
"קושחה\n"
"איתחול"
msgstr "אתחול קושחה"
msgid "Flow:"
msgstr ""
msgstr "זרם"
msgid "Flowrate:"
msgstr ""
msgstr "קצב זרימה"
msgid "Font Size"
msgstr "גודל טקסט"
msgid "Full Update"
msgstr ""
"מלא\n"
"עדכון"
msgstr "עדכון מלא"
msgid "Go Back"
msgstr "חזרה"
msgid "Height:"
msgstr ""
msgstr "גובה"
msgid "Hidden"
msgstr "מוּסתָר"
msgstr "מוסתר"
msgid "Hide"
msgstr "להתחבא"
msgstr "הסתר"
msgid "Hide sensors in Temp."
msgstr "הסתר חיישנים בטמפ'."
msgid "Hide temp."
msgstr ""
msgstr "הסתר טמפרטורה"
msgid "Home"
msgstr "איפוס"
@@ -312,11 +313,14 @@ msgstr "איפוס Z"
msgid "Homing"
msgstr "איפוס צירים"
msgid "Host"
msgstr "שרת"
msgid "Hostname"
msgstr "Hostname"
msgstr "שם שרת"
msgid "Icon Theme"
msgstr "נושא אייקון"
msgstr "ערכת נושא"
msgid "Increase"
msgstr "הגדל"
@@ -328,10 +332,10 @@ msgid "Initializing printer..."
msgstr "מאתחל מדפסת..."
msgid "Input Shaper"
msgstr ""
msgstr "מעצב גימור"
msgid "Interface"
msgstr "מִמְשָׁק"
msgstr "ממשק"
msgid "Invalid"
msgstr "לא חוקי"
@@ -346,9 +350,7 @@ msgid "Invert Z"
msgstr "הפוך את Z"
msgid "Klipper Restart"
msgstr ""
"קליפר\n"
"איתחול"
msgstr "אתחול קליפר"
msgid "Klipper has disconnected"
msgstr "קליפר התנתק"
@@ -357,10 +359,10 @@ msgid "Klipper has encountered an error."
msgstr "קילפר נתקל בבעיה."
msgid "Klipper has shutdown"
msgstr "קליפר נכבה"
msgstr "קליפר כבה"
msgid "Klipper is attempting to start"
msgstr "קליפר מנסה לרוץ"
msgstr "קליפר מנסה לעלות"
msgid "Klipper will reboot"
msgstr "קליפר יבצע אתחול"
@@ -369,10 +371,10 @@ msgid "Language"
msgstr "שפה"
msgid "Large"
msgstr "גָדוֹל"
msgstr "גדול"
msgid "Layer:"
msgstr ""
msgstr "שכבה"
msgid "Left:"
msgstr "זמן שנותר:"
@@ -381,7 +383,7 @@ msgid "Limits"
msgstr "גבולות"
msgid "Load"
msgstr "לִטעוֹן"
msgstr "טעינה"
msgid "Lower Nozzle"
msgstr "הנמך דיזה"
@@ -396,10 +398,10 @@ msgid "Main Menu"
msgstr "תפריט ראשי"
msgid "Max"
msgstr ""
msgstr "מקסימום"
msgid "Max Acceleration"
msgstr ""
msgstr "מקסימום תאוצה"
msgid "Max Acceleration to Deceleration"
msgstr "האצה מרבית להאטה"
@@ -408,19 +410,19 @@ msgid "Max Velocity"
msgstr "מהירות מרבית"
msgid "Measure Both"
msgstr ""
msgstr "מדוד את שניהם"
msgid "Measure X"
msgstr ""
msgstr "מדוד X"
msgid "Measure Y"
msgstr ""
msgstr "מדוד Y"
msgid "Medium"
msgstr "ממוצע"
msgstr "בינוני"
msgid "Menu"
msgstr "תַפרִיט"
msgstr "תפריט"
msgid "Modified"
msgstr "שונה"
@@ -435,18 +437,18 @@ msgid "Move Distance (mm)"
msgstr "מרחק הזזה (מ''מ)"
msgid "Name"
msgstr "שֵׁם"
msgstr "שם"
msgid "Network"
msgstr "רשת"
msgid "New"
msgstr ""
msgstr "חדש"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgstr "איתור אוטומטי אינו נתמך, זה צריך להיות מוגדר ב klipperscreen"
msgid "Nothing selected"
msgstr "שום דבר לא נבחר"
@@ -469,7 +471,7 @@ msgstr[2] "חבילות יעודכנו"
msgstr[3] "חבילות יעודכנו"
msgid "Part Fan"
msgstr ""
msgstr "מאוורר חומר"
msgid "Password saved"
msgstr "הסיסמה נשמרה"
@@ -484,10 +486,10 @@ msgid "Perform a full upgrade?"
msgstr "לבצע שדרוג מלא?"
msgid "Pins"
msgstr ""
msgstr "פינים"
msgid "Please recompile and flash the micro-controller."
msgstr "אנא הידור מחדש והבזק את המיקרו-בקר."
msgstr "אנא הדר (קמפל) מחדש ובצע פלאש למיקרו-בקר."
msgid "Power"
msgstr "הפעלה"
@@ -496,10 +498,10 @@ msgid "Power On Printer"
msgstr "הפעל מדפסת"
msgid "Pressure Advance:"
msgstr ""
msgstr "פרשר אדוונס"
msgid "Print"
msgstr "הדפס"
msgstr "הדפסה"
msgid "Print Control"
msgstr "שליטה בהדפסה"
@@ -507,35 +509,41 @@ msgstr "שליטה בהדפסה"
msgid "Print Time"
msgstr "זמן הדפסה"
msgid "Printer"
msgstr "מדפסת"
msgid "Printer Connections"
msgstr "חיבורי מדפסת"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "מדפיס"
msgid "Probe Offset"
msgstr ""
msgstr "פרוב אוף-סט"
msgid "Profile Name:"
msgstr "שם פרופיל:"
msgid "Quad Gantry Level"
msgstr "רמת מרפסת גנטרי"
msgstr "יישור הגנטרי הריבועי"
msgid "Raise Nozzle"
msgstr "הגבה"
msgstr "הגבה דיזה"
msgid "Recover Hard"
msgstr "לְהַחלִים Hard"
msgstr "שחזור מלא"
msgid "Recover Soft"
msgstr "לְהַחלִים Soft"
msgstr "שחזור עדין"
msgid "Reference"
msgstr "התייחסות"
msgid "Refresh"
msgstr ""
msgstr "רענון"
msgid "Restart"
msgstr "אתחל"
@@ -547,39 +555,39 @@ msgid "Retract"
msgstr "שיחול לאחור"
msgid "Retraction"
msgstr ""
msgstr "משיכה"
msgid "Retraction Length"
msgstr ""
msgstr "מרחק משיכה"
msgid "Retraction Speed"
msgstr ""
msgstr "מהירות משיכה"
#, python-format
msgid "Retry #%s"
msgstr "נסה שוב #%s"
msgid "Retrying"
msgstr ""
msgstr "מנסה שוב"
msgid "Save"
msgstr "להציל"
msgstr "לשמור"
msgid "Save Config"
msgstr "שמור קונפיג"
msgid "Save Z"
msgstr ""
msgstr "שמור Z"
msgid "Save configuration?"
msgstr ""
msgstr "שמור קונפיגרציה?"
msgid "Saved"
msgstr ""
msgstr "נשמר"
#, python-format
msgid "Saved offset: %s"
msgstr ""
msgstr "שמור אופ-סט %s"
msgid "Screen DPMS"
msgstr "DPMS מסך"
@@ -594,7 +602,7 @@ msgid "Select"
msgstr "בחר"
msgid "Send"
msgstr "לִשְׁלוֹחַ"
msgstr "שליחה"
#, python-format
msgid "Sending Power ON signal to: %s"
@@ -607,13 +615,19 @@ msgid "Settings"
msgstr "הגדרות"
msgid "Show"
msgstr "הופעה"
msgstr "הצג"
msgid "Show Heater Power"
msgstr "הצג זרם מיטה"
msgid "Shutdown"
msgstr "כיבוי"
msgid "Size"
msgstr "גודל"
msgid "Slicer"
msgstr "Slicer"
msgstr "סלייסר"
msgid "Slicer Time correction (%)"
msgstr "תיקון זמן פריסה (%)"
@@ -622,13 +636,10 @@ msgid "Slicer:"
msgstr ""
msgid "Small"
msgstr "קָטָן"
msgid "Sort by: "
msgstr "מיין לפי: "
msgstr "קטן"
msgid "Sort:"
msgstr ""
msgstr "מיין"
msgid "Speed (mm/s)"
msgstr "מהירות (מ\"מ/שניות)"
@@ -640,13 +651,13 @@ msgid "Speed -"
msgstr "מהירות -"
msgid "Speed:"
msgstr ""
msgstr "מהירות"
msgid "Square Corner Velocity"
msgstr "מהירות פינה מרובעת"
msgid "Start"
msgstr "הַתחָלָה"
msgstr "התחל"
msgid "Starting WiFi Association"
msgstr "מתחיל איגוד WiFi"
@@ -661,14 +672,10 @@ msgid "System"
msgstr "מערכת"
msgid "System Restart"
msgstr ""
"מערכת\n"
"אתחול"
msgstr "אתחול מערכת"
msgid "System Shutdown"
msgstr ""
"מערכת\n"
"לכבות"
msgstr "כיבוי מערכת"
msgid "Temp (°C)"
msgstr "טמפ' (°C)"
@@ -687,10 +694,10 @@ msgid "Unknown Heater"
msgstr "מחמם לא ידוע"
msgid "Unknown screw position"
msgstr ""
msgstr "מיקום בורג לא ידוע"
msgid "Unload"
msgstr "לִפְרוֹק"
msgstr "העלה"
msgid "Unretract Extra Length"
msgstr ""
@@ -705,7 +712,7 @@ msgid "Update"
msgstr "עדכון"
msgid "Updating"
msgstr "עִדכּוּן"
msgstr "מעדכן"
msgid "Uploaded"
msgstr "הועלה"
@@ -723,7 +730,7 @@ msgid "XY Move Speed (mm/s)"
msgstr "מהירות תנועה XY (מ\"מ/שנייה)"
msgid "XY Speed (mm/s)"
msgstr ""
msgstr "מהירות XY (mm/s)"
msgid "Y+"
msgstr "Y+"
@@ -738,13 +745,13 @@ msgid "Z Move Speed (mm/s)"
msgstr "מהירות תנועה Z (מ\"מ/שניות)"
msgid "Z Speed (mm/s)"
msgstr ""
msgstr "מהירות Z (mm/s)"
msgid "Z Tilt"
msgstr "הטיה Z"
msgid "Z offset:"
msgstr ""
msgstr "Z אוף-סט"
msgid "Z+"
msgstr "Z+"
@@ -781,6 +788,18 @@ msgstr "מ\"מ/ש"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Machine"
#~ msgstr "מכונה"
#~ msgid "Manual Calibration"
#~ msgstr "כיול ידני"
#~ msgid "Auto Calibration"
#~ msgstr "כיול אוטומטי"
#~ msgid "Sort by: "
#~ msgstr "מיין לפי: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch נמצא היסט מוחל"
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-15 19:47-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: AntoszHUN\n"
"Language-Team: \n"
@@ -52,26 +52,29 @@ msgstr "Alkalmaz"
#, python-format
msgid "Apply %.2f offset to Endstop?"
msgstr "Alkalmaz %.2f eltolást az Endstopra?"
msgstr "Alkalmazod %.2f eltolást az Endstopra?"
#, python-format
msgid "Apply %s%.2f offset to Probe?"
msgstr "Alkalmaz %s%.2f eltolást a szondára?"
msgstr "Alkalmazod %s%.2f eltolást a szondára?"
msgid "Are you sure do you want to exclude the object?"
msgstr "Biztosan kizárod az objektumot?"
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Biztosan Vészleállítást végez?"
msgstr "Biztosan Vészleállítást szeretnél?"
msgid "Are you sure you wish to cancel this print?"
msgstr "Biztosan megszakítja ezt a nyomtatást?"
msgstr "Biztosan megszakítod ezt a nyomtatást?"
msgid "Are you sure you wish to disable motors?"
msgstr "Biztos benne, hogy le szeretné tiltani a motorokat?"
msgstr "Biztosan le szeretnéd tiltani a motorokat?"
msgid "Are you sure you wish to reboot the system?"
msgstr "Biztos benne, hogy újra akarja indítani a rendszert?"
msgstr "Biztos, hogy újra akarod indítani a rendszert?"
msgid "Are you sure you wish to shutdown the system?"
msgstr "Biztos, hogy le szeretné állítani a rendszert?"
msgstr "Biztos, hogy le szeretnéd állítani a rendszert?"
msgid "Auto"
msgstr "Auto"
@@ -101,7 +104,7 @@ msgid "Calibrated"
msgstr "Kalibrálva"
msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibrálva! Mentse el a konfigurációt, hogy az állandó legyen"
msgstr "Kalibrálva! Mentsd el a konfigurációt, hogy az állandó legyen"
msgid "Calibrating"
msgstr "Kalibrálás"
@@ -131,10 +134,10 @@ msgid "Channel"
msgstr "Csatorna"
msgid "Check ADXL Wiring"
msgstr "Ellenőrizze az ADXL kábelezést"
msgstr "Ellenőrizd az ADXL kábelezést"
msgid "Checking for updates, please wait..."
msgstr "Frissítések keresése, kérjük, várjon..."
msgstr "Frissítések keresése, kérjük, várj..."
msgid "Clear"
msgstr "Tiszta"
@@ -149,7 +152,7 @@ msgid "Configuration"
msgstr "Konfiguráció"
msgid "Confirm Emergency Stop"
msgstr "Erősítse meg a vészleállítást"
msgstr "Vészleállítás megerősítése"
msgid "Connected"
msgstr "Csatlakoztatva"
@@ -193,7 +196,7 @@ msgstr "Távolság (mm)"
#, python-format
msgid "Do you want to recover %s?"
msgstr "Vissza akarja állítani %s-t?"
msgstr "Vissza akarod állítani %s-t?"
msgid "Elapsed:"
msgstr "Eltelt:"
@@ -204,6 +207,9 @@ msgstr "Hiba"
msgid "Estimated Time Method"
msgstr "Becsült idő módszer"
msgid "Exclude Object"
msgstr "Objektum kizárása"
msgid "Extrude"
msgstr "Száladagolás"
@@ -274,7 +280,7 @@ msgid "Hide"
msgstr "Elrejt"
msgid "Hide sensors in Temp."
msgstr "Szenzorok elrejtése Hőfok."
msgstr "Hőfok szenzorok elrejtése."
msgid "Hide temp."
msgstr "Hőfok elrejtése"
@@ -300,6 +306,9 @@ msgstr "Z kezdőpont"
msgid "Homing"
msgstr "Kezdőpont"
msgid "Host"
msgstr "Gazda"
msgid "Hostname"
msgstr "Gazdanév"
@@ -467,13 +476,13 @@ msgid "Paused"
msgstr "Szüneteltetve"
msgid "Perform a full upgrade?"
msgstr "Teljes frissítést hajt végre?"
msgstr "Teljes frissítést hajtasz végre?"
msgid "Pins"
msgstr "Kimenetek"
msgid "Please recompile and flash the micro-controller."
msgstr "Fordítsa újra és frissítse a mikrovezérlőt."
msgstr "Fordítsd újra és frissítsd a mikrovezérlőt."
msgid "Power"
msgstr "Bekapcsolás"
@@ -493,9 +502,15 @@ msgstr "Nyomtatásvezérlés"
msgid "Print Time"
msgstr "Nyomtatási idő"
msgid "Printer"
msgstr "Nyomtató"
msgid "Printer Connections"
msgstr "Nyomtató csatlakozások"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Nyomtatás"
@@ -558,7 +573,7 @@ msgid "Save Z"
msgstr "Z mentése"
msgid "Save configuration?"
msgstr "Menti a konfigurációt?"
msgstr "Mented a konfigurációt?"
msgid "Saved"
msgstr "Mentve"
@@ -595,6 +610,12 @@ msgstr "Beállítások"
msgid "Show"
msgstr "Mutat"
msgid "Show Heater Power"
msgstr "A fűtésteljesítmény megjelenítése"
msgid "Shutdown"
msgstr "Leállítás"
msgid "Size"
msgstr "Méret"
@@ -610,9 +631,6 @@ msgstr "Szeletelő:"
msgid "Small"
msgstr "Kicsi"
msgid "Sort by: "
msgstr "Sorrend: "
msgid "Sort:"
msgstr "Fajta:"
@@ -759,6 +777,12 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Machine"
#~ msgstr "Gép"
#~ msgid "Sort by: "
#~ msgstr "Sorrend: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "A Bltouch alkalmazott eltolást talált"
Binary file not shown.
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: pappicio\n"
"Language-Team: \n"
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Sei sicuro di voler eseguire l'arresto di emergenza?"
@@ -204,6 +207,9 @@ msgstr "Errore"
msgid "Estimated Time Method"
msgstr "Metodo Tempo stimato"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Estrudi"
@@ -300,6 +306,9 @@ msgstr "Home Z"
msgid "Homing"
msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -491,9 +500,15 @@ msgstr "Controllo Stampa"
msgid "Print Time"
msgstr "Tempo di Stampa"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Connessioni Stampante"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "In Stampa"
@@ -593,6 +608,12 @@ msgstr "Impostazioni"
msgid "Show"
msgstr "Mostrare"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Grandezza"
@@ -608,9 +629,6 @@ msgstr ""
msgid "Small"
msgstr "Piccola"
msgid "Sort by: "
msgstr "Ordine: "
msgid "Sort:"
msgstr ""
@@ -757,6 +775,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Ordine: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch ha trovato l'offset applicato"
@@ -785,9 +806,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Riscaldatore sconosciuto "
#~ msgid "Disconnect"
#~ msgstr "Sconnetti"
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: NSteven\n"
"Language-Team: NSteven\n"
@@ -58,6 +58,9 @@ msgstr "엔드스탑 높이 기준을 %.2f 높이의 옵셋으로 설정 하시
msgid "Apply %s%.2f offset to Probe?"
msgstr "프로브 높이 기준을 %s%.2f 높이의 옵셋으로 설정 하시겠습니까?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "비상정지 시킬까요?"
@@ -204,6 +207,9 @@ msgstr "오류"
msgid "Estimated Time Method"
msgstr "예상시간 옵션"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "압출 "
@@ -300,6 +306,9 @@ msgstr "Z축 홈"
msgid "Homing"
msgstr "툴 헤드 위치 초기화"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "호스트 이름"
@@ -490,9 +499,15 @@ msgstr "출력 제어"
msgid "Print Time"
msgstr "출력 시간"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "프린터 연결"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "출력중"
@@ -592,6 +607,12 @@ msgstr "설정"
msgid "Show"
msgstr "보기"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "크기"
@@ -607,9 +628,6 @@ msgstr "슬라이서:"
msgid "Small"
msgstr "작은"
msgid "Sort by: "
msgstr "분류 기준: "
msgid "Sort:"
msgstr "종류:"
@@ -754,6 +772,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "분류 기준: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch가 적용된 오프셋"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-03-31 11:06-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -64,6 +64,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Czy na pewno chcesz Awaryjnie Zatrzymać?"
@@ -210,6 +213,9 @@ msgstr "Błąd"
msgid "Estimated Time Method"
msgstr "Sposób Oszacowania Czasu"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extruduj"
@@ -306,6 +312,9 @@ msgstr "Baza Z"
msgid "Homing"
msgstr "Bazowanie"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Nazwa hosta"
@@ -498,9 +507,15 @@ msgstr "Kontrola Druku"
msgid "Print Time"
msgstr "Czas Druku"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Połączenia Drukarki"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Drukujemy"
@@ -600,6 +615,12 @@ msgstr "Ustawienia"
msgid "Show"
msgstr "Pokaż"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Rozmiar"
@@ -615,9 +636,6 @@ msgstr ""
msgid "Small"
msgstr "Mały"
msgid "Sort by: "
msgstr "Sortuj wg: "
msgid "Sort:"
msgstr ""
@@ -766,6 +784,9 @@ msgstr "mm/s²"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Sortuj wg: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch znalazł zastosowane przesunięcie"
@@ -794,9 +815,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Nieznany Podgrzewacz "
#~ msgid "Disconnect"
#~ msgstr "Rozłącz"
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-06-03 20:25-0500\n"
"Last-Translator: Jakob Kais <schpuntik@freenet.de>\n"
"Language-Team: \n"
@@ -64,6 +64,9 @@ msgstr "Применить смещение %.2f к Endstop?"
msgid "Apply %s%.2f offset to Probe?"
msgstr "Применить смещение %s%.2f к зонду?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Вы уверены, что хотите запустить аварийную остановку?"
@@ -210,6 +213,9 @@ msgstr "Ошибка"
msgid "Estimated Time Method"
msgstr "Расчётное время"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Заправить"
@@ -306,6 +312,9 @@ msgstr "Парковать Z"
msgid "Homing"
msgstr "Парковка"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Имя хоста"
@@ -498,9 +507,15 @@ msgstr "Управление печатью"
msgid "Print Time"
msgstr "Время печати"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Подключение принтера"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Печатается"
@@ -600,6 +615,12 @@ msgstr "Настройки"
msgid "Show"
msgstr "Показывать"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Размер"
@@ -615,9 +636,6 @@ msgstr ""
msgid "Small"
msgstr "Маленький"
msgid "Sort by: "
msgstr "Орден: "
msgid "Sort:"
msgstr "Сортировать:"
@@ -766,6 +784,9 @@ msgstr "мм/с"
msgid "mm/s²"
msgstr "мм/с²"
#~ msgid "Sort by: "
#~ msgstr "Орден: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch обнаружил примененное смещение"
@@ -794,9 +815,6 @@ msgstr "мм/с²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Неизвестный обогреватель "
#~ msgid "Disconnect"
#~ msgstr "Отключить"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-04-15 17:25+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Är du säker på att du vill köra Nödstopp?"
@@ -209,6 +212,9 @@ msgstr "Fel"
msgid "Estimated Time Method"
msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extrudera"
@@ -305,6 +311,9 @@ msgstr "Hem Z"
msgid "Homing"
msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Värdnamn"
@@ -496,9 +505,15 @@ msgstr "Utskriftskontroll"
msgid "Print Time"
msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Skriver ut"
@@ -598,6 +613,12 @@ msgstr "Inställningar"
msgid "Show"
msgstr "Visa"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Storlek"
@@ -613,9 +634,6 @@ msgstr ""
msgid "Small"
msgstr "Liten"
msgid "Sort by: "
msgstr "Sortera efter: "
msgid "Sort:"
msgstr ""
@@ -762,6 +780,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "Sortera efter: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch hittade tillämpad offset"
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"PO-Revision-Date: 2022-08-10 21:10+0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-09-21 19:32+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: tr_TR\n"
@@ -63,6 +63,9 @@ msgstr "Sonlandırıcı için %.2f ofset uygula?"
msgid "Apply %s%.2f offset to Probe?"
msgstr "Prob için %s%.2f ofset uygula?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Acil Durdurma'yı çalıştırmak istediğinizden emin misiniz?"
@@ -209,6 +212,9 @@ msgstr "Hata"
msgid "Estimated Time Method"
msgstr "Tahmini Zaman Metodu"
msgid "Exclude Object"
msgstr "Nesneyi Hariç Tut"
msgid "Extrude"
msgstr "Ekstrüzyon"
@@ -305,6 +311,9 @@ msgstr "Z Sıfırla"
msgid "Homing"
msgstr "Eksen Sıfırlama"
msgid "Host"
msgstr "Sunucu"
msgid "Hostname"
msgstr "Ana bilgisayar adı"
@@ -498,9 +507,15 @@ msgstr "Yazdırma Kontrolü"
msgid "Print Time"
msgstr "Yazdırma Süresi"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Yazıcı Bağlantıları"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Yazdırılıyor"
@@ -600,6 +615,12 @@ msgstr "Ayarlar"
msgid "Show"
msgstr "Göster"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Boyut"
@@ -615,9 +636,6 @@ msgstr "Dilimleyici:"
msgid "Small"
msgstr "Küçük"
msgid "Sort by: "
msgstr "Sırala: "
msgid "Sort:"
msgstr "Sırala:"
@@ -764,6 +782,12 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Machine"
#~ msgstr "Makine"
#~ msgid "Sort by: "
#~ msgstr "Sırala: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch uygulanmış ofseti buldu"
@@ -5,11 +5,11 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 2022-06-02 14:53-0300\n"
"Project-Id-Version: 2022-09-04 14:53-0300\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"PO-Revision-Date: 2022-06-03 10:02+0300\n"
"Last-Translator: \n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-09-16 21:40+0300\n"
"Last-Translator: Andrii Komarovskyi\n"
"Language-Team: Andrii Komarovskyi\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
@@ -17,8 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.0.1\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Generator: Poedit 3.1\n"
#, python-format
msgid "%s will be updated to version"
@@ -46,13 +45,13 @@ msgid "Accept"
msgstr "Прийняти"
msgid "Actions"
msgstr "Керування"
msgstr "Дії"
msgid "Add Printer"
msgstr "Додати принтер"
msgid "Add profile"
msgstr ""
msgstr "Додати профіль"
msgid "Apply"
msgstr "Застосувати"
@@ -65,11 +64,14 @@ msgstr "Застосувати зміщення %.2f до кінцевика?"
msgid "Apply %s%.2f offset to Probe?"
msgstr "Застосувати зміщення %s%.2f до зонда?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Ви впевнені, що хочете запустити аварійну зупинку?"
msgstr "Ви впевнені, що хочете зробити аварійну зупинку?"
msgid "Are you sure you wish to cancel this print?"
msgstr "Ви впевнені, що хочете скасувати цей друк?"
msgstr "Ви впевнені, що хочете скасувати друк?"
msgid "Are you sure you wish to disable motors?"
msgstr "Ви дійсно бажаєте вимкнути двигуни?"
@@ -87,7 +89,7 @@ msgid "Auto-calibrate"
msgstr "Автоматичне калібрування"
msgid "Auto-close notifications"
msgstr ""
msgstr "Автоматичне закриття сповіщень"
msgid "Auto-scroll"
msgstr "Автоматична прокрутка"
@@ -99,7 +101,7 @@ msgid "Bed Mesh"
msgstr "Сітка столу"
msgid "Bed screw configuration:"
msgstr ""
msgstr "Конфігурація гвинтів ліжка:"
msgid "Calibrate"
msgstr "Калібрування"
@@ -111,16 +113,16 @@ msgid "Calibrated, save configuration to make it permanent"
msgstr "Відкалібровано, збережіть конфігурацію, щоб зробити її постійною"
msgid "Calibrating"
msgstr ""
msgstr "Калібрування"
msgid "Calibrating..."
msgstr "Калібрування..."
msgid "Can't set above the maximum:"
msgstr "Не встановити вище макс.:"
msgstr "Не можна встановити вище максимум:"
msgid "Cancel"
msgstr "СКАСУВАТИ"
msgstr "Скасувати"
msgid "Cancel Print"
msgstr "Скасувати друк"
@@ -141,7 +143,7 @@ msgid "Check ADXL Wiring"
msgstr "Перевірте підключення ADXL"
msgid "Checking for updates, please wait..."
msgstr ""
msgstr "Перевірка оновлень, зачекайте..."
msgid "Clear"
msgstr "Очистити"
@@ -156,7 +158,7 @@ msgid "Configuration"
msgstr "Конфігурація"
msgid "Confirm Emergency Stop"
msgstr "Підтверджувати АВАРІЙНУ ЗУПИНКУ"
msgstr "Підтвердьте АВАРІЙНУ ЗУПИНКУ"
msgid "Connected"
msgstr "Підключено"
@@ -184,10 +186,10 @@ msgid "Delete"
msgstr "Видалити"
msgid "Delete File?"
msgstr ""
msgstr "Видалити файл?"
msgid "Deselect"
msgstr "Відміна"
msgstr "Скасувати вибір"
msgid "Disable Motors"
msgstr "Вимкнути мотори"
@@ -211,23 +213,28 @@ msgstr "Помилка"
msgid "Estimated Time Method"
msgstr "Метод розрахунку часу"
msgid "Exclude Object"
msgstr "Виключити об’єкт"
msgid "Extrude"
msgstr "Видавити"
msgstr ""
"Заміна\n"
"пластику"
msgid "Extrusion +"
msgstr "Екструзія+"
msgstr "Видавити +"
msgid "Extrusion -"
msgstr "Екструзія -"
msgstr "Втягнути -"
msgid "Failed, adjust position first"
msgstr "Помилка, спочатку хоумінг"
msgstr "Не вдалося, спочатку відрегулюйте положення"
msgid "Fan"
msgstr "Вентилятор"
msgid "Filament Used"
msgstr "Філамент"
msgstr "Використання Прутка"
msgid "Filament total:"
msgstr "Загальна кількість прутка:"
@@ -248,13 +255,13 @@ msgid "Finding ADXL"
msgstr "Знаходження ADXL"
msgid "Fine Tuning"
msgstr "Підправити"
msgstr "Точне налаштування"
msgid "Finish"
msgstr "Фініш"
msgid "Firmware Restart"
msgstr "Перезапуск Прошивки"
msgstr "Перезавантаження прошивки"
msgid "Flow:"
msgstr "Потік:"
@@ -266,7 +273,9 @@ msgid "Font Size"
msgstr "Розмір шрифту"
msgid "Full Update"
msgstr "Повне Оновлення"
msgstr ""
"Повне\n"
"Оновлення"
msgid "Go Back"
msgstr "Назад"
@@ -307,8 +316,11 @@ msgstr "Дім Z"
msgid "Homing"
msgstr "До дому"
msgid "Host"
msgstr "Хост"
msgid "Hostname"
msgstr "Назва хоста"
msgstr "Ім'я хоста"
msgid "Icon Theme"
msgstr "Тема оформлення"
@@ -323,7 +335,7 @@ msgid "Initializing printer..."
msgstr "Ініціалізація принтера..."
msgid "Input Shaper"
msgstr ""
msgstr "Input Shaper"
msgid "Interface"
msgstr "Інтерфейс"
@@ -341,10 +353,12 @@ msgid "Invert Z"
msgstr "Інвертувати Z"
msgid "Klipper Restart"
msgstr "Перезапуск Кліппера"
msgstr ""
"Перезапуск\n"
"Klipper"
msgid "Klipper has disconnected"
msgstr "Klipper відключився"
msgstr "Klipper загубив зв'язок"
msgid "Klipper has encountered an error."
msgstr "У Klipper сталася помилка."
@@ -377,7 +391,7 @@ msgid "Load"
msgstr "Завантажити"
msgid "Lower Nozzle"
msgstr "Низ сопла"
msgstr "Опустити сопло"
msgid "Macro shortcut on sidebar"
msgstr "Ярлик макросу на бічній панелі"
@@ -386,10 +400,10 @@ msgid "Macros"
msgstr "Макрос"
msgid "Main Menu"
msgstr "Main Menu"
msgstr "Головне Меню"
msgid "Max"
msgstr ""
msgstr "Макс"
msgid "Max Acceleration"
msgstr "Макс. прискорення"
@@ -422,7 +436,7 @@ msgid "Moonraker: connected"
msgstr "Підключено до Moonraker"
msgid "Move"
msgstr "Рухатися"
msgstr "Переміщення"
msgid "Move Distance (mm)"
msgstr "Переміщення (мм)"
@@ -440,9 +454,11 @@ msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"Автоматичне визначення не підтримується, його потрібно налаштувати у "
"klipperscreen.conf"
msgid "Nothing selected"
msgstr "Не вибрано"
msgstr "Не обрано"
msgid "Off"
msgstr "Вимк"
@@ -457,17 +473,17 @@ msgstr "PSK для"
msgid "Package will be updated"
msgid_plural "Packages will be updated"
msgstr[0] "Пакет буде оновлено"
msgstr[1] "Пакет оновлено"
msgstr[2] "Пакет оновлено"
msgstr[1] "Пакети будуть оновлені"
msgstr[2] "Пакети будуть оновлені"
msgid "Part Fan"
msgstr ""
msgstr "Охолодження моделі"
msgid "Password saved"
msgstr "Пароль збережено"
msgid "Pause"
msgstr "ПАУЗА"
msgstr "Пауза"
msgid "Paused"
msgstr "ПАУЗА"
@@ -477,6 +493,8 @@ msgstr "Виконати повне оновлення?"
msgid "Pins"
msgstr ""
"Керування\n"
"контактами"
msgid "Please recompile and flash the micro-controller."
msgstr "Будь ласка, перекомпілюйте та перепрошійте мікроконтролер."
@@ -499,9 +517,15 @@ msgstr "Контроль друку"
msgid "Print Time"
msgstr "Час друку"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "Підключення принтера"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "Друк"
@@ -527,7 +551,7 @@ msgid "Reference"
msgstr "Довідка"
msgid "Refresh"
msgstr ""
msgstr "Оновити"
msgid "Restart"
msgstr "Перезапуск"
@@ -539,7 +563,9 @@ msgid "Retract"
msgstr "Ретракт"
msgid "Retraction"
msgstr "Втягнення"
msgstr ""
"Параметри\n"
"ретракту"
msgid "Retraction Length"
msgstr "Довжина втягування"
@@ -552,7 +578,7 @@ msgid "Retry #%s"
msgstr "Повторіть #%s"
msgid "Retrying"
msgstr ""
msgstr "Повторна спроба"
msgid "Save"
msgstr "Зберегти"
@@ -601,6 +627,12 @@ msgstr "Налаштування"
msgid "Show"
msgstr "Показати"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "Розмір"
@@ -616,9 +648,6 @@ msgstr "Слайсер:"
msgid "Small"
msgstr "Малий"
msgid "Sort by: "
msgstr "Сортувати за: "
msgid "Sort:"
msgstr "Сортувати:"
@@ -635,7 +664,7 @@ msgid "Speed:"
msgstr "Швидкість:"
msgid "Square Corner Velocity"
msgstr "Квадратна кутова швидкість"
msgstr "Квадратно кутова швидкість"
msgid "Start"
msgstr "СТАРТ"
@@ -653,10 +682,10 @@ msgid "System"
msgstr "Системна"
msgid "System Restart"
msgstr "Рестарт Малини"
msgstr "Перезавантаження системи"
msgid "System Shutdown"
msgstr "Вимкнути Малину"
msgstr "Завершення роботи системи"
msgid "Temp (°C)"
msgstr "Teмп (°C)"
@@ -675,7 +704,7 @@ msgid "Unknown Heater"
msgstr "Невідомий нагрівач"
msgid "Unknown screw position"
msgstr ""
msgstr "Невідоме положення гвинта"
msgid "Unload"
msgstr "Вийняти"
@@ -752,7 +781,7 @@ msgstr "dBm"
msgid "hour"
msgid_plural "hours"
msgstr[0] "година"
msgstr[1] "години"
msgstr[1] "годин"
msgstr[2] "години"
msgid "minutes"
@@ -767,18 +796,19 @@ msgstr "мм/с"
msgid "mm/s²"
msgstr "мм/с²"
#~ msgid "Bltouch found applied offset"
#~ msgstr "Зонд знайшов застосоване зміщення"
#~ msgid "Machine"
#~ msgstr "Машина"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgid "Sort by: "
#~ msgstr "Сортувати за: "
#~ msgid "Auto Calibration"
#~ msgstr "Автоматичне калібрування"
#~ msgid "Manual Calibration"
#~ msgstr "Ручне калібрування"
#~ msgid "NOTE: Edit your printer.cfg to save manual calibration changes."
#~ msgstr ""
#~ "Перевірте /tmp/KlipperScreen.log для отримання додаткової інформації.\n"
#~ "Будь ласка, надішліть проблему на GitHub, щоб отримати допомогу."
#~ msgid "Probe found applied offset"
#~ msgstr "Зонд знайшов застосоване зміщення"
#~ msgid "Tool"
#~ msgstr "Інструмент"
#~ "ПРИМІТКА. Відредагуйте файл printer.cfg, щоб зберегти зміни калібрування "
#~ "вручну."
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-07-16 23:03+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -63,6 +63,9 @@ msgstr "对Endstop应用%.2f的偏移量?"
msgid "Apply %s%.2f offset to Probe?"
msgstr "将%s%.2f的偏移量应用于探针?"
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "您确定要紧急停止吗?"
@@ -209,6 +212,9 @@ msgstr "错误"
msgid "Estimated Time Method"
msgstr "估算剩余时间方式"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "挤出机"
@@ -305,6 +311,9 @@ msgstr "Z轴归零"
msgid "Homing"
msgstr "归零"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "主机名"
@@ -495,9 +504,15 @@ msgstr "打印控制"
msgid "Print Time"
msgstr "打印用时"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "龙门架调平"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "打印中"
@@ -597,6 +612,12 @@ msgstr "设置"
msgid "Show"
msgstr "显示"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "大小"
@@ -612,9 +633,6 @@ msgstr "切片:"
msgid "Small"
msgstr "小"
msgid "Sort by: "
msgstr "排序: "
msgid "Sort:"
msgstr "排序:"
@@ -759,6 +777,9 @@ msgstr ""
msgid "mm/s²"
msgstr ""
#~ msgid "Sort by: "
#~ msgstr "排序: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch 发现应用的偏移量"
@@ -787,9 +808,6 @@ msgstr ""
#~ msgid "IPv6"
#~ msgstr "IPv6 地址"
#~ msgid "Unknown Heater "
#~ msgstr "未知加热器 "
#~ msgid "Disconnect"
#~ msgstr "断开"
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-10 12:01-0300\n"
"POT-Creation-Date: 2022-10-27 23:42-0300\n"
"PO-Revision-Date: 2022-03-31 11:25-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?"
msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?"
msgstr "您確定要運行緊急停止嗎?"
@@ -209,6 +212,9 @@ msgstr "錯誤"
msgid "Estimated Time Method"
msgstr "預估時間方法"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "擠出機"
@@ -305,6 +311,9 @@ msgstr "歸零 Z"
msgid "Homing"
msgstr "歸零"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "主機名稱"
@@ -495,9 +504,15 @@ msgstr "列印控制"
msgid "Print Time"
msgstr "列印時間"
msgid "Printer"
msgstr ""
msgid "Printer Connections"
msgstr "連接列印機"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "列印中"
@@ -597,6 +612,12 @@ msgstr "設定"
msgid "Show"
msgstr "展示"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size"
msgstr "大小"
@@ -612,9 +633,6 @@ msgstr ""
msgid "Small"
msgstr "小的"
msgid "Sort by: "
msgstr "排序: "
msgid "Sort:"
msgstr ""
@@ -759,6 +777,9 @@ msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
#~ msgid "Sort by: "
#~ msgstr "排序: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch 發現應用的偏移量"
@@ -787,9 +808,6 @@ msgstr "mm/s²"
#~ msgid "IPv6"
#~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "未知加熱器 "
#~ msgid "Disconnect"
#~ msgstr "斷開"
+21 -29
View File
@@ -134,8 +134,8 @@ class Printer:
self.data[x] = {}
self.data[x].update(data[x])
if "webhooks" in data or "idle_timeout" in data or "print_stats" in data or "pause_resume" in data:
self.evaluate_state()
if "webhooks" in data or "print_stats" in data:
self.process_status_update()
def get_updates(self):
updates = self.data.copy()
@@ -143,39 +143,27 @@ class Printer:
return updates
def evaluate_state(self):
wh_state = self.data['webhooks']['state'].lower() # possible values: startup, ready, shutdown, error
# webhooks states: startup, ready, shutdown, error
if self.data['webhooks']['state'] == "ready":
if self.data['print_stats']: # standby, printing, paused, error, complete
if self.data['print_stats']['state'] == 'paused' or self.data.get('pause_resume').get('is_paused'):
return "paused"
if self.data['print_stats']['state'] == 'printing':
return "printing"
return self.data['webhooks']['state']
if wh_state == "ready":
new_state = "ready"
if self.data['pause_resume']['is_paused']:
new_state = "paused"
elif self.data['print_stats']:
print_state = self.data['print_stats']['state'].lower() # complete, error, paused, printing, standby
if print_state == "paused":
new_state = "paused"
if self.data['idle_timeout']:
idle_state = self.data['idle_timeout']['state'].lower() # idle, printing, ready
if idle_state == "printing":
if print_state == "complete":
new_state = "ready"
elif print_state != "printing": # Not printing a file, toolhead moving
new_state = "busy"
else:
new_state = "printing"
if new_state != "busy":
self.change_state(new_state)
else:
self.change_state(wh_state)
def process_status_update(self):
state = self.evaluate_state()
if state != self.state:
self.change_state(state)
def process_power_update(self, data):
if data['device'] in self.power_devices:
self.power_devices[data['device']]['status'] = data['status']
def change_state(self, state):
if state == self.state or state not in list(self.state_callbacks):
if state not in list(self.state_callbacks): # disconnected, startup, ready, shutdown, error, paused, printing
return
logging.debug(f"Changing state from '{self.state}' to '{state}'")
prev_state = self.state
self.state = state
@@ -199,7 +187,9 @@ class Printer:
logging.debug(f"Power devices: {self.power_devices}")
def get_config_section_list(self, search=""):
return [i for i in list(self.config) if i.startswith(search)] if hasattr(self, "config") else []
if self.config is not None:
return [i for i in list(self.config) if i.startswith(search)] if hasattr(self, "config") else []
return []
def get_config_section(self, section):
return self.config[section] if section in self.config else False
@@ -285,11 +275,13 @@ class Printer:
def get_state(self):
return self.state
def set_dev_temps(self, dev, temp, target=None):
def set_dev_temps(self, dev, temp, target=None, power=None):
if dev in self.devices:
self.devices[dev]['temperature'] = temp
if target is not None:
self.devices[dev]['target'] = target
if power is not None:
self.devices[dev]['power'] = power
def get_dev_stats(self, dev):
return self.devices[dev] if dev in self.devices else None
+32 -3
View File
@@ -14,7 +14,6 @@ class ScreenPanel:
self._screen = screen
self._config = screen._config
self._files = screen.files
self.lang = self._screen.lang
self._printer = screen.printer
self.labels = {}
self._gtk = screen.gtk
@@ -31,6 +30,8 @@ class ScreenPanel:
self.content.set_hexpand(True)
self.content.set_vexpand(True)
self._show_heater_power = self._config.get_main_config().getboolean('show_heater_power', False)
def initialize(self, panel_name):
# Create gtk items here
return
@@ -49,10 +50,11 @@ class ScreenPanel:
def get_content(self):
return self.content
def get_file_image(self, filename, width=1, height=1, small=False):
def get_file_image(self, filename, width=None, height=None, small=False):
if not self._files.has_thumbnail(filename):
return None
width = width if width is not None else self._gtk.img_width
height = height if height is not None else self._gtk.img_height
loc = self._files.get_thumbnail_location(filename, small)
if loc is None:
return None
@@ -174,3 +176,30 @@ class ScreenPanel:
unit = 1024 ** i
if size < unit:
return f"{(1024 * size / unit):.1f} {suffix}"
def update_temp(self, dev, temp, target, power, lines=1):
if temp is None:
return
show_target = bool(target)
if dev in self.devices and not self.devices[dev]["can_target"]:
show_target = False
show_power = show_target and self._show_heater_power and power is not None
new_label_text = f"{int(temp):3}"
if show_target:
new_label_text += f"/{int(target)}"
if dev not in self.devices:
new_label_text += "°"
if show_power:
if lines == 2:
# The label should wrap, but it doesn't work
# this is a workaround
new_label_text += "\n "
new_label_text += f" {int(power*100):3}%"
if dev in self.labels:
self.labels[dev].set_label(new_label_text)
elif dev in self.devices:
self.devices[dev]["temp"].get_child().set_label(new_label_text)
+2 -1
View File
@@ -112,7 +112,7 @@ class HeaterGraph(Gtk.DrawingArea):
d_len = len(data) - 1
for d in data:
p_x = i * swidth + gsize[0][0] if i != d_len else gsize[1][0] - 1
p_y = gsize[1][1] - 1 - (d * hscale)
p_y = max(gsize[0][1], min(gsize[1][1], gsize[1][1] - 1 - (d * hscale)))
if i == 0:
ctx.move_to(gsize[0][0] + 1, p_y)
i += 1
@@ -132,6 +132,7 @@ class HeaterGraph(Gtk.DrawingArea):
def graph_lines(self, ctx, gsize, max_num):
nscale = 10
max_num = min(max_num, 999)
while (max_num / nscale) > 5:
nscale += 10
# nscale = math.floor((max_num / 10) / 4) * 10
+150
View File
@@ -0,0 +1,150 @@
import logging
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, Gtk
class ObjectMap(Gtk.DrawingArea):
def __init__(self, screen, printer, font_size):
super().__init__()
self._screen = screen
self.set_hexpand(True)
self.set_vexpand(True)
# self.get_style_context().add_class('objectmap')
self.printer = printer
self.max_length = 0
self.connect('draw', self.draw_graph)
self.add_events(Gdk.EventMask.TOUCH_MASK)
self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK)
self.connect('button_press_event', self.event_cb)
self.font_size = round(font_size * 0.75)
self.font_spacing = round(self.font_size * 1.5)
self.margin_left = round(self.font_size * 2.75)
self.margin_right = 15
self.margin_top = 10
self.margin_bottom = self.font_size * 2
self.objects = self.printer.get_stat("exclude_object", "objects")
self.current_object = self.printer.get_stat("current_object", "current_object")
self.excluded_objects = self.printer.get_stat("exclude_object", "excluded_objects")
self.min_x = self.min_y = 99999999
self.max_x = self.max_y = 0
def x_graph_to_bed(self, width, gx):
return (((gx - self.margin_left) * (self.max_x - self.min_x))
/ (width - self.margin_left - self.margin_right)) + self.min_x
def y_graph_to_bed(self, height, gy):
return ((1 - ((gy - self.margin_top) / (height - self.margin_top - self.margin_bottom)))
* (self.max_y - self.min_y)) + self.min_y
def event_cb(self, da, ev):
# Convert coordinates from screen-graph to bed
x = self.x_graph_to_bed(da.get_allocated_width(), ev.x)
y = self.y_graph_to_bed(da.get_allocated_height(), ev.y)
logging.info(f"Touched GRAPH {ev.x:.0f},{ev.y:.0f} BED: {x:.0f},{y:.0f}")
for obj in self.objects:
obj_min_x = obj_max_x = obj["polygon"][0][0]
obj_min_y = obj_max_y = obj["polygon"][0][1]
for point in obj["polygon"]:
obj_min_x = min(obj_min_x, point[0])
obj_min_y = min(obj_min_y, point[1])
obj_max_x = max(obj_max_x, point[0])
obj_max_y = max(obj_max_y, point[1])
if obj_min_x < x < obj_max_x and obj_min_y < y < obj_max_y:
logging.info(f"TOUCHED object it's: {obj['name']}")
if obj['name'] not in self.excluded_objects:
self.exclude_object(obj['name'])
break
def exclude_object(self, name):
script = {"script": f"EXCLUDE_OBJECT NAME={name}"}
self._screen._confirm_send_action(
None,
_("Are you sure do you want to exclude the object?") + f"\n\n{name}",
"printer.gcode.script",
script
)
def draw_graph(self, da, ctx):
right = da.get_allocated_width() - self.margin_right
bottom = da.get_allocated_height() - self.margin_bottom
self.objects = self.printer.get_stat("exclude_object", "objects")
for obj in self.objects:
for point in obj["polygon"]:
# Find min coords
self.min_x = min(self.min_x, point[0])
self.min_y = min(self.min_y, point[1])
# Find max coords
self.max_x = max(self.max_x, point[0])
self.max_y = max(self.max_y, point[1])
# Styling
ctx.set_source_rgb(.5, .5, .5) # Grey
ctx.set_line_width(1)
ctx.set_font_size(self.font_size)
# Borders
ctx.move_to(self.margin_left, self.margin_top)
# logging.info(f"l:{self.margin_left:.0f} t:{self.margin_top:.0f} r:{right:.0f} b:{bottom:.0f}")
ctx.line_to(right, self.margin_top)
ctx.line_to(right, bottom)
ctx.line_to(self.margin_left, bottom)
ctx.line_to(self.margin_left, self.margin_top)
ctx.stroke()
# Axis labels
ctx.move_to(0, bottom + self.font_spacing)
ctx.show_text(f"{self.min_x:.0f},{self.min_y:.0f}")
ctx.stroke()
ctx.move_to(right - self.font_spacing * 2, bottom + self.font_spacing)
ctx.show_text(f"{self.max_x:.0f},{self.min_y:.0f}")
ctx.stroke()
ctx.move_to(0, self.font_spacing / 2)
ctx.show_text(f"{self.min_x:.0f},{self.max_y:.0f}")
ctx.stroke()
# middle markers
midx = (right - self.margin_left) / 2 + self.margin_left
ctx.set_dash([1, 1])
ctx.move_to(midx, self.margin_top)
ctx.line_to(midx, bottom)
ctx.stroke()
midy = (self.margin_top - bottom) / 2 + bottom
ctx.move_to(self.margin_left, midy)
ctx.line_to(right, midy)
ctx.stroke()
ctx.set_dash([1, 0])
# Draw objects
for obj in self.objects:
# change the color depending on the status
if obj['name'] == self.printer.get_stat("exclude_object", "current_object"):
ctx.set_source_rgb(1, 0, 0) # Red
elif obj['name'] in self.printer.get_stat("exclude_object", "excluded_objects"):
ctx.set_source_rgb(0, 0, 0) # Black
else:
ctx.set_source_rgb(.5, .5, .5) # Grey
for i, point in enumerate(obj["polygon"]):
# Convert coordinates from bed to screen-graph
x = self.x_bed_to_graph(da.get_allocated_width(), point[0])
y = self.y_bed_to_graph(da.get_allocated_height(), point[1])
if i == 0:
ctx.move_to(x, y)
continue
ctx.line_to(x, y)
# logging.info(f"obj graph: {x=:.0f},{y=:.0f} bed: {point[0]:.0f},{point[1]:.0f}")
ctx.close_path()
ctx.fill()
ctx.stroke()
def x_bed_to_graph(self, width, bx):
return (((bx - self.min_x) * (width - self.margin_left - self.margin_right))
/ (self.max_x - self.min_x)) + self.margin_left
def y_bed_to_graph(self, height, by):
return ((1 - ((by - self.min_y) / (self.max_y - self.min_y)))
* (height - self.margin_top - self.margin_bottom)) + self.margin_top
+1
View File
@@ -14,6 +14,7 @@ nav:
- Quicktips.md
- Macros: macros.md
- Android.md
- Thumbnails.md
- Troubleshooting.md
- Panels:
- Bed Level/Screws: Screws.md
+40 -42
View File
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
import contextlib
import datetime
import gi
import logging
gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Pango
from jinja2 import Environment
from datetime import datetime
from math import log
from ks_includes.screen_panel import ScreenPanel
@@ -64,7 +65,7 @@ class BasePanel(ScreenPanel):
self.action_bar.add(self.control['home'])
if len(self._config.get_printers()) > 1:
self.action_bar.add(self.control['printer_select'])
self.action_bar.add(self.control['macros_shortcut'])
self.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
self.action_bar.add(self.control['estop'])
# Titlebar
@@ -81,7 +82,7 @@ class BasePanel(ScreenPanel):
self.control['time'] = Gtk.Label("00:00 AM")
self.control['time_box'] = Gtk.Box()
self.control['time_box'].set_halign(Gtk.Align.END)
self.control['time_box'].pack_end(self.control['time'], True, True, 5)
self.control['time_box'].pack_end(self.control['time'], True, True, 10)
self.titlebar = Gtk.Box(spacing=5)
self.titlebar.set_size_request(0, self._gtk.get_titlebar_height())
@@ -115,6 +116,11 @@ class BasePanel(ScreenPanel):
return
def show_heaters(self, show=True):
for child in self.control['temp_box'].get_children():
self.control['temp_box'].remove(child)
if not show or self._screen.printer.get_temp_store_devices() is None:
return
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
if printer_cfg is not None:
self.titlebar_name_type = printer_cfg.get("titlebar_name_type", None)
@@ -122,54 +128,24 @@ class BasePanel(ScreenPanel):
self.titlebar_name_type = None
logging.info(f"Titlebar name type: {self.titlebar_name_type}")
for child in self.control['temp_box'].get_children():
self.control['temp_box'].remove(child)
if not show or self._screen.printer.get_temp_store_devices() is None:
return
img_size = self._gtk.img_scale * .5
for device in self._screen.printer.get_temp_store_devices():
if device.startswith("extruder"):
if self._screen.printer.extrudercount > 1:
if device == "extruder":
icon = self._gtk.Image("extruder-0", .5)
else:
icon = self._gtk.Image(f"extruder-{device[8:]}", .5)
else:
icon = self._gtk.Image("extruder", .5)
elif device.startswith("heater_bed"):
icon = self._gtk.Image("bed", .5)
# Extra items
elif self.titlebar_name_type is not None:
# The item has a name, do not use an icon
icon = None
elif device.startswith("temperature_fan"):
icon = self._gtk.Image("fan", .5)
elif device.startswith("heater_generic"):
icon = self._gtk.Image("heater", .5)
else:
icon = self._gtk.Image("heat-up", .5)
self.labels[device] = Gtk.Label(label="100º")
self.labels[device].set_ellipsize(Pango.EllipsizeMode.START)
self.labels[f'{device}_box'] = Gtk.Box()
icon = self.get_icon(device, img_size)
if icon is not None:
self.labels[f'{device}_box'].pack_start(icon, False, False, 3)
self.labels[f'{device}_box'].pack_start(self.labels[device], False, False, 0)
# Limit the number of items according to resolution
if self._screen.width <= 480:
nlimit = 3
elif self._screen.width <= 800:
nlimit = 4
else:
nlimit = 5
nlimit = int(round(log(self._screen.width, 10) * 5 - 10.5))
n = 0
if self._screen.printer.get_tools():
self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder")
if self.current_extruder:
if self.current_extruder and f"{self.current_extruder}_box" in self.labels:
self.control['temp_box'].add(self.labels[f"{self.current_extruder}_box"])
n += 1
@@ -203,6 +179,26 @@ class BasePanel(ScreenPanel):
n += 1
self.control['temp_box'].show_all()
def get_icon(self, device, img_size):
if device.startswith("extruder"):
if self._screen.printer.extrudercount > 1:
if device == "extruder":
device = "extruder0"
return self._gtk.Image(f"extruder-{device[8:]}", img_size, img_size)
return self._gtk.Image("extruder", img_size, img_size)
elif device.startswith("heater_bed"):
return self._gtk.Image("bed", img_size, img_size)
# Extra items
elif self.titlebar_name_type is not None:
# The item has a name, do not use an icon
return None
elif device.startswith("temperature_fan"):
return self._gtk.Image("fan", img_size, img_size)
elif device.startswith("heater_generic"):
return self._gtk.Image("heater", img_size, img_size)
else:
return self._gtk.Image("heat-up", img_size, img_size)
def activate(self):
if self.time_update is None:
self.time_update = GLib.timeout_add_seconds(1, self.update_time)
@@ -270,11 +266,11 @@ class BasePanel(ScreenPanel):
self.action_bar.reorder_child(self.control['macros_shortcut'], 2)
else:
self.action_bar.reorder_child(self.control['macros_shortcut'], 3)
self.control['macros_shortcut'].show()
self.buttons_showing['macros_shortcut'] = True
elif show is False and self.buttons_showing['macros_shortcut'] is True:
self.action_bar.remove(self.control['macros_shortcut'])
self.buttons_showing['macros_shortcut'] = False
self._screen.show_all()
def show_printer_select(self, show=True):
if len(self._config.get_printers()) <= 1:
@@ -283,15 +279,15 @@ class BasePanel(ScreenPanel):
self.action_bar.add(self.control['printer_select'])
self.action_bar.reorder_child(self.control['printer_select'], 2)
self.buttons_showing['printer_select'] = True
self.control['printer_select'].show()
elif show is False and self.buttons_showing['printer_select']:
self.action_bar.remove(self.control['printer_select'])
self.buttons_showing['printer_select'] = False
self._screen.show_all()
def set_title(self, title):
try:
env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self.lang)
env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(title)
title = j2_temp.render()
except Exception as e:
@@ -300,11 +296,13 @@ class BasePanel(ScreenPanel):
self.titlelbl.set_label(f"{self._screen.connecting_to_printer} | {title}")
def update_time(self):
now = datetime.datetime.now()
now = datetime.now()
confopt = self._config.get_main_config().getboolean("24htime", True)
if now.minute != self.time_min or self.time_format != confopt:
if confopt:
self.control['time'].set_text(f'{now:%H:%M}')
self.control['time'].set_text(f'{now:%H:%M }')
else:
self.control['time'].set_text(f'{now:%I:%M %p}')
self.time_min = now.minute
self.time_format = confopt
return True
+8 -6
View File
@@ -48,11 +48,13 @@ class BedLevelPanel(ScreenPanel):
self._get_offsets("bltouch")
elif "probe" in self._screen.printer.get_config_section_list():
self._get_offsets("probe")
new_screws = []
# bed_screws uses NOZZLE positions
# screws_tilt_adjust uses PROBE positions and to be offseted for the buttons to work equal to bed_screws
for screw in self.screws:
new_screws.append([round(screw[0] + self.x_offset, 1), round(screw[1] + self.y_offset, 1)])
new_screws = [
[round(screw[0] + self.x_offset, 1), round(screw[1] + self.y_offset, 1)]
for screw in self.screws
]
self.screws = new_screws
logging.info(f"screws with offset: {self.screws}")
elif "bed_screws" in self._screen.printer.get_config_section_list():
@@ -110,9 +112,9 @@ class BedLevelPanel(ScreenPanel):
for screw in screw_positions:
if screw not in ("bl", "fl", "fr", "br", "bm", "fm", "lm", "rm", ""):
logging.error(f"Unknown screw: {screw}")
self._screen.show_popup_message(_("Unknown screw position") + ": %s" % screw)
self._screen.show_popup_message(_("Unknown screw position") + f": {screw}")
valid_positions = False
if not(3 <= len(screw_positions) <= 8):
if not (3 <= len(screw_positions) <= 8):
valid_positions = False
rotation = printer_cfg.getint("screw_rotation", 0)
logging.info(f"Rotation: {rotation}")
@@ -142,7 +144,7 @@ class BedLevelPanel(ScreenPanel):
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1)
if "rm" in screw_positions:
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1)
elif nscrews in (4, 6, 8):
elif nscrews in {4, 6, 8}:
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1)
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1)
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1)
+52 -101
View File
@@ -37,16 +37,16 @@ class BedMeshPanel(ScreenPanel):
clear = self._gtk.ButtonImage("cancel", " " + _("Clear"), "color2", .66, Gtk.PositionType.LEFT, 1)
clear.connect("clicked", self._clear_mesh)
clear.set_hexpand(True)
top_calibrate = self._gtk.ButtonImage("refresh", " " + _("Calibrate"), "color3", .66, Gtk.PositionType.LEFT, 1)
top_calibrate.connect("clicked", self._send_calibrate)
top_calibrate.set_hexpand(True)
calibrate = self._gtk.ButtonImage("refresh", " " + _("Calibrate"), "color3", .66, Gtk.PositionType.LEFT, 1)
calibrate.connect("clicked", self.calibrate_mesh)
calibrate.set_hexpand(True)
topbar = Gtk.Box(spacing=5)
topbar.set_hexpand(True)
topbar.set_vexpand(False)
topbar.add(addprofile)
topbar.add(clear)
topbar.add(top_calibrate)
topbar.add(calibrate)
# Create a grid for all profiles
self.labels['profiles'] = Gtk.Grid()
@@ -68,45 +68,24 @@ class BedMeshPanel(ScreenPanel):
self.content.add(self.labels['main_box'])
def activate(self):
for child in self.content.get_children():
self.content.remove(child)
self.content.add(self.labels['main_box'])
self.activate_mesh(
self._screen.printer.get_stat("bed_mesh", "profile_name")
)
with contextlib.suppress(KeyError):
self.activate_mesh(self._screen.printer.get_stat("bed_mesh", "profile_name"))
def activate_mesh(self, profile):
if profile == "":
profile = "default"
logging.debug(f"Activating profile: {profile} Current: {self.active_mesh}")
logging.info("Clearing active profile")
self.profiles[self.active_mesh]['button_box'].add(self.profiles[self.active_mesh]['load'])
self.active_mesh = None
return
if profile not in self.profiles:
self.add_profile(profile)
if self.active_mesh is not None and self.active_mesh in self.profiles:
a = self.profiles[self.active_mesh]
with contextlib.suppress(KeyError):
a['button_box'].remove(a['calibrate'])
a['button_box'].pack_start(a['load'], False, False, 0)
logging.info(f"Active {self.active_mesh} changing to {profile}")
self.profiles[profile]['button_box'].remove(self.profiles[profile]['load'])
self.active_mesh = profile
if self.active_mesh is not None:
a = self.profiles[profile]
with contextlib.suppress(KeyError):
a['button_box'].remove(a['load'])
with contextlib.suppress(KeyError):
a['button_box'].remove(a['view'])
a['button_box'].pack_start(a['calibrate'], False, False, 0)
if self._printer.get_config_section(f"bed_mesh {profile}"):
a['button_box'].pack_end(a["view"], False, False, 0)
self._screen.show_all()
def add_profile(self, profile):
logging.debug(f"Adding Profile: {profile} Current: {self.active_mesh}")
logging.debug(f"Adding Profile: {profile}")
name = Gtk.Label()
name.set_markup(f"<big><b>{profile}</b></big>")
name.set_hexpand(True)
@@ -116,17 +95,15 @@ class BedMeshPanel(ScreenPanel):
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
buttons = {
"calibrate": self._gtk.ButtonImage("refresh", _("Calibrate"), "color4"),
"load": self._gtk.ButtonImage("load", _("Load"), "color2"),
"save": self._gtk.ButtonImage("complete", _("Save"), "color3"),
"delete": self._gtk.ButtonImage("cancel", _("Delete"), "color3"),
"view": self._gtk.ButtonImage("bed-level", _("View Mesh"), "color1"),
"load": self._gtk.ButtonImage("load", _("Load"), "color2"),
}
buttons["calibrate"].connect("clicked", self.calibrate_mesh)
buttons["load"].connect("clicked", self.send_load_mesh, profile)
buttons["save"].connect("clicked", self.send_save_mesh, profile)
buttons["delete"].connect("clicked", self.send_remove_mesh, profile)
buttons["view"].connect("clicked", self.show_mesh, profile)
buttons["load"].connect("clicked", self.send_load_mesh, profile)
for b in buttons.values():
b.set_hexpand(False)
@@ -134,13 +111,11 @@ class BedMeshPanel(ScreenPanel):
b.set_halign(Gtk.Align.END)
button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
button_box.add(buttons["calibrate"])
if profile != "default":
button_box.add(buttons["save"])
button_box.add(buttons["delete"])
if self._printer.get_config_section(f"bed_mesh {profile}"):
button_box.add(buttons["load"])
button_box.add(buttons["view"])
button_box.add(buttons["delete"])
button_box.add(buttons["view"])
button_box.add(buttons["load"])
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
box.pack_start(name, True, True, 0)
@@ -153,7 +128,6 @@ class BedMeshPanel(ScreenPanel):
self.profiles[profile] = {
"button_box": button_box,
"row": frame,
"calibrate": buttons["calibrate"],
"load": buttons["load"],
"save": buttons["save"],
"delete": buttons["delete"],
@@ -185,6 +159,7 @@ class BedMeshPanel(ScreenPanel):
def process_update(self, action, data):
if action == "notify_status_update":
with contextlib.suppress(KeyError):
logging.info(data['bed_mesh'])
self.activate_mesh(data['bed_mesh']['profile_name'])
def remove_create(self):
@@ -249,41 +224,33 @@ class BedMeshPanel(ScreenPanel):
self._screen.show_keyboard(entry=self.labels['profile_name'])
def show_mesh(self, widget, profile):
bm = self._printer.get_config_section(f"bed_mesh {profile}")
if bm is False:
logging.info(f"Unable to load profile: {profile}")
return
if profile == self.active_mesh:
abm = self._printer.get_stat("bed_mesh")
if abm is None:
bm = self._printer.get_stat("bed_mesh")
if bm is None:
logging.info(f"Unable to load active mesh: {profile}")
return
x_range = [int(abm['mesh_min'][0]), int(abm['mesh_max'][0])]
y_range = [int(abm['mesh_min'][1]), int(abm['mesh_max'][1])]
minz_mesh = min(min(abm['mesh_matrix']))
maxz_mesh = max(max(abm['mesh_matrix']))
# Do not use a very small zscale, because that could be misleading
minz_mesh = min(minz_mesh, -0.5)
maxz_mesh = max(maxz_mesh, 0.5)
z_range = [minz_mesh, maxz_mesh]
counts = [len(abm['mesh_matrix'][0]), len(abm['mesh_matrix'])]
deltas = [(x_range[1] - x_range[0]) / (counts[0] - 1), (y_range[1] - y_range[0]) / (counts[1] - 1)]
x = [(i * deltas[0]) + x_range[0] for i in range(counts[0])]
y = [(i * deltas[0]) + y_range[0] for i in range(counts[1])]
x, y = np.meshgrid(x, y)
z = np.asarray(abm['mesh_matrix'])
matrix = 'probed_matrix'
# if 'mesh_matrix' in bm and bm['mesh_matrix'][0]:
# matrix = 'mesh_matrix'
x_range = [int(bm['mesh_min'][0]), int(bm['mesh_max'][0])]
y_range = [int(bm['mesh_min'][1]), int(bm['mesh_max'][1])]
else:
bm = self._printer.get_config_section(f"bed_mesh {profile}")
if bm is False:
logging.info(f"Unable to load profile: {profile}")
self.remove_profile(profile)
return
matrix = 'points'
x_range = [int(bm['min_x']), int(bm['max_x'])]
y_range = [int(bm['min_y']), int(bm['max_y'])]
z_range = [min(min(bm['points'])), max(max(bm['points']))]
deltas = [(x_range[1] - x_range[0]) / (int(bm['x_count']) - 1),
(y_range[1] - y_range[0]) / (int(bm['y_count']) - 1)]
x = [(i * deltas[0]) + x_range[0] for i in range(bm['x_count'])]
y = [(i * deltas[0]) + y_range[0] for i in range(bm['y_count'])]
x, y = np.meshgrid(x, y)
z = np.asarray(bm['points'])
# Zscale can be offered as a slider instead of hardcoded values reasonable values 0.5 - 2 (mm)
z_range = [min(min(min(bm[matrix])), -1), max(max(max(bm[matrix])), 1)]
counts = [len(bm[matrix][0]), len(bm[matrix])]
deltas = [(x_range[1] - x_range[0]) / (counts[0] - 1), (y_range[1] - y_range[0]) / (counts[1] - 1)]
x = [(i * deltas[0]) + x_range[0] for i in range(counts[0])]
y = [(i * deltas[0]) + y_range[0] for i in range(counts[1])]
x, y = np.meshgrid(x, y)
z = np.asarray(bm[matrix])
rc('axes', edgecolor="#e2e2e2", labelcolor="#e2e2e2")
rc(('xtick', 'ytick'), color="#e2e2e2")
@@ -292,7 +259,8 @@ class BedMeshPanel(ScreenPanel):
ax.set(title=profile, xlabel="X", ylabel="Y", facecolor='none')
ax.spines['bottom'].set_color("#e2e2e2")
fig.add_axes(ax)
surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm, vmin=-0.1, vmax=0.1)
# Color gradient could also be configurable as a slider reasonable values 0.1 - 0.2 (mm)
surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm, vmin=-0.2, vmax=0.2)
chartbox = ax.get_position()
ax.set_position([chartbox.x0, chartbox.y0 + 0.1, chartbox.width * .92, chartbox.height])
@@ -303,38 +271,29 @@ class BedMeshPanel(ScreenPanel):
ax.zaxis.set_major_formatter('{x:.02f}')
fig.colorbar(surf, shrink=0.7, aspect=5, pad=0.25)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.set_hexpand(True)
box.set_vexpand(True)
title = Gtk.Label()
title.set_markup(f"<b>{profile}</b>")
title.set_hexpand(True)
title.set_halign(Gtk.Align.CENTER)
canvas_box = Gtk.Box()
canvas_box.set_hexpand(True)
canvas_box.set_vexpand(True)
box.add(title)
box.add(canvas_box)
buttons = [
{"name": _("Close"), "response": Gtk.ResponseType.CANCEL}
]
self._gtk.Dialog(self._screen, buttons, box, self._close_dialog)
alloc = canvas_box.get_allocation()
canvas = FigureCanvas(fig)
canvas.set_size_request(alloc.width, self._screen.height / 3 * 2)
canvas_box.add(canvas)
canvas_box.show_all()
canvas.set_size_request(self._screen.width * .9, self._screen.height / 3 * 2)
# Remove the "matplotlib-canvas" class which forces a white background.
# https://github.com/matplotlib/matplotlib/commit/3c832377fb4c4b32fcbdbc60fdfedb57296bc8c0
style_ctx = canvas.get_style_context()
for css_class in style_ctx.list_classes():
style_ctx.remove_class(css_class)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.add(title)
box.add(canvas)
box.show_all()
buttons = [
{"name": _("Close"), "response": Gtk.ResponseType.CANCEL}
]
self._gtk.Dialog(self._screen, buttons, box, self._close_dialog)
@staticmethod
def _close_dialog(widget, response):
widget.destroy()
@@ -365,14 +324,6 @@ class BedMeshPanel(ScreenPanel):
"BED_MESH_CLEAR"
)
def _send_calibrate(self, widget):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self._screen._ws.klippy.gcode_script(
"BED_MESH_CALIBRATE"
)
def send_load_mesh(self, widget, profile):
self._screen._ws.klippy.gcode_script(
KlippyGcodes.bed_mesh_load(profile)
+67 -25
View File
@@ -1,11 +1,13 @@
import gi
import contextlib
import logging
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from gi.repository import Gtk, Pango
from ks_includes.screen_panel import ScreenPanel
from ks_includes.widgets.objectmap import ObjectMap
def create_panel(*args):
@@ -15,48 +17,64 @@ def create_panel(*args):
class ExcludeObjectPanel(ScreenPanel):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self._screen = screen
self.object_list = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
self.object_list.set_valign(Gtk.Align.CENTER)
self.object_list.set_halign(Gtk.Align.CENTER)
self.object_list.set_halign(Gtk.Align.START)
self.buttons = {}
self.current_object = self._gtk.ButtonImage("extrude", "", scale=.66,
position=Gtk.PositionType.LEFT, lines=1)
self.current_object = self._gtk.ButtonImage("extrude", "", scale=.66, position=Gtk.PositionType.LEFT, lines=1)
self.current_object.connect("clicked", self.exclude_current)
self.current_object.set_hexpand(True)
self.current_object.set_vexpand(False)
self.excluded_objects = self._printer.get_stat("exclude_object", "excluded_objects")
logging.info(f'Excluded: {self.excluded_objects}')
self.objects = self._printer.get_stat("exclude_object", "objects")
self.labels['map'] = None
def initialize(self, panel_name):
objects = self._printer.get_stat("exclude_object", "objects")
for obj in objects:
for obj in self.objects:
logging.info(f"Adding {obj['name']}")
self.add_object(obj["name"])
scroll = self._gtk.ScrolledWindow()
scroll.set_size_request((self._screen.width * .9) // 2, -1)
scroll.add(self.object_list)
scroll.set_halign(Gtk.Align.CENTER)
scroll.set_size_request(self._gtk.get_content_width(), 0)
grid = Gtk.Grid()
grid.attach(self.current_object, 0, 0, 1, 1)
grid.attach(Gtk.Separator(), 0, 1, 1, 1)
grid.attach(scroll, 0, 2, 1, 1)
grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False)
grid.attach(self.current_object, 0, 0, 2, 1)
grid.attach(Gtk.Separator(), 0, 1, 2, 1)
if self.objects and "polygon" in self.objects[0]:
self.labels['map'] = ObjectMap(self._screen, self._printer, self._gtk.get_font_size())
grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1)
else:
grid.attach(scroll, 0, 2, 2, 1)
self.content.add(grid)
self.content.show_all()
def add_object(self, name):
if name not in self.buttons:
self.buttons[name] = self._gtk.ButtonImage("cancel", name, scale=.66, position=Gtk.PositionType.LEFT,
lines=1)
if name not in self.buttons and name not in self.excluded_objects:
self.buttons[name] = self._gtk.Button(name.replace("_", " "))
self.buttons[name].get_children()[0].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self.buttons[name].get_children()[0].set_line_wrap(True)
self.buttons[name].connect("clicked", self.exclude_object, name)
self.buttons[name].set_hexpand(True)
if name in self.excluded_objects:
self.buttons[name].set_sensitive(False)
self.buttons[name].get_style_context().add_class("frame-item")
self.object_list.add(self.buttons[name])
self.buttons[name].get_style_context().add_class("frame-item")
self.object_list.add(self.buttons[name])
def exclude_object(self, widget, name):
if len(self.excluded_objects) == len(self.objects) - 1:
# Do not exclude the last object, this is a workaround for a bug of klipper that starts
# to move the toolhead really fast skipping gcode until the file ends
# Remove this if they fix it.
self._screen._confirm_send_action(
widget,
_("Are you sure you wish to cancel this print?"),
"printer.print.cancel",
)
return
script = {"script": f"EXCLUDE_OBJECT NAME={name}"}
self._screen._confirm_send_action(
widget,
@@ -71,13 +89,37 @@ class ExcludeObjectPanel(ScreenPanel):
def process_update(self, action, data):
if action == "notify_status_update":
with contextlib.suppress(KeyError):
self.current_object.set_label(f'{data["exclude_object"]["current_object"]}')
# Update objects
self.objects = data["exclude_object"]["objects"]
logging.info(f'Objects: {data["exclude_object"]["objects"]}')
for obj in self.buttons:
self.object_list.remove(self.buttons[obj])
self.buttons = {}
for obj in self.objects:
logging.info(f"Adding {obj['name']}")
self.add_object(obj["name"])
with contextlib.suppress(KeyError):
# Update current objects
if data["exclude_object"]["current_object"]:
self.current_object.set_label(f'{data["exclude_object"]["current_object"].replace("_", " ")}')
self.update_graph()
with contextlib.suppress(KeyError):
# Update excluded objects
logging.info(f'Excluded objects: {data["exclude_object"]["excluded_objects"]}')
self.excluded_objects = data["exclude_object"]["excluded_objects"]
for name in self.excluded_objects:
self.buttons[name].set_sensitive(False)
with contextlib.suppress(KeyError):
logging.info(f'Objects: {data["exclude_object"]["objects"]}')
if name in self.buttons:
self.object_list.remove(self.buttons[name])
self.update_graph()
if len(self.excluded_objects) == len(self.objects):
self.menu_return(False)
elif action == "notify_gcode_response" and "Excluding object" in data:
self._screen.show_popup_message(data, level=1)
self.update_graph()
def activate(self):
self.update_graph()
def update_graph(self):
if self.labels['map']:
self.labels['map'].queue_draw()
+29 -39
View File
@@ -1,5 +1,6 @@
import gi
import logging
import re
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango
@@ -17,14 +18,28 @@ class ExtrudePanel(ScreenPanel):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
self.speeds = ['1', '2', '5', '25']
self.speed = 1
self.distances = ['5', '10', '15', '25']
self.distance = 5
macros = self._screen.printer.get_gcode_macros()
self.load_filament = any("LOAD_FILAMENT" in macro.upper() for macro in macros)
self.unload_filament = any("UNLOAD_FILAMENT" in macro.upper() for macro in macros)
self.speeds = ['1', '2', '5', '25']
self.speed = int(self.speeds[1])
self.distances = ['5', '10', '15', '25']
self.distance = int(self.distances[1])
print_cfg = self._config.get_printer_config(self._screen.connected_printer)
if print_cfg is not None:
dis = print_cfg.get("extrude_distances", '5, 10, 15, 25')
if re.match(r'^[0-9,\s]+$', dis):
dis = [str(i.strip()) for i in dis.split(',')]
if 1 < len(dis) < 5:
self.distances = dis
vel = print_cfg.get("extrude_speeds", '1, 2, 5, 25')
if re.match(r'^[0-9,\s]+$', vel):
vel = [str(i.strip()) for i in vel.split(',')]
if 1 < len(vel) < 5:
self.speeds = vel
def initialize(self, panel_name):
self.labels['extrude'] = self._gtk.ButtonImage("extrude", _("Extrude"), "color4")
self.labels['extrude'].connect("clicked", self.extrude, "+")
@@ -62,7 +77,7 @@ class ExtrudePanel(ScreenPanel):
distgrid = Gtk.Grid()
for j, i in enumerate(self.distances):
self.labels[f"dist{i}"] = self._gtk.ToggleButton(i)
self.labels[f"dist{i}"] = self._gtk.Button(i)
self.labels[f"dist{i}"].connect("clicked", self.change_distance, int(i))
ctx = self.labels[f"dist{i}"].get_style_context()
if ((self._screen.lang_ltr is True and j == 0) or
@@ -73,14 +88,13 @@ class ExtrudePanel(ScreenPanel):
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "5":
if int(i) == self.distance:
ctx.add_class("distbutton_active")
distgrid.attach(self.labels[f"dist{i}"], j, 0, 1, 1)
self.labels["dist5"].set_active(True)
speedgrid = Gtk.Grid()
for j, i in enumerate(self.speeds):
self.labels[f"speed{i}"] = self._gtk.ToggleButton(_(i))
self.labels[f"speed{i}"] = self._gtk.Button(i)
self.labels[f"speed{i}"].connect("clicked", self.change_speed, int(i))
ctx = self.labels[f"speed{i}"].get_style_context()
if ((self._screen.lang_ltr is True and j == 0) or
@@ -91,10 +105,9 @@ class ExtrudePanel(ScreenPanel):
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "2":
if int(i) == self.speed:
ctx.add_class("distbutton_active")
speedgrid.attach(self.labels[f"speed{i}"], j, 0, 1, 1)
self.labels["speed2"].set_active(True)
distbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.labels['extrude_dist'] = Gtk.Label(_("Distance (mm)"))
@@ -168,7 +181,9 @@ class ExtrudePanel(ScreenPanel):
self.update_temp(
x,
self._printer.get_dev_stat(x, "temperature"),
self._printer.get_dev_stat(x, "target")
self._printer.get_dev_stat(x, "target"),
self._printer.get_dev_stat(x, "power"),
lines=2,
)
if ("toolhead" in data and "extruder" in data["toolhead"] and
@@ -195,20 +210,10 @@ class ExtrudePanel(ScreenPanel):
logging.info(f"{x}: Filament detected: {data[x]['filament_detected']}")
def change_distance(self, widget, distance):
if self.distance == distance:
return
logging.info(f"### Distance {distance}")
ctx = self.labels[f"dist{self.distance}"].get_style_context()
ctx.remove_class("distbutton_active")
self.labels[f"dist{self.distance}"].get_style_context().remove_class("distbutton_active")
self.labels[f"dist{distance}"].get_style_context().add_class("distbutton_active")
self.distance = distance
ctx = self.labels[f"dist{self.distance}"].get_style_context()
ctx.add_class("distbutton_active")
for i in self.distances:
if i == self.distance:
continue
self.labels[f"dist{i}"].set_active(False)
def change_extruder(self, widget, extruder):
logging.info(f"Changing extruder to {extruder}")
@@ -219,18 +224,10 @@ class ExtrudePanel(ScreenPanel):
self._screen._ws.klippy.gcode_script(f"T{self._printer.get_tool_number(extruder)}")
def change_speed(self, widget, speed):
if self.speed == speed:
return
logging.info(f"### Speed {speed}")
self.labels[f"speed{self.speed}"].get_style_context().remove_class("distbutton_active")
self.labels[f"speed{speed}"].get_style_context().add_class("distbutton_active")
self.speed = speed
self.labels[f"speed{self.speed}"].get_style_context().add_class("distbutton_active")
for i in self.speeds:
if i == self.speed:
continue
self.labels[f"speed{i}"].set_active(False)
def extrude(self, widget, direction):
self._screen._ws.klippy.gcode_script(KlippyGcodes.EXTRUDE_REL)
@@ -257,10 +254,3 @@ class ExtrudePanel(ScreenPanel):
self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=0")
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_empty")
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected")
def update_temp(self, dev, temp, target):
if dev in self.labels and temp is not None:
if target > 0:
self.labels[dev].set_label(f"{temp:.1f}°C\n({target:.0f})")
else:
self.labels[dev].set_label(f"{temp:.1f}°C")
+32 -45
View File
@@ -1,6 +1,7 @@
import gi
import logging
import re
import contextlib
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
@@ -14,15 +15,11 @@ def create_panel(*args):
class FineTunePanel(ScreenPanel):
user_selecting = False
bs = 0
bs_delta = "0.05"
bs_deltas = ["0.01", "0.05"]
percent_delta = 1
bs_delta = bs_deltas[-1]
percent_deltas = ['1', '5', '10', '25']
extrusion = 100
speed = 100
percent_delta = percent_deltas[-2]
speed = extrusion = 100
def initialize(self, panel_name):
@@ -33,15 +30,16 @@ class FineTunePanel(ScreenPanel):
bs = print_cfg.get("z_babystep_values", "0.01, 0.05")
if re.match(r'^[0-9,\.\s]+$', bs):
bs = [str(i.strip()) for i in bs.split(',')]
self.bs_deltas = bs if len(bs) <= 2 else [bs[0], bs[-1]]
self.bs_delta = self.bs_deltas[0]
if 1 < len(bs) < 3:
self.bs_deltas = bs
self.bs_delta = self.bs_deltas[-1]
# babystepping grid
bsgrid = Gtk.Grid()
for j, i in enumerate(self.bs_deltas):
self.labels[i] = self._gtk.ToggleButton(i)
self.labels[i].connect("clicked", self.change_bs_delta, i)
ctx = self.labels[i].get_style_context()
self.labels[f"bdelta{i}"] = self._gtk.Button(i)
self.labels[f"bdelta{i}"].connect("clicked", self.change_bs_delta, float(i))
ctx = self.labels[f"bdelta{i}"].get_style_context()
if j == 0:
ctx.add_class("distbutton_top")
elif j == len(self.bs_deltas) - 1:
@@ -50,23 +48,22 @@ class FineTunePanel(ScreenPanel):
ctx.add_class("distbutton")
if i == self.bs_delta:
ctx.add_class("distbutton_active")
bsgrid.attach(self.labels[i], j, 0, 1, 1)
bsgrid.attach(self.labels[f"bdelta{i}"], j, 0, 1, 1)
# Grid for percentage
deltgrid = Gtk.Grid()
for j, i in enumerate(self.percent_deltas):
self.labels[i] = self._gtk.ToggleButton(f"{i}%")
self.labels[i].connect("clicked", self.change_percent_delta, i)
ctx = self.labels[i].get_style_context()
self.labels[f"pdelta{i}"] = self._gtk.Button(f"{i}%")
self.labels[f"pdelta{i}"].connect("clicked", self.change_percent_delta, int(i))
ctx = self.labels[f"pdelta{i}"].get_style_context()
if j == 0:
ctx.add_class("distbutton_top")
elif j == len(self.percent_deltas) - 1:
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "1":
if i == self.percent_delta:
ctx.add_class("distbutton_active")
deltgrid.attach(self.labels[i], j, 0, 1, 1)
self.labels["1"].set_active(True)
deltgrid.attach(self.labels[f"pdelta{i}"], j, 0, 1, 1)
grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False)
@@ -155,35 +152,34 @@ class FineTunePanel(ScreenPanel):
def change_babystepping(self, widget, direction):
if direction == "reset":
self.labels['zoffset'].set_label(' 0.00mm')
self._screen._ws.klippy.gcode_script("SET_GCODE_OFFSET Z=0 MOVE=1")
elif direction in ["+", "-"]:
with contextlib.suppress(KeyError):
z_offset = float(self._printer.data["gcode_move"]["homing_origin"][2])
if direction == "+":
z_offset += float(self.bs_delta)
else:
z_offset -= float(self.bs_delta)
self.labels['zoffset'].set_label(f' {round(z_offset, 2):.2f}mm')
self._screen._ws.klippy.gcode_script(f"SET_GCODE_OFFSET Z_ADJUST={direction}{self.bs_delta} MOVE=1")
def change_bs_delta(self, widget, bs):
if self.bs_delta == bs:
return
logging.info(f"### BabyStepping {bs}")
ctx = self.labels[f"{self.bs_delta}"].get_style_context()
ctx.remove_class("distbutton_active")
self.labels[f"bdelta{self.bs_delta}"].get_style_context().remove_class("distbutton_active")
self.labels[f"bdelta{bs}"].get_style_context().add_class("distbutton_active")
self.bs_delta = bs
ctx = self.labels[self.bs_delta].get_style_context()
ctx.add_class("distbutton_active")
for i in self.bs_deltas:
if i == self.bs_delta:
continue
self.labels[i].set_active(False)
def change_extrusion(self, widget, direction):
if direction == "+":
self.extrusion += int(self.percent_delta)
self.extrusion += self.percent_delta
elif direction == "-":
self.extrusion -= int(self.percent_delta)
self.extrusion -= self.percent_delta
elif direction == "reset":
self.extrusion = 100
self.extrusion = max(self.extrusion, 1)
self.labels['extrudefactor'].set_label(f" {self.extrusion:3}%")
self._screen._ws.klippy.gcode_script(KlippyGcodes.set_extrusion_rate(self.extrusion))
def change_speed(self, widget, direction):
@@ -195,20 +191,11 @@ class FineTunePanel(ScreenPanel):
self.speed = 100
self.speed = max(self.speed, 1)
self.labels['speedfactor'].set_label(f" {self.speed:3}%")
self._screen._ws.klippy.gcode_script(KlippyGcodes.set_speed_rate(self.speed))
def change_percent_delta(self, widget, delta):
if self.percent_delta == delta:
return
logging.info(f"### Delta {delta}")
ctx = self.labels[f"{self.percent_delta}"].get_style_context()
ctx.remove_class("distbutton_active")
self.labels[f"pdelta{self.percent_delta}"].get_style_context().remove_class("distbutton_active")
self.labels[f"pdelta{delta}"].get_style_context().add_class("distbutton_active")
self.percent_delta = delta
ctx = self.labels[self.percent_delta].get_style_context()
ctx.add_class("distbutton_active")
for i in self.percent_deltas:
if i == self.percent_delta:
continue
self.labels[f"{i}"].set_active(False)
+2 -2
View File
@@ -104,9 +104,9 @@ class MacroPanel(ScreenPanel):
def change_sort(self, widget):
self.sort_reverse ^= True
if self.sort_reverse:
self.sort_btn.set_image(self._gtk.Image("arrow-down", .5))
self.sort_btn.set_image(self._gtk.Image("arrow-down", self._gtk.img_scale * .5))
else:
self.sort_btn.set_image(self._gtk.Image("arrow-up", .5))
self.sort_btn.set_image(self._gtk.Image("arrow-up", self._gtk.img_scale * .5))
self.sort_btn.show()
GLib.idle_add(self.reload_macros)
+1 -1
View File
@@ -127,7 +127,7 @@ class InputShaperPanel(ScreenPanel):
if method == "both":
self._screen._ws.klippy.gcode_script('SHAPER_CALIBRATE')
self.calibrate_btn.set_label(self.lang.gettext('Calibrating...'))
self.calibrate_btn.set_label(_('Calibrating...'))
self.calibrate_btn.set_sensitive(False)
def set_opt_value(self, widget, opt, *args):
+27 -33
View File
@@ -119,12 +119,7 @@ class JobStatusPanel(ScreenPanel):
overlay.add(self.labels['darea'])
overlay.add_overlay(box)
self.labels['thumbnail'] = self._gtk.Image("file", 2)
if self._screen.vertical_mode:
self.labels['thumbnail'].set_size_request(0, self._screen.height / 4)
else:
self.labels['thumbnail'].set_size_request(self._screen.width / 3, 0)
self.labels['thumbnail'] = self._gtk.Image("file", self._screen.width / 4, self._screen.height / 4)
self.labels['info_grid'] = Gtk.Grid()
self.labels['info_grid'].attach(self.labels['thumbnail'], 0, 0, 1, 1)
if self._screen.printer.get_tools():
@@ -186,7 +181,7 @@ class JobStatusPanel(ScreenPanel):
self.heater_button[device].set_halign(Gtk.Align.START)
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1)
n += 1
extra_item = True
extra_item = not self._show_heater_power
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
if printer_cfg is not None:
titlebar_items = printer_cfg.get("titlebar_items", "")
@@ -441,9 +436,11 @@ class JobStatusPanel(ScreenPanel):
widget.destroy()
def restart(self, widget):
self.disable_button("restart")
if self.filename != "none":
self._screen._ws.klippy.print_start(self.filename)
self.new_print()
GLib.timeout_add_seconds(5, self.enable_button("restart"))
def resume(self, widget):
self._screen._ws.klippy.print_resume(self._response_callback, "enable_button", "pause", "cancel")
@@ -471,7 +468,6 @@ class JobStatusPanel(ScreenPanel):
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self._gtk.Dialog(self._screen, buttons, label, self.cancel_confirm)
self.disable_button("pause", "cancel")
def cancel_confirm(self, widget, response_id):
widget.destroy()
@@ -494,11 +490,15 @@ class JobStatusPanel(ScreenPanel):
self.enable_button(*args)
def close_panel(self, widget=None):
self.disable_button("menu")
logging.debug("Closing job_status panel")
self.remove_close_timeout()
self.state_check()
if self.state not in ["printing", "paused"]:
if self.state not in ["printing", "paused", "cancelling"]:
self._screen.printer_ready()
self._printer.change_state("ready")
GLib.timeout_add_seconds(5, self.enable_button("menu"))
return False
def remove_close_timeout(self):
@@ -543,7 +543,8 @@ class JobStatusPanel(ScreenPanel):
self.update_temp(
x,
self._printer.get_dev_stat(x, "temperature"),
self._printer.get_dev_stat(x, "target")
self._printer.get_dev_stat(x, "target"),
self._printer.get_dev_stat(x, "power"),
)
self.extruder_button[x].set_label(self.labels[x].get_text())
for x in self._printer.get_heaters():
@@ -551,7 +552,8 @@ class JobStatusPanel(ScreenPanel):
self.update_temp(
x,
self._printer.get_dev_stat(x, "temperature"),
self._printer.get_dev_stat(x, "target")
self._printer.get_dev_stat(x, "target"),
self._printer.get_dev_stat(x, "power"),
)
self.heater_button[x].set_label(self.labels[x].get_text())
@@ -746,13 +748,11 @@ class JobStatusPanel(ScreenPanel):
self.set_state("complete")
return self._add_timeout("job_complete_timeout")
elif ps['state'] == "error":
logging.debug("Error!")
self.set_state("error")
self.labels['status'].set_text(_("Error"))
self._screen.show_popup_message(ps['message'])
return self._add_timeout("job_error_timeout")
elif ps['state'] == "cancelled":
# Print was cancelled
self.set_state("cancelled")
return self._add_timeout("job_cancelled_timeout")
elif ps['state'] == "paused":
@@ -819,12 +819,19 @@ class JobStatusPanel(ScreenPanel):
if self.filename is not None:
self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1)
if self.state != "cancelling":
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1)
self.show_all()
def show_file_thumbnail(self):
if self._files.has_thumbnail(self.filename):
pixbuf = self.get_file_image(self.filename, 5, 4)
if self._screen.vertical_mode:
width = -1
height = self._screen.height / 4
else:
width = self._screen.width / 3
height = -1
pixbuf = self.get_file_image(self.filename, width, height)
if pixbuf is not None:
self.labels['thumbnail'].set_from_pixbuf(pixbuf)
@@ -835,27 +842,21 @@ class JobStatusPanel(ScreenPanel):
"complete": self.labels['file'].get_label(),
"current": self.labels['file'].get_label(),
"position": 0,
"limit": 24,
"limit": (self._screen.width * 24 / 480) // (self._gtk.get_font_size() / 11),
"length": len(self.labels['file'].get_label())
}
if self.animation_timeout is None:
# if self.labels['file'].is_ellipsized(): <- currently this doesn't work
if (self.filename_label['length'] - self.filename_label['limit']) > 0:
self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
if self.animation_timeout is None and (self.filename_label['length'] - self.filename_label['limit']) > 0:
self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
self.update_percent_complete()
self.update_file_metadata()
def animate_label(self):
pos = self.filename_label['position']
current = self.filename_label['current']
complete = self.filename_label['complete']
if pos > (self.filename_label['length'] - self.filename_label['limit']):
self.filename_label['position'] = 0
self.labels['file'].set_label(complete)
self.labels['file'].set_label(self.filename_label['complete'])
else:
self.labels['file'].set_label(current[pos:self.filename_label['length']])
self.labels['file'].set_label(self.filename_label['current'][pos:self.filename_label['length']])
self.filename_label['position'] += 1
return True
@@ -915,10 +916,3 @@ class JobStatusPanel(ScreenPanel):
if msg is None:
msg = " "
self.labels['lcdmessage'].set_text(f"{msg}")
def update_temp(self, x, temp, target):
if x in self.labels and temp is not None:
if target is not None and target > 0:
self.labels[x].set_label(f"{int(temp):3}/{int(target):3}°")
else:
self.labels[x].set_label(f"{int(temp):3}°")
+7 -2
View File
@@ -67,8 +67,11 @@ class LimitsPanel(ScreenPanel):
if opt["option"] == option:
if self.values[option] > opt["max"]:
self.limits[option]['scale'].get_style_context().add_class("option_slider_max")
# Infinite scale
self.limits[option]['adjustment'].set_upper(self.values[option] * 1.5)
else:
self.limits[option]['scale'].get_style_context().remove_class("option_slider_max")
self.limits[option]['adjustment'].set_upper(opt["max"] * 1.5)
self.limits[option]['scale'].connect("button-release-event", self.set_opt_value, option)
def add_option(self, option, optname, units, value):
@@ -83,8 +86,9 @@ class LimitsPanel(ScreenPanel):
name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
scale = Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL, min=0, max=value * 1.5, step=1)
scale.set_value(value)
# adj (value, lower, upper, step_increment, page_increment, page_size)
adj = Gtk.Adjustment(value, 1, (value * 1.5), 1, 5, 0)
scale = Gtk.Scale.new(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
scale.set_digits(0)
scale.set_hexpand(True)
scale.set_has_origin(True)
@@ -108,6 +112,7 @@ class LimitsPanel(ScreenPanel):
self.limits[option] = {
"row": frame,
"scale": scale,
"adjustment": adj,
}
limits = sorted(self.limits)
+3 -9
View File
@@ -243,13 +243,15 @@ class MainPanel(MenuPanel):
self.update_temp(
x,
self._printer.get_dev_stat(x, "temperature"),
self._printer.get_dev_stat(x, "target")
self._printer.get_dev_stat(x, "target"),
self._printer.get_dev_stat(x, "power"),
)
for h in self._printer.get_heaters():
self.update_temp(
h,
self._printer.get_dev_stat(h, "temperature"),
self._printer.get_dev_stat(h, "target"),
self._printer.get_dev_stat(h, "power"),
)
return
@@ -275,11 +277,3 @@ class MainPanel(MenuPanel):
def update_graph(self):
self.labels['da'].queue_draw()
return True
def update_temp(self, device, temp, target):
if device not in self.devices:
return
if self.devices[device]["can_target"] and target > 0:
self.devices[device]["temp"].get_child().set_label(f"{temp:.1f} / {target:.0f}")
else:
self.devices[device]["temp"].get_child().set_label(f"{temp:.1f}")
+2 -4
View File
@@ -77,7 +77,7 @@ class MenuPanel(ScreenPanel):
item = self.items[i][key]
env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self.lang)
env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(item['name'])
parsed_name = j2_temp.render()
@@ -109,9 +109,7 @@ class MenuPanel(ScreenPanel):
logging.debug(f"Template: '{enable}'")
j2_temp = Template(enable, autoescape=True)
result = j2_temp.render(self.j2_data)
if result == 'True':
return True
return False
return result == 'True'
except Exception as e:
logging.debug(f"Error evaluating enable statement: {enable}\n{e}")
return False
+6 -19
View File
@@ -17,8 +17,8 @@ def create_panel(*args):
class MovePanel(ScreenPanel):
distance = 1
distances = ['.1', '.5', '1', '5', '10', '25', '50']
distance = distances[-2]
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
@@ -100,7 +100,7 @@ class MovePanel(ScreenPanel):
distgrid = Gtk.Grid()
for j, i in enumerate(self.distances):
self.labels[i] = self._gtk.ToggleButton(i)
self.labels[i] = self._gtk.Button(i)
self.labels[i].set_direction(Gtk.TextDirection.LTR)
self.labels[i].connect("clicked", self.change_distance, i)
ctx = self.labels[i].get_style_context()
@@ -110,10 +110,9 @@ class MovePanel(ScreenPanel):
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "1":
if i == self.distance:
ctx.add_class("distbutton_active")
distgrid.attach(self.labels[i], j, 0, 1, 1)
self.labels["1"].set_active(True)
self.labels['pos_x'] = Gtk.Label("X: 0")
self.labels['pos_y'] = Gtk.Label("Y: 0")
@@ -194,31 +193,19 @@ class MovePanel(ScreenPanel):
self.labels['pos_z'].set_text("Z: ?")
def change_distance(self, widget, distance):
if self.distance == distance:
return
logging.info(f"### Distance {distance}")
ctx = self.labels[f"{self.distance}"].get_style_context()
ctx.remove_class("distbutton_active")
self.labels[f"{self.distance}"].get_style_context().remove_class("distbutton_active")
self.labels[f"{distance}"].get_style_context().add_class("distbutton_active")
self.distance = distance
ctx = self.labels[self.distance].get_style_context()
ctx.add_class("distbutton_active")
for i in self.distances:
if i == self.distance:
continue
self.labels[f"{i}"].set_active(False)
def move(self, widget, axis, direction):
speed = None
if self._config.get_config()['main'].getboolean(f"invert_{axis.lower()}", False):
direction = "-" if direction == "+" else "+"
dist = f"{direction}{self.distance}"
config_key = "move_speed_z" if axis == AXIS_Z else "move_speed_xy"
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
if printer_cfg is not None:
speed = printer_cfg.getint(config_key, None)
speed = None if printer_cfg is None else printer_cfg.getint(config_key, None)
if speed is None:
speed = self._config.get_config()['main'].getint(config_key, 20)
+1 -1
View File
@@ -446,8 +446,8 @@ class NetworkPanel(ScreenPanel):
def reload_networks(self, widget=None):
self.networks = {}
self.labels['networklist'].remove_column(0)
self.wifi.rescan()
if self.wifi is not None and self.wifi.is_initialized():
self.wifi.rescan()
GLib.idle_add(self.load_networks)
def activate(self):
+10 -10
View File
@@ -16,21 +16,17 @@ class PowerPanel(ScreenPanel):
self.devices = {}
# Create a scroll window for the power devices
scroll = self._gtk.ScrolledWindow()
# Create a grid for all devices
self.labels['devices'] = Gtk.Grid()
scroll.add(self.labels['devices'])
# Create a box to contain all of the above
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True)
box.pack_start(scroll, True, True, 0)
self.labels['devices'].set_valign(Gtk.Align.CENTER)
self.load_power_devices()
self.content.add(box)
# Create a scroll window for the power devices
scroll = self._gtk.ScrolledWindow()
scroll.add(self.labels['devices'])
self.content.add(scroll)
def activate(self):
devices = self._screen.printer.get_power_devices()
@@ -87,6 +83,10 @@ class PowerPanel(ScreenPanel):
devices = self._screen.printer.get_power_devices()
for x in devices:
self.add_device(x)
# Add the line at the top
frame = Gtk.Frame()
frame.set_vexpand(False)
self.labels['devices'].attach(frame, 0, -1, 1, 1)
def on_switch(self, switch, gparam, device):
logging.debug(f"Power toggled {device}")
+30 -26
View File
@@ -45,7 +45,7 @@ class PrintPanel(ScreenPanel):
for i, (name, val) in enumerate(self.sort_items.items(), start=1):
s = self._gtk.ButtonImage(None, val, f"color{i % 4}", .5, Gtk.PositionType.RIGHT, 1)
if name == self.sort_current[0]:
s.set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], .5))
s.set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], self._gtk.img_scale * .5))
s.connect("clicked", self.change_sort, name)
self.labels[f'sort_{name}'] = s
sbox.add(s)
@@ -110,10 +110,14 @@ class PrintPanel(ScreenPanel):
d = f"gcodes/{filepath}".split('/')[:-1]
directory = '/'.join(d)
filename = filepath.split('/')[-1]
if filename.startswith("."):
return
for i in range(1, len(d)):
curdir = "/".join(d[:i])
newdir = "/".join(d[:i + 1])
if newdir not in self.filelist[curdir]['directories']:
if d[i].startswith("."):
return
self.add_directory(newdir)
if filename not in self.filelist[directory]['files']:
@@ -122,7 +126,7 @@ class PrintPanel(ScreenPanel):
if curdir != "gcodes" and fileinfo['modified'] > self.filelist[curdir]['modified']:
self.filelist[curdir]['modified'] = fileinfo['modified']
self.labels['directories'][curdir]['info'].set_markup(
f'<small>' + _("Modified")
'<small>' + _("Modified")
+ f' <b>{datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %H:%M}</b></small>'
)
@@ -175,7 +179,7 @@ class PrintPanel(ScreenPanel):
file.set_hexpand(True)
file.set_vexpand(False)
icon = self._gtk.Image("folder", 1)
icon = self._gtk.Image("folder")
file.add(icon)
file.add(labels)
@@ -185,7 +189,6 @@ class PrintPanel(ScreenPanel):
self.directories[directory] = frame
self.labels['directories'][directory] = {
"icon": icon,
"info": info,
"name": name
}
@@ -222,18 +225,11 @@ class PrintPanel(ScreenPanel):
file.set_hexpand(True)
file.set_vexpand(False)
icon = Gtk.Image()
pixbuf = self.get_file_image(filepath, small=True)
if pixbuf is not None:
icon.set_from_pixbuf(pixbuf)
else:
icon = self._gtk.Image("file", 1.6)
icon = Gtk.Button()
GLib.idle_add(self.image_load, filepath)
icon.connect("clicked", self.confirm_delete_file, f"gcodes/{filepath}")
img = Gtk.Button()
img.set_image(icon)
img.connect("clicked", self.confirm_delete_file, f"gcodes/{filepath}")
file.add(img)
file.add(icon)
file.add(labels)
if os.path.splitext(filename)[1] in [".gcode", ".g", ".gco"]:
file.add(actions)
@@ -246,6 +242,13 @@ class PrintPanel(ScreenPanel):
"name": name
}
def image_load(self, filepath):
pixbuf = self.get_file_image(filepath, small=True)
if pixbuf is not None:
self.labels['files'][filepath]['icon'].set_image(Gtk.Image.new_from_pixbuf(pixbuf))
else:
self.labels['files'][filepath]['icon'].set_image(self._gtk.Image("file"))
def confirm_delete_file(self, widget, filepath):
logging.debug(f"Sending delete_file {filepath}")
params = {"path": f"{filepath}"}
@@ -284,7 +287,8 @@ class PrintPanel(ScreenPanel):
self.labels[f'sort_{oldkey}'].set_image(None)
self.labels[f'sort_{oldkey}'].show_all()
self.sort_current = [key, 0]
self.labels[f'sort_{key}'].set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], .5))
self.labels[f'sort_{key}'].set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]],
self._gtk.img_scale * .5))
self.labels[f'sort_{key}'].show()
GLib.idle_add(self.reload_files)
@@ -308,16 +312,16 @@ class PrintPanel(ScreenPanel):
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
grid = Gtk.Grid()
grid.add(label)
pixbuf = self.get_file_image(filename, 8, 3.2)
if pixbuf is not None:
image = Gtk.Image.new_from_pixbuf(pixbuf)
grid.attach_next_to(image, label, Gtk.PositionType.BOTTOM, 1, 3)
grid.set_vexpand(True)
grid.set_halign(Gtk.Align.CENTER)
grid.set_valign(Gtk.Align.CENTER)
grid.add(label)
pixbuf = self.get_file_image(filename, self._screen.width * .9, self._screen.height * .6)
if pixbuf is not None:
image = Gtk.Image.new_from_pixbuf(pixbuf)
image.set_vexpand(False)
grid.attach_next_to(image, label, Gtk.PositionType.BOTTOM, 1, 1)
self._gtk.Dialog(self._screen, buttons, grid, self.confirm_print_response, filename)
@@ -333,6 +337,8 @@ class PrintPanel(ScreenPanel):
def delete_file(self, filename):
dir_parts = f"gcodes/{filename}".split('/')[:-1]
directory = '/'.join(dir_parts)
if directory not in self.filelist or filename.split('/')[-1].startswith("."):
return
self.filelist[directory]["files"].pop(self.filelist[directory]["files"].index(filename.split('/')[-1]))
i = len(dir_parts)
while i > 1:
@@ -390,9 +396,7 @@ class PrintPanel(ScreenPanel):
self.labels['files'][filename]['info'].set_markup(self.get_file_info_str(filename))
# Update icon
pixbuf = self.get_file_image(filename)
if pixbuf is not None:
self.labels['files'][filename]['icon'].set_from_pixbuf(pixbuf)
GLib.idle_add(self.image_load, filename)
def _callback(self, newfiles, deletedfiles, updatedfiles=None):
logging.debug(f"newfiles: {newfiles}")
+5 -2
View File
@@ -2,7 +2,7 @@ import gi
import logging
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from gi.repository import Gtk, GLib
from ks_includes.screen_panel import ScreenPanel
logger = logging.getLogger("KlipperScreen.PrinterSelect")
@@ -17,7 +17,6 @@ class PrinterSelect(ScreenPanel):
super().__init__(screen, title, False)
def initialize(self, panel_name):
printers = self._config.get_printers()
grid = self._gtk.HomogeneousGrid()
@@ -47,3 +46,7 @@ class PrinterSelect(ScreenPanel):
col = i % columns
row = int(i / columns)
grid.attach(self.labels[name], col, row, 1, 1)
def activate(self):
self._screen.base_panel.action_bar.hide()
GLib.timeout_add(100, self._screen.base_panel.action_bar.hide)
+12 -2
View File
@@ -102,6 +102,14 @@ class FWRetractionPanel(ScreenPanel):
self.list[option]['scale'].disconnect_by_func(self.set_opt_value)
self.list[option]['scale'].set_value(self.values[option])
self.list[option]['scale'].connect("button-release-event", self.set_opt_value, option)
# Infinite scale
for opt in self.options:
if opt['option'] == option:
if self.values[option] > opt["maxval"] * .75:
self.list[option]['adjustment'].set_upper(self.values[option] * 1.5)
else:
self.list[option]['adjustment'].set_upper(opt["maxval"])
break
def add_option(self, option, optname, units, value, digits, maxval):
logging.info(f"Adding option: {option}")
@@ -116,8 +124,9 @@ class FWRetractionPanel(ScreenPanel):
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
minimum = 1 if option in ["retract_speed", "unretract_speed"] else 0
self.values[option] = value
scale = Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL, min=minimum, max=maxval, step=1)
scale.set_value(self.values[option])
# adj (value, lower, upper, step_increment, page_increment, page_size)
adj = Gtk.Adjustment(value, minimum, maxval, 1, 5, 0)
scale = Gtk.Scale.new(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
scale.set_digits(digits)
scale.set_hexpand(True)
scale.set_has_origin(True)
@@ -140,6 +149,7 @@ class FWRetractionPanel(ScreenPanel):
self.list[option] = {
"row": frame,
"scale": scale,
"adjustment": adj,
}
pos = sorted(self.list).index(option)
+1 -3
View File
@@ -102,12 +102,10 @@ class SettingsPanel(ScreenPanel):
dev.add(box)
elif option['type'] == "dropdown":
dropdown = Gtk.ComboBoxText()
i = 0
for opt in option['options']:
for i, opt in enumerate(option['options']):
dropdown.append(opt['value'], opt['name'])
if opt['value'] == self._config.get_config()[option['section']].get(opt_name, option['value']):
dropdown.set_active(i)
i += 1
dropdown.connect("changed", self.on_dropdown_change, option['section'], opt_name,
option['callback'] if "callback" in option else None)
dropdown.set_entry_text_column(0)
+1 -1
View File
@@ -20,7 +20,7 @@ class SplashScreenPanel(ScreenPanel):
def initialize(self, panel_name):
image = self._gtk.Image("klipper", 3.2)
image = self._gtk.Image("klipper", self._screen.width / 5, -1)
self.labels['text'] = Gtk.Label(_("Initializing printer..."))
self.labels['text'].set_line_wrap(True)
+17 -3
View File
@@ -12,7 +12,18 @@ def create_panel(*args):
return SystemPanel(*args)
ALLOWED_SERVICES = ["KlipperScreen", "MoonCord", "klipper", "moonraker", "webcamd"]
# Same as ALLOWED_SERVICES in moonraker
# https://github.com/Arksine/moonraker/blob/master/moonraker/components/machine.py
ALLOWED_SERVICES = (
"crowsnest",
"MoonCord",
"moonraker",
"moonraker-telegram-bot",
"klipper",
"KlipperScreen",
"sonar",
"webcamd",
)
class SystemPanel(ScreenPanel):
@@ -124,6 +135,7 @@ class SystemPanel(ScreenPanel):
)
if data['complete']:
self.update_dialog.set_response_sensitive(Gtk.ResponseType.CANCEL, True)
self.update_dialog.get_widget_for_response(Gtk.ResponseType.CANCEL).show()
def restart(self, widget, program):
if program not in ALLOWED_SERVICES:
@@ -253,7 +265,7 @@ class SystemPanel(ScreenPanel):
]
scroll = self._gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
scroll.set_property("overlay-scrolling", True)
self.labels['update_progress'] = Gtk.Label(_("Starting recovery for") + f' {program}...')
self.labels['update_progress'].set_halign(Gtk.Align.START)
@@ -265,6 +277,7 @@ class SystemPanel(ScreenPanel):
dialog = self._gtk.Dialog(self._screen, buttons, scroll, self.finish_updating)
dialog.set_response_sensitive(Gtk.ResponseType.CANCEL, False)
dialog.get_widget_for_response(Gtk.ResponseType.CANCEL).hide()
self.update_prog = program
self.update_dialog = dialog
@@ -296,7 +309,7 @@ class SystemPanel(ScreenPanel):
]
scroll = self._gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
scroll.set_property("overlay-scrolling", True)
if "full" in info:
self.labels['update_progress'] = Gtk.Label(_("Updating") + '\n')
@@ -310,6 +323,7 @@ class SystemPanel(ScreenPanel):
dialog = self._gtk.Dialog(self._screen, buttons, scroll, self.finish_updating)
dialog.set_response_sensitive(Gtk.ResponseType.CANCEL, False)
dialog.get_widget_for_response(Gtk.ResponseType.CANCEL).hide()
self.update_prog = program
self.update_dialog = dialog
+27 -40
View File
@@ -25,7 +25,7 @@ class TemperaturePanel(ScreenPanel):
self.popover_device = None
self.h = 1
self.tempdeltas = ["1", "5", "10", "25"]
self.tempdelta = "10"
self.tempdelta = self.tempdeltas[-2]
self.show_preheat = False
self.preheat_options = self._screen._config.get_preheat_options()
logging.debug(f"Preheat options: {self.preheat_options}")
@@ -39,11 +39,15 @@ class TemperaturePanel(ScreenPanel):
state = self._printer.get_state()
logging.info(state)
selection = []
if "extruder" in self._printer.get_tools():
selection.append("extruder")
if state not in ["printing", "paused"]:
for extruder in self._printer.get_tools():
selection.append(extruder)
self.show_preheat = True
selection.extend(self._printer.get_heaters())
else:
current_extruder = self._screen.printer.get_stat("toolhead", "extruder")
if current_extruder:
selection.append(current_extruder)
# Select heaters
for h in selection:
@@ -115,7 +119,7 @@ class TemperaturePanel(ScreenPanel):
tempgrid = Gtk.Grid()
for j, i in enumerate(self.tempdeltas):
self.labels[f'deg{i}'] = self._gtk.ToggleButton(i)
self.labels[f'deg{i}'] = self._gtk.Button(i)
self.labels[f'deg{i}'].connect("clicked", self.change_temp_delta, i)
ctx = self.labels[f'deg{i}'].get_style_context()
if j == 0:
@@ -124,10 +128,9 @@ class TemperaturePanel(ScreenPanel):
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "10":
if i == self.tempdelta:
ctx.add_class("distbutton_active")
tempgrid.attach(self.labels[f'deg{i}'], j, 0, 1, 1)
self.labels[f"deg{self.tempdelta}"].set_active(True)
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
vbox.pack_start(Gtk.Label(_("Temperature") + " (°C)"), False, False, 8)
@@ -140,20 +143,10 @@ class TemperaturePanel(ScreenPanel):
return deltagrid
def change_temp_delta(self, widget, tempdelta):
if self.tempdelta == tempdelta:
return
logging.info(f"### tempdelta {tempdelta}")
ctx = self.labels[f"deg{self.tempdelta}"].get_style_context()
ctx.remove_class("distbutton_active")
self.labels[f"deg{self.tempdelta}"].get_style_context().remove_class("distbutton_active")
self.labels[f"deg{tempdelta}"].get_style_context().add_class("distbutton_active")
self.tempdelta = tempdelta
ctx = self.labels[f"deg{self.tempdelta}"].get_style_context()
ctx.add_class("distbutton_active")
for i in self.tempdeltas:
if i == self.tempdeltas:
continue
self.labels[f"deg{i}"].set_active(False)
def change_target_temp_incremental(self, widget, direction):
@@ -222,18 +215,17 @@ class TemperaturePanel(ScreenPanel):
self.hide_numpad()
def select_heater(self, widget, device):
if self.active_heater is None:
if self.devices[device]["can_target"]:
if device in self.active_heaters:
self.active_heaters.pop(self.active_heaters.index(device))
self.devices[device]['name'].get_style_context().remove_class("button_active")
self.devices[device]['select'].set_label(_("Select"))
logging.info(f"Deselecting {device}")
return
self.active_heaters.append(device)
self.devices[device]['name'].get_style_context().add_class("button_active")
self.devices[device]['select'].set_label(_("Deselect"))
logging.info(f"Seselecting {device}")
if self.active_heater is None and device in self.devices and self.devices[device]["can_target"]:
if device in self.active_heaters:
self.active_heaters.pop(self.active_heaters.index(device))
self.devices[device]['name'].get_style_context().remove_class("button_active")
self.devices[device]['select'].set_label(_("Select"))
logging.info(f"Deselecting {device}")
return
self.active_heaters.append(device)
self.devices[device]['name'].get_style_context().add_class("button_active")
self.devices[device]['select'].set_label(_("Deselect"))
logging.info(f"Seselecting {device}")
return
def set_temperature(self, widget, setting):
@@ -289,6 +281,7 @@ class TemperaturePanel(ScreenPanel):
elif target > max_temp:
self._screen.show_popup_message(_("Can't set above the maximum:") + f' {max_temp}')
return False
logging.debug(f"Invalid {heater} Target:{target}/{max_temp}")
return False
def preheat_gcode(self, setting):
@@ -519,13 +512,15 @@ class TemperaturePanel(ScreenPanel):
self.update_temp(
x,
self._printer.get_dev_stat(x, "temperature"),
self._printer.get_dev_stat(x, "target")
self._printer.get_dev_stat(x, "target"),
self._printer.get_dev_stat(x, "power"),
)
for h in self._printer.get_heaters():
self.update_temp(
h,
self._printer.get_dev_stat(h, "temperature"),
self._printer.get_dev_stat(h, "target")
self._printer.get_dev_stat(h, "target"),
self._printer.get_dev_stat(h, "power"),
)
return
@@ -552,11 +547,3 @@ class TemperaturePanel(ScreenPanel):
def update_graph(self):
self.labels['da'].queue_draw()
return True
def update_temp(self, device, temp, target):
if device not in self.devices:
return
if self.devices[device]["can_target"] and target > 0:
self.devices[device]["temp"].get_child().set_label(f"{temp:.1f} / {target:.0f}")
else:
self.devices[device]["temp"].get_child().set_label(f"{temp:.1f}")
+9 -18
View File
@@ -16,8 +16,8 @@ def create_panel(*args):
class ZCalibratePanel(ScreenPanel):
_screen = None
widgets = {}
distance = 1
distances = ['.01', '.05', '.1', '.5', '1', '5']
distance = distances[-2]
def __init__(self, screen, title, back=True):
super().__init__(screen, title, False)
@@ -90,7 +90,7 @@ class ZCalibratePanel(ScreenPanel):
distgrid = Gtk.Grid()
for j, i in enumerate(self.distances):
self.widgets[i] = self._gtk.ToggleButton(i)
self.widgets[i] = self._gtk.Button(i)
self.widgets[i].set_direction(Gtk.TextDirection.LTR)
self.widgets[i].connect("clicked", self.change_distance, i)
ctx = self.widgets[i].get_style_context()
@@ -100,10 +100,9 @@ class ZCalibratePanel(ScreenPanel):
ctx.add_class("distbutton_bottom")
else:
ctx.add_class("distbutton")
if i == "1":
if i == self.distance:
ctx.add_class("distbutton_active")
distgrid.attach(self.widgets[i], j, 0, 1, 1)
self.widgets["1"].set_active(True)
self.widgets['move_dist'] = Gtk.Label(_("Move Distance (mm)"))
distances = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
@@ -206,9 +205,10 @@ class ZCalibratePanel(ScreenPanel):
x_offset = float(probe['x_offset'])
if "y_offset" in probe:
y_offset = float(probe['y_offset'])
if x_offset is not None and y_offset is not None:
logging.info(f"Probe offset X:{x_offset} Y:{y_offset}")
logging.info(f"Offset X:{x_offset} Y:{y_offset}")
if x_offset is not None:
x_position = x_position - x_offset
if y_offset is not None:
y_position = y_position - y_offset
logging.info(f"Moving to X:{x_position} Y:{y_position}")
@@ -247,19 +247,10 @@ class ZCalibratePanel(ScreenPanel):
self.widgets['zoffset'].set_text(f"{-position[2] + self.z_offset:.2f}")
def change_distance(self, widget, distance):
if self.distance == distance:
return
ctx = self.widgets[f'{self.distance}'].get_style_context()
ctx.remove_class("distbutton_active")
logging.info(f"### Distance {distance}")
self.widgets[f"{self.distance}"].get_style_context().remove_class("distbutton_active")
self.widgets[f"{distance}"].get_style_context().add_class("distbutton_active")
self.distance = distance
ctx = self.widgets[self.distance].get_style_context()
ctx.add_class("distbutton_active")
for i in self.distances:
if i == self.distance:
continue
self.widgets[f"{i}"].set_active(False)
def move(self, widget, direction):
dist = f"{direction}{self.distance}"
+50 -40
View File
@@ -7,7 +7,6 @@ import json
import importlib
import logging
import os
import re
import signal
import subprocess
import pathlib
@@ -46,7 +45,9 @@ PRINTER_BASE_STATUS_OBJECTS = [
'toolhead',
'virtual_sdcard',
'webhooks',
'motion_report'
'motion_report',
'firmware_retraction',
'exclude_object',
]
klipperscreendir = pathlib.Path(__file__).parent.resolve()
@@ -72,7 +73,6 @@ class KlipperScreen(Gtk.Window):
printer = None
printer_select_callbacks = []
printer_select_prepanel = None
rtl_languages = ['he_il']
subscriptions = []
shutdown = True
updating = False
@@ -94,17 +94,7 @@ class KlipperScreen(Gtk.Window):
configfile = os.path.normpath(os.path.expanduser(args.configfile))
self._config = KlipperScreenConfig(configfile, self)
self.lang = self._config.get_lang()
logging.debug(f"OS Language: {os.getenv('LANG')}")
self.lang_ltr = True
for lang in self.rtl_languages:
if os.getenv('LANG').lower().startswith(lang):
self.lang_ltr = False
Gtk.Widget.set_default_direction(Gtk.TextDirection.RTL)
logging.debug("Enabling RTL mode")
break
self.lang_ltr = self.set_text_direction(self._config.get_main_config().get("language", None))
Gtk.Window.__init__(self)
monitor = Gdk.Display.get_default().get_primary_monitor()
@@ -147,7 +137,7 @@ class KlipperScreen(Gtk.Window):
pname = list(printers[0])[0]
self.connect_printer(pname)
else:
self.show_panel("printer_select", "printer_select", "Printer Select", 2)
self.show_printer_select()
def connect_printer_widget(self, widget, name):
self.connect_printer(name)
@@ -271,9 +261,10 @@ class KlipperScreen(Gtk.Window):
}
}
for extruder in self.printer.get_tools():
requested_updates['objects'][extruder] = ["target", "temperature", "pressure_advance", "smooth_time"]
requested_updates['objects'][extruder] = [
"target", "temperature", "pressure_advance", "smooth_time", "power"]
for h in self.printer.get_heaters():
requested_updates['objects'][h] = ["target", "temperature"]
requested_updates['objects'][h] = ["target", "temperature", "power"]
for f in self.printer.get_fans():
requested_updates['objects'][f] = ["speed"]
for f in self.printer.get_filament_sensors():
@@ -404,7 +395,6 @@ class KlipperScreen(Gtk.Window):
self.base_panel.get().remove(self.popup_message)
self.popup_message = None
self.show_all()
def show_error_modal(self, err, e=""):
logging.exception(f"Showing error modal: {err}")
@@ -605,7 +595,7 @@ class KlipperScreen(Gtk.Window):
self.subscriptions.pop(i)
return
def reset_screensaver_timeout(self, widget=None):
def reset_screensaver_timeout(self, *args):
if self.screensaver_timeout is not None:
GLib.source_remove(self.screensaver_timeout)
self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver)
@@ -615,6 +605,8 @@ class KlipperScreen(Gtk.Window):
if self.screensaver is not None:
self.close_screensaver()
self.remove_keyboard()
for dialog in self.dialogs:
dialog.hide()
close = Gtk.Button()
close.connect("clicked", self.close_screensaver)
@@ -624,12 +616,12 @@ class KlipperScreen(Gtk.Window):
box.pack_start(close, True, True, 0)
box.set_halign(Gtk.Align.CENTER)
box.get_style_context().add_class("screensaver")
self.base_panel.get().put(box, 0, 0)
self.show_all()
# Avoid leaving a cursor-handle
close.grab_focus()
self.screensaver = box
self.screensaver.show_all()
return False
def close_screensaver(self, widget=None):
@@ -642,6 +634,8 @@ class KlipperScreen(Gtk.Window):
self.wake_screen()
else:
self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver)
for dialog in self.dialogs:
dialog.show()
self.show_all()
return False
@@ -720,11 +714,7 @@ class KlipperScreen(Gtk.Window):
logging.debug(f"Saving panel: {self._cur_panels[0]}")
self.printer_select_prepanel = self._cur_panels[0]
self.base_panel.show_heaters(False)
self.base_panel.show_macro_shortcut(False)
self.base_panel.show_printer_select(False)
self.show_panel("printer_select", "printer_select", "Printer Select", 2)
self.show_all()
self.base_panel.action_bar.hide()
self.show_panel("printer_select", "printer_select", _("Printer Select"), 2)
def state_execute(self, callback, prev_state):
if self.is_updating():
@@ -829,15 +819,44 @@ class KlipperScreen(Gtk.Window):
def toggle_macro_shortcut(self, value):
self.base_panel.show_macro_shortcut(value)
def set_text_direction(self, lang=None):
rtl_languages = ['he_IL']
if lang is None:
for lng in rtl_languages:
if os.getenv('LANG').startswith(lng):
lang = lng
break
if lang in rtl_languages:
Gtk.Widget.set_default_direction(Gtk.TextDirection.RTL)
logging.debug("Enabling RTL mode")
return False
Gtk.Widget.set_default_direction(Gtk.TextDirection.LTR)
return True
def change_language(self, lang):
self._config.install_language(lang)
self.lang_ltr = self.set_text_direction(lang)
self._config._create_configurable_options(self)
self.reload_panels()
def reload_panels(self, *args):
self._remove_all_panels()
for panel in list(self.panels):
del self.panels[panel]
for dialog in self.dialogs:
dialog.destroy()
self.printer.change_state(self.printer.state)
def _websocket_callback(self, action, data):
if self.connecting is True:
return
if action == "notify_klippy_disconnected":
logging.debug("Received notify_klippy_disconnected")
self.printer.change_state("disconnected")
return
elif action == "notify_klippy_shutdown":
self.printer.change_state("shutdown")
elif action == "notify_klippy_ready":
self.printer.change_state("ready")
elif action == "notify_status_update" and self.printer.get_state() != "shutdown":
@@ -855,17 +874,11 @@ class KlipperScreen(Gtk.Window):
self.printer.process_power_update(data)
self.panels['splash_screen'].check_power_status()
elif self.printer.get_state() not in ["error", "shutdown"] and action == "notify_gcode_response":
if "Klipper state: Shutdown" in data:
logging.debug("Shutdown in gcode response, changing state to shutdown")
self.printer.change_state("shutdown")
if not (data.startswith("B:") and
re.search(r'B:[0-9\.]+\s/[0-9\.]+\sT[0-9]+:[0-9\.]+', data)):
if not (data.startswith("B:") or data.startswith("T:")):
if data.startswith("echo: "):
self.show_popup_message(data[6:], 1)
elif data.startswith("!! "):
self.show_popup_message(data[3:], 3)
logging.debug(json.dumps([action, data], indent=2))
if "SAVE_CONFIG" in data and self.printer.get_state() == "ready":
script = {"script": "SAVE_CONFIG"}
self._confirm_send_action(
@@ -890,7 +903,7 @@ class KlipperScreen(Gtk.Window):
try:
env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self.lang)
env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(text)
text = j2_temp.render()
except Exception as e:
@@ -920,7 +933,7 @@ class KlipperScreen(Gtk.Window):
def printer_initializing(self, text=None, disconnect=False):
self.close_popup_message()
self.show_panel('splash_screen', "splash_screen", "Splash Screen", 2)
self.show_panel('splash_screen', "splash_screen", _("Home"), 2)
if disconnect is True and self.printer is not None:
self.shutdown = True
self.printer.state = "disconnected"
@@ -1024,10 +1037,7 @@ class KlipperScreen(Gtk.Window):
return False
def printer_ready(self):
self.close_popup_message()
# Force an update to printer webhooks state in case the update is missed due to websocket subscribe not yet sent
self.printer.process_update({"webhooks": {"state": "ready", "state_message": "Printer is ready"}})
self.show_panel('main_panel', "main_menu", _("Home"), 2,
items=self._config.get_menu_items("__main"), extrudercount=self.printer.get_extruder_count())
self.ws_subscribe()
@@ -1037,7 +1047,7 @@ class KlipperScreen(Gtk.Window):
def printer_printing(self):
self.close_popup_message()
self.show_panel('job_status', "job_status", "Print Status", 2)
self.show_panel('job_status', "job_status", _("Printing"), 2)
self.base_panel.show_heaters(True)
self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
for dialog in self.dialogs:
+14 -5
View File
@@ -105,11 +105,12 @@ create_virtualenv()
{
echo_text "Creating virtual environment"
if [ ! -d ${KSENV} ]; then
GET_PIP="${HOME}/get-pip.py"
virtualenv --no-pip -p /usr/bin/python3 ${KSENV}
curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o ${GET_PIP}
${KSENV}/bin/python ${GET_PIP}
rm ${GET_PIP}
virtualenv -p /usr/bin/python3 ${KSENV}
# GET_PIP="${HOME}/get-pip.py"
# virtualenv --no-pip -p /usr/bin/python3 ${KSENV}
# curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o ${GET_PIP}
# ${KSENV}/bin/python ${GET_PIP}
# rm ${GET_PIP}
fi
source ${KSENV}/bin/activate
@@ -161,6 +162,13 @@ update_x11()
fi
}
add_desktop_file()
{
DESKTOP=$(<$SCRIPTPATH/KlipperScreen.desktop)
mkdir -p $HOME/.local/share/applications/
echo "$DESKTOP" | tee $HOME/.local/share/applications/KlipperScreen.desktop > /dev/null
}
start_KlipperScreen()
{
echo_text "Starting service..."
@@ -177,4 +185,5 @@ modify_user
install_systemd_service
update_x11
echo_ok "KlipperScreen was installed"
add_desktop_file
start_KlipperScreen
+1 -1
View File
@@ -3,6 +3,6 @@ jinja2==3.1.2
matplotlib==3.5.0
netifaces==0.11.0
requests==2.28.1
websocket-client==1.4.0
websocket-client==1.4.1
pycairo==1.21.0
PyGObject==3.42.2
+11
View File
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=KlipperScreen
GenericName=Touch screen GUI for Klipper via Moonraker
Icon=$HOME/KlipperScreen/styles/icon.svg
Exec=sh -c "$HOME/.KlipperScreen-env/bin/python $HOME/KlipperScreen/screen.py"
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;Engineering;
Keywords=3D;Printing
StartupNotify=false
StartupWMClass=klipper-screen
+3 -5
View File
@@ -485,12 +485,10 @@ popover button {
background-color: #222;
}
.screensaver {
.screensaver, .screensaver button, .screensaver button:hover, .screensaver button:focus, .screensaver button:active {
background-color: black;
}
.screensaver button:active {
background-color: rgba(0, 0, 0, 0.5);
border: 0;
margin: 0;
}
.option_slider_max trough highlight, trough progress {
+123
View File
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="64"
height="64"
viewBox="0 0 64 64"
version="1.1"
id="svg10"
sodipodi:docname="icon.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata16"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>folder</dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs14" /><sodipodi:namedview
pagecolor="#bfbfbf"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="826"
id="namedview12"
showgrid="false"
inkscape:pagecheckerboard="false"
inkscape:zoom="7.6562596"
inkscape:cx="39.510155"
inkscape:cy="26.318334"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg10"
inkscape:snap-bbox="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:document-rotation="0"
inkscape:showpageshadow="0"
inkscape:deskcolor="#bfbfbf" /><!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch --><title
id="title2">folder</title><rect
style="fill:#13181c;stroke:#000000;stroke-width:4;stroke-dasharray:none;stop-color:#000000;fill-opacity:1"
id="rect412"
width="55.045174"
height="47.364159"
x="4.4774132"
y="8.3179207"
rx="2"
ry="2" /><desc
id="desc4">Created with Sketch.</desc><path
style="fill:none;stroke:#dd5f01;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 10.918877,44.683482 4.397769,-10.40131 12.695858,0.02858"
id="path1171"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#009183;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 10.004324,40.896808 17.991756,0.08241"
id="path1173" /><path
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 12.5,18.344859 h 10"
id="path1175" /><path
style="fill:none;stroke:#ffffff;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 12.5,24.783654 h 14"
id="path1177" /><g
id="g20756"><rect
style="fill:#404040;stroke:none;stroke-width:1;stroke-dasharray:none;stop-color:#000000"
id="rect524"
width="10"
height="10"
x="45"
y="14.999999" /><rect
style="fill:#404040;stroke:none;stroke-width:1;stroke-dasharray:none;stop-color:#000000"
id="rect545"
width="10"
height="10"
x="33"
y="14.999999" /><rect
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#404040;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
id="rect547"
width="10"
height="10"
x="45"
y="26.999998" /><rect
style="fill:#404040;stroke:none;stroke-width:1;stroke-dasharray:none;stop-color:#000000"
id="rect549"
width="10"
height="10"
x="33"
y="26.999998" /><rect
style="fill:#404040;stroke:none;stroke-width:1;stroke-dasharray:none;stop-color:#000000"
id="rect551"
width="22"
height="10"
x="33"
y="39" /><path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#ed6500;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
d="M 33,25 H 43"
id="path14404" /><path
style="fill:none;stroke:#ae007e;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 45,25 H 55"
id="path14406" /><path
style="fill:none;stroke:#009384;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 33,37 H 43"
id="path14408" /><path
style="fill:none;stroke:#a7e100;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 45,37 H 55"
id="path14410" /><path
style="fill:none;fill-opacity:1;stroke:#ed6500;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 33,49 H 55"
id="path14412" /></g><path
style="fill:none;stroke:#009183;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 10.5,23.283653 v 3"
id="path20785"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ed6500;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 10.5,16.844859 v 3"
id="path20785-9"
sodipodi:nodetypes="cc" /></svg>

After

Width:  |  Height:  |  Size: 5.5 KiB