Compare commits

..
30 Commits
Author SHA1 Message Date
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
65 changed files with 816 additions and 250 deletions

No files matched your search

+1 -3
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
+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

+21 -10
View File
@@ -112,12 +112,16 @@ class KlipperScreenConfig:
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',
@@ -133,10 +137,10 @@ class KlipperScreenConfig:
)
strs = (
'moonraker_api_key', 'moonraker_host', 'language', 'titlebar_name_type',
'screw_positions', 'power_devices', 'titlebar_items'
'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values',
)
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 +157,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 +165,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 +175,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)
@@ -212,7 +222,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 +230,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": ""}}
]
@@ -392,7 +403,7 @@ 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 "):
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-08-18 23:05-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: SRBJ\n"
"Language-Team: \n"
@@ -204,6 +204,9 @@ msgstr "Fejl"
msgid "Estimated Time Method"
msgstr "Metode til beregning af tid"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Ekstrudér"
@@ -300,6 +303,9 @@ msgstr "Home Z"
msgid "Homing"
msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Værtsnavn"
@@ -372,6 +378,9 @@ msgstr "Indlæs"
msgid "Lower Nozzle"
msgstr "Sænk Nozzle"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Makrogenvej på sidelinjen"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-03-31 10:43-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -209,6 +209,9 @@ msgstr "Fehler"
msgid "Estimated Time Method"
msgstr "Druckzeit"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Filament fördern"
@@ -305,6 +308,9 @@ msgstr "Achse Z zurücksetzen"
msgid "Homing"
msgstr "Grundposition"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -377,6 +383,9 @@ msgstr "Laden"
msgid "Lower Nozzle"
msgstr "Düse absenken"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Makro Verknüpfung in Sidebar"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -204,6 +204,9 @@ msgstr ""
msgid "Estimated Time Method"
msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr ""
@@ -300,6 +303,9 @@ msgstr ""
msgid "Homing"
msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr ""
@@ -372,6 +378,9 @@ msgstr ""
msgid "Lower Nozzle"
msgstr ""
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr ""
Binary file not shown.
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-08-10 12:01-0300\n"
"Last-Translator: alfrix\n"
"Language-Team: \n"
@@ -209,6 +209,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 +308,9 @@ msgstr "Origen Z"
msgid "Homing"
msgstr "Origen"
msgid "Host"
msgstr "Anfitrión"
msgid "Hostname"
msgstr "Hostname"
@@ -377,6 +383,9 @@ msgstr "Cargar"
msgid "Lower Nozzle"
msgstr "Bajar Boquilla"
msgid "Machine"
msgstr "Máquina"
msgid "Macro shortcut on sidebar"
msgstr "Atajo a Macros en el lateral"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-03-31 10:50-0300\n"
"Last-Translator: O. Robardet\n"
"Language-Team: \n"
@@ -209,6 +209,9 @@ msgstr "Erreur"
msgid "Estimated Time Method"
msgstr "Méthode d'estimation du temps"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extruder"
@@ -305,6 +308,9 @@ msgstr "Origine Z"
msgid "Homing"
msgstr "Origine"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -377,6 +383,9 @@ msgstr "Charger"
msgid "Lower Nozzle"
msgstr "Rapprocher la buse"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Raccourci macro sur la barre latérale"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-03-31 10:54-0300\n"
"Last-Translator: Emanuel Sharvit <manu7irl@gmail.com>\n"
"Language-Team: \n"
@@ -212,6 +212,9 @@ msgstr "שְׁגִיאָה"
msgid "Estimated Time Method"
msgstr "שיטת זמן משוערת"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "אקסטרוזיה"
@@ -312,6 +315,9 @@ msgstr "איפוס Z"
msgid "Homing"
msgstr "איפוס צירים"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -386,6 +392,9 @@ msgstr "לִטעוֹן"
msgid "Lower Nozzle"
msgstr "הנמך דיזה"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "קיצור מקרו בסרגל הצד"
@@ -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-09-11 11:38-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: AntoszHUN\n"
"Language-Team: \n"
@@ -204,6 +204,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"
@@ -300,6 +303,9 @@ msgstr "Z kezdőpont"
msgid "Homing"
msgstr "Kezdőpont"
msgid "Host"
msgstr "Gazda"
msgid "Hostname"
msgstr "Gazdanév"
@@ -372,6 +378,9 @@ msgstr "Betöltés"
msgid "Lower Nozzle"
msgstr "Fúvóka le"
msgid "Machine"
msgstr "Gép"
msgid "Macro shortcut on sidebar"
msgstr "Makró parancsikon az oldalsávon"
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-08-18 23:05-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: pappicio\n"
"Language-Team: \n"
@@ -204,6 +204,9 @@ msgstr "Errore"
msgid "Estimated Time Method"
msgstr "Metodo Tempo stimato"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Estrudi"
@@ -300,6 +303,9 @@ msgstr "Home Z"
msgid "Homing"
msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
@@ -372,6 +378,9 @@ msgstr "Carica"
msgid "Lower Nozzle"
msgstr "Abbassa ugello"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Macros sulla barra laterale"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: NSteven\n"
"Language-Team: NSteven\n"
@@ -204,6 +204,9 @@ msgstr "오류"
msgid "Estimated Time Method"
msgstr "예상시간 옵션"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "압출 "
@@ -300,6 +303,9 @@ msgstr "Z축 홈"
msgid "Homing"
msgstr "툴 헤드 위치 초기화"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "호스트 이름"
@@ -372,6 +378,9 @@ msgstr "필라 넣기"
msgid "Lower Nozzle"
msgstr "노즐 낮춤"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-03-31 11:06-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -210,6 +210,9 @@ msgstr "Błąd"
msgid "Estimated Time Method"
msgstr "Sposób Oszacowania Czasu"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extruduj"
@@ -306,6 +309,9 @@ msgstr "Baza Z"
msgid "Homing"
msgstr "Bazowanie"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Nazwa hosta"
@@ -378,6 +384,9 @@ msgstr "Ładuj"
msgid "Lower Nozzle"
msgstr "Obniż dyszę"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Skrót do makr na pasku bocznym"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-06-03 20:25-0500\n"
"Last-Translator: Jakob Kais <schpuntik@freenet.de>\n"
"Language-Team: \n"
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"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"
"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-Flags-xgettext: --add-comments\n"
@@ -210,6 +210,9 @@ msgstr "Ошибка"
msgid "Estimated Time Method"
msgstr "Расчётное время"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Заправить"
@@ -306,6 +309,9 @@ msgstr "Парковать Z"
msgid "Homing"
msgstr "Парковка"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Имя хоста"
@@ -378,6 +384,9 @@ msgstr "Загрузить"
msgid "Lower Nozzle"
msgstr "Опустить сопло"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-04-15 17:25+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -209,6 +209,9 @@ msgstr "Fel"
msgid "Estimated Time Method"
msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "Extrudera"
@@ -305,6 +308,9 @@ msgstr "Hem Z"
msgid "Homing"
msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Värdnamn"
@@ -377,6 +383,9 @@ msgstr "Ladda"
msgid "Lower Nozzle"
msgstr "Sänk munstycket"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "Makro genväg på sidofältet"
@@ -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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-09-21 19:32+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: tr_TR\n"
@@ -209,6 +209,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 +308,9 @@ msgstr "Z Sıfırla"
msgid "Homing"
msgstr "Eksen Sıfırlama"
msgid "Host"
msgstr "Sunucu"
msgid "Hostname"
msgstr "Ana bilgisayar adı"
@@ -377,6 +383,9 @@ msgstr "Yükle"
msgid "Lower Nozzle"
msgstr "Nozzle düşür"
msgid "Machine"
msgstr "Makine"
msgid "Macro shortcut on sidebar"
msgstr "Kenar çubuğunda makro kısayolu"
@@ -5,20 +5,19 @@
#
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-09-04 13:01+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"
"Content-Type: text/plain; charset=UTF-8\n"
"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"
"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.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 "Застосувати"
@@ -66,10 +65,10 @@ msgid "Apply %s%.2f offset to Probe?"
msgstr "Застосувати зміщення %s%.2f до зонда?"
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 +86,7 @@ msgid "Auto-calibrate"
msgstr "Автоматичне калібрування"
msgid "Auto-close notifications"
msgstr ""
msgstr "Автоматичне закриття сповіщень"
msgid "Auto-scroll"
msgstr "Автоматична прокрутка"
@@ -99,7 +98,7 @@ msgid "Bed Mesh"
msgstr "Сітка столу"
msgid "Bed screw configuration:"
msgstr ""
msgstr "Конфігурація гвинтів ліжка:"
msgid "Calibrate"
msgstr "Калібрування"
@@ -111,16 +110,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 +140,7 @@ msgid "Check ADXL Wiring"
msgstr "Перевірте підключення ADXL"
msgid "Checking for updates, please wait..."
msgstr ""
msgstr "Перевірка оновлень, зачекайте..."
msgid "Clear"
msgstr "Очистити"
@@ -156,7 +155,7 @@ msgid "Configuration"
msgstr "Конфігурація"
msgid "Confirm Emergency Stop"
msgstr "Підтверджувати АВАРІЙНУ ЗУПИНКУ"
msgstr "Підтвердьте АВАРІЙНУ ЗУПИНКУ"
msgid "Connected"
msgstr "Підключено"
@@ -184,10 +183,10 @@ msgid "Delete"
msgstr "Видалити"
msgid "Delete File?"
msgstr ""
msgstr "Видалити файл?"
msgid "Deselect"
msgstr "Відміна"
msgstr "Скасувати вибір"
msgid "Disable Motors"
msgstr "Вимкнути мотори"
@@ -211,23 +210,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 +252,13 @@ msgid "Finding ADXL"
msgstr "Знаходження ADXL"
msgid "Fine Tuning"
msgstr "Підправити"
msgstr "Точне налаштування"
msgid "Finish"
msgstr "Фініш"
msgid "Firmware Restart"
msgstr "Перезапуск Прошивки"
msgstr "Перезавантаження прошивки"
msgid "Flow:"
msgstr "Потік:"
@@ -266,7 +270,9 @@ msgid "Font Size"
msgstr "Розмір шрифту"
msgid "Full Update"
msgstr "Повне Оновлення"
msgstr ""
"Повне\n"
"Оновлення"
msgid "Go Back"
msgstr "Назад"
@@ -307,8 +313,11 @@ msgstr "Дім Z"
msgid "Homing"
msgstr "До дому"
msgid "Host"
msgstr "Хост"
msgid "Hostname"
msgstr "Назва хоста"
msgstr "Ім'я хоста"
msgid "Icon Theme"
msgstr "Тема оформлення"
@@ -323,7 +332,7 @@ msgid "Initializing printer..."
msgstr "Ініціалізація принтера..."
msgid "Input Shaper"
msgstr ""
msgstr "Input Shaper"
msgid "Interface"
msgstr "Інтерфейс"
@@ -341,10 +350,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 +388,10 @@ msgid "Load"
msgstr "Завантажити"
msgid "Lower Nozzle"
msgstr "Низ сопла"
msgstr "Опустити сопло"
msgid "Machine"
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 "Переміщення (мм)"
@@ -436,13 +450,12 @@ msgstr "Сітка"
msgid "New"
msgstr "Новий"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
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 +470,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 +490,8 @@ msgstr "Виконати повне оновлення?"
msgid "Pins"
msgstr ""
"Керування\n"
"контактами"
msgid "Please recompile and flash the micro-controller."
msgstr "Будь ласка, перекомпілюйте та перепрошійте мікроконтролер."
@@ -527,7 +542,7 @@ msgid "Reference"
msgstr "Довідка"
msgid "Refresh"
msgstr ""
msgstr "Оновити"
msgid "Restart"
msgstr "Перезапуск"
@@ -539,7 +554,9 @@ msgid "Retract"
msgstr "Ретракт"
msgid "Retraction"
msgstr "Втягнення"
msgstr ""
"Параметри\n"
"ретракту"
msgid "Retraction Length"
msgstr "Довжина втягування"
@@ -552,7 +569,7 @@ msgid "Retry #%s"
msgstr "Повторіть #%s"
msgid "Retrying"
msgstr ""
msgstr "Повторна спроба"
msgid "Save"
msgstr "Зберегти"
@@ -635,7 +652,7 @@ msgid "Speed:"
msgstr "Швидкість:"
msgid "Square Corner Velocity"
msgstr "Квадратна кутова швидкість"
msgstr "Квадратно кутова швидкість"
msgid "Start"
msgstr "СТАРТ"
@@ -653,10 +670,10 @@ msgid "System"
msgstr "Системна"
msgid "System Restart"
msgstr "Рестарт Малини"
msgstr "Перезавантаження системи"
msgid "System Shutdown"
msgstr "Вимкнути Малину"
msgstr "Завершення роботи системи"
msgid "Temp (°C)"
msgstr "Teмп (°C)"
@@ -675,7 +692,7 @@ msgid "Unknown Heater"
msgstr "Невідомий нагрівач"
msgid "Unknown screw position"
msgstr ""
msgstr "Невідоме положення гвинта"
msgid "Unload"
msgstr "Вийняти"
@@ -752,7 +769,7 @@ msgstr "dBm"
msgid "hour"
msgid_plural "hours"
msgstr[0] "година"
msgstr[1] "години"
msgstr[1] "годин"
msgstr[2] "години"
msgid "minutes"
@@ -767,18 +784,11 @@ msgstr "мм/с"
msgid "mm/s²"
msgstr "мм/с²"
#~ msgid "Bltouch found applied offset"
#~ msgstr "Зонд знайшов застосоване зміщення"
msgid "Auto Calibration"
msgstr "Автоматичне калібрування"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Перевірте /tmp/KlipperScreen.log для отримання додаткової інформації.\n"
#~ "Будь ласка, надішліть проблему на GitHub, щоб отримати допомогу."
msgid "Manual Calibration"
msgstr "Ручне калібрування"
#~ msgid "Probe found applied offset"
#~ msgstr "Зонд знайшов застосоване зміщення"
#~ msgid "Tool"
#~ msgstr "Інструмент"
msgid "NOTE: Edit your printer.cfg to save manual calibration changes."
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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-07-16 23:03+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -209,6 +209,9 @@ msgstr "错误"
msgid "Estimated Time Method"
msgstr "估算剩余时间方式"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "挤出机"
@@ -305,6 +308,9 @@ msgstr "Z轴归零"
msgid "Homing"
msgstr "归零"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "主机名"
@@ -377,6 +383,9 @@ msgstr "载入耗材"
msgid "Lower Nozzle"
msgstr "降低喷嘴"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
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-08-18 23:05-0300\n"
"PO-Revision-Date: 2022-03-31 11:25-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -209,6 +209,9 @@ msgstr "錯誤"
msgid "Estimated Time Method"
msgstr "預估時間方法"
msgid "Exclude Object"
msgstr ""
msgid "Extrude"
msgstr "擠出機"
@@ -305,6 +308,9 @@ msgstr "歸零 Z"
msgid "Homing"
msgstr "歸零"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "主機名稱"
@@ -377,6 +383,9 @@ msgstr "載入"
msgid "Lower Nozzle"
msgstr "降低噴嘴"
msgid "Machine"
msgstr ""
msgid "Macro shortcut on sidebar"
msgstr "在側邊欄上顯示巨集快捷鍵"
+6 -2
View File
@@ -199,7 +199,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 +287,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
+29
View File
@@ -31,6 +31,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
@@ -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
+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)
+64 -23
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,65 @@ 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.add(self.object_list)
scroll.set_halign(Gtk.Align.CENTER)
scroll.set_size_request(self._gtk.get_content_width(), 0)
scroll.set_size_request(self._gtk.get_content_width() // 2, 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.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())
self.labels['map'].set_size_request(self._gtk.get_content_width() // 2, 0)
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.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.buttons) == 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 +90,35 @@ 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()
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()
+3 -8
View File
@@ -168,7 +168,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
@@ -257,10 +259,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")
+11
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
@@ -155,8 +156,16 @@ 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):
@@ -184,6 +193,7 @@ class FineTunePanel(ScreenPanel):
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,6 +205,7 @@ 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):
+9 -15
View File
@@ -186,7 +186,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", "")
@@ -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())
@@ -835,14 +837,13 @@ class JobStatusPanel(ScreenPanel):
"complete": self.labels['file'].get_label(),
"current": self.labels['file'].get_label(),
"position": 0,
"limit": 24,
"limit": 0.8 * (self._gtk.get_content_width() - self.labels[
'darea'].get_allocated_width()) // self._gtk.get_font_size(),
"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()
@@ -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}°")
+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(x, "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}")
+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}")
+14 -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):
@@ -253,7 +264,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)
@@ -296,7 +307,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')
+4 -10
View File
@@ -519,13 +519,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(x, "power"),
)
return
@@ -552,11 +554,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}")
+17 -4
View File
@@ -46,7 +46,9 @@ PRINTER_BASE_STATUS_OBJECTS = [
'toolhead',
'virtual_sdcard',
'webhooks',
'motion_report'
'motion_report',
'firmware_retraction',
'exclude_object',
]
klipperscreendir = pathlib.Path(__file__).parent.resolve()
@@ -271,9 +273,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 +407,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}")
@@ -829,6 +831,17 @@ class KlipperScreen(Gtk.Window):
def toggle_macro_shortcut(self, value):
self.base_panel.show_macro_shortcut(value)
def reload_panels(self, *args):
self._remove_all_panels()
for panel in list(self.panels):
if panel not in ["printer_select", "splash_screen"]:
del self.panels[panel]
for dialog in self.dialogs:
dialog.destroy()
state = self.printer.state
self.printer.state = None
self.printer.change_state(state)
def _websocket_callback(self, action, data):
if self.connecting is True:
+8
View File
@@ -161,6 +161,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 +184,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