Compare commits

...
178 Commits
Author SHA1 Message Date
alfrix 8af5c0b2d4 Trace memory 2023-03-24 08:12:19 -06:00
alfrix da9f970231 print: refactors 2023-03-22 06:51:34 -06:00
alfrix 3417765223 job_status: fix panel not showing and not updating thumbnails
safeguard against thumbnail corruption or other errors fixes #893
better system to update name and thumbnails fixes #889
2023-03-19 05:55:30 -06:00
alfrix b963c55140 job_status: fix save endstop not working fixes #929 2023-03-17 07:50:50 -06:00
alfrix 2d8419ca13 fix desktop icon not appearing 2023-03-17 07:50:50 -06:00
Jookiaandalfrix 5f3827a2cb screen: Only switch layouts if the window has been majorly resized (#913)
* screen: Only switch layouts if the window has been majorly resized

Changing the layout can cause the window to resize on some systems.
This can create a feedback loop on systems with square displays.

Keep track of the vertical aspect ratio associated with the current
mode and only switch between vertical and horizontal mode when a
significant aspect ratio change has been detected.

* fixup

---------

Co-authored-by: alfrix <alfredomonclus@gmail.com>
2023-03-17 07:49:28 -06:00
alfrix d6f7bdcfe6 macros: use the new get_macro instead of get_config due to recent issues 2023-03-11 16:53:08 -06:00
alfrix 87c3f03719 fix issues caused by dfe1ac8d
fix #924
fix #923
2023-03-11 16:40:06 -06:00
Alfredo Monclus 094b90cf86 network: integrate networkmanager (#917)
fixes #881
this should be temporary until an implementation of sdbus-networkmanager
2023-03-11 07:43:10 -06:00
alfrixandAndriy 3220f084ec Update Ukranian close #914
Re-done due to merge conflicts

Co-authored-by: Andriy <40995038+komandrik@users.noreply.github.com>
2023-03-10 20:29:18 -06:00
alfrix dfe1ac8d2c macros: fix list not loading when there are extra spaces fixes #909 2023-03-10 20:03:28 -06:00
alfrix be473bf626 bed_level: fix auto-detect when there is no config file fixes #918 2023-03-10 06:43:02 -06:00
alfrix b353f8526e timeout requests to prevent locking 2023-03-09 07:32:46 -06:00
alfrix 122752b000 leakfix 2023-03-09 07:32:46 -06:00
alfrix 0f0c6f9b6e always maintain printers data, should avoid a bunch of issues 2023-03-09 07:32:46 -06:00
alfrix 18af1d1410 bed_level: add center screw close #863 2023-03-08 06:36:54 -06:00
alfrix 926d78de01 bed_level: remove screws only if in list and simplify detection fixes #910 2023-03-08 06:11:23 -06:00
alfrix a5b639fba2 bed_level: fix compatibility with python 3.7 2023-03-03 08:12:41 -06:00
Alfredo Monclusandczaky 55af0d753c bed_level: improve screw detection (#908)
* Use max_distance for fitting screws to buttons

The max distance is at most 1/3 of the diagonal,
depending on how many screws are there in horizontal or
vertical orientation.

This is a safe guard to prevent assigning screws to buttons
that would confuse the users, for very skewed screw configs.

use a smaller button scale fixes #891

Co-authored-by: alfrix <alfredomonclus@gmail.com>

Co-authored-by: czaky <jendrzej.w@lczak.net>
2023-03-01 07:41:43 -06:00
alfrix d6693fbecc make the menu icon non-mandatory
this was caused by #866
fixes #902
2023-02-20 07:57:45 -06:00
alfrix e426b06b8b lint fix 2023-02-13 21:10:53 -06:00
alfrix c722674918 fix popup word wrap 2023-02-13 21:08:21 -06:00
Geoffrey Young 3d7e92f507 add ability to style and template menu buttons (#866)
* add ability to select button style for menu items

* allow for jinja template rendering for (nearly) all menu options
this shuffles params json checks to display time instead of config time
2023-02-13 21:06:33 -06:00
Thijs Triemstra fc7b8c5304 fix typos (#897) 2023-02-13 21:05:48 -06:00
alfrix a6bb0fd02e zcalibrate: fix dialog loop, fix popup errors not showing at end #844 2023-02-06 18:27:35 -06:00
dependabot[bot] dcb6d18709 build(deps): bump websocket-client from 1.5.0 to 1.5.1 (#888)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.5.0 to 1.5.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.5.0...v1.5.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 16:35:20 -06:00
alfrix 69571c88b8 fix german keyboard issue caused by #886 2023-02-05 22:32:07 -06:00
Cyril Guislain c33b5d6311 Fix German Keyboard and Add French Keyboard (#886) 2023-02-05 21:47:11 -06:00
alfrix 49add980b3 theme: add light icon to material-dark fix:#884 2023-02-05 10:24:58 -06:00
dependabot[bot] 8d8d3bf9af build(deps): bump requests from 2.28.1 to 2.28.2 (#868)
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.28.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.28.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 10:20:24 -06:00
alfrix 059f1a8026 update docs screenshot 2023-01-29 15:49:41 -06:00
alfrix eeffdd26dd mask modemmanager close #857 2023-01-29 15:49:41 -06:00
camerony 5de5e1e3eb Update on-screen keyboard.py (#874) 2023-01-29 09:54:53 -06:00
dependabot[bot] 485c82c53f build(deps): bump websocket-client from 1.4.2 to 1.5.0 (#877)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.4.2 to 1.5.0.
- [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.2...v1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-29 09:43:04 -06:00
camerony 4e60f65404 network: fix button size, and update ipv4 address on network change (#879) 2023-01-29 09:42:49 -06:00
camerony 85cec193f9 Fix Changing wifi networks hangs 2023-01-29 09:40:45 -06:00
alfrix 34055277e0 Add czech and update ru .mo 2023-01-29 09:34:29 -06:00
AleksandrBukin 9b4c58369e Update Ru (#871)
line 626: "Show Heater Power" in RU "Показать мощность нагрева"
2023-01-29 09:16:18 -06:00
AntoszHUN b96adf55ed Update Hungarian Language (#848) 2022-12-13 20:04:48 -03:00
Alex Hornung f6afb4d4ab install: Fix Xwrapper.config existence test (#846) 2022-12-13 20:04:08 -03:00
alfrix 3c5449f0db job_status: cast float to zoffset 2022-12-12 19:53:34 -03:00
alfrix c828d8349c camera: fix for busters old libmpv fixes #840 2022-12-12 08:12:52 -03:00
alfrix 9fa047eb8b camera: fix libmpv-dev not installing fixes #842 2022-12-12 08:00:38 -03:00
alfrix 82b8cbcca5 zcalibrate: fix initial zhop causing issues for some machines fixes #837 2022-12-12 01:42:30 -03:00
alfrix 1f5a090bfd camera: always fullscreen, fix inverted vo logic, fixes #839 2022-12-12 01:25:36 -03:00
alfrix e4d5cd65ce fix a couple of errors that may happen if klipper fails to start or takes too long 2022-12-11 19:22:45 -03:00
alfrix 502d9699bd fix actions not appearing in printers without name after last commit fix #838 2022-12-11 15:25:28 -03:00
alfrix d2d2c82041 feat: camera support, using mpv as backend
it should be able to play any video or stream that mpv itself can handle

close #67 close #129
2022-12-11 09:20:06 -03:00
alfrix 1375c823c9 job_status: clear_file after error 2022-12-11 09:20:06 -03:00
alfrix 74338a7f3e splash: fix power_device appearing if configured in ks.conf but not available in the server 2022-12-11 09:20:06 -03:00
alfrix 778cd84ba8 panels do not call screen.show_all 2022-12-11 09:17:18 -03:00
alfrix a83f499c0c rename graph to heatergraph 2022-12-11 09:17:18 -03:00
alfrix 70d7564a78 shorten _screen.printer to _printer 2022-12-11 09:17:18 -03:00
alfrix f31ae7a829 hide popups from panel initialization
ideally the initialization should not contain this commands but at the moment klipper nor moonraker provide a way to identify the required status
2022-12-11 09:17:18 -03:00
alfrix 701ff35652 installer: if pip fails upgrade and retry once 2022-12-11 09:17:18 -03:00
alfrix 7120c424d4 gtk: resizability
doesn't rescale the fonts or images
2022-12-11 09:17:18 -03:00
alfrix 413e822fa5 screen: separate matchbox-keyboard 2022-12-11 09:17:18 -03:00
alfrix 75c716f9a1 screen: convert state execute into a function since it doesn't depend on self 2022-12-11 09:17:18 -03:00
alfrix 41a8ebf084 print: add move/rename, make delete a visible button close #636 2022-12-11 09:17:18 -03:00
Selim 57ce346d69 Turkish language update (#836) 2022-12-11 08:35:58 -03:00
alfrix 753be13a0c exclude: fix list not showing 2022-12-05 14:29:58 -03:00
alfrix 06bf269862 feat: turn on_off power devices with the screensaver close #518 2022-12-05 12:31:44 -03:00
alfrix 45e1f652db theme override style of disabled_un-sensitive buttons 2022-12-05 12:31:44 -03:00
alfrix 6a95e46a18 websocket increase reconnect time
moonraker takes around 5 seconds to restart on a pi3 so 6 seconds tends to be too close

moonraker takes at least this amount to restart on a pi3
2022-12-05 12:09:58 -03:00
alfrix 250574bc41 bedmap: limit probed position display to 16x8 2022-12-05 09:07:28 -03:00
alfrix f49e1ef6c4 main and temp simplify get temps 2022-12-04 22:33:43 -03:00
alfrix 904dd24c10 tempstore get the max length configured in moonraker 2022-12-04 13:56:33 -03:00
alfrix f52b52f76a main and temp: less tempstore dependency 2022-12-04 12:59:59 -03:00
alfrix dc5741d605 graph: autoscale time 2022-12-04 12:02:34 -03:00
alfrix 02b69d0d39 theme fix ks using dark theme on desktop 2022-12-04 11:27:12 -03:00
alfrix de252643c1 do not change the state directly from the callback because it causes double initialization issues 2022-12-04 01:08:58 -03:00
alfrix 548fc4de69 do more cleanups while changing printers 2022-12-04 01:08:58 -03:00
alfrix 72599b5ba7 moonraker tempstore takes a while to register device changes, call it again after a few seconds
with this change there should be no need to reinit on every state change, this was the cause of missing devices after init
2022-12-04 01:07:58 -03:00
alfrix c714553da1 system: log if the repo is invalid 2022-12-03 20:43:25 -03:00
alfrix 36faaa153a fix pause panel appearing after issuing a pauese while not printing fixes #832 2022-12-03 20:33:38 -03:00
alfrix 629451051d fix update dialog sometimes not appearing fixes #831 2022-12-03 20:32:14 -03:00
northcoastam fcb6861119 Fix not starting on Wayland
fix #829
2022-12-03 15:51:02 -03:00
alfrix 34a9151910 warn about dpms failures 2022-12-03 15:46:26 -03:00
alfrix 683b72ab20 simplify keyboard calls 2022-12-03 15:46:26 -03:00
alfrix e658f562be macros add parameters 2022-12-03 15:46:26 -03:00
alfrix ab4d4af7f8 tweak image size of buttons with side labes or no label 2022-12-02 20:59:01 -03:00
alfrix 4804f5a5e0 print: use am-pm if not 24h 2022-12-01 14:20:49 -03:00
alfrix 7651b892b8 print: allow directory deletion 2022-12-01 13:27:31 -03:00
alfrix 91b505bfef print: less os dependent path handling 2022-12-01 13:27:31 -03:00
alfrix 415535eeb8 tweak sizes #828 2022-11-30 23:57:34 -03:00
alfrix 8ebc855ddd improve the speed of the updates, also affects showing panels 2022-11-30 19:45:49 -03:00
alfrix efebea2c36 Update German thanks to livinhack close #826 2022-11-30 19:45:49 -03:00
alfrix 75c8681781 fix switch sizes after frames removal 2022-11-30 19:45:49 -03:00
alfrix ea4efa1f61 move improve vertical look 2022-11-30 19:30:09 -03:00
alfrix 9de058b0d7 dialogs: set title 2022-11-30 11:51:24 -03:00
alfrix 3a764be93f ws remove unused method 2022-11-30 11:00:10 -03:00
alfrix 4dceeb77b6 extrude: fix filament sensor showing status when disabled
alongside the initialization fixes this should be enough to close #825
2022-11-30 11:00:10 -03:00
alfrix 2bacac7efb job_status: info refactor
switching info is much faster, buttons keep their label
2022-11-30 11:00:10 -03:00
alfrix 79afa3620a fix error modal for job_status 2022-11-30 11:00:10 -03:00
alfrix d161c3f1e4 splash_screen: use initialized for klipper restart buttons 2022-11-30 11:00:10 -03:00
alfrix ec86403056 create attach panel 2022-11-30 11:00:10 -03:00
alfrix b1a6d5c182 improve panel initialization
just make a notify_status_update from printer data, it's much simpler
2022-11-30 11:00:10 -03:00
alfrix 61cf5828e2 console: fix sizes 2022-11-30 11:00:10 -03:00
alfrix 69a7d3defb installer: remove fbturbo always use fbdev most platforms today have issues with fbturbo 2022-11-30 11:00:10 -03:00
alfrix 3047fde812 cleanup quotes in connection status messages 2022-11-30 11:00:10 -03:00
alfrix 49c2e4f1d7 improve updater dialog behaviour 2022-11-29 01:52:47 -03:00
alfrix 68ccf5e803 job_status: hide speed unit on 480x320 2022-11-29 00:24:20 -03:00
alfrix 62ef4f1844 job_status: stabilize the grid, add object height to main, translate units 2022-11-29 00:04:05 -03:00
alfrix 3c8886ab36 Documentation updates close #821 2022-11-28 22:35:13 -03:00
alfrix d6161539a6 Update translation add japanese thanks to yhira1023 2022-11-28 11:57:12 -03:00
alfrix 25797b5ed3 remove frames from lists 2022-11-28 00:15:28 -03:00
alfrix 56149e4148 print_list: refactor 2022-11-27 23:44:25 -03:00
alfrix d0fc1e197d gtk: create a format_label function 2022-11-27 19:38:03 -03:00
alfrix 1df2d0e8f0 fix full update not opening 2022-11-27 19:38:03 -03:00
alfrix 217b185730 try to restart ks if an update fails to restart it 2022-11-27 19:38:03 -03:00
Selim db4e5d4e08 Turkish_update (#819) 2022-11-27 14:31:37 -03:00
dependabot[bot] 7a8fe9f6ac build(deps): bump pycairo from 1.21.0 to 1.22.0 (#799)
Bumps [pycairo](https://github.com/pygobject/pycairo) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/pygobject/pycairo/releases)
- [Changelog](https://github.com/pygobject/pycairo/blob/main/NEWS)
- [Commits](https://github.com/pygobject/pycairo/compare/v1.21.0...v1.22.0)

---
updated-dependencies:
- dependency-name: pycairo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-11-27 14:31:00 -03:00
alfrix 741d9b654d restart ks on error, do not warn on ks restart when changing options
i don't see it necessary ks can be restarted while printing it will generate a bit of load but shouldn't be a problem, i've done it too many times at this point
2022-11-27 14:30:28 -03:00
alfrix fe06b38128 installer: add the new packages needed to build python-networkmanager to moonraker
not every platform has prebuilt bins, so it's necessary for those platforms to have this packages
2022-11-27 14:30:00 -03:00
alfrix da164b495e job_status: change slicer-filament-file times to totals 2022-11-26 23:21:07 -03:00
alfrix 26030526a9 fix move panel not opening after a61a74d7bf fixes #818 2022-11-26 23:14:31 -03:00
alfrix 17cae91708 fix bootloop with python 3.7 fixes #817 2022-11-26 19:01:12 -03:00
alfrix a61a74d7bf initialize with values some panels 2022-11-26 16:46:33 -03:00
alfrix e9df355b3b job_status: initialize some labels and use live position close #809 2022-11-26 15:57:50 -03:00
alfrix 6ae6937c49 format the connection error 2022-11-26 15:57:50 -03:00
alfrix 4f5e025de1 fix not starting due to missing translation fixes #815 2022-11-26 15:57:50 -03:00
alfrix 20346a90dc splash_screen: tweak layout sizes and remove get_allocation that can cause isssues
fixes #813

gtk: fix content_width while vertical returning 0
2022-11-26 15:57:50 -03:00
alfrix abb1f0d2d2 installer: add packages needed to build python-networkmanager
pass the req file to pip (secuential install was needed for Vext)
fixes #812

some systems don't have wheels and need compilation, the packages are needed for those cases
2022-11-26 15:57:50 -03:00
alfrix 959f7e3401 disable backspace return if keyboard is open 2022-11-26 15:57:50 -03:00
alfrix 2e39de56bd cleanup stylesheets 2022-11-26 15:57:50 -03:00
alfrix d8b4d2d293 job_status: add eta 2022-11-26 15:57:50 -03:00
alfrix cdb40e8ce1 Show the update dialog as modal 2022-11-26 15:57:50 -03:00
alfrix f8cde7bfe1 Add busy state, and disable buttons that usually take time during the state 2022-11-26 00:17:30 -03:00
alfrix 9604c159b5 fix file permissions 2022-11-25 15:50:33 -03:00
alfrix 8297f72ff4 functions: print a nicer traceback 2022-11-25 15:50:33 -03:00
alfrix b5cf73054a job_status: refactor 2022-11-25 15:50:31 -03:00
alfrix c630178f0c network: improve NetworkManager support 2022-11-24 14:57:36 -03:00
Elias Bakken db48bb8a1f Added support for network manager 2022-11-24 14:57:36 -03:00
alfrix e1f02fd870 main and temp: fix gtk warning 2022-11-24 14:57:36 -03:00
alfrix 43a2f88ad1 docs: add a general remark in supported hardware 2022-11-24 14:02:51 -03:00
alfrix e98114eaff Improve Fatal error handling an messages 2022-11-24 11:35:21 -03:00
alfrix 8834ceb3e8 fix RTL not being applied 2022-11-24 08:38:00 -03:00
alfrix 1806973ba1 fix issue with auto language detection 2022-11-23 23:01:20 -03:00
alfrix 0d87592093 Update fr 2022-11-23 14:06:58 -03:00
alfrix c0ffa41010 fix websocket not closing and sometimes looping, better fix for #806 2022-11-23 03:10:02 -03:00
alfrix 9ec4ed204e rework update_queue fixes an issue that caused to not initialize after updates 2022-11-23 01:11:59 -03:00
alfrix 9211583a15 fix issues when using multiple printers fixes #806 2022-11-22 22:27:21 -03:00
alfrix 12b9ee5344 job_status: filename tweak max chars
after the tweaks for bigger font sizes the maximum amount can be raised

TODO: investigate if a pango layout that can detect ellipzised labels is suitable to replace this method
2022-11-22 17:32:53 -03:00
alfrix 97106bc2e0 tweak print and macros topbars 2022-11-22 16:33:12 -03:00
alfrix 00bd6ac4db gtk: adjust icon sizes so they are more consistent across font sizes 2022-11-22 16:18:06 -03:00
alfrix 33fd5f9576 fix extrude speed buttons with no labels after 593d8c678b 2022-11-22 15:21:14 -03:00
alfrix c09e552e3a fix screen not turning on if using dpms due to glib timer fix #804 2022-11-22 15:16:58 -03:00
alfrix 5c7dfaf703 try to reinit after state changes 2022-11-22 15:03:46 -03:00
alfrix 593d8c678b gtk: merge buttonimage and button 2022-11-22 14:55:42 -03:00
alfrix 34fde780fc fix temp panel in vertical mode with big font getting out of screen fixes #805 2022-11-22 14:55:42 -03:00
alfrix ea33d9de0f fix printer_select not loading if there is a KS config error 2022-11-22 14:55:42 -03:00
alfrix 0b1b2f0e19 dialog removal refactor 2022-11-22 14:55:42 -03:00
alfrix 8d2f90f800 set title for internal options subpanels
the menu/subpanel system is a bit complex and hard to use
consider removing it and use individual panels of options
2022-11-22 14:55:42 -03:00
alfrix ef5f86a67d screenpanel remove unnecesary getters 2022-11-22 14:55:42 -03:00
alfrix b415eca1c8 keyboard shortcuts escape and backspace to return 2022-11-22 14:55:42 -03:00
alfrix 880f7628e4 fix f-strings with no placeholders 2022-11-22 14:55:42 -03:00
alfrix 03ab14fa64 optimize imports 2022-11-22 14:55:42 -03:00
alfrix 717575256c update translations remove some unnecesary strings use 2 letter designation unless needed 2022-11-22 14:55:42 -03:00
alfrix 0233327554 fix splash_screen reloading and limit klipper reconnects fixes #803 2022-11-22 14:55:42 -03:00
alfrix 484dbd1609 updater: show errors as popups 2022-11-22 00:55:37 -03:00
alfrix 383086e303 screen: cleanup show_panel names 2022-11-22 00:55:37 -03:00
alfrix e90dac950c config: make klipper_config a secondary location for new configs fixes #800 2022-11-22 00:55:37 -03:00
alfrix d0d79a64df base_panel: simplify action bar buttons enable-disable 2022-11-21 09:20:05 -03:00
alfrix 7b7c3838fc printer_initializing: refactor message generation and remove markup
markup caused issues with status messages
2022-11-21 09:20:05 -03:00
alfrix 818f1ab465 splash_screen: show detailed error when moonraker connection fails 2022-11-21 07:15:02 -03:00
alfrix bdd3e0ba1b Cleanups 2022-11-20 22:41:22 -03:00
alfrix f1754f1014 update translations 2022-11-20 21:00:43 -03:00
alfrix 054523d937 settings: add extra large font close #798 2022-11-20 20:58:06 -03:00
alfrix fa10b00db7 job_status: fix fan speed sometimes not updating 2022-11-20 20:58:06 -03:00
alfrix e785022e64 screen: simplify DPMS timeout 2022-11-20 20:57:46 -03:00
alfrix dbd1474d63 screen_panel: share ks_printer_cfg between panels 2022-11-20 14:17:48 -03:00
alfrix 1ca950c1fc job_status: alwasys get the value of homing_origin to set buttons fixes #795 2022-11-20 11:19:58 -03:00
alfrix c4c7e50314 printer: create get_probe to support other probe types 2022-11-20 11:07:24 -03:00
alfrix e29b41e5c3 rewrite send_request 2022-11-20 09:04:51 -03:00
alfrix fc0f153023 reorder imports 2022-11-20 07:28:05 -03:00
alfrix cebd371734 websocket: fix for when websockets-client doesnt pass the class object #796 2022-11-20 00:23:19 -03:00
alfrix 86ee1eb19f menu: the system panel should not be accesible during printing (at least not without disabling all the buttons) 2022-11-19 12:31:13 -03:00
alfrix c3c28175ca use https with port 7130 and mention the behaviour in the docs 2022-11-18 13:54:16 -03:00
113 changed files with 7563 additions and 3284 deletions

No files matched your search

+12 -2
View File
@@ -32,6 +32,10 @@ default_printer: Ender 3 Pro
# To define a full set of custom menues (instead of merging user entries with default entries) # To define a full set of custom menues (instead of merging user entries with default entries)
# set this to False. See Menu section below. # set this to False. See Menu section below.
use_default_menu: True use_default_menu: True
# Define one or more moonraker power devices that turn on/off with the screensaver (CSV list)
screen_on_devices: example1, example2
screen_off_devices: example1, example2
``` ```
## Printer Options ## Printer Options
@@ -41,6 +45,7 @@ Multiple printers can be defined
[printer Ender 3 Pro] [printer Ender 3 Pro]
# Define the moonraker host/port if different from 127.0.0.1 and 7125 # Define the moonraker host/port if different from 127.0.0.1 and 7125
moonraker_host: 127.0.0.1 moonraker_host: 127.0.0.1
# ports 443 and 7130 will use https/wss
moonraker_port: 7125 moonraker_port: 7125
# Moonraker API key if this is not connecting from a trusted client IP # Moonraker API key if this is not connecting from a trusted client IP
moonraker_api_key: False moonraker_api_key: False
@@ -74,8 +79,8 @@ calibrate_y_position: 100
# Bed Screws # Bed Screws
# define the screw positons required for odd number of screws in a comma separated list # define the screw positons required for odd number of screws in a comma separated list
# possible values are: bl, br, bm, fl, fr, fm, lm, rm # possible values are: bl, br, bm, fl, fr, fm, lm, rm, center
# they correspond to back-left, back-right, back-middle, front-left, front-right, front-middle, left-middle, left-right # they correspond to back-left, back-right, back-middle, front-left, front-right, front-middle, left-middle, right-middle
screw_positions: "" screw_positions: ""
# Rotation is useful if the screen is not directly in front of the machine. # Rotation is useful if the screen is not directly in front of the machine.
@@ -85,6 +90,9 @@ screw_rotation: 0
# Define distances and speeds for the extrude panel. CSV list 2 to 4 integers # Define distances and speeds for the extrude panel. CSV list 2 to 4 integers
extrude_distances: 5, 10, 15, 25 extrude_distances: 5, 10, 15, 25
extrude_speeds: 1, 2, 5, 25 extrude_speeds: 1, 2, 5, 25
# Camera configuration
camera_url: http://127.0.0.1/webcam/?action=stream
``` ```
## Preheat Options ## Preheat Options
@@ -125,6 +133,8 @@ A menu item is configured as follows:
name: Item Name name: Item Name
icon: home icon: home
# Optional Parameters # Optional Parameters
# Icon style, defined as "button.mycolor4" (for example) in the theme css
style: mycolor4
# Panel from the panels listed below # Panel from the panels listed below
panel: preheat panel: preheat
# Moonraker method to call when the item is selected # Moonraker method to call when the item is selected
+3 -1
View File
@@ -1,6 +1,8 @@
# Hardware # Hardware
There are no recommended screens, but the minimum supported resolution is 480x320 There are no recommended screens, but the minimum supported resolution is 480x320.
In general, if the device can show a GNU/Linux desktop, then KlipperScreen should work too.
#### Hardware known to work #### Hardware known to work
+20
View File
@@ -35,11 +35,31 @@ Moved to [Thumbnails](Thumbnails.md)
## Layer Progress ## Layer Progress
Accurate layer progress as a message below the status:
PrusaSlicer/SuperSlicer > Printer Settings > Custom Gcode > After layer change Gcode PrusaSlicer/SuperSlicer > Printer Settings > Custom Gcode > After layer change Gcode
`M117 Layer {layer_num+1}/[total_layer_count] : {filament_settings_id[0]}` `M117 Layer {layer_num+1}/[total_layer_count] : {filament_settings_id[0]}`
![Layer_progress](img/quicktips/PS_SS_Layer_progress.png) ![Layer_progress](img/quicktips/PS_SS_Layer_progress.png)
Accurate layer progress in the secondary screen of the printing panel:
The layer number in the secondary screen of the printing panelis calculated according to object height and provided layer height.
It will be innacurate when using variable layer height, but can be fixed by providing klipper with the correct data.
![speed_screenshot](img/panels/job_status_speed.png)
PrusaSlicer/SuperSlicer:
Printer Settings > Custom Gcode > Start Gcode
`SET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]`
Printer Settings > Custom Gcode > After layer change Gcode
`SET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}`
## Supported Macros ## Supported Macros
[Macros](macros.md) [Macros](macros.md)
+23 -12
View File
@@ -1,21 +1,32 @@
## Create Translations # Translations
You can use an editor such as [poedit](https://poedit.net/) to assist in translations. This guide will assume that you ## Updating an existing translation:
will be using poedit.
This guide will refer to `language designation`. This can be found from running `echo $LANG` on your pi, as long as you You can use an editor such as [poedit](https://poedit.net/) to assist in translations.
have set your pi up for your preferred language.
#### New Language * Edit `ks_includes/locals/{ISO 639 lang code}/LC_MESSAGES/KlipperScreen.po`
To test your translation:
In poedit go to `File -> Compile to MO`. Save it on the same folder, and restart KlipperScreen
## Adding a new Language:
Example using poedit
* Select `Create a new translation` or `File -> New from POT/PO` and select `ks_includes/locals/KlipperScreen.pot`. * Select `Create a new translation` or `File -> New from POT/PO` and select `ks_includes/locals/KlipperScreen.pot`.
* Enter your language designation. !!! important
* Create the translations Do not edit the POT file as is automatically generated and your changes will be lost.
* Save the file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.po`. * Save the file as `ks_includes/locales/{ISO 639 lang code}/LC_MESSAGES/KlipperScreen.po`
* Select `File -> Compile to MO`. Save this file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.mo` * Select `File -> Compile to MO`. Save it on the same folder, and restart KlipperScreen
Once you have followed those steps, restart KlipperScreen, and select it from the list in the settings. !!! note
[Wikipedia ISO 639 Language Codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
Once you have restarted KlipperScreen, select it from the list in the settings.
If you edited and recompiled, you need to restart KlipperScreen to reload the translation. If you edited and recompiled, you need to restart KlipperScreen to reload the translation.
Do not edit the POT file as is automatically generated and your changes will be lost.
## Contributing:
[Attach your translation on a GitHub issue or create a PR](Contact.md) [Attach your translation on a GitHub issue or create a PR](Contact.md)
+31 -2
View File
@@ -116,7 +116,7 @@ and reboot, that should make the touch work, if your screen is rotated 180 degre
KlipperScreen was never intended to be used with OctoPrint, and there is no support for it. KlipperScreen was never intended to be used with OctoPrint, and there is no support for it.
## WiFi networks not listed ## WiFi networks not listed (Using wpa_supplicant as backend)
This can be caused because of the user is not allowed to control the interface This can be caused because of the user is not allowed to control the interface
@@ -137,13 +137,42 @@ usermod -a -G netdev pi
Then reboot the machine: Then reboot the machine:
``` ```sh
systemctl reboot systemctl reboot
``` ```
!!! tip !!! tip
It's possible to just restart KlipperScreen and networking It's possible to just restart KlipperScreen and networking
## WiFi networks not listed (Using NetworkManager as backend)
`[wifi_nm.py:rescan()] [...] NetworkManager.wifi.scan request failed: not authorized`
If you see the above permission error in the log you may need to use polkit or disable it:
```sh
mkdir -p /etc/NetworkManager/conf.d
sudo nano /etc/NetworkManager/conf.d/any-user.conf
```
in the editor paste this:
```conf
[main]
auth-polkit=false
```
Then restart the service:
```sh
systemctl restart NetworkManager.service
```
!!! tip
It's possible to just restart KlipperScreen and NetworkManager
## Other issues ## Other issues
If you found an issue not listed here, or can't make it work, please provide all the log files If you found an issue not listed here, or can't make it work, please provide all the log files
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+9 -26
View File
@@ -7,51 +7,34 @@ Load and Unload Filament macros are used in the Extrude-Panel if it is available
The selected speed is transferred to this macro. The selected speed is transferred to this macro.
The following example macros show how this can be used in the macro. The following example macros show how this can be used in the macro.
```py ```jinja
[gcode_macro LOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(500) %}
G91
G1 E50 F{speed}
G1 E50 F{speed}
G92
```
```py
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(500) %}
G91
G1 E-50 F{speed}
G1 E-50 F{speed}
G92
```
this could be interesting to tweak the purge speed, this would be one Example Macro from alfrix:
```py
[gcode_macro LOAD_FILAMENT] [gcode_macro LOAD_FILAMENT]
gcode: gcode:
{% set speed = params.SPEED|default(300) %} {% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %} {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
SAVE_GCODE_STATE NAME=load_state
M300 # beep M300 # beep
G91 G91
G92 E0 G92 E0
G1 E350 F{max_velocity} G1 E350 F{max_velocity} # fast-load
G1 E25 F{speed} #purge G1 E25 F{speed} # purge
M300 M300
M300 M300
RESTORE_GCODE_STATE NAME=load_state
``` ```
```py ```jinja
[gcode_macro UNLOAD_FILAMENT] [gcode_macro UNLOAD_FILAMENT]
gcode: gcode:
{% set speed = params.SPEED|default(300) %} {% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %} {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
SAVE_GCODE_STATE NAME=unload_state
G91 G91
M300 # beep M300 # beep
G92 E0 G92 E0
G1 E25 F{speed} # purge G1 E25 F{speed} # purge
G1 E-420 F{max_velocity} G1 E-420 F{max_velocity} # fast-unload
M300 M300
M300 M300
RESTORE_GCODE_STATE NAME=unload_state
``` ```
-8
View File
@@ -1,8 +1,5 @@
class KlippyGcodes: class KlippyGcodes:
HOME = "G28" HOME = "G28"
HOME_X = "G28 X"
HOME_Y = "G28 Y"
HOME_Z = "G28 Z"
HOME_XY = "G28 X Y" HOME_XY = "G28 X Y"
Z_TILT = "Z_TILT_ADJUST" Z_TILT = "Z_TILT_ADJUST"
QUAD_GANTRY_LEVEL = "QUAD_GANTRY_LEVEL" QUAD_GANTRY_LEVEL = "QUAD_GANTRY_LEVEL"
@@ -15,7 +12,6 @@ class KlippyGcodes:
EXTRUDE_REL = "M83" EXTRUDE_REL = "M83"
SET_EXT_TEMP = "M104" SET_EXT_TEMP = "M104"
SET_BED_TEMP = "M140" SET_BED_TEMP = "M140"
SET_EXT_FACTOR = "M221" SET_EXT_FACTOR = "M221"
@@ -28,10 +24,6 @@ class KlippyGcodes:
ABORT = "ABORT" ABORT = "ABORT"
ACCEPT = "ACCEPT" ACCEPT = "ACCEPT"
SAVE_CONFIG = "SAVE_CONFIG"
RESTART = "RESTART"
FIRMWARE_RESTART = "FIRMWARE_RESTART"
@staticmethod @staticmethod
def set_bed_temp(temp): def set_bed_temp(temp):
return f"{KlippyGcodes.SET_BED_TEMP} S{temp}" return f"{KlippyGcodes.SET_BED_TEMP} S{temp}"
+94 -96
View File
@@ -1,81 +1,85 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import contextlib import contextlib
import gi
import logging import logging
import os import os
import pathlib import pathlib
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango
def format_label(widget, lines=2):
if type(widget) == Gtk.Label:
return widget
if type(widget) in (Gtk.Container, Gtk.Bin, Gtk.Button, Gtk.Alignment, Gtk.Box):
for _ in widget.get_children():
lbl = format_label(_)
if lbl is not None:
lbl.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
lbl.set_line_wrap(True)
lbl.set_ellipsize(True)
lbl.set_ellipsize(Pango.EllipsizeMode.END)
lbl.set_lines(lines)
class KlippyGtk: class KlippyGtk:
labels = {} labels = {}
def __init__(self, screen, width, height, theme, cursor, fontsize_type): def __init__(self, screen):
self.screen = screen self.screen = screen
self.width = width self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", screen.theme, "images")
self.height = height self.cursor = screen.show_cursor
self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", theme, "images") self.font_size_type = screen._config.get_main_config().get("font_size", "medium")
self.width = screen.width
self.height = screen.height
self.font_ratio = [33, 49] if self.screen.vertical_mode else [43, 29] self.font_ratio = [33, 49] if self.screen.vertical_mode else [43, 29]
self.font_size = int(min( self.font_size = min(self.width / self.font_ratio[0], self.height / self.font_ratio[1])
self.width / self.font_ratio[0], self.img_scale = self.font_size * 2
self.height / self.font_ratio[1] self.button_image_scale = 1.38
)) self.bsidescale = .65 # Buttons with image at the side
if fontsize_type == "small":
self.font_size = round(self.font_size * 0.91) if self.font_size_type == "max":
elif fontsize_type == "large": self.font_size = self.font_size * 1.2
self.font_size = round(self.font_size * 1.09) self.bsidescale = .7
self.titlebar_height = self.font_size * 2 elif self.font_size_type == "extralarge":
self.img_scale = self.font_size * 2.5 self.font_size = self.font_size * 1.14
self.img_scale = self.img_scale * 0.7
self.bsidescale = 1
elif self.font_size_type == "large":
self.font_size = self.font_size * 1.09
self.img_scale = self.img_scale * 0.9
self.bsidescale = .8
elif self.font_size_type == "small":
self.font_size = self.font_size * 0.91
self.bsidescale = .55
self.img_width = self.font_size * 3 self.img_width = self.font_size * 3
self.img_height = self.font_size * 3 self.img_height = self.font_size * 3
self.titlebar_height = self.font_size * 2
logging.info(f"Font size: {self.font_size:.1f} ({self.font_size_type})")
if self.screen.vertical_mode: if self.screen.vertical_mode:
self.action_bar_width = int(self.width) self.action_bar_width = int(self.width)
self.action_bar_height = int(self.height * .1) self.action_bar_height = int(self.height * .1)
self.content_width = self.width
self.content_height = self.height - self.titlebar_height - self.action_bar_height
else: else:
self.action_bar_width = int(self.width * .1) self.action_bar_width = int(self.width * .1)
self.action_bar_height = int(self.height) self.action_bar_height = int(self.height)
self.cursor = cursor self.content_width = self.width - self.action_bar_width
self.content_height = self.height - self.titlebar_height
self.keyboard_height = self.content_height * 0.5
if (self.height / self.width) >= 3: # Ultra-tall
self.keyboard_height = self.keyboard_height * 0.5
self.color_list = {} # This is set by screen.py init_style() self.color_list = {} # This is set by screen.py init_style()
for key in self.color_list: for key in self.color_list:
if "base" in self.color_list[key]: if "base" in self.color_list[key]:
rgb = [int(self.color_list[key]['base'][i:i + 2], 16) for i in range(0, 6, 2)] rgb = [int(self.color_list[key]['base'][i:i + 2], 16) for i in range(0, 6, 2)]
self.color_list[key]['rgb'] = rgb self.color_list[key]['rgb'] = rgb
logging.debug(f"img width: {self.img_width} height: {self.img_height}")
def get_action_bar_width(self):
return self.action_bar_width
def get_action_bar_height(self):
return self.action_bar_height
def get_content_width(self):
return self.width - self.action_bar_width
def get_content_height(self):
if self.screen.vertical_mode:
return self.height - self.titlebar_height - self.action_bar_height
else:
return self.height - self.titlebar_height
def get_font_size(self):
return self.font_size
def get_titlebar_height(self):
return self.titlebar_height
def get_keyboard_height(self):
if (self.height / self.width) >= 3:
# Ultra-tall
return self.get_content_height() * 0.25
else:
return self.get_content_height() * 0.5
def get_temp_color(self, device): def get_temp_color(self, device):
# logging.debug("Color list %s" % self.color_list) # logging.debug("Color list %s" % self.color_list)
if device not in self.color_list: if device not in self.color_list:
@@ -112,43 +116,44 @@ class KlippyGtk:
def Image(self, image_name=None, width=None, height=None): def Image(self, image_name=None, width=None, height=None):
if image_name is None: if image_name is None:
return Gtk.Image() return Gtk.Image()
pixbuf = self.PixbufFromIcon(image_name, width, height)
return Gtk.Image.new_from_pixbuf(pixbuf) if pixbuf is not None else Gtk.Image()
def PixbufFromIcon(self, filename, width=None, height=None):
width = width if width is not None else self.img_width width = width if width is not None else self.img_width
height = height if height is not None else self.img_height height = height if height is not None else self.img_height
filename = os.path.join(self.themedir, image_name) filename = os.path.join(self.themedir, filename)
for ext in ["svg", "png"]: for ext in ["svg", "png"]:
with contextlib.suppress(Exception): pixbuf = self.PixbufFromFile(f"{filename}.{ext}", int(width), int(height))
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(f"{filename}.{ext}", int(width), int(height)) if pixbuf is not None:
if pixbuf is not None: return pixbuf
return Gtk.Image.new_from_pixbuf(pixbuf) return None
logging.error(f"Unable to find image {filename}.{ext}")
return Gtk.Image()
@staticmethod @staticmethod
def PixbufFromFile(filename, width=-1, height=-1): def PixbufFromFile(filename, width=-1, height=-1):
return GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(width), int(height)) try:
return GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(width), int(height))
except Exception as e:
logging.exception(e)
logging.error(f"Unable to find image {filename}")
return None
def PixbufFromHttp(self, resource, width=-1, height=-1): def PixbufFromHttp(self, resource, width=-1, height=-1):
response = self.screen.apiclient.get_thumbnail_stream(resource) response = self.screen.apiclient.get_thumbnail_stream(resource)
if response is False: if response is False:
return None return None
stream = Gio.MemoryInputStream.new_from_data(response, None) stream = Gio.MemoryInputStream.new_from_data(response, None)
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(width), int(height), True) try:
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(width), int(height), True)
except Exception as e:
logging.exception(e)
return None
stream.close_async(2) stream.close_async(2)
return pixbuf return pixbuf
def Button(self, label=None, style=None): def Button(self, image_name=None, label=None, style=None, scale=None, position=Gtk.PositionType.TOP, lines=2):
b = Gtk.Button(label=label) if self.font_size_type == "max" and label is not None and scale is None:
b.set_hexpand(True) image_name = None
b.set_vexpand(True)
b.set_can_focus(False)
b.props.relief = Gtk.ReliefStyle.NONE
if style is not None:
b.get_style_context().add_class(style)
b.connect("clicked", self.screen.reset_screensaver_timeout)
return b
def ButtonImage(self, image_name=None, label=None, style=None, scale=1.38, position=Gtk.PositionType.TOP, lines=2):
b = Gtk.Button() b = Gtk.Button()
if label is not None: if label is not None:
b.set_label(label.replace("\n", " ")) b.set_label(label.replace("\n", " "))
@@ -156,29 +161,17 @@ class KlippyGtk:
b.set_vexpand(True) b.set_vexpand(True)
b.set_can_focus(False) b.set_can_focus(False)
if image_name is not None: if image_name is not None:
if scale is None:
scale = self.button_image_scale
if label is None:
scale = scale * 1.5
width = height = self.img_scale * scale width = height = self.img_scale * scale
b.set_image(self.Image(image_name, width, height)) b.set_image(self.Image(image_name, width, height))
b.set_image_position(position) b.set_image_position(position)
b.set_always_show_image(True) b.set_always_show_image(True)
if label is not None: if label is not None:
try: format_label(b, lines)
# Get the label object
if image_name is not None:
if position == Gtk.PositionType.RIGHT:
child = b.get_children()[0].get_children()[0].get_children()[0]
else:
child = b.get_children()[0].get_children()[0].get_children()[1]
else:
child = b.get_children()[0]
child.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
child.set_line_wrap(True)
child.set_ellipsize(True)
child.set_ellipsize(Pango.EllipsizeMode.END)
child.set_lines(lines)
except Exception as e:
logging.debug(f"Unable to wrap and ellipsize label: {label} image: {image_name} exception:{e}")
if style is not None: if style is not None:
b.get_style_context().add_class(style) b.get_style_context().add_class(style)
b.connect("clicked", self.screen.reset_screensaver_timeout) b.connect("clicked", self.screen.reset_screensaver_timeout)
@@ -191,15 +184,13 @@ class KlippyGtk:
dialog.set_transient_for(screen) dialog.set_transient_for(screen)
dialog.set_modal(True) dialog.set_modal(True)
for i, button in enumerate(buttons): for button in buttons:
dialog.add_button(button_text=button['name'], response_id=button['response']) dialog.add_button(button['name'], button['response'])
button = dialog.get_children()[0].get_children()[0].get_children()[0].get_children()[i] button = dialog.get_widget_for_response(button['response'])
button.get_child().set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
button.get_child().set_line_wrap(True)
button.set_size_request((screen.width - 30) / 3, screen.height / 5) button.set_size_request((screen.width - 30) / 3, screen.height / 5)
format_label(button, 3)
dialog.connect("response", self.screen.reset_screensaver_timeout) dialog.connect("response", self.screen.reset_screensaver_timeout)
dialog.connect("response", self.remove_dialog, dialog)
dialog.connect("response", callback, *args) dialog.connect("response", callback, *args)
dialog.get_style_context().add_class("dialog") dialog.get_style_context().add_class("dialog")
@@ -220,11 +211,18 @@ class KlippyGtk:
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.BLANK_CURSOR)) Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.BLANK_CURSOR))
self.screen.dialogs.append(dialog) self.screen.dialogs.append(dialog)
logging.info(f"Showing dialog {dialog}")
return dialog return dialog
def remove_dialog(self, widget, response_id, dialog): def remove_dialog(self, dialog, *args):
logging.info("Removing Dialog") if self.screen.updating:
self.screen.dialogs.remove(dialog) return
dialog.destroy()
if dialog in self.screen.dialogs:
logging.info("Removing Dialog")
self.screen.dialogs.remove(dialog)
return
logging.debug(f"Cannot remove dialog {dialog}")
@staticmethod @staticmethod
def HomogeneousGrid(width=None, height=None): def HomogeneousGrid(width=None, height=None):
+42 -25
View File
@@ -1,6 +1,6 @@
import json
import requests
import logging import logging
import re
import requests
class KlippyRest: class KlippyRest:
@@ -8,11 +8,12 @@ class KlippyRest:
self.ip = ip self.ip = ip
self.port = port self.port = port
self.api_key = api_key self.api_key = api_key
self.status = ''
@property @property
def endpoint(self): def endpoint(self):
protocol = "http" protocol = "http"
if int(self.port) == 443: if int(self.port) in {443, 7130}:
protocol = "https" protocol = "https"
return f"{protocol}://{self.ip}:{self.port}" return f"{protocol}://{self.ip}:{self.port}"
@@ -21,7 +22,7 @@ class KlippyRest:
def get_oneshot_token(self): def get_oneshot_token(self):
r = self.send_request("access/oneshot_token") r = self.send_request("access/oneshot_token")
if r is False: if r is False or 'result' not in r:
return False return False
return r['result'] return r['result']
@@ -29,30 +30,46 @@ class KlippyRest:
return self.send_request("printer/info") return self.send_request("printer/info")
def get_thumbnail_stream(self, thumbnail): def get_thumbnail_stream(self, thumbnail):
url = f"{self.endpoint}/server/files/gcodes/{thumbnail}" return self.send_request(f"server/files/gcodes/{thumbnail}", json=False)
response = requests.get(url, stream=True) def send_request(self, method, json=True):
if response.status_code == 200:
response.raw.decode_content = True
return response.content
return False
def send_request(self, method):
url = f"{self.endpoint}/{method}" url = f"{self.endpoint}/{method}"
logging.debug(f"Sending request to {url}")
headers = {} if self.api_key is False else {"x-api-key": self.api_key} headers = {} if self.api_key is False else {"x-api-key": self.api_key}
data = False
try: try:
r = requests.get(url, headers=headers) response = requests.get(url, headers=headers, timeout=3)
response.raise_for_status()
if json:
logging.debug(f"Sending request to {url}")
data = response.json()
else:
data = response.content
except requests.exceptions.HTTPError as h:
self.status = self.format_status(h)
except requests.exceptions.ConnectionError as c:
self.status = self.format_status(c)
except requests.exceptions.Timeout as t:
self.status = self.format_status(t)
except requests.exceptions.JSONDecodeError as j:
self.status = self.format_status(j)
except requests.exceptions.RequestException as r:
self.status = self.format_status(r)
except Exception as e: except Exception as e:
logging.error(e) self.status = self.format_status(e)
return False if data:
if r.status_code != 200: self.status = ''
return False else:
logging.error(self.status.replace('\n', '>>'))
try:
data = json.loads(r.content)
except Exception as e:
logging.error(f"Unable to parse response from moonraker:\n {r.content}")
return False
return data return data
@staticmethod
def format_status(status):
try:
rep = {"HTTPConnectionPool": "", "/server/info ": "", "Caused by ": "", "(": "", ")": "",
": ": "\n", "'": "", "`": "", "\"": ""}
rep = {re.escape(k): v for k, v in rep.items()}
pattern = re.compile("|".join(rep.keys()))
status = pattern.sub(lambda m: rep[re.escape(m.group(0))], f"{status}").split("\n")
return "\n".join(_ for _ in status if "urllib3" not in _ and _ != "")
except TypeError or KeyError:
return status
+24 -56
View File
@@ -1,31 +1,16 @@
#!/usr/bin/python #!/usr/bin/python
import gi
import threading import threading
import json import json
import websocket
import logging import logging
import gi
import websocket
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import GLib from gi.repository import GLib
from ks_includes.KlippyGcodes import KlippyGcodes from ks_includes.KlippyGcodes import KlippyGcodes
api_key = ""
api = {
"printer_info": {
"url": "/printer/info",
"method": "get_printer_info"
},
"apikey": {
"url": "/access/api_key"
},
"oneshot_token": {
"url": "/access/oneshot_token"
}
}
class KlippyWebsocket(threading.Thread): class KlippyWebsocket(threading.Thread):
_req_id = 0 _req_id = 0
@@ -42,9 +27,8 @@ class KlippyWebsocket(threading.Thread):
self._screen = screen self._screen = screen
self._callback = callback self._callback = callback
self.klippy = MoonrakerApi(self) self.klippy = MoonrakerApi(self)
self.closing = False
self.ws = None self.ws = None
self.closing = False
self.host = host self.host = host
self.port = port self.port = port
@@ -67,7 +51,7 @@ class KlippyWebsocket(threading.Thread):
# Enable a timeout so that way if moonraker is not running, it will attempt to reconnect # Enable a timeout so that way if moonraker is not running, it will attempt to reconnect
self.connect() self.connect()
if self.connecting: if self.connecting:
GLib.timeout_add_seconds(6, self.reconnect) GLib.timeout_add_seconds(10, self.reconnect)
def connect(self): def connect(self):
if self.connected: if self.connected:
@@ -78,8 +62,7 @@ class KlippyWebsocket(threading.Thread):
if state is False: if state is False:
if self.reconnect_count > 2: if self.reconnect_count > 2:
self._screen.printer_initializing( self._screen.printer_initializing(
_("Cannot connect to Moonraker") _("Cannot connect to Moonraker") + '\n\n'
+ f'\n\n{self._url}\n\n'
+ _("Retrying") + f' #{self.reconnect_count}' + _("Retrying") + f' #{self.reconnect_count}'
) )
return False return False
@@ -106,10 +89,10 @@ class KlippyWebsocket(threading.Thread):
self.closing = True self.closing = True
self.connecting = False self.connecting = False
if self.ws is not None: if self.ws is not None:
logging.debug("Closing websocket")
self.ws.close() self.ws.close()
def on_message(self, ws, message): def on_message(self, *args):
message = args[1] if len(args) == 2 else args[0]
response = json.loads(message) response = json.loads(message)
if "id" in response and response['id'] in self.callback_table: if "id" in response and response['id'] in self.callback_table:
args = (response, args = (response,
@@ -144,23 +127,31 @@ class KlippyWebsocket(threading.Thread):
self.ws.send(json.dumps(data)) self.ws.send(json.dumps(data))
return True return True
def on_open(self, ws): def on_open(self, *args):
logging.info("Moonraker Websocket Open") logging.info("Moonraker Websocket Open")
self.connected = True self.connected = True
self._screen.reinit_count = 0
self.reconnect_count = 0 self.reconnect_count = 0
if "on_connect" in self._callback: if "on_connect" in self._callback:
GLib.idle_add(self._callback['on_connect']) GLib.idle_add(self._callback['on_connect'])
def on_close(self, ws, status, message): def on_close(self, *args):
# args: ws, status, message
# sometimes ws is not passed due to bugs
message = args[2] if len(args) == 3 else args[1]
if message is not None: if message is not None:
logging.info(f"{status} {message}") logging.info(f"{message}")
if not self.connected: if not self.connected:
logging.debug("Connection already closed") logging.debug("Connection already closed")
return return
if self.closing:
logging.debug("Closing websocket")
self.ws.keep_running = False
self.close()
self.closing = False
return
if "on_close" in self._callback: if "on_close" in self._callback:
GLib.idle_add(self._callback['on_close'], "Lost Connection to Moonraker") GLib.idle_add(self._callback['on_close'], "Lost Connection to Moonraker")
logging.info("Moonraker Websocket Closed") logging.info("Moonraker Websocket Closed")
self.connected = False self.connected = False
@@ -172,14 +163,15 @@ class KlippyWebsocket(threading.Thread):
self.connecting = False self.connecting = False
self._screen.printer_initializing( self._screen.printer_initializing(
_("Cannot connect to Moonraker") _("Cannot connect to Moonraker")
+ f'\n\n{self._url}') + f'\n\n{self._screen.apiclient.status}')
return False return False
logging.debug("Attempting to reconnect") logging.debug("Attempting to reconnect")
self.connect() self.connect()
return True return True
@staticmethod @staticmethod
def on_error(ws, error): def on_error(*args):
error = args[1] if len(args) == 2 else args[0]
logging.debug(f"Websocket error: {error}") logging.debug(f"Websocket error: {error}")
@@ -291,30 +283,6 @@ class MoonrakerApi:
*args *args
) )
def temperature_set(self, heater, target, callback=None, *args):
if heater == "heater_bed":
logging.debug(f"Sending printer.gcode.script: {KlippyGcodes.set_bed_temp(target)}")
return self._ws.send_method(
"printer.gcode.script",
{
"script": KlippyGcodes.set_bed_temp(target)
},
callback,
*args
)
else:
logging.debug(
f'Sending printer.gcode.script: {KlippyGcodes.set_ext_temp(target, heater.replace("tool", ""))}')
# TODO: Add max/min limits
return self._ws.send_method(
"printer.gcode.script",
{
"script": KlippyGcodes.set_ext_temp(target, heater.replace("tool", ""))
},
callback,
*args
)
def set_bed_temp(self, target, callback=None, *args): def set_bed_temp(self, target, callback=None, *args):
logging.debug(f"Sending set_bed_temp: {KlippyGcodes.set_bed_temp(target)}") logging.debug(f"Sending set_bed_temp: {KlippyGcodes.set_bed_temp(target)}")
return self._ws.send_method( return self._ws.send_method(
File diff suppressed because it is too large. Load diff
+36 -31
View File
@@ -6,11 +6,10 @@ import json
import re import re
import copy import copy
import pathlib import pathlib
import locale
from io import StringIO from io import StringIO
from os import path
SCREEN_BLANKING_OPTIONS = [ SCREEN_BLANKING_OPTIONS = [
300, # 5 Minutes 300, # 5 Minutes
900, # 15 Minutes 900, # 15 Minutes
@@ -115,15 +114,21 @@ class KlipperScreenConfig:
self.langs[lng] = gettext.translation('KlipperScreen', localedir=lang_path, languages=[lng], fallback=True) self.langs[lng] = gettext.translation('KlipperScreen', localedir=lang_path, languages=[lng], fallback=True)
lang = self.get_main_config().get("language", None) lang = self.get_main_config().get("language", None)
logging.debug(f"Selected lang: {lang} OS lang: {os.getenv('LANG')}") logging.debug(f"Selected lang: {lang} OS lang: {locale.getdefaultlocale()[0]}")
self.install_language(lang) self.install_language(lang)
def install_language(self, lang): def install_language(self, lang):
if lang is None or lang == "system_lang": if lang is None or lang == "system_lang":
for language in self.lang_list: for language in self.lang_list:
if os.getenv('LANG').lower().startswith(language): if locale.getdefaultlocale()[0].startswith(language):
logging.debug("Using system lang") logging.debug("Using system lang")
lang = language lang = language
if lang is not None and lang not in self.lang_list:
# try to match a parent
for language in self.lang_list:
if lang.startswith(language):
lang = language
self.set("main", "language", lang)
if lang not in self.lang_list: if lang not in self.lang_list:
logging.error(f"lang: {lang} not found") logging.error(f"lang: {lang} not found")
logging.info(f"Available lang list {self.lang_list}") logging.info(f"Available lang list {self.lang_list}")
@@ -147,7 +152,7 @@ class KlipperScreenConfig:
) )
strs = ( strs = (
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size', 'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size',
'print_estimate_method', 'screen_blanking' 'print_estimate_method', 'screen_blanking', "screen_on_devices", "screen_off_devices",
) )
numbers = ( numbers = (
'job_complete_timeout', 'job_error_timeout', 'move_speed_xy', 'move_speed_z', 'job_complete_timeout', 'job_error_timeout', 'move_speed_xy', 'move_speed_z',
@@ -160,7 +165,7 @@ class KlipperScreenConfig:
strs = ( strs = (
'moonraker_api_key', 'moonraker_host', 'titlebar_name_type', 'moonraker_api_key', 'moonraker_host', 'titlebar_name_type',
'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values', 'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values',
'extrude_distances', "extrude_speeds", 'extrude_distances', "extrude_speeds", "camera_url",
) )
numbers = ( numbers = (
'moonraker_port', 'move_speed_xy', 'move_speed_z', 'moonraker_port', 'move_speed_xy', 'move_speed_z',
@@ -170,7 +175,7 @@ class KlipperScreenConfig:
strs = ('gcode', '') strs = ('gcode', '')
numbers = [f'{option}' for option in self.config[section] if option != 'gcode'] numbers = [f'{option}' for option in self.config[section] if option != 'gcode']
elif section.startswith('menu '): elif section.startswith('menu '):
strs = ('name', 'icon', 'panel', 'method', 'params', 'enable', 'confirm') strs = ('name', 'icon', 'panel', 'method', 'params', 'enable', 'confirm', 'style')
elif section == 'bed_screws': elif section == 'bed_screws':
# This section may be deprecated in favor of moving this options under the printer section # This section may be deprecated in favor of moving this options under the printer section
numbers = ('rotation', '') numbers = ('rotation', '')
@@ -218,7 +223,7 @@ class KlipperScreenConfig:
{"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}}, {"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}},
{"theme": { {"theme": {
"section": "main", "name": _("Icon Theme"), "type": "dropdown", "section": "main", "name": _("Icon Theme"), "type": "dropdown",
"value": "z-bolt", "callback": screen.restart_warning, "options": [ "value": "z-bolt", "callback": screen.restart_ks, "options": [
{"name": "Z-bolt" + " " + _("(default)"), "value": "z-bolt"}]}}, {"name": "Z-bolt" + " " + _("(default)"), "value": "z-bolt"}]}},
{"print_estimate_method": { {"print_estimate_method": {
"section": "main", "name": _("Estimated Time Method"), "type": "dropdown", "section": "main", "name": _("Estimated Time Method"), "type": "dropdown",
@@ -238,10 +243,12 @@ class KlipperScreenConfig:
"value": "True", "callback": screen.toggle_macro_shortcut}}, "value": "True", "callback": screen.toggle_macro_shortcut}},
{"font_size": { {"font_size": {
"section": "main", "name": _("Font Size"), "type": "dropdown", "section": "main", "name": _("Font Size"), "type": "dropdown",
"value": "medium", "callback": screen.restart_warning, "options": [ "value": "medium", "callback": screen.restart_ks, "options": [
{"name": _("Small"), "value": "small"}, {"name": _("Small"), "value": "small"},
{"name": _("Medium") + " " + _("(default)"), "value": "medium"}, {"name": _("Medium") + " " + _("(default)"), "value": "medium"},
{"name": _("Large"), "value": "large"}]}}, {"name": _("Large"), "value": "large"},
{"name": _("Extra Large"), "value": "extralarge"},
{"name": _("Maximum"), "value": "max"}]}},
{"confirm_estop": {"section": "main", "name": _("Confirm Emergency Stop"), "type": "binary", {"confirm_estop": {"section": "main", "name": _("Confirm Emergency Stop"), "type": "binary",
"value": "False"}}, "value": "False"}},
{"only_heaters": {"section": "main", "name": _("Hide sensors in Temp."), "type": "binary", {"only_heaters": {"section": "main", "name": _("Hide sensors in Temp."), "type": "binary",
@@ -350,7 +357,7 @@ class KlipperScreenConfig:
user_def = [] user_def = []
saved_def = [] saved_def = []
found_saved = False found_saved = False
if not path.exists(config_path): if not os.path.exists(config_path):
return ["", None] return ["", None]
with open(config_path) as file: with open(config_path) as file:
for line in file: for line in file:
@@ -367,31 +374,32 @@ class KlipperScreenConfig:
def get_config_file_location(self, file): def get_config_file_location(self, file):
# Passed config (-c) by default is ~/KlipperScreen.conf # Passed config (-c) by default is ~/KlipperScreen.conf
if path.exists(file): logging.info(f"Passed config (-c): {file}")
if os.path.exists(file):
return file return file
file = os.path.join(klipperscreendir, self.configfile_name) file = os.path.join(klipperscreendir, self.configfile_name)
if path.exists(file): if os.path.exists(file):
return file return file
file = os.path.join(klipperscreendir, self.configfile_name.lower()) file = os.path.join(klipperscreendir, self.configfile_name.lower())
if path.exists(file): if os.path.exists(file):
return file return file
klipper_config = os.path.join(os.path.expanduser("~/"), "printer_data", "config") klipper_config = os.path.join(os.path.expanduser("~/"), "printer_data", "config")
file = os.path.join(klipper_config, self.configfile_name) file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file): if os.path.exists(file):
return file return file
file = os.path.join(klipper_config, self.configfile_name.lower()) file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file): if os.path.exists(file):
return file return file
# OLD config folder # OLD config folder
klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config") klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config")
file = os.path.join(klipper_config, self.configfile_name) file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file): if os.path.exists(file):
return file return file
file = os.path.join(klipper_config, self.configfile_name.lower()) file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file): if os.path.exists(file):
return file return file
# fallback # fallback
@@ -486,20 +494,21 @@ class KlipperScreenConfig:
f"{self.do_not_edit_line}\n" f"{self.do_not_edit_line}\n"
f"{self.do_not_edit_prefix}\n" f"{self.do_not_edit_prefix}\n"
+ '\n'.join(save_output) + f"\n" + '\n'.join(save_output) + f"\n"
f"{self.do_not_edit_prefix}\n") f"{self.do_not_edit_prefix}\n")
if self.config_path != self.default_config_path: if self.config_path != self.default_config_path:
filepath = self.config_path filepath = self.config_path
else: else:
filepath = os.path.expanduser("~/") filepath = os.path.expanduser("~/")
klipper_config = os.path.join(filepath, "klipper_config")
if os.path.exists(klipper_config):
filepath = os.path.join(klipper_config, "KlipperScreen.conf")
klipper_config = os.path.join(filepath, "printer_data", "config") klipper_config = os.path.join(filepath, "printer_data", "config")
old_klipper_config = os.path.join(filepath, "klipper_config")
if os.path.exists(klipper_config): if os.path.exists(klipper_config):
filepath = os.path.join(klipper_config, "KlipperScreen.conf") filepath = os.path.join(klipper_config, self.configfile_name)
elif os.path.exists(old_klipper_config):
filepath = os.path.join(old_klipper_config, self.configfile_name)
else: else:
filepath = os.path.join(filepath, "KlipperScreen.conf") filepath = os.path.join(filepath, self.configfile_name)
logging.info(f'Creating a new config file in {filepath}')
try: try:
with open(filepath, 'w') as file: with open(filepath, 'w') as file:
@@ -540,13 +549,9 @@ class KlipperScreenConfig:
"panel": cfg.get("panel", None), "panel": cfg.get("panel", None),
"method": cfg.get("method", None), "method": cfg.get("method", None),
"confirm": cfg.get("confirm", None), "confirm": cfg.get("confirm", None),
"enable": cfg.get("enable", "True") "enable": cfg.get("enable", "True"),
"params": cfg.get("params", "{}"),
"style": cfg.get("style", None)
} }
try:
item["params"] = json.loads(cfg.get("params", "{}"))
except Exception as e:
logging.exception(f"Unable to parse parameters for [{name}]:\n{e}")
item["params"] = {}
return {name[(len(menu) + 6):]: item} return {name[(len(menu) + 6):]: item}
+13 -5
View File
@@ -128,6 +128,12 @@ icon: motor-off
method: printer.gcode.script method: printer.gcode.script
params: {"script":"M18"} params: {"script":"M18"}
[menu __main actions camera]
name: {{ gettext('Camera') }}
icon: camera
panel: camera
enable: {{ camera_configured }}
[menu __main actions console] [menu __main actions console]
name: {{ gettext('Console') }} name: {{ gettext('Console') }}
icon: console icon: console
@@ -231,6 +237,13 @@ icon: custom-script
panel: gcode_macros panel: gcode_macros
enable: {{ printer.gcode_macros.count > 0 }} enable: {{ printer.gcode_macros.count > 0 }}
[menu __print camera]
name: {{ gettext('Camera') }}
icon: camera
panel: camera
enable: {{ camera_configured }}
[menu __print console] [menu __print console]
name: {{ gettext('Console') }} name: {{ gettext('Console') }}
icon: console icon: console
@@ -252,11 +265,6 @@ icon: retract
panel: retraction panel: retraction
enable: {{ printer.firmware_retraction }} enable: {{ printer.firmware_retraction }}
[menu __print system]
name: {{ gettext('System') }}
icon: info
panel: system
[menu __print settings] [menu __print settings]
name: {{ gettext('Settings') }} name: {{ gettext('Settings') }}
icon: settings icon: settings
+1 -1
View File
@@ -177,7 +177,7 @@ def setup_logging(log_file, software_version):
def logging_exception_handler(ex_type, value, tb, thread_identifier=None): def logging_exception_handler(ex_type, value, tb, thread_identifier=None):
logging.exception( logging.exception(
f'Uncaught exception {ex_type}: {value}\n' f'Uncaught exception {ex_type}: {value}\n'
f'Traceback: {traceback.format_tb(tb)}' + '\n'.join([str(x) for x in [*traceback.format_tb(tb)]])
) )
sys.excepthook = logging_exception_handler sys.excepthook = logging_exception_handler
+22 -39
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -46,9 +46,6 @@ msgstr ""
msgid "Actions" msgid "Actions"
msgstr "" msgstr ""
msgid "Add Printer"
msgstr ""
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -114,9 +111,6 @@ msgstr ""
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "" msgstr ""
@@ -212,6 +206,9 @@ msgstr ""
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "" msgstr ""
@@ -317,9 +314,6 @@ msgstr ""
msgid "Increase" msgid "Increase"
msgstr "" msgstr ""
msgid "Initializing"
msgstr ""
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "" msgstr ""
@@ -332,6 +326,9 @@ msgstr ""
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "" msgstr ""
@@ -359,6 +356,9 @@ msgstr ""
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "" msgstr ""
msgid "KlipperScreen will reboot"
msgstr ""
msgid "Language" msgid "Language"
msgstr "" msgstr ""
@@ -401,6 +401,9 @@ msgstr ""
msgid "Max Velocity" msgid "Max Velocity"
msgstr "" msgstr ""
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -520,12 +523,18 @@ msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "" msgstr ""
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "" msgstr ""
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "" msgstr ""
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "" msgstr ""
@@ -559,10 +568,6 @@ msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr ""
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -634,9 +639,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "" msgstr ""
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "" msgstr ""
@@ -679,10 +681,6 @@ msgstr ""
msgid "Temperature" msgid "Temperature"
msgstr "" msgstr ""
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr ""
msgid "Total:" msgid "Total:"
msgstr "" msgstr ""
@@ -713,24 +711,12 @@ msgstr ""
msgid "Uploaded" msgid "Uploaded"
msgstr "" msgstr ""
msgid "X+"
msgstr ""
msgid "X-"
msgstr ""
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "" msgstr ""
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr ""
msgid "Y+"
msgstr ""
msgid "Y-"
msgstr ""
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "" msgstr ""
@@ -746,12 +732,6 @@ msgstr ""
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr ""
msgid "Z-"
msgstr ""
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "" msgstr[0] ""
@@ -776,3 +756,6 @@ msgstr ""
msgid "mm/s²" msgid "mm/s²"
msgstr "" msgstr ""
msgid "mm³/s"
msgstr ""
Binary file not shown.
@@ -0,0 +1,776 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Czech\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-29 09:28-0600\n"
"PO-Revision-Date: 2023-01-29 09:27-0600\n"
"Last-Translator: \n"
"Language-Team: Jan Stanka (stanky@email.cz)\n"
"Language: cs\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==1 ? 0 : n>=2 && n<=4 ? 1 : 2);\n"
"X-Generator: Poedit 2.4.2\n"
#, python-format
msgid "%s will be updated to version"
msgstr "%s bude aktualizováno na verzi"
msgid "(default)"
msgstr ""
msgid "24 Hour Time"
msgstr "24 hod formát"
msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FW restart může fixnout chyby."
msgid "ADXL Not Configured"
msgstr "ADXL není nastaven"
msgid "Abort"
msgstr "Zrušit"
msgid "Acceleration:"
msgstr "Zrychlení:"
msgid "Accept"
msgstr "Přijmout"
msgid "Actions"
msgstr "Akce"
msgid "Add profile"
msgstr "Přidat profil"
msgid "Apply"
msgstr "Použít"
#, python-format
msgid "Apply %.2f offset to Endstop?"
msgstr "Použít %.2f přesah k Endstop?"
#, python-format
msgid "Apply %s%.2f offset to Probe?"
msgstr "Použít %s%.2f přesah k Sondě?"
msgid "Are you sure do you want to exclude the object?"
msgstr "Opravdu chceš vyjmout objekt?"
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Opravdu okamžitě zastavit?"
msgid "Are you sure you wish to cancel this print?"
msgstr "Opravdu chcete zrušit tisk?"
msgid "Are you sure you wish to disable motors?"
msgstr "Opravdu chcete uvolnit motory?"
msgid "Are you sure you wish to reboot the system?"
msgstr "Opravdu chcete rebootovat systém?"
msgid "Are you sure you wish to shutdown the system?"
msgstr "Opravdu chcete vypnout systém?"
msgid "Auto"
msgstr "Auto"
msgid "Auto-calibrate"
msgstr "Auto-kalibrace"
msgid "Auto-close notifications"
msgstr "Automaticky zavřít upozornění"
msgid "Auto-scroll"
msgstr "Auto posun"
msgid "Bed Level"
msgstr "Vyrovnání podložky"
msgid "Bed Mesh"
msgstr "Mapa podložky"
msgid "Bed screw configuration:"
msgstr "Vyrovnání šroubů podložky:"
msgid "Calibrate"
msgstr "Kalibrace"
msgid "Calibrated"
msgstr "Zkalibrováno"
msgid "Calibrated, save configuration to make it permanent"
msgstr "Zkalibrováno, uložit změny jako trvalé"
msgid "Calibrating"
msgstr "Kalibruji"
msgid "Camera"
msgstr ""
msgid "Can't set above the maximum:"
msgstr "Nemohu nastavit víc než max:"
msgid "Cancel"
msgstr "Zrušit"
msgid "Cancel Print"
msgstr "Zrušit tisk"
msgid "Cancelled"
msgstr "Zrušeno"
msgid "Cancelling"
msgstr "Ruším"
msgid "Cannot connect to Moonraker"
msgstr "Nelze se připojit k Moonraker"
msgid "Channel"
msgstr "Kanál"
msgid "Check ADXL Wiring"
msgstr "Zkontroluj zapojení ADXL"
msgid "Checking for updates, please wait..."
msgstr "Kontrola aktualizací, čekej ..."
msgid "Clear"
msgstr "Vymaž"
msgid "Close"
msgstr "Zavřít"
msgid "Complete"
msgstr "Hotovo"
msgid "Configuration"
msgstr "Konfigurace"
msgid "Confirm Emergency Stop"
msgstr "Potvrzovat Emergency Stop"
msgid "Connected"
msgstr "Připojeno"
#, python-format
msgid "Connecting to %s"
msgstr "Připojování k %s"
msgid "Console"
msgstr "Konsole"
msgid "Continue"
msgstr "Pokračuj"
msgid "Cooldown"
msgstr "Zchladit"
msgid "Date"
msgstr "Datum"
msgid "Delete Directory?"
msgstr ""
msgid "Delete File?"
msgstr "Smazat soubor?"
msgid "Deselect"
msgstr "Odznačit"
msgid "Disable Motors"
msgstr "Uvolnit motory"
msgid "Disable XY"
msgstr "Uvolnit XY"
msgid "Distance (mm)"
msgstr "Vzdálenost (mm)"
#, python-format
msgid "Do you want to recover %s?"
msgstr "Obnovit %s?"
msgid "Elapsed:"
msgstr "Uplynulo:"
msgid "Error"
msgstr "Chyba"
msgid "Estimated Time Method"
msgstr "Výpočet doby tisku"
msgid "Exclude Object"
msgstr "Vyloučit objekt"
msgid "Extra Large"
msgstr "Extra velký"
msgid "Extrude"
msgstr "Extruze"
msgid "Extrusion +"
msgstr "Extruze +"
msgid "Extrusion -"
msgstr "Extruze -"
msgid "Failed, adjust position first"
msgstr "Chyba, nastav nejprve pozici"
msgid "Fan"
msgstr "Větrák"
msgid "Filament Used"
msgstr "Typ filamentu"
msgid "Filament total:"
msgstr "Filament celkem:"
msgid "Filament used:"
msgstr "Použitý filament:"
msgid "Filament:"
msgstr "Filament:"
msgid "File"
msgstr "Soubor"
msgid "File:"
msgstr "Soubor:"
msgid "Finding ADXL"
msgstr "Hledání ADXL"
msgid "Fine Tuning"
msgstr "Ladění"
msgid "Finish"
msgstr "Konec"
msgid "Firmware Restart"
msgstr "Firmware Restart"
msgid "Flow:"
msgstr "Tok:"
msgid "Flowrate:"
msgstr "Rychlost toku:"
msgid "Font Size"
msgstr "Velikost fontu"
msgid "Full Update"
msgstr "Úplný update"
msgid "Fullscreen"
msgstr ""
msgid "Go Back"
msgstr "Zpět"
msgid "Height:"
msgstr "Výška:"
msgid "Hidden"
msgstr "Skrytý"
msgid "Hide"
msgstr "Skrýt"
msgid "Hide sensors in Temp."
msgstr "Skrýt senzory v Temp."
msgid "Hide temp."
msgstr "Skrýt teplotu"
msgid "Home All"
msgstr "Zaparkovat XYZ"
msgid "Home X"
msgstr "Zaparkovat X"
msgid "Home XY"
msgstr "Zaparkovat XY"
msgid "Home Y"
msgstr "Zaparkovat Y"
msgid "Home Z"
msgstr "Zaparkovat Z"
msgid "Homing"
msgstr "Domů"
msgid "Host"
msgstr "Host"
msgid "Hostname"
msgstr "Hostname"
msgid "Icon Theme"
msgstr "Sada ikon"
msgid "Initializing printer..."
msgstr "Startuji tiskárnu ..."
msgid "Input Shaper"
msgstr ""
msgid "Interface"
msgstr "Rozhraní"
msgid "Invalid"
msgstr "Špatně"
msgid "Invalid password"
msgstr "Špatné heslo"
msgid "Invert X"
msgstr "Otočit X"
msgid "Invert Y"
msgstr "Otočit Y"
msgid "Invert Z"
msgstr "Otočit Z"
msgid "Klipper Restart"
msgstr "Klipper Restart"
msgid "Klipper has disconnected"
msgstr "Klipper odpojen"
msgid "Klipper has encountered an error."
msgstr "Klipper zaznamenal chybu."
msgid "Klipper has shutdown"
msgstr "Klipper zastaven"
msgid "Klipper is attempting to start"
msgstr "Klipper startuje"
msgid "Klipper will reboot"
msgstr "Klipper se restartuje"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen se restartuje"
msgid "Language"
msgstr "Jazyk"
msgid "Large"
msgstr "Velký"
msgid "Layer:"
msgstr "Vrstva:"
msgid "Left:"
msgstr "Zbývá:"
msgid "Limits"
msgstr "Limity"
msgid "Load"
msgstr "Zasuň"
msgid "Lower Nozzle"
msgstr "Trysku níž"
msgid "Macro shortcut on sidebar"
msgstr "Macro shortcut on sidebar"
msgid "Macros"
msgstr "Makra"
msgid "Main Menu"
msgstr "Hlavní menu"
msgid "Max"
msgstr "Max"
msgid "Max Acceleration"
msgstr "Max. zrychlení"
msgid "Max Acceleration to Deceleration"
msgstr "Z max. zrychlení do zpomalení"
msgid "Max Velocity"
msgstr "Max. rychlost"
msgid "Maximum"
msgstr "Maximum"
msgid "Measure Both"
msgstr "Změřit oboje"
msgid "Measure X"
msgstr "Změřit X"
msgid "Measure Y"
msgstr "Změřit Y"
msgid "Medium"
msgstr "Střední"
msgid "Menu"
msgstr "Menu"
msgid "Mesh calibrate"
msgstr "Kalibrace sítě"
msgid "Modified"
msgstr "Změněno"
msgid "Moonraker: connected"
msgstr "Moonraker: připojen"
msgid "Move"
msgstr "Posun"
msgid "Move Distance (mm)"
msgstr "Vzdálenost posunu (mm)"
msgid "Name"
msgstr "Jméno"
msgid "Network"
msgstr "Síť"
msgid "Never"
msgstr "Nikdy"
msgid "New"
msgstr "Nový"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr "Nepodporováno autodetekcí, nakonfiguruj v klipperscreen.conf"
msgid "Nothing selected"
msgstr "Nevybráno nic"
#, python-format
msgid "Outdated by %d"
msgstr "Zastaralý %d"
msgid "PSK for"
msgstr "PSK pro"
msgid "Package will be updated"
msgid_plural "Packages will be updated"
msgstr[0] "Balíček bude aktualizován"
msgstr[1] "Balíčky budou aktualizovány"
msgstr[2] ""
msgid "Part Fan"
msgstr "Částečný ofuk"
msgid "Password saved"
msgstr "Heslo uloženo"
msgid "Pause"
msgstr "Pauza"
msgid "Paused"
msgstr "Pozastaveno"
msgid "Perform a full upgrade?"
msgstr "Úplně aktualizovat?"
msgid "Pins"
msgstr "Piny"
msgid "Please recompile and flash the micro-controller."
msgstr "Znovu přelož a flashni micro-controller."
msgid "Power"
msgstr "Zdroj"
msgid "Power On Printer"
msgstr "Zapni tiskárnu"
msgid "Pressure Advance:"
msgstr "Pressure Advance:"
msgid "Print"
msgstr "Tisk"
msgid "Print Control"
msgstr "Nastavení tisku"
msgid "Print Time"
msgstr "Čas tisku"
msgid "Printer"
msgstr "Tiskárna"
msgid "Printer Connections"
msgstr "Připojení"
msgid "Printer Select"
msgstr "Výběr tiskárny"
msgid "Printing"
msgstr "Probíhá tisk"
msgid "Probe Offset"
msgstr "Offset sondy"
msgid "Profile Name:"
msgstr "Jméno profilu:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr "Provide KlipperScreen.log when asking for help.\n"
msgid "Quad Gantry Level"
msgstr "Quad Gantry Level"
msgid "Raise Nozzle"
msgstr "Zvedni trysku"
msgid "Recover"
msgstr "Recover"
msgid "Recover Hard"
msgstr "Recover Hard"
msgid "Recover Soft"
msgstr "Recover Soft"
msgid "Reference"
msgstr "Reference"
msgid "Refresh"
msgstr "Obnovit"
msgid "Rename/Move:"
msgstr ""
msgid "Restart"
msgstr "Restart"
msgid "Resume"
msgstr "Pokračuj"
msgid "Retract"
msgstr "Retrakce"
msgid "Retraction"
msgstr "Retrakce"
msgid "Retraction Length"
msgstr "Délka retrakce"
msgid "Retraction Speed"
msgstr "Rychlost retrakce"
msgid "Retry"
msgstr "Znovu"
msgid "Retrying"
msgstr "Zkouším znovu"
msgid "Save"
msgstr "Uložit"
msgid "Save Config"
msgstr "Ulož nastavení"
msgid "Save Z"
msgstr "Uložit Z"
msgid "Save configuration?"
msgstr "Uložit nastavení?"
msgid "Saved"
msgstr "Uloženo"
#, python-format
msgid "Saved offset: %s"
msgstr "Uložený offset: %s"
msgid "Screen DPMS"
msgstr "Screen DPMS"
msgid "Screen Power Off Time"
msgstr "Čas vypnutí displeje"
msgid "Screws Adjust"
msgstr "Nastavit šrouby"
msgid "Select"
msgstr "Vyber"
msgid "Send"
msgstr "Odeslat"
msgid "Set Temp"
msgstr "Nastav teplotu"
msgid "Settings"
msgstr "Nastavení"
msgid "Show"
msgstr "Ukaž"
msgid "Show Heater Power"
msgstr "Ukaž odběr topení"
msgid "Shutdown"
msgstr "Shutdown"
msgid "Size"
msgstr "Velikost"
msgid "Slicer"
msgstr "Slicer"
msgid "Slicer Time correction (%)"
msgstr "Časová korekce Sliceru (%)"
msgid "Slicer:"
msgstr "Slicer:"
msgid "Small"
msgstr "Malý"
msgid "Speed (mm/s)"
msgstr "Rychlost (mm/s)"
msgid "Speed +"
msgstr "Rychlost ₊"
msgid "Speed -"
msgstr "Rychlost -"
msgid "Speed:"
msgstr "Rychlost:"
msgid "Square Corner Velocity"
msgstr ""
msgid "Start"
msgstr "Start"
msgid "Starting WiFi Association"
msgstr "Připojování k WiFi"
msgid "Starting recovery for"
msgstr "Obnovuji"
msgid "Starting update for"
msgstr "Aktualizuji"
msgid "System"
msgstr "Systém"
msgid "System Restart"
msgstr "Restart systému"
msgid "System Shutdown"
msgstr "Vypnutí"
msgid "Temp (°C)"
msgstr "Teplota (°C)"
msgid "Temperature"
msgstr "Teplota"
msgid "Total:"
msgstr "Total:"
msgid "Unknown Heater"
msgstr "Neznámé topení"
msgid "Unknown screw position"
msgstr "Neznámé nastavení šroubů"
msgid "Unload"
msgstr "Vysuň"
msgid "Unretract Extra Length"
msgstr "Vysuň extra délku"
msgid "Unretract Speed"
msgstr "Vysunovací rychlost"
msgid "Up To Date"
msgstr "Aktuální"
msgid "Update"
msgstr "Aktualizuj"
msgid "Updating"
msgstr "Aktualizuji"
msgid "Uploaded"
msgstr "Nahrané"
msgid "XY Move Speed (mm/s)"
msgstr "Rychlost pohybu XY (mm/s)"
msgid "XY Speed (mm/s)"
msgstr "Rychlost XY (mm/s)"
msgid "Z Calibrate"
msgstr "Kalibrace Z"
msgid "Z Move Speed (mm/s)"
msgstr "Rychlost pohybu Z (mm/s)"
msgid "Z Speed (mm/s)"
msgstr "Rychlost pohybu Z (mm/s)"
msgid "Z Tilt"
msgstr "Z Tilt"
msgid "Z offset:"
msgstr "Z offset:"
msgid "commit"
msgid_plural "commits"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgid "dBm"
msgstr "dBm"
msgid "hour"
msgid_plural "hours"
msgstr[0] "hodina"
msgstr[1] "hodiny"
msgstr[2] "hodin"
msgid "minutes"
msgstr "min"
msgid "mm"
msgstr "mm"
msgid "mm/s"
msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "Decrease"
#~ msgstr "Snížit"
#~ msgid "Increase"
#~ msgstr "Zvětšit"
#, python-format
#~ msgid "Sending Power ON signal to: %s"
#~ msgstr "Odeslat ZAP do %s"
Binary file not shown.
@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: SRBJ\n" "Last-Translator: SRBJ\n"
"Language-Team: \n" "Language-Team: \n"
@@ -11,7 +11,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -41,9 +41,6 @@ msgstr "OK"
msgid "Actions" msgid "Actions"
msgstr "Muligheder" msgstr "Muligheder"
msgid "Add Printer"
msgstr "Tilføj printer"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -107,10 +104,7 @@ msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibreret, gem konfiguration for at gøre den permanent" msgstr "Kalibreret, gem konfiguration for at gøre den permanent"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr "Kalibrerer"
msgid "Calibrating..."
msgstr "Kalibrerer..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Kan ikke indstilles over maksimum:" msgstr "Kan ikke indstilles over maksimum:"
@@ -207,6 +201,9 @@ msgstr "Metode til beregning af tid"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Ekstrudér" msgstr "Ekstrudér"
@@ -312,9 +309,6 @@ msgstr "Ikon-tema"
msgid "Increase" msgid "Increase"
msgstr "Forøg" msgstr "Forøg"
msgid "Initializing"
msgstr "Initialiserer"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Initialiserer printer..." msgstr "Initialiserer printer..."
@@ -327,6 +321,9 @@ msgstr "Interface"
msgid "Invalid" msgid "Invalid"
msgstr "Ugyldig" msgstr "Ugyldig"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Invertér X" msgstr "Invertér X"
@@ -354,6 +351,9 @@ msgstr "Klipper forsøger at starte"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper vil genstarte" msgstr "Klipper vil genstarte"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen vil genstarte"
msgid "Language" msgid "Language"
msgstr "Sprog" msgstr "Sprog"
@@ -396,6 +396,9 @@ msgstr "Maks. acceleration til decceleration"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Maks. hastighed" msgstr "Maks. hastighed"
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -515,12 +518,18 @@ msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilnavn:" msgstr "Profilnavn:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Justering af 4-søjlers konstruktion" msgstr "Justering af 4-søjlers konstruktion"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Hæv Nozzle" msgstr "Hæv Nozzle"
msgid "Recover"
msgstr "Nulstil"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Nulstil alt" msgstr "Nulstil alt"
@@ -554,10 +563,6 @@ msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr "Prøv igen #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -571,7 +576,7 @@ msgid "Save Z"
msgstr "Gem Z" msgstr "Gem Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "Gem Konfiguration" msgstr "Gem Konfiguration?"
msgid "Saved" msgid "Saved"
msgstr "Gemt" msgstr "Gemt"
@@ -629,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Lille" msgstr "Lille"
msgid "Sort:"
msgstr "Sortere: "
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Hastighed (mm/s)" msgstr "Hastighed (mm/s)"
@@ -642,7 +644,7 @@ msgid "Speed -"
msgstr "Hastighed -" msgstr "Hastighed -"
msgid "Speed:" msgid "Speed:"
msgstr "Hastighed" msgstr "Hastighed:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Hastighed for 90° hjørne" msgstr "Hastighed for 90° hjørne"
@@ -674,10 +676,6 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatur" msgstr "Temperatur"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "KlipperScreen skal genstartes for at anvende %s"
msgid "Total:" msgid "Total:"
msgstr "Total:" msgstr "Total:"
@@ -708,24 +706,12 @@ msgstr "Opdatering"
msgid "Uploaded" msgid "Uploaded"
msgstr "Uploadet" msgstr "Uploadet"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY Flyt hastighed (mm/s)" msgstr "XY Flyt hastighed (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY Hastighed (mm/s)" msgstr "XY Hastighed (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Kalibrér Z" msgstr "Kalibrér Z"
@@ -741,12 +727,6 @@ msgstr "Z-tilt"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "ændring" msgstr[0] "ændring"
@@ -772,6 +752,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "Sortere: "
#~ msgid "Calibrating..."
#~ msgstr "Kalibrerer..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Prøv igen #%s"
#~ msgid "Add Printer"
#~ msgstr "Tilføj printer"
#~ msgid "Initializing"
#~ msgstr "Initialiserer"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Slet" #~ msgstr "Slet"
Binary file not shown.
@@ -7,16 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-03-31 10:43-0300\n" "PO-Revision-Date: 2022-11-30 18:10-0300\n"
"Last-Translator: \n" "Last-Translator: livinhack\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de_DE\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -32,7 +32,7 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "Ein FIRMWARE_RESTART kann das Problem beheben." msgstr "Ein FIRMWARE_RESTART kann das Problem beheben."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL nicht konfiguriert"
msgid "Abort" msgid "Abort"
msgstr "Abbrechen" msgstr "Abbrechen"
@@ -46,25 +46,22 @@ msgstr "OK"
msgid "Actions" msgid "Actions"
msgstr "Aktionen" msgstr "Aktionen"
msgid "Add Printer"
msgstr "Drucker hinzufügen"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr "Profil hinzufügen"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Anwenden"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "%.2f Offset auf Endstop anwenden?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr "%s%.2f Offset auf Sonde anwenden?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Möchten Sie das Objekt wirklich ausschließen?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Sind Sie sicher, dass Sie Not-Aus ausführen möchten?" msgstr "Sind Sie sicher, dass Sie Not-Aus ausführen möchten?"
@@ -88,7 +85,7 @@ msgid "Auto-calibrate"
msgstr "Automatisch kalibrieren" msgstr "Automatisch kalibrieren"
msgid "Auto-close notifications" msgid "Auto-close notifications"
msgstr "" msgstr "Benachrichtigungen automatisch schließen"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -100,7 +97,7 @@ msgid "Bed Mesh"
msgstr "Druckbett Mesh-Level" msgstr "Druckbett Mesh-Level"
msgid "Bed screw configuration:" msgid "Bed screw configuration:"
msgstr "" msgstr "Bettschraubenkonfiguration:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Höheneinstellung" msgstr "Höheneinstellung"
@@ -109,13 +106,10 @@ msgid "Calibrated"
msgstr "Kalibriert" msgstr "Kalibriert"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibriert, Konfiguration speichern, um sie dauerhaft zu machen" msgstr "Kalibriert, Konfiguration dauerhaft speichern"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr "Kalibrieren"
msgid "Calibrating..."
msgstr "Kalibrieren..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Kann nicht über dem Maximum eingestellt werden:" msgstr "Kann nicht über dem Maximum eingestellt werden:"
@@ -139,10 +133,10 @@ msgid "Channel"
msgstr "Kanal" msgstr "Kanal"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "Überprüfen Sie die ADXL-Verkabelung"
msgid "Checking for updates, please wait..." msgid "Checking for updates, please wait..."
msgstr "" msgstr "Suche nach Updates, bitte warten..."
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -182,7 +176,7 @@ msgid "Decrease"
msgstr "Verringern" msgstr "Verringern"
msgid "Delete File?" msgid "Delete File?"
msgstr "" msgstr "Datei löschen?"
msgid "Deselect" msgid "Deselect"
msgstr "Abwählen" msgstr "Abwählen"
@@ -210,7 +204,10 @@ msgid "Estimated Time Method"
msgstr "Druckzeit" msgstr "Druckzeit"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr "Objekt ausschließen"
msgid "Extra Large"
msgstr "Extra groß"
msgid "Extrude" msgid "Extrude"
msgstr "Filament fördern" msgstr "Filament fördern"
@@ -252,28 +249,28 @@ msgid "Fine Tuning"
msgstr "Feintuning" msgstr "Feintuning"
msgid "Finish" msgid "Finish"
msgstr "Ziel" msgstr "Fertig"
msgid "Firmware Restart" msgid "Firmware Restart"
msgstr "Firmware Neu starten" msgstr "Firmware Neustart"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Fluss:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Fließrate:"
msgid "Font Size" msgid "Font Size"
msgstr "Schriftgröße" msgstr "Schriftgröße"
msgid "Full Update" msgid "Full Update"
msgstr "Voll Aktualisieren" msgstr "Vollständige Aktualisierung"
msgid "Go Back" msgid "Go Back"
msgstr "Zurück" msgstr "Zurück"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Höhe:"
msgid "Hidden" msgid "Hidden"
msgstr "Versteckt" msgstr "Versteckt"
@@ -285,7 +282,7 @@ msgid "Hide sensors in Temp."
msgstr "Sensoren in Temp ausblenden." msgstr "Sensoren in Temp ausblenden."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Temp. ausblenden"
msgid "Home All" msgid "Home All"
msgstr "Alle Achsen zurücksetzen" msgstr "Alle Achsen zurücksetzen"
@@ -306,7 +303,7 @@ msgid "Homing"
msgstr "Grundposition" msgstr "Grundposition"
msgid "Host" msgid "Host"
msgstr "" msgstr "Host"
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Hostname"
@@ -317,14 +314,11 @@ msgstr "Icon Theme"
msgid "Increase" msgid "Increase"
msgstr "Erhöhen" msgstr "Erhöhen"
msgid "Initializing"
msgstr "Startvorgang"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Drucker wird initialisiert..." msgstr "Drucker wird initialisiert..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Input Shaper"
msgid "Interface" msgid "Interface"
msgstr "Interface" msgstr "Interface"
@@ -332,6 +326,9 @@ msgstr "Interface"
msgid "Invalid" msgid "Invalid"
msgstr "Ungültig" msgstr "Ungültig"
msgid "Invalid password"
msgstr "Ungültiges Passwort"
msgid "Invert X" msgid "Invert X"
msgstr "Achse X invertieren" msgstr "Achse X invertieren"
@@ -342,10 +339,10 @@ msgid "Invert Z"
msgstr "Achse Z invertieren" msgstr "Achse Z invertieren"
msgid "Klipper Restart" msgid "Klipper Restart"
msgstr "Klipper Neu starten" msgstr "Klipper Neustart"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper nicht verbunden" msgstr "Verbindung zu Klipper getrennt"
msgid "Klipper has encountered an error." msgid "Klipper has encountered an error."
msgstr "Klipper hat einen Fehler festgestellt." msgstr "Klipper hat einen Fehler festgestellt."
@@ -359,6 +356,9 @@ msgstr "Klipper ist startbereit"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper startet neu" msgstr "Klipper startet neu"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen startet neu"
msgid "Language" msgid "Language"
msgstr "Sprache" msgstr "Sprache"
@@ -366,7 +366,7 @@ msgid "Large"
msgstr "Groß" msgstr "Groß"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Schicht:"
msgid "Left:" msgid "Left:"
msgstr "Restzeit:" msgstr "Restzeit:"
@@ -390,7 +390,7 @@ msgid "Main Menu"
msgstr "Hauptmenü" msgstr "Hauptmenü"
msgid "Max" msgid "Max"
msgstr "" msgstr "Max"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Max Beschleunigung" msgstr "Max Beschleunigung"
@@ -401,14 +401,17 @@ msgstr "Max Verzögerung"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Max Geschwindigkeit" msgstr "Max Geschwindigkeit"
msgid "Maximum"
msgstr "Maximal"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Beides messen"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "Messen Sie X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Messen Sie Y"
msgid "Medium" msgid "Medium"
msgstr "Mittel" msgstr "Mittel"
@@ -417,7 +420,7 @@ msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Mesh kalibrieren"
msgid "Modified" msgid "Modified"
msgstr "Modifiziert" msgstr "Modifiziert"
@@ -438,7 +441,7 @@ msgid "Network"
msgstr "Netzwerk" msgstr "Netzwerk"
msgid "Never" msgid "Never"
msgstr "" msgstr "Niemals"
msgid "New" msgid "New"
msgstr "Neu" msgstr "Neu"
@@ -447,6 +450,8 @@ msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen." "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf" "conf"
msgstr "" msgstr ""
"Wird für die automatische Erkennung nicht unterstützt, muss in klipperscreen."
"conf konfiguriert werden"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nichts ausgewählt" msgstr "Nichts ausgewählt"
@@ -464,7 +469,7 @@ msgstr[0] "Paket wird aktualisiert"
msgstr[1] "Pakete werden aktualisiert" msgstr[1] "Pakete werden aktualisiert"
msgid "Part Fan" msgid "Part Fan"
msgstr "" msgstr "Bauteil Lüfter"
msgid "Password saved" msgid "Password saved"
msgstr "Passwort gespeichert" msgstr "Passwort gespeichert"
@@ -479,7 +484,7 @@ msgid "Perform a full upgrade?"
msgstr "Vollständiges Upgrade durchführen?" msgstr "Vollständiges Upgrade durchführen?"
msgid "Pins" msgid "Pins"
msgstr "" msgstr "Pins"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Please recompile and flash the micro-controller." msgstr "Please recompile and flash the micro-controller."
@@ -491,7 +496,7 @@ msgid "Power On Printer"
msgstr "Drucker einschalten" msgstr "Drucker einschalten"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Druckvorlauf:"
msgid "Print" msgid "Print"
msgstr "Druck" msgstr "Druck"
@@ -503,40 +508,46 @@ msgid "Print Time"
msgstr "Druckzeit" msgstr "Druckzeit"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Drucker"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Drucker Verbindungen" msgstr "Drucker Verbindungen"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Wählen Sie einen Drucker"
msgid "Printing" msgid "Printing"
msgstr "Drucken" msgstr "Drucken"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Sonden-Offset"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilname:" msgstr "Profilname:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Quad Gantry Level" msgstr "Quad Gantry Level"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Düse anheben" msgstr "Düse anheben"
msgid "Recover"
msgstr "Rücksetzen"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Rücksetzen Hard" msgstr "Rücksetzen (Hard)"
msgid "Recover Soft" msgid "Recover Soft"
msgstr "Rücksetzen Soft" msgstr "Rücksetzen (Soft)"
msgid "Reference" msgid "Reference"
msgstr "Referenz" msgstr "Referenz"
msgid "Refresh" msgid "Refresh"
msgstr "" msgstr "Aktualisieren"
msgid "Restart" msgid "Restart"
msgstr "Neustart" msgstr "Neustart"
@@ -557,14 +568,10 @@ msgid "Retraction Speed"
msgstr "Rückzugsgeschwindigkeit" msgstr "Rückzugsgeschwindigkeit"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Wiederholen"
#, python-format
msgid "Retry #%s"
msgstr "Wiederholen #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr "Wiederhole"
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
@@ -573,17 +580,17 @@ msgid "Save Config"
msgstr "Einstellungen speichern" msgstr "Einstellungen speichern"
msgid "Save Z" msgid "Save Z"
msgstr "Speichern Sie Z" msgstr "Z speichern"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "Konfiguration speichern?" msgstr "Konfiguration speichern?"
msgid "Saved" msgid "Saved"
msgstr "Gerettet" msgstr "Gespeichert"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Gespeicherter Versatz: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Bildschirm-DPMS" msgstr "Bildschirm-DPMS"
@@ -614,10 +621,10 @@ msgid "Show"
msgstr "Zeigen" msgstr "Zeigen"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Heizleistung anzeigen"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Ausschalten"
msgid "Size" msgid "Size"
msgstr "Größe" msgstr "Größe"
@@ -629,14 +636,11 @@ msgid "Slicer Time correction (%)"
msgstr "Slicer-Zeitkorrektur (%)" msgstr "Slicer-Zeitkorrektur (%)"
msgid "Slicer:" msgid "Slicer:"
msgstr "" msgstr "Slicer:"
msgid "Small" msgid "Small"
msgstr "Klein" msgstr "Klein"
msgid "Sort:"
msgstr "Sortieren: "
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Geschwindigkeit (mm/s)" msgstr "Geschwindigkeit (mm/s)"
@@ -656,7 +660,7 @@ msgid "Start"
msgstr "Starten" msgstr "Starten"
msgid "Starting WiFi Association" msgid "Starting WiFi Association"
msgstr "Wi-Fi Association starten" msgstr "Wi-Fi Verbindung starten"
msgid "Starting recovery for" msgid "Starting recovery for"
msgstr "Starte Wiederherstellung für" msgstr "Starte Wiederherstellung für"
@@ -679,10 +683,6 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatur" msgstr "Temperatur"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Zum Übernehmen von %s benötigt Klipperscreen einen Neustart"
msgid "Total:" msgid "Total:"
msgstr "Gesamt:" msgstr "Gesamt:"
@@ -690,16 +690,16 @@ msgid "Unknown Heater"
msgstr "Unbekannte Heizung" msgstr "Unbekannte Heizung"
msgid "Unknown screw position" msgid "Unknown screw position"
msgstr "" msgstr "Unbekannte Schraubenposition"
msgid "Unload" msgid "Unload"
msgstr "Entladen" msgstr "Entladen"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr "Überlänge ausfahren"
msgid "Unretract Speed" msgid "Unretract Speed"
msgstr "" msgstr "Ausfahrgeschwindigkeit"
# Respect the number of characters # Respect the number of characters
# english text barely fits in small screens # english text barely fits in small screens
@@ -710,29 +710,17 @@ msgid "Update"
msgstr "Update" msgstr "Update"
msgid "Updating" msgid "Updating"
msgstr "Aktualisierung" msgstr "Aktualisiere"
msgid "Uploaded" msgid "Uploaded"
msgstr "Hochgeladen" msgstr "Hochgeladen"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY Bewegungsgeschwindigkeit (mm/s)" msgstr "XY Bewegungsgeschwindigkeit (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY Geschwindigkeit (mm/s)" msgstr "XY Geschwindigkeit (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Höhe Kalibrieren" msgstr "Höhe Kalibrieren"
@@ -748,12 +736,6 @@ msgstr "Z-Achse ausrichten"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z Offset:" msgstr "Z Offset:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "Änderung" msgstr[0] "Änderung"
@@ -779,6 +761,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "Sortieren:"
#~ msgid "Calibrating..."
#~ msgstr "Kalibrieren..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Wiederholen #%s"
#~ msgid "Add Printer"
#~ msgstr "Drucker hinzufügen"
#~ msgid "Initializing"
#~ msgstr "Startvorgang"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Löschen" #~ msgstr "Löschen"
@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -41,9 +41,6 @@ msgstr ""
msgid "Actions" msgid "Actions"
msgstr "" msgstr ""
msgid "Add Printer"
msgstr ""
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -109,9 +106,6 @@ msgstr ""
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "" msgstr ""
@@ -207,6 +201,9 @@ msgstr ""
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "" msgstr ""
@@ -312,9 +309,6 @@ msgstr ""
msgid "Increase" msgid "Increase"
msgstr "" msgstr ""
msgid "Initializing"
msgstr ""
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "" msgstr ""
@@ -327,6 +321,9 @@ msgstr ""
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "" msgstr ""
@@ -354,6 +351,9 @@ msgstr ""
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "" msgstr ""
msgid "KlipperScreen will reboot"
msgstr ""
msgid "Language" msgid "Language"
msgstr "" msgstr ""
@@ -396,6 +396,9 @@ msgstr ""
msgid "Max Velocity" msgid "Max Velocity"
msgstr "" msgstr ""
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -515,12 +518,18 @@ msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "" msgstr ""
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "" msgstr ""
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "" msgstr ""
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "" msgstr ""
@@ -554,10 +563,6 @@ msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr ""
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -629,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "" msgstr ""
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "" msgstr ""
@@ -674,10 +676,6 @@ msgstr ""
msgid "Temperature" msgid "Temperature"
msgstr "" msgstr ""
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr ""
msgid "Total:" msgid "Total:"
msgstr "" msgstr ""
@@ -708,24 +706,12 @@ msgstr ""
msgid "Uploaded" msgid "Uploaded"
msgstr "" msgstr ""
msgid "X+"
msgstr ""
msgid "X-"
msgstr ""
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "" msgstr ""
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr ""
msgid "Y+"
msgstr ""
msgid "Y-"
msgstr ""
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "" msgstr ""
@@ -741,12 +727,6 @@ msgstr ""
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr ""
msgid "Z-"
msgstr ""
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "" msgstr[0] ""
@@ -771,3 +751,6 @@ msgstr ""
msgid "mm/s²" msgid "mm/s²"
msgstr "" msgstr ""
msgid "mm³/s"
msgstr ""
Binary file not shown.
@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-11-12 11:20-0300\n" "PO-Revision-Date: 2022-11-30 18:10-0300\n"
"Last-Translator: alfrix\n" "Last-Translator: alfrix\n"
"Language-Team: \n" "Language-Team: \n"
"Language: es\n" "Language: es\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,9 +46,6 @@ msgstr "Aceptar"
msgid "Actions" msgid "Actions"
msgstr "Acciones" msgstr "Acciones"
msgid "Add Printer"
msgstr "Agregar impresora"
msgid "Add profile" msgid "Add profile"
msgstr "Agregar perfil" msgstr "Agregar perfil"
@@ -114,9 +111,6 @@ msgstr "Calibrado, guarde su configuración para hacerlo permanente"
msgid "Calibrating" msgid "Calibrating"
msgstr "Calibrando" msgstr "Calibrando"
msgid "Calibrating..."
msgstr "Calibrando..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Error: Valor sobre el máximo:" msgstr "Error: Valor sobre el máximo:"
@@ -212,6 +206,9 @@ msgstr "Método para estimar tiempo"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "Excluir Objeto" msgstr "Excluir Objeto"
msgid "Extra Large"
msgstr "Extra Grande"
msgid "Extrude" msgid "Extrude"
msgstr "Extruir" msgstr "Extruir"
@@ -317,9 +314,6 @@ msgstr "Tema de Iconos"
msgid "Increase" msgid "Increase"
msgstr "Aumentar" msgstr "Aumentar"
msgid "Initializing"
msgstr "Iniciando"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Iniciando Impresora..." msgstr "Iniciando Impresora..."
@@ -332,6 +326,9 @@ msgstr "Interfaz"
msgid "Invalid" msgid "Invalid"
msgstr "Invalido" msgstr "Invalido"
msgid "Invalid password"
msgstr "Contraseña invalida"
msgid "Invert X" msgid "Invert X"
msgstr "Invertir X" msgstr "Invertir X"
@@ -359,6 +356,9 @@ msgstr "Klipper está intentando iniciar"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper se reiniciará" msgstr "Klipper se reiniciará"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen se reiniciará"
msgid "Language" msgid "Language"
msgstr "Idioma" msgstr "Idioma"
@@ -401,6 +401,9 @@ msgstr "Max. Aceleración a Desaceleración"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Max. Velocidad" msgstr "Max. Velocidad"
msgid "Maximum"
msgstr "Maximo"
msgid "Measure Both" msgid "Measure Both"
msgstr "Medir Ambos" msgstr "Medir Ambos"
@@ -522,12 +525,18 @@ msgstr "Desfase del sensor"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nombre del perfil:" msgstr "Nombre del perfil:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr "Provea KlipperScreen.log cuando pida ayuda.\n"
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Nivelación cuádruple" msgstr "Nivelación cuádruple"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Levantar Boquilla" msgstr "Levantar Boquilla"
msgid "Recover"
msgstr "Recuperar"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Recuperar Hard" msgstr "Recuperar Hard"
@@ -561,10 +570,6 @@ msgstr "Velocidad de Retracción"
msgid "Retry" msgid "Retry"
msgstr "Reintentar" msgstr "Reintentar"
#, python-format
msgid "Retry #%s"
msgstr "Intento #%s"
msgid "Retrying" msgid "Retrying"
msgstr "Reintentando" msgstr "Reintentando"
@@ -636,9 +641,6 @@ msgstr "Slicer:"
msgid "Small" msgid "Small"
msgstr "Pequeño" msgstr "Pequeño"
msgid "Sort:"
msgstr "Ordenar:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Velocidad (mm/s)" msgstr "Velocidad (mm/s)"
@@ -681,10 +683,6 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatura" msgstr "Temperatura"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Para aplicar %s KlipperScreen necesita reiniciarse"
msgid "Total:" msgid "Total:"
msgstr "Total:" msgstr "Total:"
@@ -715,24 +713,12 @@ msgstr "Actualizando"
msgid "Uploaded" msgid "Uploaded"
msgstr "Subido" msgstr "Subido"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Velocidad XY (mm/s)" msgstr "Velocidad XY (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY Velocidad (mm/s)" msgstr "XY Velocidad (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Calibrar Z" msgstr "Calibrar Z"
@@ -748,12 +734,6 @@ msgstr "Inclinación Z"
msgid "Z offset:" msgid "Z offset:"
msgstr "Desfase Z:" msgstr "Desfase Z:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "cambio" msgstr[0] "cambio"
@@ -779,6 +759,46 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "KlipperScreen will be restarted"
#~ msgstr "KlipperScreen se reiniciará"
#~ msgid "Sort:"
#~ msgstr "Ordenar:"
#~ msgid "Calibrating..."
#~ msgstr "Calibrando..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Intento #%s"
#~ msgid "Add Printer"
#~ msgstr "Agregar impresora"
#~ msgid "Initializing"
#~ msgstr "Iniciando"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Borrar" #~ msgstr "Borrar"
Binary file not shown.
@@ -7,16 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-03-31 10:50-0300\n" "PO-Revision-Date: 2022-11-30 18:11-0300\n"
"Last-Translator: O. Robardet\n" "Last-Translator: O. Robardet\n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr_FR\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -32,7 +32,7 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "Un FIRMWARE_RESTART peut résoudre le problème." msgstr "Un FIRMWARE_RESTART peut résoudre le problème."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL non configuré"
msgid "Abort" msgid "Abort"
msgstr "Annuler" msgstr "Annuler"
@@ -46,64 +46,61 @@ msgstr "Accepter"
msgid "Actions" msgid "Actions"
msgstr "Actions" msgstr "Actions"
msgid "Add Printer"
msgstr "Ajouter une imprimante"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr "Ajouter un profil"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Appliquer"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "Appliquer un décalage de %.2f au Endstop ?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr "Appliquer un décalage de %s%.2f au palpeur ?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Êtes-vous sûr de vouloir exclure l’objet ?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Êtes-vous sûr de vouloir exécuter l'arrêt d'urgence?" msgstr "Êtes-vous sûr de vouloir exécuter l'arrêt d'urgence ?"
msgid "Are you sure you wish to cancel this print?" msgid "Are you sure you wish to cancel this print?"
msgstr "Êtes-vous sûr de vouloir annuler cette impression?" msgstr "Êtes-vous sûr de vouloir annuler cette impression ?"
msgid "Are you sure you wish to disable motors?" msgid "Are you sure you wish to disable motors?"
msgstr "Voulez-vous vraiment désactiver les moteurs ?" msgstr "Voulez-vous vraiment désactiver les moteurs ?"
msgid "Are you sure you wish to reboot the system?" msgid "Are you sure you wish to reboot the system?"
msgstr "Êtes-vous sûr de vouloir redémarrer le système?" msgstr "Êtes-vous sûr de vouloir redémarrer le système ?"
msgid "Are you sure you wish to shutdown the system?" msgid "Are you sure you wish to shutdown the system?"
msgstr "Êtes-vous sûr de vouloir arrêter le système?" msgstr "Êtes-vous sûr de vouloir arrêter le système ?"
msgid "Auto" msgid "Auto"
msgstr "Auto" msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Calibrage automatique" msgstr "Calibration Automatique"
msgid "Auto-close notifications" msgid "Auto-close notifications"
msgstr "" msgstr "Fermeture automatique des notifications"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Défilement automatique"
msgid "Bed Level" msgid "Bed Level"
msgstr "Nivelage du plateau" msgstr "Nivellement"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Maillage du plateau" msgstr "Maillage du plateau"
msgid "Bed screw configuration:" msgid "Bed screw configuration:"
msgstr "" msgstr "Configuration des vis:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Étalonner" msgstr "Calibrer"
msgid "Calibrated" msgid "Calibrated"
msgstr "Calibré" msgstr "Calibré"
@@ -112,10 +109,7 @@ msgid "Calibrated, save configuration to make it permanent"
msgstr "Calibré, enregistrez la configuration pour la rendre permanente" msgstr "Calibré, enregistrez la configuration pour la rendre permanente"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr "Calibrage"
msgid "Calibrating..."
msgstr "Calibrage..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Impossible de définir au-dessus du maximum:" msgstr "Impossible de définir au-dessus du maximum:"
@@ -127,7 +121,7 @@ msgid "Cancel Print"
msgstr "Annuler l'impression" msgstr "Annuler l'impression"
msgid "Cancelled" msgid "Cancelled"
msgstr "Annulé" msgstr "Annulée"
msgid "Cancelling" msgid "Cancelling"
msgstr "Annulation" msgstr "Annulation"
@@ -139,19 +133,19 @@ msgid "Channel"
msgstr "Canal" msgstr "Canal"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "Vérifier le câblage ADXL"
msgid "Checking for updates, please wait..." msgid "Checking for updates, please wait..."
msgstr "" msgstr "Recherche de mises à jour, veuillez patienter..."
msgid "Clear" msgid "Clear"
msgstr "" msgstr "Effacer"
msgid "Close" msgid "Close"
msgstr "Fermer" msgstr "Fermer"
msgid "Complete" msgid "Complete"
msgstr "Finalisé" msgstr "Impression terminée"
msgid "Configuration" msgid "Configuration"
msgstr "Configuration" msgstr "Configuration"
@@ -182,7 +176,7 @@ msgid "Decrease"
msgstr "Diminuer" msgstr "Diminuer"
msgid "Delete File?" msgid "Delete File?"
msgstr "" msgstr "Supprimer le fichier ?"
msgid "Deselect" msgid "Deselect"
msgstr "Désélectionner" msgstr "Désélectionner"
@@ -207,13 +201,16 @@ msgid "Error"
msgstr "Erreur" msgstr "Erreur"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Méthode d'estimation du temps" msgstr "Méthode d'estimation de la durée"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr "Exclure Objet"
msgid "Extra Large"
msgstr "Extra Grande"
msgid "Extrude" msgid "Extrude"
msgstr "Extruder" msgstr "Extrusion"
msgid "Extrusion +" msgid "Extrusion +"
msgstr "Extrusion +" msgstr "Extrusion +"
@@ -225,13 +222,13 @@ msgid "Failed, adjust position first"
msgstr "Échec, ajustez d'abord la position" msgstr "Échec, ajustez d'abord la position"
msgid "Fan" msgid "Fan"
msgstr "Ventilateur" msgstr "Ventilation"
msgid "Filament Used" msgid "Filament Used"
msgstr "Filament utilisé" msgstr "Filament utilisé"
msgid "Filament total:" msgid "Filament total:"
msgstr "Total de filaments:" msgstr "Total filament:"
msgid "Filament used:" msgid "Filament used:"
msgstr "Filament utilisé:" msgstr "Filament utilisé:"
@@ -246,46 +243,46 @@ msgid "File:"
msgstr "Fichier:" msgstr "Fichier:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "Recherche de l’ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Réglages fins" msgstr "Réglages précis"
msgid "Finish" msgid "Finish"
msgstr "Fin" msgstr "Terminée"
msgid "Firmware Restart" msgid "Firmware Restart"
msgstr "Micrologiciel Redémarrage" msgstr "Redémarrer Firmware"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Flux:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Débit:"
msgid "Font Size" msgid "Font Size"
msgstr "Taille de police" msgstr "Taille de la police"
msgid "Full Update" msgid "Full Update"
msgstr "Plein Mettre à jour" msgstr "Mettre à jour"
msgid "Go Back" msgid "Go Back"
msgstr "Retourner" msgstr "Retour"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Hauteur:"
msgid "Hidden" msgid "Hidden"
msgstr "Caché" msgstr "Masqué"
msgid "Hide" msgid "Hide"
msgstr "Cacher" msgstr "Masquer"
msgid "Hide sensors in Temp." msgid "Hide sensors in Temp."
msgstr "Masquer les capteurs dans Temp." msgstr "Masquer les capteurs dans Températures"
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Masquer temp."
msgid "Home All" msgid "Home All"
msgstr "Origine XYZ" msgstr "Origine XYZ"
@@ -306,25 +303,22 @@ msgid "Homing"
msgstr "Origine" msgstr "Origine"
msgid "Host" msgid "Host"
msgstr "" msgstr "Hôte"
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Nom d’hôte"
msgid "Icon Theme" msgid "Icon Theme"
msgstr "Thème icônes" msgstr "Thème"
msgid "Increase" msgid "Increase"
msgstr "Augmenter" msgstr "Augmenter"
msgid "Initializing"
msgstr "Initialisation"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Démarrage de l'imprimante..." msgstr "Démarrage de l'imprimante..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Input Shaper"
msgid "Interface" msgid "Interface"
msgstr "Interface" msgstr "Interface"
@@ -332,17 +326,20 @@ msgstr "Interface"
msgid "Invalid" msgid "Invalid"
msgstr "Invalide" msgstr "Invalide"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Inverser X" msgstr "Inverser l'axe X"
msgid "Invert Y" msgid "Invert Y"
msgstr "Inverser Y" msgstr "Inverser l'axe Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Inverser Z" msgstr "Inverser l'axe Z"
msgid "Klipper Restart" msgid "Klipper Restart"
msgstr "Klipper Redémarrage" msgstr "Redémarrer Klipper"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper s'est déconnecté" msgstr "Klipper s'est déconnecté"
@@ -359,14 +356,17 @@ msgstr "Klipper tente de démarrer"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper va redémarrer" msgstr "Klipper va redémarrer"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen va redémarrer"
msgid "Language" msgid "Language"
msgstr "Langue" msgstr "Langue"
msgid "Large" msgid "Large"
msgstr "Grand" msgstr "Grande"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Couche:"
msgid "Left:" msgid "Left:"
msgstr "Restant:" msgstr "Restant:"
@@ -381,7 +381,7 @@ msgid "Lower Nozzle"
msgstr "Rapprocher la buse" msgstr "Rapprocher la buse"
msgid "Macro shortcut on sidebar" msgid "Macro shortcut on sidebar"
msgstr "Raccourci macro sur la barre latérale" msgstr "Raccourci des Macros sur la barre latérale"
msgid "Macros" msgid "Macros"
msgstr "Macros" msgstr "Macros"
@@ -390,40 +390,43 @@ msgid "Main Menu"
msgstr "Menu principal" msgstr "Menu principal"
msgid "Max" msgid "Max"
msgstr "" msgstr "Max"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Accélération Max" msgstr "Accélération maximale"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Accélération maximale à décélération" msgstr "Accélération à décélération maximale"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Vélocité maximale" msgstr "Vélocité maximale"
msgid "Maximum"
msgstr "Maximum"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Mesurer les deux"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "Mesure X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Mesure Y"
msgid "Medium" msgid "Medium"
msgstr "Moyen" msgstr "Moyenne"
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Calibration du maillage"
msgid "Modified" msgid "Modified"
msgstr "Modifié" msgstr "Modifié"
msgid "Moonraker: connected" msgid "Moonraker: connected"
msgstr "Moonraker : connecté" msgstr "Moonraker: connecté"
msgid "Move" msgid "Move"
msgstr "Mouvement" msgstr "Mouvement"
@@ -438,7 +441,7 @@ msgid "Network"
msgstr "Réseau" msgstr "Réseau"
msgid "Never" msgid "Never"
msgstr "" msgstr "Jamais"
msgid "New" msgid "New"
msgstr "Nouveau" msgstr "Nouveau"
@@ -447,13 +450,15 @@ msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen." "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf" "conf"
msgstr "" msgstr ""
"Non pris en charge pour la détection automatique, il doit être configuré "
"dans klipperscreen.conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Rien de sélectionné" msgstr "Rien de sélectionné"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Obsolète de %d" msgstr "Obsolète par %d"
msgid "PSK for" msgid "PSK for"
msgstr "PSK pour" msgstr "PSK pour"
@@ -461,10 +466,10 @@ msgstr "PSK pour"
msgid "Package will be updated" msgid "Package will be updated"
msgid_plural "Packages will be updated" msgid_plural "Packages will be updated"
msgstr[0] "Le paquet sera mis à jour" msgstr[0] "Le paquet sera mis à jour"
msgstr[1] "Forfaits seront mis à jour" msgstr[1] "Les paquets seront mis à jour"
msgid "Part Fan" msgid "Part Fan"
msgstr "" msgstr "Ventilateurs de refroidissement"
msgid "Password saved" msgid "Password saved"
msgstr "Mot de passe enregistré" msgstr "Mot de passe enregistré"
@@ -479,7 +484,7 @@ msgid "Perform a full upgrade?"
msgstr "Effectuer une mise à jour complète ?" msgstr "Effectuer une mise à jour complète ?"
msgid "Pins" msgid "Pins"
msgstr "" msgstr "Pins"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Veuillez recompiler et flasher le microcontrôleur." msgstr "Veuillez recompiler et flasher le microcontrôleur."
@@ -491,7 +496,7 @@ msgid "Power On Printer"
msgstr "Allumer l'imprimante" msgstr "Allumer l'imprimante"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Pressure Advance:"
msgid "Print" msgid "Print"
msgstr "Imprimer" msgstr "Imprimer"
@@ -500,43 +505,49 @@ msgid "Print Control"
msgstr "Contrôle de l'impression" msgstr "Contrôle de l'impression"
msgid "Print Time" msgid "Print Time"
msgstr "Temps d'impression" msgstr "Durée d'impression"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Imprimante"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Connexions aux imprimantes" msgstr "Connexions aux imprimantes"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Sélection d'une imprimante"
msgid "Printing" msgid "Printing"
msgstr "Impression" msgstr "Impression"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Décalage du palpeur"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nom de profil:" msgstr "Nom du profil:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Portique à quatre niveaux" msgstr "Portique à quatre niveaux"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Éloigner la buse" msgstr "Eloigner la buse"
msgid "Recover"
msgstr "Récupération"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Récupération \"--hard\"" msgstr "Récupération Hard"
msgid "Recover Soft" msgid "Recover Soft"
msgstr "Récupérer \"--soft\"" msgstr "Récupération Soft"
msgid "Reference" msgid "Reference"
msgstr "Référence" msgstr "Référence"
msgid "Refresh" msgid "Refresh"
msgstr "" msgstr "Rafraîchir"
msgid "Restart" msgid "Restart"
msgstr "Redémarrer" msgstr "Redémarrer"
@@ -551,39 +562,35 @@ msgid "Retraction"
msgstr "Rétraction" msgstr "Rétraction"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "Longueur de rétraction" msgstr "Distance de rétraction"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Vitesse de rétraction" msgstr "Vitesse de rétraction"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Réessayer"
#, python-format
msgid "Retry #%s"
msgstr "Réessayez #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr "Réessaye"
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"
msgid "Save Config" msgid "Save Config"
msgstr "Enregistrer la config" msgstr "Enregistrer la configuration"
msgid "Save Z" msgid "Save Z"
msgstr "Enregistrer Z" msgstr "Enregistrer Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "Enregistrer la configuration?" msgstr "Enregistrer la configuration ?"
msgid "Saved" msgid "Saved"
msgstr "Enregistré" msgstr "Enregistré"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Décalage enregistré: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Écran DPMS" msgstr "Écran DPMS"
@@ -602,43 +609,40 @@ msgstr "Envoyer"
#, python-format #, python-format
msgid "Sending Power ON signal to: %s" msgid "Sending Power ON signal to: %s"
msgstr "Envoi du signal de mise sous tension à : %s" msgstr "Envoi du signal de mise sous tension à: %s"
msgid "Set Temp" msgid "Set Temp"
msgstr "Régler la temp" msgstr "Régler la température"
msgid "Settings" msgid "Settings"
msgstr "Paramètres" msgstr "Paramètres"
msgid "Show" msgid "Show"
msgstr "Montrer" msgstr "Afficher"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Afficher la puissance de chauffe"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Arrêter"
msgid "Size" msgid "Size"
msgstr "Dimension" msgstr "Taille"
msgid "Slicer" msgid "Slicer"
msgstr "Trancheur" msgstr "Slicer"
msgid "Slicer Time correction (%)" msgid "Slicer Time correction (%)"
msgstr "Correction du temps de trancheuse (%)" msgstr "Correction de la durée du slicer (%)"
msgid "Slicer:" msgid "Slicer:"
msgstr "" msgstr "Slicer:"
msgid "Small" msgid "Small"
msgstr "Petit" msgstr "Petite"
msgid "Sort:"
msgstr "Trier:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Vitesse de déplacement (mm/s)" msgstr "Vitesse (mm/s)"
msgid "Speed +" msgid "Speed +"
msgstr "Vitesse +" msgstr "Vitesse +"
@@ -668,10 +672,10 @@ msgid "System"
msgstr "Système" msgstr "Système"
msgid "System Restart" msgid "System Restart"
msgstr "Redémarrer le système" msgstr "Redémarrez le système"
msgid "System Shutdown" msgid "System Shutdown"
msgstr "Arrêt du Système" msgstr "Arrêter le système"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -679,45 +683,35 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Température" msgstr "Température"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Pour appliquer %s KlipperScreen doit être redémarré"
msgid "Total:" msgid "Total:"
msgstr "Total:" msgstr "Total:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Chauffage inconnu" msgstr "Chauffe inconnue"
msgid "Unknown screw position" msgid "Unknown screw position"
msgstr "" msgstr "Position de vis inconnue"
msgid "Unload" msgid "Unload"
msgstr "Décharger" msgstr "Décharger"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr "Longueur supplémentaire non rétractée"
msgid "Unretract Speed" msgid "Unretract Speed"
msgstr "" msgstr "Vitesse non rétractée"
msgid "Up To Date" msgid "Up To Date"
msgstr "À jour" msgstr "À jour"
msgid "Update" msgid "Update"
msgstr "Mise à jour" msgstr "Mettre à jour"
msgid "Updating" msgid "Updating"
msgstr "Mise à jour" msgstr "Mise à jour"
msgid "Uploaded" msgid "Uploaded"
msgstr "Téléchargé" msgstr "Envoyé"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Vitesse de déplacement XY (mm/s)" msgstr "Vitesse de déplacement XY (mm/s)"
@@ -725,12 +719,6 @@ msgstr "Vitesse de déplacement XY (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "Vitesse XY (mm/s)" msgstr "Vitesse XY (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Calibration Z" msgstr "Calibration Z"
@@ -744,13 +732,7 @@ msgid "Z Tilt"
msgstr "Z Tilt" msgstr "Z Tilt"
msgid "Z offset:" msgid "Z offset:"
msgstr "Décalage Z" msgstr "Décalage Z:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
@@ -762,7 +744,7 @@ msgstr "dBm"
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "heur" msgstr[0] "heure"
msgstr[1] "heures" msgstr[1] "heures"
msgid "minutes" msgid "minutes"
@@ -777,6 +759,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "Sort:"
#~ msgstr "Trier:"
#~ msgid "Calibrating..."
#~ msgstr "Calibrage..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Réessayez #%s"
#~ msgid "Add Printer"
#~ msgstr "Ajouter une imprimante"
#~ msgid "Initializing"
#~ msgstr "Initialisation"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Effacer" #~ msgstr "Effacer"
Binary file not shown.
@@ -7,17 +7,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Klipperscreen\n" "Project-Id-Version: Klipperscreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-03-31 10:54-0300\n" "PO-Revision-Date: 2022-11-30 18:11-0300\n"
"Last-Translator: Tal Rahav <talrhv1@gmail.com>\n" "Last-Translator: Tal Rahav <talrhv1@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: he_IL\n" "Language: he\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? " "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? "
"2 : 3);\n" "2 : 3);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#, python-format #, python-format
@@ -48,9 +48,6 @@ msgstr "אשר"
msgid "Actions" msgid "Actions"
msgstr "פעולות" msgstr "פעולות"
msgid "Add Printer"
msgstr "הוסף מדפסת"
msgid "Add profile" msgid "Add profile"
msgstr "הוסף פרופיל" msgstr "הוסף פרופיל"
@@ -63,7 +60,7 @@ msgstr "הוסף %.2f לתחנת קצה?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "הוסף %.2f לפרוב (בודק)?" msgstr "החל היסט של %s%.2f על בדיקה"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr ""
@@ -116,9 +113,6 @@ msgstr "מכויל, שמור את התצורה כדי שהיא תהיה קבוע
msgid "Calibrating" msgid "Calibrating"
msgstr "מכייל" msgstr "מכייל"
msgid "Calibrating..."
msgstr "מכייל..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "לא ניתן להגדיר מעל המקסימום:" msgstr "לא ניתן להגדיר מעל המקסימום:"
@@ -214,6 +208,9 @@ msgstr "שיטת זמן משוערת"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "ביטול אובייקט" msgstr "ביטול אובייקט"
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "הוצא חומר" msgstr "הוצא חומר"
@@ -319,9 +316,6 @@ msgstr "ערכת נושא"
msgid "Increase" msgid "Increase"
msgstr "הגדל" msgstr "הגדל"
msgid "Initializing"
msgstr "מאתחל"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "מאתחל מדפסת..." msgstr "מאתחל מדפסת..."
@@ -334,6 +328,9 @@ msgstr "ממשק"
msgid "Invalid" msgid "Invalid"
msgstr "לא חוקי" msgstr "לא חוקי"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "הפוך את X" msgstr "הפוך את X"
@@ -344,7 +341,7 @@ msgid "Invert Z"
msgstr "הפוך את Z" msgstr "הפוך את Z"
msgid "Klipper Restart" msgid "Klipper Restart"
msgstr "אתחול קליפר" msgstr "Klipper יאתחל מחדש"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "קליפר התנתק" msgstr "קליפר התנתק"
@@ -361,6 +358,9 @@ msgstr "קליפר מנסה לעלות"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "קליפר יבצע אתחול" msgstr "קליפר יבצע אתחול"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen יאתחל מחדש"
msgid "Language" msgid "Language"
msgstr "שפה" msgstr "שפה"
@@ -403,6 +403,9 @@ msgstr "האצה מרבית להאטה"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "מהירות מרבית" msgstr "מהירות מרבית"
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "מדוד את שניהם" msgstr "מדוד את שניהם"
@@ -524,12 +527,18 @@ msgstr "פרוב אוף-סט"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "שם פרופיל:" msgstr "שם פרופיל:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "יישור הגנטרי הריבועי" msgstr "יישור הגנטרי הריבועי"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "הגבה דיזה" msgstr "הגבה דיזה"
msgid "Recover"
msgstr "שחזור"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "שחזור מלא" msgstr "שחזור מלא"
@@ -563,10 +572,6 @@ msgstr "מהירות משיכה"
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr "נסה שוב #%s"
msgid "Retrying" msgid "Retrying"
msgstr "מנסה שוב" msgstr "מנסה שוב"
@@ -638,9 +643,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "קטן" msgstr "קטן"
msgid "Sort:"
msgstr "מיין"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "מהירות (מ\"מ/שניות)" msgstr "מהירות (מ\"מ/שניות)"
@@ -683,10 +685,6 @@ msgstr "טמפ' (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "טמפרטורה" msgstr "טמפרטורה"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "כדי ליישם %s צריך להפעיל מחדש את KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "סך הכל:" msgstr "סך הכל:"
@@ -717,24 +715,12 @@ msgstr "מעדכן"
msgid "Uploaded" msgid "Uploaded"
msgstr "הועלה" msgstr "הועלה"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "מהירות תנועה XY (מ\"מ/שנייה)" msgstr "מהירות תנועה XY (מ\"מ/שנייה)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "מהירות XY (mm/s)" msgstr "מהירות XY (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "כיול Z" msgstr "כיול Z"
@@ -750,12 +736,6 @@ msgstr "הטיה Z"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z אוף-סט" msgstr "Z אוף-סט"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "שינוי" msgstr[0] "שינוי"
@@ -785,6 +765,43 @@ msgstr "מ\"מ/ש"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "מיין"
#~ msgid "Calibrating..."
#~ msgstr "מכייל..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "נסה שוב #%s"
#~ msgid "Add Printer"
#~ msgstr "הוסף מדפסת"
#~ msgid "Initializing"
#~ msgstr "מאתחל"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "מחק" #~ msgstr "מחק"
Binary file not shown.
@@ -2,16 +2,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-12-13 20:39-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: AntoszHUN\n" "Last-Translator: AntoszHUN\n"
"Language-Team: \n" "Language-Team: \n"
"Language: hu_HU\n" "Language: hu\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -41,9 +41,6 @@ msgstr "Elfogad"
msgid "Actions" msgid "Actions"
msgstr "Műveletek" msgstr "Műveletek"
msgid "Add Printer"
msgstr "Nyomtató hozzáadása"
msgid "Add profile" msgid "Add profile"
msgstr "Profil hozzáadása" msgstr "Profil hozzáadása"
@@ -109,9 +106,6 @@ msgstr "Kalibrálva! Mentsd el a konfigurációt, hogy az állandó legyen"
msgid "Calibrating" msgid "Calibrating"
msgstr "Kalibrálás" msgstr "Kalibrálás"
msgid "Calibrating..."
msgstr "Kalibrálás..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Nem állítható a maximum fölé:" msgstr "Nem állítható a maximum fölé:"
@@ -207,6 +201,9 @@ msgstr "Becsült idő módszer"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "Objektum kizárása" msgstr "Objektum kizárása"
msgid "Extra Large"
msgstr "Extra nagy"
msgid "Extrude" msgid "Extrude"
msgstr "Száladagolás" msgstr "Száladagolás"
@@ -312,9 +309,6 @@ msgstr "Ikon téma"
msgid "Increase" msgid "Increase"
msgstr "Növel" msgstr "Növel"
msgid "Initializing"
msgstr "Inicializálás"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Nyomtató inicializálása..." msgstr "Nyomtató inicializálása..."
@@ -327,6 +321,9 @@ msgstr "Felület"
msgid "Invalid" msgid "Invalid"
msgstr "Érvénytelen" msgstr "Érvénytelen"
msgid "Invalid password"
msgstr "Érvénytelen jelszó"
msgid "Invert X" msgid "Invert X"
msgstr "Fordított X" msgstr "Fordított X"
@@ -354,6 +351,9 @@ msgstr "Klipper megpróbálja elindítani"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "A Klipper újraindul" msgstr "A Klipper újraindul"
msgid "KlipperScreen will reboot"
msgstr "A KlipperScreen újraindul"
msgid "Language" msgid "Language"
msgstr "Nyelv" msgstr "Nyelv"
@@ -396,6 +396,9 @@ msgstr "Lassulás max gyorsulása"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Max sebesség" msgstr "Max sebesség"
msgid "Maximum"
msgstr "Maximum"
msgid "Measure Both" msgid "Measure Both"
msgstr "Mindkettő mérése" msgstr "Mindkettő mérése"
@@ -412,7 +415,7 @@ msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Háló kalibrálása"
msgid "Modified" msgid "Modified"
msgstr "Módosított" msgstr "Módosított"
@@ -433,7 +436,7 @@ msgid "Network"
msgstr "Hálózat" msgstr "Hálózat"
msgid "Never" msgid "Never"
msgstr "" msgstr "Soha"
msgid "New" msgid "New"
msgstr "Új" msgstr "Új"
@@ -517,12 +520,18 @@ msgstr "Szonda eltolás"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profil név:" msgstr "Profil név:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr "Add meg a KlipperScreen.log-ot, amikor segítséget kérsz.\n"
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Négy állású szint" msgstr "Négy állású szint"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Fúvóka fel" msgstr "Fúvóka fel"
msgid "Recover"
msgstr "Visszaállítása"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Hárdver visszaállítása" msgstr "Hárdver visszaállítása"
@@ -554,11 +563,7 @@ msgid "Retraction Speed"
msgstr "Visszahúzási sebesség" msgstr "Visszahúzási sebesség"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Újra"
#, python-format
msgid "Retry #%s"
msgstr "Újra #%s"
msgid "Retrying" msgid "Retrying"
msgstr "Újrapróbálkozás" msgstr "Újrapróbálkozás"
@@ -631,9 +636,6 @@ msgstr "Szeletelő:"
msgid "Small" msgid "Small"
msgstr "Kicsi" msgstr "Kicsi"
msgid "Sort:"
msgstr "Fajta:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Sebesség (mm/s)" msgstr "Sebesség (mm/s)"
@@ -676,10 +678,6 @@ msgstr "Hőmérséklet (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Hőfok" msgstr "Hőfok"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "A %s KlipperScreen alkalmazásához újra kell indítani"
msgid "Total:" msgid "Total:"
msgstr "Teljes:" msgstr "Teljes:"
@@ -710,24 +708,12 @@ msgstr "Frissítés"
msgid "Uploaded" msgid "Uploaded"
msgstr "Feltöltve" msgstr "Feltöltve"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY Mozgási seb. (mm/s)" msgstr "XY Mozgási seb. (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY Sebesség (mm/s)" msgstr "XY Sebesség (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z Kalibrálás" msgstr "Z Kalibrálás"
@@ -743,12 +729,6 @@ msgstr "Z Dőlés"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z eltolás:" msgstr "Z eltolás:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "ajánlás" msgstr[0] "ajánlás"
@@ -774,6 +754,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "Sort:"
#~ msgstr "Fajta:"
#~ msgid "Calibrating..."
#~ msgstr "Kalibrálás..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Újra #%s"
#~ msgid "Add Printer"
#~ msgstr "Nyomtató hozzáadása"
#~ msgid "Initializing"
#~ msgstr "Inicializálás"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Töröl" #~ msgstr "Töröl"
Binary file not shown.
@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: pappicio\n" "Last-Translator: pappicio\n"
"Language-Team: \n" "Language-Team: \n"
@@ -11,7 +11,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -27,13 +27,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "Un FIRMWARE_RESTART potrebbe risolvere il problema." msgstr "Un FIRMWARE_RESTART potrebbe risolvere il problema."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL non configurato"
msgid "Abort" msgid "Abort"
msgstr "Annulla" msgstr "Annulla"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "Accelerazione:"
msgid "Accept" msgid "Accept"
msgstr "Accetta" msgstr "Accetta"
@@ -41,25 +41,22 @@ msgstr "Accetta"
msgid "Actions" msgid "Actions"
msgstr "Azioni" msgstr "Azioni"
msgid "Add Printer"
msgstr "Aggiungi Stampante"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr "Aggiungi profilo"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Applicare"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "Applicare l'offset %.2f a Endstop?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr "Applicare l'offset %s%.2f a Probe?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Sei sicuro di voler escludere l'oggetto?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Sei sicuro di voler eseguire l'arresto di emergenza?" msgstr "Sei sicuro di voler eseguire l'arresto di emergenza?"
@@ -80,10 +77,10 @@ msgid "Auto"
msgstr "Auto" msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr "Calibrazione automatica"
msgid "Auto-close notifications" msgid "Auto-close notifications"
msgstr "" msgstr "Chiudi automaticamente le notifiche"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -95,22 +92,19 @@ msgid "Bed Mesh"
msgstr "Rete letto" msgstr "Rete letto"
msgid "Bed screw configuration:" msgid "Bed screw configuration:"
msgstr "" msgstr "Configurazione della vite del letto:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Calibra" msgstr "Calibra"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "Calibrato"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Calibrato, salva la configurazione per renderla permanente" msgstr "Calibrato, salva la configurazione per renderla permanente"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr "Calibratura"
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Impossibile impostare al di sopra del massimo:" msgstr "Impossibile impostare al di sopra del massimo:"
@@ -134,10 +128,10 @@ msgid "Channel"
msgstr "Canale" msgstr "Canale"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "Controllare il cablaggio ADXL"
msgid "Checking for updates, please wait..." msgid "Checking for updates, please wait..."
msgstr "" msgstr "Controllo degli aggiornamenti in corso, attendere..."
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -177,7 +171,7 @@ msgid "Decrease"
msgstr "Diminuisci" msgstr "Diminuisci"
msgid "Delete File?" msgid "Delete File?"
msgstr "" msgstr "Cancella il file?"
msgid "Deselect" msgid "Deselect"
msgstr "Deseleziona" msgstr "Deseleziona"
@@ -205,7 +199,10 @@ msgid "Estimated Time Method"
msgstr "Metodo Tempo stimato" msgstr "Metodo Tempo stimato"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr "Escludi oggetto"
msgid "Extra Large"
msgstr "Extra grande"
msgid "Extrude" msgid "Extrude"
msgstr "Estrudi" msgstr "Estrudi"
@@ -226,22 +223,22 @@ msgid "Filament Used"
msgstr "Filamento Usato" msgstr "Filamento Usato"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "Filamento totale:"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "Filamento utilizzato:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "Filamento:"
msgid "File" msgid "File"
msgstr "File" msgstr "File"
msgid "File:" msgid "File:"
msgstr "" msgstr "File:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "Alla ricerca di ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Messa a Punto" msgstr "Messa a Punto"
@@ -253,10 +250,10 @@ msgid "Firmware Restart"
msgstr "Firmware Riavvio" msgstr "Firmware Riavvio"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Fluire:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Portata:"
msgid "Font Size" msgid "Font Size"
msgstr "Dimensione del testo" msgstr "Dimensione del testo"
@@ -268,7 +265,7 @@ msgid "Go Back"
msgstr "Indietro" msgstr "Indietro"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Altezza:"
msgid "Hidden" msgid "Hidden"
msgstr "Nascosto" msgstr "Nascosto"
@@ -280,7 +277,7 @@ msgid "Hide sensors in Temp."
msgstr "Nascondi sensori in Temp." msgstr "Nascondi sensori in Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Nascondi temp."
msgid "Home All" msgid "Home All"
msgstr "Home XYZ" msgstr "Home XYZ"
@@ -312,9 +309,6 @@ msgstr "Tema Icone"
msgid "Increase" msgid "Increase"
msgstr "Incrementa" msgstr "Incrementa"
msgid "Initializing"
msgstr "Inizializzo"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Inizializzo stampante..." msgstr "Inizializzo stampante..."
@@ -327,6 +321,9 @@ msgstr "Interfaccia"
msgid "Invalid" msgid "Invalid"
msgstr "Non valido" msgstr "Non valido"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Inverti X" msgstr "Inverti X"
@@ -354,6 +351,9 @@ msgstr "Klipper si sta avviando"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper sarà riavviato" msgstr "Klipper sarà riavviato"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen sarà riavviato"
msgid "Language" msgid "Language"
msgstr "Lingua" msgstr "Lingua"
@@ -361,7 +361,7 @@ msgid "Large"
msgstr "Grande" msgstr "Grande"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Strato:"
msgid "Left:" msgid "Left:"
msgstr "Restante:" msgstr "Restante:"
@@ -385,10 +385,10 @@ msgid "Main Menu"
msgstr "Menu Principale" msgstr "Menu Principale"
msgid "Max" msgid "Max"
msgstr "" msgstr "Max"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "Accelerazione Massima"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Da acceleraz. Massima a Deceleraz. Massima" msgstr "Da acceleraz. Massima a Deceleraz. Massima"
@@ -396,14 +396,17 @@ msgstr "Da acceleraz. Massima a Deceleraz. Massima"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Velocità Massima" msgstr "Velocità Massima"
msgid "Maximum"
msgstr "Massimo"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Misura entrambi"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "Misura X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Misura Y"
msgid "Medium" msgid "Medium"
msgstr "Medio" msgstr "Medio"
@@ -412,7 +415,7 @@ msgid "Menu"
msgstr "Menù" msgstr "Menù"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Calibrare la maglia"
msgid "Modified" msgid "Modified"
msgstr "Modificato" msgstr "Modificato"
@@ -433,15 +436,17 @@ msgid "Network"
msgstr "Rete" msgstr "Rete"
msgid "Never" msgid "Never"
msgstr "" msgstr "Mai"
msgid "New" msgid "New"
msgstr "" msgstr "Nuovo"
msgid "" msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen." "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf" "conf"
msgstr "" msgstr ""
"Non supportato per il rilevamento automatico, deve essere configurato in "
"klipperscreen.conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Niente selezionato" msgstr "Niente selezionato"
@@ -459,7 +464,7 @@ msgstr[0] "Pacchetto verrà aggiornato"
msgstr[1] "I pacchetti verranno aggiornati" msgstr[1] "I pacchetti verranno aggiornati"
msgid "Part Fan" msgid "Part Fan"
msgstr "" msgstr "Parte Fan"
msgid "Password saved" msgid "Password saved"
msgstr "Password salvata" msgstr "Password salvata"
@@ -474,7 +479,7 @@ msgid "Perform a full upgrade?"
msgstr "Eseguire un aggiornamento completo?" msgstr "Eseguire un aggiornamento completo?"
msgid "Pins" msgid "Pins"
msgstr "" msgstr "Perni"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Si prega di ricompilare e flashare il microcontrollore." msgstr "Si prega di ricompilare e flashare il microcontrollore."
@@ -486,7 +491,7 @@ msgid "Power On Printer"
msgstr "Accendi Stampante" msgstr "Accendi Stampante"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Anticipo di pressione:"
msgid "Print" msgid "Print"
msgstr "Stampa" msgstr "Stampa"
@@ -498,29 +503,35 @@ msgid "Print Time"
msgstr "Tempo di Stampa" msgstr "Tempo di Stampa"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Stampante"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Connessioni Stampante" msgstr "Connessioni Stampante"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Stampante Seleziona"
msgid "Printing" msgid "Printing"
msgstr "In Stampa" msgstr "In Stampa"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Scostamento della sonda"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nome Profilo:" msgstr "Nome Profilo:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Quad Gantry Level" msgstr "Quad Gantry Level"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Alza Ugello" msgstr "Alza Ugello"
msgid "Recover"
msgstr "Recuperare"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Recuperare Hard" msgstr "Recuperare Hard"
@@ -531,7 +542,7 @@ msgid "Reference"
msgstr "Riferimento" msgstr "Riferimento"
msgid "Refresh" msgid "Refresh"
msgstr "" msgstr "Ricaricare"
msgid "Restart" msgid "Restart"
msgstr "Riavvia" msgstr "Riavvia"
@@ -543,23 +554,19 @@ msgid "Retract"
msgstr "Ritrai" msgstr "Ritrai"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "Retrazione"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "Lunghezza di retrazione"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr "Velocità di ritrazione"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Riprova"
#, python-format
msgid "Retry #%s"
msgstr "Riprova #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr "Nuovo tentativo"
msgid "Save" msgid "Save"
msgstr "Salva" msgstr "Salva"
@@ -568,17 +575,17 @@ msgid "Save Config"
msgstr "Salva Config" msgstr "Salva Config"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "Salvo Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "Salva configurazione?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "Salvato"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Offset salvato: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Schermo DPMS" msgstr "Schermo DPMS"
@@ -609,10 +616,10 @@ msgid "Show"
msgstr "Mostrare" msgstr "Mostrare"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Mostra la potenza del riscaldatore"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Spegnimento"
msgid "Size" msgid "Size"
msgstr "Grandezza" msgstr "Grandezza"
@@ -624,14 +631,11 @@ msgid "Slicer Time correction (%)"
msgstr "Affettatrice Correzione del tempo (%)" msgstr "Affettatrice Correzione del tempo (%)"
msgid "Slicer:" msgid "Slicer:"
msgstr "" msgstr "Slicer:"
msgid "Small" msgid "Small"
msgstr "Piccola" msgstr "Piccola"
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Velocità (mm/s)" msgstr "Velocità (mm/s)"
@@ -642,7 +646,7 @@ msgid "Speed -"
msgstr "Velocità-" msgstr "Velocità-"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "Velocità:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Velocità Square Corner" msgstr "Velocità Square Corner"
@@ -674,10 +678,6 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatura" msgstr "Temperatura"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Riavvia KlipperScreen per applicare %s"
msgid "Total:" msgid "Total:"
msgstr "Totale:" msgstr "Totale:"
@@ -685,16 +685,16 @@ msgid "Unknown Heater"
msgstr "Riscaldatore sconosciuto" msgstr "Riscaldatore sconosciuto"
msgid "Unknown screw position" msgid "Unknown screw position"
msgstr "" msgstr "Posizione della vite sconosciuta"
msgid "Unload" msgid "Unload"
msgstr "Scaricare" msgstr "Scaricare"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr "Lunghezza extra non retratta"
msgid "Unretract Speed" msgid "Unretract Speed"
msgstr "" msgstr "Velocità di ritiro"
msgid "Up To Date" msgid "Up To Date"
msgstr "Aggiornato" msgstr "Aggiornato"
@@ -708,23 +708,11 @@ msgstr "In aggiornamento"
msgid "Uploaded" msgid "Uploaded"
msgstr "Caricato" msgstr "Caricato"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Velocità di spostamento XY (mm/s)" msgstr "Velocità di spostamento XY (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr "Velocità XY (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Calibra Z" msgstr "Calibra Z"
@@ -733,19 +721,13 @@ msgid "Z Move Speed (mm/s)"
msgstr "Velocità di spostamento Z (mm/s)" msgstr "Velocità di spostamento Z (mm/s)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "Velocità Z (mm/s)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "Z Tilt" msgstr "Z Tilt"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr "Spostamento Z:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
@@ -772,6 +754,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "Sort:"
#~ msgstr "Ordinare:"
#~ msgid "Calibrating..."
#~ msgstr "Calibratura..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Riprova #%s"
#~ msgid "Add Printer"
#~ msgstr "Aggiungi Stampante"
#~ msgid "Initializing"
#~ msgstr "Inizializzo"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Elimina" #~ msgstr "Elimina"
Binary file not shown.
@@ -0,0 +1,756 @@
msgid ""
msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: \n"
"Last-Translator: boyon\n"
"Language-Team: \n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.2.1\n"
#, python-format
msgid "%s will be updated to version"
msgstr "%s を最新にアップデートします"
msgid "(default)"
msgstr "(デフォルト)"
msgid "24 Hour Time"
msgstr "24時間表記"
msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "ファームウェアの更新を行うと不具合が解決する場合があります"
msgid "ADXL Not Configured"
msgstr "ADXL が構成されていません"
msgid "Abort"
msgstr "中止する"
msgid "Acceleration:"
msgstr "加速度:"
msgid "Accept"
msgstr "承諾する"
msgid "Actions"
msgstr "操作"
msgid "Add profile"
msgstr "プロファイルの追加"
msgid "Apply"
msgstr "適用する"
#, python-format
msgid "Apply %.2f offset to Endstop?"
msgstr "エンドストップにオフセットに %.2f を適用しますか?"
#, python-format
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 "緊急停止しますか?"
msgid "Are you sure you wish to cancel this print?"
msgstr "印刷を中断しますか?"
msgid "Are you sure you wish to disable motors?"
msgstr "モーターの制御を無効にしますか?"
msgid "Are you sure you wish to reboot the system?"
msgstr "システムを再起動しますか?"
msgid "Are you sure you wish to shutdown the system?"
msgstr "システムをシャットダウンしますか?"
msgid "Auto"
msgstr "自動"
msgid "Auto-calibrate"
msgstr "自動校正"
msgid "Auto-close notifications"
msgstr "自動終了通知"
msgid "Auto-scroll"
msgstr "自動スクロール"
msgid "Bed Level"
msgstr "ベッドレベル"
msgid "Bed Mesh"
msgstr "ベッドメッシュ"
msgid "Bed screw configuration:"
msgstr "ベッドスクリュー設定:"
msgid "Calibrate"
msgstr "校正"
msgid "Calibrated"
msgstr "構成済み"
msgid "Calibrated, save configuration to make it permanent"
msgstr "校正完了しました。次回起動時以降も適用するには設定を保存してください"
msgid "Calibrating"
msgstr "校正中"
msgid "Can't set above the maximum:"
msgstr "上限値を超えて設定できません:"
msgid "Cancel"
msgstr "キャンセル"
msgid "Cancel Print"
msgstr "印刷をキャンセルする"
msgid "Cancelled"
msgstr "キャンセル済"
msgid "Cancelling"
msgstr "キャンセル中"
msgid "Cannot connect to Moonraker"
msgstr "Moonrakerに接続できません"
msgid "Channel"
msgstr "チャンネル"
msgid "Check ADXL Wiring"
msgstr "ADXL Wiring を検査する"
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear"
msgstr "クリア"
msgid "Close"
msgstr "終了"
msgid "Complete"
msgstr "完了"
msgid "Configuration"
msgstr "設定"
msgid "Confirm Emergency Stop"
msgstr "緊急停止時に確認する"
msgid "Connected"
msgstr "接続済み"
#, python-format
msgid "Connecting to %s"
msgstr "%s へ接続中・・・"
msgid "Console"
msgstr "コンソール"
msgid "Continue"
msgstr "継続"
msgid "Cooldown"
msgstr "クールダウン"
msgid "Date"
msgstr "日付"
msgid "Decrease"
msgstr "減少"
msgid "Delete File?"
msgstr "ファイルを削除しますか?"
msgid "Deselect"
msgstr "選択解除"
msgid "Disable Motors"
msgstr "モーターの無効化"
msgid "Disable XY"
msgstr "XY軸制御の無効化"
msgid "Distance (mm)"
msgstr "距離(mm)"
#, python-format
msgid "Do you want to recover %s?"
msgstr "元に戻しますか %s ?"
msgid "Elapsed:"
msgstr "経過時間:"
msgid "Error"
msgstr "エラー"
msgid "Estimated Time Method"
msgstr "予定時刻"
msgid "Exclude Object"
msgstr "対象の除外"
msgid "Extra Large"
msgstr "特大"
msgid "Extrude"
msgstr "吐出"
msgid "Extrusion +"
msgstr "吐出+"
msgid "Extrusion -"
msgstr "吐出-"
msgid "Failed, adjust position first"
msgstr "失敗時は最初に位置を調整する"
msgid "Fan"
msgstr "ファン"
msgid "Filament Used"
msgstr "使用済フィラメント"
msgid "Filament total:"
msgstr "フィラメント 総量:"
msgid "Filament used:"
msgstr "フィラメント 使用済:"
msgid "Filament:"
msgstr "フィラメント:"
msgid "File"
msgstr "ファイル"
msgid "File:"
msgstr "ファイル:"
msgid "Finding ADXL"
msgstr "ADXLを検索中"
msgid "Fine Tuning"
msgstr "Fine Tuning"
msgid "Finish"
msgstr "完了"
msgid "Firmware Restart"
msgstr "ファームウェアの再起動"
msgid "Flow:"
msgstr "流量:"
msgid "Flowrate:"
msgstr "フローレート:"
msgid "Font Size"
msgstr "フォントサイズ"
msgid "Full Update"
msgstr "フルアップデート"
msgid "Go Back"
msgstr "戻る"
msgid "Height:"
msgstr "高さ:"
msgid "Hidden"
msgstr "非表示"
msgid "Hide"
msgstr "隠す"
msgid "Hide sensors in Temp."
msgstr "温度を非表示にする"
msgid "Hide temp."
msgstr "温度を非表示にする"
msgid "Home All"
msgstr ""
msgid "Home X"
msgstr "Home X"
msgid "Home XY"
msgstr "Home XY"
msgid "Home Y"
msgstr "Home Y"
msgid "Home Z"
msgstr "Home Z"
msgid "Homing"
msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
msgid "Icon Theme"
msgstr "アイコンテーマ"
msgid "Increase"
msgstr "増加"
msgid "Initializing printer..."
msgstr ""
msgid "Input Shaper"
msgstr ""
msgid "Interface"
msgstr "インターフェース"
msgid "Invalid"
msgstr "不正"
msgid "Invalid password"
msgstr ""
msgid "Invert X"
msgstr "X軸を反対にする"
msgid "Invert Y"
msgstr "Y軸を反対にする"
msgid "Invert Z"
msgstr "X軸を反対にする"
msgid "Klipper Restart"
msgstr "Klipperを再起動する"
msgid "Klipper has disconnected"
msgstr "Klipperの接続が切れました"
msgid "Klipper has encountered an error."
msgstr "Klipperのエラーが発生しました"
msgid "Klipper has shutdown"
msgstr "Klipperはシャットダウンしました"
msgid "Klipper is attempting to start"
msgstr "Klipperは起動中です"
msgid "Klipper will reboot"
msgstr "Klipperは再起動します"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreenは再起動します"
msgid "Language"
msgstr "言語"
msgid "Large"
msgstr "大"
msgid "Layer:"
msgstr "レイヤー:"
msgid "Left:"
msgstr "左:"
msgid "Limits"
msgstr "制限"
msgid "Load"
msgstr ""
msgid "Lower Nozzle"
msgstr "ノズルが低い"
msgid "Macro shortcut on sidebar"
msgstr "サイドバーのマクロショートカット"
msgid "Macros"
msgstr "マクロ"
msgid "Main Menu"
msgstr "メインメニュー"
msgid "Max"
msgstr "最大"
msgid "Max Acceleration"
msgstr "最大加速度"
msgid "Max Acceleration to Deceleration"
msgstr "減速時の最大加速度"
msgid "Max Velocity"
msgstr "最大速度"
msgid "Maximum"
msgstr "最大"
msgid "Measure Both"
msgstr "両方計測する"
msgid "Measure X"
msgstr "X軸を計測する"
msgid "Measure Y"
msgstr "Y軸を計測する"
msgid "Medium"
msgstr "中"
msgid "Menu"
msgstr "メニュー"
msgid "Mesh calibrate"
msgstr "メッシュ較正"
msgid "Modified"
msgstr "変更"
msgid "Moonraker: connected"
msgstr "Moonraker: 接続済"
msgid "Move"
msgstr "移動"
msgid "Move Distance (mm)"
msgstr "移動距離"
msgid "Name"
msgstr "名称"
msgid "Network"
msgstr "ネットワーク"
msgid "Never"
msgstr "未"
msgid "New"
msgstr "新"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected"
msgstr "未選択"
#, python-format
msgid "Outdated by %d"
msgstr ""
msgid "PSK for"
msgstr ""
msgid "Package will be updated"
msgid_plural "Packages will be updated"
msgstr[0] ""
msgid "Part Fan"
msgstr ""
msgid "Password saved"
msgstr "パスワードを保存しました"
msgid "Pause"
msgstr "一時停止"
msgid "Paused"
msgstr "一時停止中"
msgid "Perform a full upgrade?"
msgstr "フルアップデートしますか?"
msgid "Pins"
msgstr "Pins"
msgid "Please recompile and flash the micro-controller."
msgstr "マイクロコントローラーをリコンパイル&フラッシュしてください"
msgid "Power"
msgstr "電源"
msgid "Power On Printer"
msgstr "プリンター電源"
msgid "Pressure Advance:"
msgstr ""
msgid "Print"
msgstr "印刷"
msgid "Print Control"
msgstr "印刷制御"
msgid "Print Time"
msgstr "印刷時間"
msgid "Printer"
msgstr "プリンター"
msgid "Printer Connections"
msgstr "プリンター接続状態"
msgid "Printer Select"
msgstr "プリンターの選択"
msgid "Printing"
msgstr "印刷中"
msgid "Probe Offset"
msgstr "プローブオフセット"
msgid "Profile Name:"
msgstr "プロファイル:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level"
msgstr "ガントリーレベル"
msgid "Raise Nozzle"
msgstr ""
msgid "Recover"
msgstr ""
msgid "Recover Hard"
msgstr ""
msgid "Recover Soft"
msgstr ""
msgid "Reference"
msgstr ""
msgid "Refresh"
msgstr "最新表示"
msgid "Restart"
msgstr "再起動"
msgid "Resume"
msgstr "再開"
msgid "Retract"
msgstr "リトラクトする"
msgid "Retraction"
msgstr "リトラクション"
msgid "Retraction Length"
msgstr "リトラクション長さ"
msgid "Retraction Speed"
msgstr "リトラクションスピード"
msgid "Retry"
msgstr "再試行"
msgid "Retrying"
msgstr "再試行中"
msgid "Save"
msgstr "保存"
msgid "Save Config"
msgstr "設定の保存"
msgid "Save Z"
msgstr "Z軸の保存"
msgid "Save configuration?"
msgstr "設定を保存しますか?"
msgid "Saved"
msgstr "保存しました"
#, python-format
msgid "Saved offset: %s"
msgstr "保存しました offset: %s"
msgid "Screen DPMS"
msgstr ""
msgid "Screen Power Off Time"
msgstr ""
msgid "Screws Adjust"
msgstr ""
msgid "Select"
msgstr ""
msgid "Send"
msgstr ""
#, python-format
msgid "Sending Power ON signal to: %s"
msgstr ""
msgid "Set Temp"
msgstr "温度設定"
msgid "Settings"
msgstr "設定"
msgid "Show"
msgstr "表示"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr "シャットダウン"
msgid "Size"
msgstr "サイズ"
msgid "Slicer"
msgstr "スライサー"
msgid "Slicer Time correction (%)"
msgstr "スライサーの補正時間(%)"
msgid "Slicer:"
msgstr "スライサー:"
msgid "Small"
msgstr "小"
msgid "Speed (mm/s)"
msgstr ""
msgid "Speed +"
msgstr ""
msgid "Speed -"
msgstr ""
msgid "Speed:"
msgstr ""
msgid "Square Corner Velocity"
msgstr "四隅の速度"
msgid "Start"
msgstr "開始"
msgid "Starting WiFi Association"
msgstr "Wifi接続開始中"
msgid "Starting recovery for"
msgstr "回復中"
msgid "Starting update for"
msgstr "更新中"
msgid "System"
msgstr "システム"
msgid "System Restart"
msgstr "システムの再起動"
msgid "System Shutdown"
msgstr "システムのシャットダウン"
msgid "Temp (°C)"
msgstr "温度 (°C)"
msgid "Temperature"
msgstr "温度"
msgid "Total:"
msgstr "全体:"
msgid "Unknown Heater"
msgstr "無効なヒーター"
msgid "Unknown screw position"
msgstr "無効なのスクリュー位置"
msgid "Unload"
msgstr "アンロード"
msgid "Unretract Extra Length"
msgstr ""
msgid "Unretract Speed"
msgstr ""
msgid "Up To Date"
msgstr "最新"
msgid "Update"
msgstr "更新"
msgid "Updating"
msgstr "更新中"
msgid "Uploaded"
msgstr "アップロード済"
msgid "XY Move Speed (mm/s)"
msgstr "XY移動速度 (mm/s)"
msgid "XY Speed (mm/s)"
msgstr "XY速度 (mm/s)"
msgid "Z Calibrate"
msgstr "Z軸 校正"
msgid "Z Move Speed (mm/s)"
msgstr "X軸 移動速度 (mm/s)"
msgid "Z Speed (mm/s)"
msgstr ""
msgid "Z Tilt"
msgstr ""
msgid "Z offset:"
msgstr ""
msgid "commit"
msgid_plural "commits"
msgstr[0] ""
msgid "dBm"
msgstr ""
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgid "minutes"
msgstr "分"
msgid "mm"
msgstr ""
msgid "mm/s"
msgstr ""
msgid "mm/s²"
msgstr ""
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "ソート順:"
Binary file not shown.
@@ -2,16 +2,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: NSteven\n" "Last-Translator: NSteven\n"
"Language-Team: NSteven\n" "Language-Team: NSteven\n"
"Language: ko_KR\n" "Language: ko\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -41,9 +41,6 @@ msgstr "확인"
msgid "Actions" msgid "Actions"
msgstr "툴 헤드 제어" msgstr "툴 헤드 제어"
msgid "Add Printer"
msgstr "프린터 추가"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -109,9 +106,6 @@ msgstr "교정됨, 설정을 저장합니다"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr "교정 중.."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "최대 값을 초과하는 설정은 할 수 없습니다:" msgstr "최대 값을 초과하는 설정은 할 수 없습니다:"
@@ -207,6 +201,9 @@ msgstr "예상시간 옵션"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "압출 " msgstr "압출 "
@@ -312,9 +309,6 @@ msgstr "아이콘 테마"
msgid "Increase" msgid "Increase"
msgstr "높이기" msgstr "높이기"
msgid "Initializing"
msgstr "초기화 중.."
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "프린터 초기화 중.." msgstr "프린터 초기화 중.."
@@ -327,6 +321,9 @@ msgstr "인터페이스"
msgid "Invalid" msgid "Invalid"
msgstr "존재하지 않음" msgstr "존재하지 않음"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "X축 반전" msgstr "X축 반전"
@@ -352,7 +349,10 @@ msgid "Klipper is attempting to start"
msgstr "클리퍼 시작하는 중" msgstr "클리퍼 시작하는 중"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "클리퍼를 다시 시작합니다" msgstr "Klipper가 재부팅됩니다"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen가 재부팅됩니다"
msgid "Language" msgid "Language"
msgstr "언어" msgstr "언어"
@@ -396,6 +396,9 @@ msgstr "감속을 위한 최대 가속"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "출력 속도" msgstr "출력 속도"
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "XY축 모두 측정" msgstr "XY축 모두 측정"
@@ -514,12 +517,18 @@ msgstr "프로브 오프셋"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "프로파일 이름:" msgstr "프로파일 이름:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "쿼드 갠트리 레벨" msgstr "쿼드 갠트리 레벨"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "노즐 높임" msgstr "노즐 높임"
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "강화 복구 모드" msgstr "강화 복구 모드"
@@ -553,10 +562,6 @@ msgstr "퇴출 속도"
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr "재시도 #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -628,9 +633,6 @@ msgstr "슬라이서:"
msgid "Small" msgid "Small"
msgstr "작은" msgstr "작은"
msgid "Sort:"
msgstr "종류:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "속도 (mm/s)" msgstr "속도 (mm/s)"
@@ -673,10 +675,6 @@ msgstr "온도 (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "온도 제어" msgstr "온도 제어"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "%s을(를) 적용하려면 클리퍼 스크린을 다시 시작해야 합니다"
msgid "Total:" msgid "Total:"
msgstr "총:" msgstr "총:"
@@ -707,24 +705,12 @@ msgstr "업데이트 중.."
msgid "Uploaded" msgid "Uploaded"
msgstr "업로드됨" msgstr "업로드됨"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY 이동 속도 (mm/s)" msgstr "XY 이동 속도 (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY 속도 (mm/s)" msgstr "XY 속도 (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z 옵셋 교정" msgstr "Z 옵셋 교정"
@@ -740,12 +726,6 @@ msgstr "Z 기울기"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z 옵셋:" msgstr "Z 옵셋:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "커밋" msgstr[0] "커밋"
@@ -769,6 +749,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "종류:"
#~ msgid "Calibrating..."
#~ msgstr "교정 중.."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "재시도 #%s"
#~ msgid "Add Printer"
#~ msgstr "프린터 추가"
#~ msgid "Initializing"
#~ msgstr "초기화 중.."
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "삭제" #~ msgstr "삭제"
Binary file not shown.
@@ -7,17 +7,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-03-31 11:06-0300\n" "PO-Revision-Date: 2022-11-30 18:14-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: pl_PL\n" "Language: pl\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 " "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 "
"|| n%100>14) ? 1 : 2);\n" "|| n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -33,13 +33,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FIRMWARE_RESTART może rozwiązać problem." msgstr "FIRMWARE_RESTART może rozwiązać problem."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL nieskonfigurowany"
msgid "Abort" msgid "Abort"
msgstr "Odwołaj" msgstr "Odwołaj"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "Przyśpieszenie:"
msgid "Accept" msgid "Accept"
msgstr "Akceptuj" msgstr "Akceptuj"
@@ -47,25 +47,22 @@ msgstr "Akceptuj"
msgid "Actions" msgid "Actions"
msgstr "Akcje" msgstr "Akcje"
msgid "Add Printer"
msgstr "Dodaj drukarkę"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr "Dodaj profil"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Stosować"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "Zastosować przesunięcie %.2f do Endstop?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr "Zastosować przesunięcie %s%.2f do sondy?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Czy na pewno chcesz wykluczyć obiekt?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Czy na pewno chcesz Awaryjnie Zatrzymać?" msgstr "Czy na pewno chcesz Awaryjnie Zatrzymać?"
@@ -86,10 +83,10 @@ msgid "Auto"
msgstr "Automatyczny" msgstr "Automatyczny"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr "Automatyczna kalibracja"
msgid "Auto-close notifications" msgid "Auto-close notifications"
msgstr "" msgstr "Powiadomienia o automatycznym zamknięciu"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -101,22 +98,19 @@ msgid "Bed Mesh"
msgstr "Poziom siatki stołu" msgstr "Poziom siatki stołu"
msgid "Bed screw configuration:" msgid "Bed screw configuration:"
msgstr "" msgstr "Konfiguracja śrub łóżka:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibracja" msgstr "Kalibracja"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "Skalibrowany"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Skalibrowano, zapisz konfigurację aby została na stałe" msgstr "Skalibrowano, zapisz konfigurację aby została na stałe"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr "Kalibracja"
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Nie można ustawić powyżej maksymum:" msgstr "Nie można ustawić powyżej maksymum:"
@@ -140,10 +134,10 @@ msgid "Channel"
msgstr "Kanał" msgstr "Kanał"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "Sprawdź okablowanie ADXL"
msgid "Checking for updates, please wait..." msgid "Checking for updates, please wait..."
msgstr "" msgstr "Trwa sprawdzanie dostępności aktualizacji, proszę czekać..."
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -183,7 +177,7 @@ msgid "Decrease"
msgstr "Obniż" msgstr "Obniż"
msgid "Delete File?" msgid "Delete File?"
msgstr "" msgstr "Usunąć plik?"
msgid "Deselect" msgid "Deselect"
msgstr "Odznacz" msgstr "Odznacz"
@@ -211,7 +205,10 @@ msgid "Estimated Time Method"
msgstr "Sposób Oszacowania Czasu" msgstr "Sposób Oszacowania Czasu"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr "Wyklucz obiekt"
msgid "Extra Large"
msgstr "Bardzo duży"
msgid "Extrude" msgid "Extrude"
msgstr "Extruduj" msgstr "Extruduj"
@@ -232,22 +229,22 @@ msgid "Filament Used"
msgstr "Filament w Użytku" msgstr "Filament w Użytku"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "Całkowita ilość filamentu:"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "Zastosowane włókno:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "Włókno:"
msgid "File" msgid "File"
msgstr "Plik" msgstr "Plik"
msgid "File:" msgid "File:"
msgstr "" msgstr "Plik:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "Znalezienie ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Regulacja Precyzyjna" msgstr "Regulacja Precyzyjna"
@@ -259,10 +256,10 @@ msgid "Firmware Restart"
msgstr "" msgstr ""
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Pływ:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Pływ:"
msgid "Font Size" msgid "Font Size"
msgstr "Rozmiar trzcionki" msgstr "Rozmiar trzcionki"
@@ -274,7 +271,7 @@ msgid "Go Back"
msgstr "Powróć" msgstr "Powróć"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Wzrost:"
msgid "Hidden" msgid "Hidden"
msgstr "Ukryty" msgstr "Ukryty"
@@ -286,7 +283,7 @@ msgid "Hide sensors in Temp."
msgstr "Ukryj czujniki w Temp." msgstr "Ukryj czujniki w Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Ukryj temp."
msgid "Home All" msgid "Home All"
msgstr "Baza Wszystkich" msgstr "Baza Wszystkich"
@@ -318,9 +315,6 @@ msgstr "Motyw Ikon"
msgid "Increase" msgid "Increase"
msgstr "Zwiększ" msgstr "Zwiększ"
msgid "Initializing"
msgstr "Startowanie"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Drukarka Startuje..." msgstr "Drukarka Startuje..."
@@ -333,6 +327,9 @@ msgstr "Interfejs"
msgid "Invalid" msgid "Invalid"
msgstr "Nieprawidłowy" msgstr "Nieprawidłowy"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Odwróć X" msgstr "Odwróć X"
@@ -358,7 +355,10 @@ msgid "Klipper is attempting to start"
msgstr "Klipper próbuje wystartować" msgstr "Klipper próbuje wystartować"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper będzie się restartował" msgstr "Klipper uruchomi się ponownie"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen uruchomi się ponownie"
msgid "Language" msgid "Language"
msgstr "Język" msgstr "Język"
@@ -367,7 +367,7 @@ msgid "Large"
msgstr "Duży" msgstr "Duży"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Warstwa:"
msgid "Left:" msgid "Left:"
msgstr "Lewo:" msgstr "Lewo:"
@@ -391,10 +391,10 @@ msgid "Main Menu"
msgstr "Główne Menu" msgstr "Główne Menu"
msgid "Max" msgid "Max"
msgstr "" msgstr "Maks"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "Maksymalne przyspieszenie"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Maks Przyśpieszenie i Opóźnienie" msgstr "Maks Przyśpieszenie i Opóźnienie"
@@ -402,14 +402,17 @@ msgstr "Maks Przyśpieszenie i Opóźnienie"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Maks Prędkość" msgstr "Maks Prędkość"
msgid "Maximum"
msgstr "Maksymalny"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Zmierz oba"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "Zmierz X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Zmierz Y"
msgid "Medium" msgid "Medium"
msgstr "Średni" msgstr "Średni"
@@ -418,7 +421,7 @@ msgid "Menu"
msgstr "Menu" msgstr "Menu"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Kalibracja siatki"
msgid "Modified" msgid "Modified"
msgstr "Zmodyfikowane" msgstr "Zmodyfikowane"
@@ -439,15 +442,17 @@ msgid "Network"
msgstr "Sieć" msgstr "Sieć"
msgid "Never" msgid "Never"
msgstr "" msgstr "Nigdy"
msgid "New" msgid "New"
msgstr "" msgstr "Nowy"
msgid "" msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen." "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf" "conf"
msgstr "" msgstr ""
"Nieobsługiwany do automatycznego wykrywania, musi być skonfigurowany w pliku "
"klipperscreen.conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nic nie wybrano" msgstr "Nic nie wybrano"
@@ -493,7 +498,7 @@ msgid "Power On Printer"
msgstr "Zasilanie włączone" msgstr "Zasilanie włączone"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Postęp ciśnienia:"
msgid "Print" msgid "Print"
msgstr "Drukuj" msgstr "Drukuj"
@@ -505,29 +510,35 @@ msgid "Print Time"
msgstr "Czas Druku" msgstr "Czas Druku"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Drukarka"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Połączenia Drukarki" msgstr "Połączenia Drukarki"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Wybierz drukarkę"
msgid "Printing" msgid "Printing"
msgstr "Drukujemy" msgstr "Drukujemy"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Przesunięcie sondy"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nazwa Profilu:" msgstr "Nazwa Profilu:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Poziom Bramy" msgstr "Poziom Bramy"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Podnieś dyszę" msgstr "Podnieś dyszę"
msgid "Recover"
msgstr "Odzyskaj"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Odzyskaj Twardo" msgstr "Odzyskaj Twardo"
@@ -538,7 +549,7 @@ msgid "Reference"
msgstr "Sprawdzenie" msgstr "Sprawdzenie"
msgid "Refresh" msgid "Refresh"
msgstr "" msgstr "Odświeżać"
msgid "Restart" msgid "Restart"
msgstr "Restartuj" msgstr "Restartuj"
@@ -550,23 +561,19 @@ msgid "Retract"
msgstr "Cofnij" msgstr "Cofnij"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "Wycofanie"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "Długość wycofania"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr "Szybkość wycofania"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Spróbować ponownie"
#, python-format
msgid "Retry #%s"
msgstr "Spróbuj ponownie #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr "Ponawianie próby"
msgid "Save" msgid "Save"
msgstr "Zapisz" msgstr "Zapisz"
@@ -575,17 +582,17 @@ msgid "Save Config"
msgstr "Zapisz Konfigurację" msgstr "Zapisz Konfigurację"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "Zapisz Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "Zapisać konfigurację?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "Zapisane"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Zapisane przesunięcie: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Ekran DPMS" msgstr "Ekran DPMS"
@@ -616,10 +623,10 @@ msgid "Show"
msgstr "Pokaż" msgstr "Pokaż"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Pokaż moc grzałki"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Zamknąć"
msgid "Size" msgid "Size"
msgstr "Rozmiar" msgstr "Rozmiar"
@@ -636,9 +643,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Mały" msgstr "Mały"
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Prędkość (mm/s)" msgstr "Prędkość (mm/s)"
@@ -649,7 +653,7 @@ msgid "Speed -"
msgstr "Prędkość -" msgstr "Prędkość -"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "Prędkość:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Prędkość w narożniku kwadratowym" msgstr "Prędkość w narożniku kwadratowym"
@@ -681,10 +685,6 @@ msgstr "Temp (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatura" msgstr "Temperatura"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Aby zastosować %s KlipperScreen musi zostać ponownie uruchomiony"
msgid "Total:" msgid "Total:"
msgstr "Całkowity:" msgstr "Całkowity:"
@@ -692,7 +692,7 @@ msgid "Unknown Heater"
msgstr "Nieznany Podgrzewacz" msgstr "Nieznany Podgrzewacz"
msgid "Unknown screw position" msgid "Unknown screw position"
msgstr "" msgstr "Nieznana pozycja śruby"
msgid "Unload" msgid "Unload"
msgstr "Wyładuj" msgstr "Wyładuj"
@@ -715,23 +715,11 @@ msgstr "Aktualizacja"
msgid "Uploaded" msgid "Uploaded"
msgstr "Przesłane" msgstr "Przesłane"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Prędkość ruchu XY (mm/s)" msgstr "Prędkość ruchu XY (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr "Prędkość XY (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y0"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Kalibracja Z" msgstr "Kalibracja Z"
@@ -740,7 +728,7 @@ msgid "Z Move Speed (mm/s)"
msgstr "Prędkość ruchu Z (mm/s)" msgstr "Prędkość ruchu Z (mm/s)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "Prędkość Z (mm/s)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "Przechył Z" msgstr "Przechył Z"
@@ -748,12 +736,6 @@ msgstr "Przechył Z"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "zmiana" msgstr[0] "zmiana"
@@ -781,6 +763,40 @@ msgstr "mm/s²"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "Sortować:"
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y0"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Spróbuj ponownie #%s"
#~ msgid "Add Printer"
#~ msgstr "Dodaj drukarkę"
#~ msgid "Initializing"
#~ msgstr "Startowanie"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Skasuj" #~ msgstr "Skasuj"
Binary file not shown.
@@ -0,0 +1,769 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-11-30 18:14-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"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.2.1\n"
#, python-format
msgid "%s will be updated to version"
msgstr "%s será atualizado para a versão"
msgid "(default)"
msgstr "(padrão)"
msgid "24 Hour Time"
msgstr "24 Horas"
msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "Reinicie para corrigir."
msgid "ADXL Not Configured"
msgstr "ADXL não configurado"
msgid "Abort"
msgstr "Abortar"
msgid "Acceleration:"
msgstr "Aceleração:"
msgid "Accept"
msgstr "Aceitar"
msgid "Actions"
msgstr "Ações"
msgid "Add profile"
msgstr "Adicionar perfil"
msgid "Apply"
msgstr "Aplicar"
#, python-format
msgid "Apply %.2f offset to Endstop?"
msgstr "Aplicar deslocamento de %.2f para Endstop?"
#, python-format
msgid "Apply %s%.2f offset to Probe?"
msgstr "Aplicar deslocamento %s%.2f ao Sonda?"
msgid "Are you sure do you want to exclude the object?"
msgstr "Tem certeza de que deseja excluir o objeto?"
msgid "Are you sure you want to run Emergency Stop?"
msgstr "Interromper ?"
msgid "Are you sure you wish to cancel this print?"
msgstr "Cancelar a impressão ?"
msgid "Are you sure you wish to disable motors?"
msgstr "Desativar os motores ?"
msgid "Are you sure you wish to reboot the system?"
msgstr "Reiniciar o sistema ?"
msgid "Are you sure you wish to shutdown the system?"
msgstr "Desligar o sistema ?"
msgid "Auto"
msgstr "Automatico"
msgid "Auto-calibrate"
msgstr "Calibrar automaticamente"
msgid "Auto-close notifications"
msgstr "Notificações de fechamento automático"
msgid "Auto-scroll"
msgstr "Auto-scroll"
msgid "Bed Level"
msgstr "Nível da cama"
msgid "Bed Mesh"
msgstr "Nivelamento da Cama"
msgid "Bed screw configuration:"
msgstr "Configuração do parafuso de cama:"
msgid "Calibrate"
msgstr "Calibrar"
msgid "Calibrated"
msgstr "Calibrado"
msgid "Calibrated, save configuration to make it permanent"
msgstr "Calibrado, use o comando para salvar definitivamente"
msgid "Calibrating"
msgstr "Calibrando"
msgid "Can't set above the maximum:"
msgstr "Não é possível definir o máximo:"
msgid "Cancel"
msgstr "Cancelar"
msgid "Cancel Print"
msgstr "Cancelar Impressão"
msgid "Cancelled"
msgstr "Cancelado"
msgid "Cancelling"
msgstr "Cancelando"
msgid "Cannot connect to Moonraker"
msgstr "Não foi possível conectar a Moonraker"
msgid "Channel"
msgstr "Canal"
msgid "Check ADXL Wiring"
msgstr "Verifique a fiação ADXL"
msgid "Checking for updates, please wait..."
msgstr "Verificando atualizações, aguarde..."
msgid "Clear"
msgstr ""
msgid "Close"
msgstr "Fechar"
msgid "Complete"
msgstr "Completado"
msgid "Configuration"
msgstr "Configuração"
msgid "Confirm Emergency Stop"
msgstr "Confirmar Parada de Emergência"
msgid "Connected"
msgstr "Conectado"
#, python-format
msgid "Connecting to %s"
msgstr "Conectando %s"
msgid "Console"
msgstr "Console"
msgid "Continue"
msgstr "Continuar"
msgid "Cooldown"
msgstr "Resfriar"
msgid "Date"
msgstr "Data"
msgid "Decrease"
msgstr "Diminuir"
msgid "Delete File?"
msgstr "Excluir arquivo?"
msgid "Deselect"
msgstr "Deselecionar"
msgid "Disable Motors"
msgstr "Desabilitar Motores"
msgid "Disable XY"
msgstr "Desabilitar YX"
msgid "Distance (mm)"
msgstr "Distancia (mm)"
#, python-format
msgid "Do you want to recover %s?"
msgstr "Deseja recuperar %s?"
msgid "Elapsed:"
msgstr "Decorrido:"
msgid "Error"
msgstr "Erro"
msgid "Estimated Time Method"
msgstr "Método de tempo estimado"
msgid "Exclude Object"
msgstr "Excluir objeto"
msgid "Extra Large"
msgstr "Extra grande"
msgid "Extrude"
msgstr "Extrusão"
msgid "Extrusion +"
msgstr "+ Extrusão"
msgid "Extrusion -"
msgstr "- Extrusão"
msgid "Failed, adjust position first"
msgstr "Falhou, ajuste a posição primeiro"
msgid "Fan"
msgstr "Fan"
msgid "Filament Used"
msgstr "Filamento Usado"
msgid "Filament total:"
msgstr "Filamento total:"
msgid "Filament used:"
msgstr "Filamento usado:"
msgid "Filament:"
msgstr "Filamento:"
msgid "File"
msgstr "Arquivo"
msgid "File:"
msgstr "Arquivo:"
msgid "Finding ADXL"
msgstr "Encontrar ADXL"
msgid "Fine Tuning"
msgstr "Correção Fina"
msgid "Finish"
msgstr "Terminar"
msgid "Firmware Restart"
msgstr "Reiniciar Firmware"
msgid "Flow:"
msgstr "Fluxo:"
msgid "Flowrate:"
msgstr "Flow:"
msgid "Font Size"
msgstr "Tamanho da fonte"
msgid "Full Update"
msgstr "Atualização completa"
msgid "Go Back"
msgstr "Voltar"
msgid "Height:"
msgstr "Altura:"
msgid "Hidden"
msgstr "Oculto"
msgid "Hide"
msgstr "Ocultar"
msgid "Hide sensors in Temp."
msgstr "Ocultar temperatura."
msgid "Hide temp."
msgstr "Ocultar temperatura"
msgid "Home All"
msgstr "Calibrar XYZ"
msgid "Home X"
msgstr "Calibrar X"
msgid "Home XY"
msgstr "Calibrar XY"
msgid "Home Y"
msgstr "Calibrar Y"
msgid "Home Z"
msgstr "Calibrar Z"
msgid "Homing"
msgstr "Calibrar"
msgid "Host"
msgstr ""
msgid "Hostname"
msgstr "Hostname"
msgid "Icon Theme"
msgstr "Tema dos icones"
msgid "Increase"
msgstr "Aumentar"
msgid "Initializing printer..."
msgstr "Inicializando impressora..."
msgid "Input Shaper"
msgstr ""
msgid "Interface"
msgstr "Interface"
msgid "Invalid"
msgstr "Inválido"
msgid "Invalid password"
msgstr ""
msgid "Invert X"
msgstr "Inverter X"
msgid "Invert Y"
msgstr "Inverter Y"
msgid "Invert Z"
msgstr "Inverter Z"
msgid "Klipper Restart"
msgstr "Reinicialização do Klipper"
msgid "Klipper has disconnected"
msgstr "Klipper desconectado"
msgid "Klipper has encountered an error."
msgstr "Klipper encontrou um erro."
msgid "Klipper has shutdown"
msgstr "Klipper desligado"
msgid "Klipper is attempting to start"
msgstr "Klipper está tentando iniciar"
msgid "Klipper will reboot"
msgstr "Klipper será reiniciado"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen será reiniciado"
msgid "Language"
msgstr "Idioma"
msgid "Large"
msgstr "Grande"
msgid "Layer:"
msgstr "Camada:"
msgid "Left:"
msgstr "Restante:"
msgid "Limits"
msgstr "Limites"
msgid "Load"
msgstr "Carregar"
msgid "Lower Nozzle"
msgstr "Descer bocal"
msgid "Macro shortcut on sidebar"
msgstr "Atalho de macro na barra lateral"
msgid "Macros"
msgstr "Macros"
msgid "Main Menu"
msgstr "Menu principal"
msgid "Max"
msgstr "Máx"
msgid "Max Acceleration"
msgstr "Aceleração Máxima"
msgid "Max Acceleration to Deceleration"
msgstr "Max. aceleração de desaceleração"
msgid "Max Velocity"
msgstr "Velocidade máxima"
msgid "Maximum"
msgstr "Máximo"
msgid "Measure Both"
msgstr "Medir ambos"
msgid "Measure X"
msgstr "Medida X"
msgid "Measure Y"
msgstr "Medida Y"
msgid "Medium"
msgstr "Médio"
msgid "Menu"
msgstr "Menu"
msgid "Mesh calibrate"
msgstr "Calibrar malha"
msgid "Modified"
msgstr "Modificado"
msgid "Moonraker: connected"
msgstr "Moonraker: Conectado"
msgid "Move"
msgstr "Mover"
msgid "Move Distance (mm)"
msgstr "Distancia do movimento (mm)"
msgid "Name"
msgstr "Nome"
msgid "Network"
msgstr "Rede"
msgid "Never"
msgstr "Nunca"
msgid "New"
msgstr "Novo"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"Não é compatível com detecção automática, precisa ser configurado no "
"klipperscreen.conf"
msgid "Nothing selected"
msgstr "Nada selecionado"
#, python-format
msgid "Outdated by %d"
msgstr "Desatualizado por %d"
msgid "PSK for"
msgstr "PSK por"
msgid "Package will be updated"
msgid_plural "Packages will be updated"
msgstr[0] "O pacote será atualizado"
msgstr[1] "Os pacotes serão atualizados"
msgid "Part Fan"
msgstr "Fã de parte"
msgid "Password saved"
msgstr "Senha salva"
msgid "Pause"
msgstr "Pausar"
msgid "Paused"
msgstr "Pausado"
msgid "Perform a full upgrade?"
msgstr "Realizar uma atualização completa?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller."
msgstr "Por favor, recompile e atualize o microcontrolador."
msgid "Power"
msgstr "Ligue"
msgid "Power On Printer"
msgstr "Ligue a impressora"
msgid "Pressure Advance:"
msgstr "Avanço de pressão:"
msgid "Print"
msgstr "Impressão"
msgid "Print Control"
msgstr "Controle de impressão"
msgid "Print Time"
msgstr "Tempo de impressão"
msgid "Printer"
msgstr "Impressora"
msgid "Printer Connections"
msgstr "Conexões da impressora"
msgid "Printer Select"
msgstr "Selecione a impressora"
msgid "Printing"
msgstr "Imprimindo"
msgid "Probe Offset"
msgstr "Deslocamento da Sonda"
msgid "Profile Name:"
msgstr "Nome do perfil:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level"
msgstr "Nível do pórtico quádruplo"
msgid "Raise Nozzle"
msgstr "Elevar o bocal"
msgid "Recover"
msgstr "Recuperar"
msgid "Recover Hard"
msgstr "Recuperar Difícil"
msgid "Recover Soft"
msgstr "Recuperar Suave"
msgid "Reference"
msgstr "Referência"
msgid "Refresh"
msgstr "Atualizar"
msgid "Restart"
msgstr "Reiniciar"
msgid "Resume"
msgstr "Resumir"
msgid "Retract"
msgstr "Retrair"
msgid "Retraction"
msgstr "Retratação"
msgid "Retraction Length"
msgstr "Comprimento de retração"
msgid "Retraction Speed"
msgstr "Velocidade de retração"
msgid "Retry"
msgstr "Tentar novamente"
msgid "Retrying"
msgstr "Tentando novamente"
msgid "Save"
msgstr "Salvar"
msgid "Save Config"
msgstr "Salvar configuração"
msgid "Save Z"
msgstr "Salvar Z"
msgid "Save configuration?"
msgstr "Salvar configuração?"
msgid "Saved"
msgstr "Salvou"
#, python-format
msgid "Saved offset: %s"
msgstr "Deslocamento salvo: %s"
msgid "Screen DPMS"
msgstr "Tela DPMS"
msgid "Screen Power Off Time"
msgstr "Tempo de desligamento da tela"
msgid "Screws Adjust"
msgstr "Ajustes"
msgid "Select"
msgstr "Selecionar"
msgid "Send"
msgstr "Enviar"
#, python-format
msgid "Sending Power ON signal to: %s"
msgstr "Enviando sinal de energia para: %s"
msgid "Set Temp"
msgstr "Definir temperatura"
msgid "Settings"
msgstr "Definições"
msgid "Show"
msgstr "Mostrar"
msgid "Show Heater Power"
msgstr "Mostrar Potência do Aquecedor"
msgid "Shutdown"
msgstr "Desligar"
msgid "Size"
msgstr "Tamanho"
msgid "Slicer"
msgstr "Fatiador"
msgid "Slicer Time correction (%)"
msgstr "Correção do tempo do fatiador (%)"
msgid "Slicer:"
msgstr ""
msgid "Small"
msgstr "Pequeno"
msgid "Speed (mm/s)"
msgstr "Velocidade (mm/s)"
msgid "Speed +"
msgstr "+ Velocidade"
msgid "Speed -"
msgstr "- Velocidade"
msgid "Speed:"
msgstr "Velocidade:"
msgid "Square Corner Velocity"
msgstr "Velocidade de canto quadrado"
msgid "Start"
msgstr "Começar"
msgid "Starting WiFi Association"
msgstr "Iniciando a associação WiFi"
msgid "Starting recovery for"
msgstr "Iniciando a recuperação para"
msgid "Starting update for"
msgstr "Iniciando atualização para"
msgid "System"
msgstr "Sistema"
msgid "System Restart"
msgstr "Reinicialização do sistema"
msgid "System Shutdown"
msgstr "Desligamento do sistema"
msgid "Temp (°C)"
msgstr "Temp (°C)"
msgid "Temperature"
msgstr "Temperatura"
msgid "Total:"
msgstr "Total:"
msgid "Unknown Heater"
msgstr "Aquecedor Desconhecido"
msgid "Unknown screw position"
msgstr "Posição desconhecida do parafuso"
msgid "Unload"
msgstr "Descarregar"
msgid "Unretract Extra Length"
msgstr ""
msgid "Unretract Speed"
msgstr ""
msgid "Up To Date"
msgstr "Atualizado"
msgid "Update"
msgstr "Atualizar"
msgid "Updating"
msgstr "Atualizando"
msgid "Uploaded"
msgstr "Carregado"
msgid "XY Move Speed (mm/s)"
msgstr "Velocidade de Movimento XY (mm/s)"
msgid "XY Speed (mm/s)"
msgstr "Velocidade XY (mm/s)"
msgid "Z Calibrate"
msgstr "Calibrar Z"
msgid "Z Move Speed (mm/s)"
msgstr "Velocidade de Movimento Z (mm/s)"
msgid "Z Speed (mm/s)"
msgstr "Velocidade Z (mm/s)"
msgid "Z Tilt"
msgstr "Inclinação Z"
msgid "Z offset:"
msgstr "Deslocamento Z:"
msgid "commit"
msgid_plural "commits"
msgstr[0] "comprometer-se"
msgstr[1] "compromete"
msgid "dBm"
msgstr "dBm"
msgid "hour"
msgid_plural "hours"
msgstr[0] "hora"
msgstr[1] "horas"
msgid "minutes"
msgstr "minutos"
msgid "mm"
msgstr "mm"
msgid "mm/s"
msgstr "mm/s"
msgid "mm/s²"
msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "Ordenar:"
#~ msgid "Calibrating..."
#~ msgstr "Calibrando..."
Binary file not shown.
@@ -6,22 +6,22 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2023-01-29 09:28-0600\n"
"PO-Revision-Date: 2022-06-03 20:25-0500\n" "PO-Revision-Date: 2022-11-30 18:15-0300\n"
"Last-Translator: Jakob Kais <schpuntik@freenet.de>\n" "Last-Translator: Jakob Kais <schpuntik@freenet.de>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: ru_RU\n" "Language: ru\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
"X-Poedit-Flags-xgettext: --add-comments\n" "X-Poedit-Flags-xgettext: --add-comments\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
msgstr "% s будет обновлен до версии" msgstr "%s будет обновлен до версии"
msgid "(default)" msgid "(default)"
msgstr "(дефолт)" msgstr "(дефолт)"
@@ -30,7 +30,7 @@ msgid "24 Hour Time"
msgstr "24-часовой формат" msgstr "24-часовой формат"
msgid "A FIRMWARE_RESTART may fix the issue." msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FIRMWARE_RESTART может решить проблему." msgstr "Выполните перезагрузку прошивки, чтобы попытаться исправить проблему."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "ADXL не настроен" msgstr "ADXL не настроен"
@@ -47,11 +47,8 @@ msgstr "Применить"
msgid "Actions" msgid "Actions"
msgstr "Действия" msgstr "Действия"
msgid "Add Printer"
msgstr "Добавить принтер"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr "Добавить профиль"
msgid "Apply" msgid "Apply"
msgstr "Применить" msgstr "Применить"
@@ -65,7 +62,7 @@ msgid "Apply %s%.2f offset to Probe?"
msgstr "Применить смещение %s%.2f к зонду?" msgstr "Применить смещение %s%.2f к зонду?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Вы уверены, что хотите исключить объект?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Вы уверены, что хотите запустить аварийную остановку?" msgstr "Вы уверены, что хотите запустить аварийную остановку?"
@@ -89,10 +86,10 @@ msgid "Auto-calibrate"
msgstr "Автоматическая калибровка" msgstr "Автоматическая калибровка"
msgid "Auto-close notifications" msgid "Auto-close notifications"
msgstr "" msgstr "Автоматическое закрытие уведомлений"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Автопрокрутка" msgstr "Автоматическая прокрутка"
msgid "Bed Level" msgid "Bed Level"
msgstr "Уровень стола" msgstr "Уровень стола"
@@ -101,7 +98,7 @@ msgid "Bed Mesh"
msgstr "Сетка стола" msgstr "Сетка стола"
msgid "Bed screw configuration:" msgid "Bed screw configuration:"
msgstr "" msgstr "Конфигурация винтов кровати:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Калибровка" msgstr "Калибровка"
@@ -115,8 +112,8 @@ msgstr "Откалибровано, сохраните конфигурацию,
msgid "Calibrating" msgid "Calibrating"
msgstr "Калибровка" msgstr "Калибровка"
msgid "Calibrating..." msgid "Camera"
msgstr "Калибровка..." msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Невозможно установить выше максимума:" msgstr "Невозможно установить выше максимума:"
@@ -134,7 +131,7 @@ msgid "Cancelling"
msgstr "Отменить" msgstr "Отменить"
msgid "Cannot connect to Moonraker" msgid "Cannot connect to Moonraker"
msgstr "Не могу подключиться к Moonraker" msgstr "Не удается подключиться к Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Канал" msgstr "Канал"
@@ -143,7 +140,7 @@ msgid "Check ADXL Wiring"
msgstr "Проверьте проводку ADXL" msgstr "Проверьте проводку ADXL"
msgid "Checking for updates, please wait..." msgid "Checking for updates, please wait..."
msgstr "" msgstr "Проверка обновлений, подождите..."
msgid "Clear" msgid "Clear"
msgstr "Очистить" msgstr "Очистить"
@@ -179,11 +176,11 @@ msgstr "Остудить"
msgid "Date" msgid "Date"
msgstr "Дата" msgstr "Дата"
msgid "Decrease" msgid "Delete Directory?"
msgstr "Уменьшить" msgstr ""
msgid "Delete File?" msgid "Delete File?"
msgstr "" msgstr "Удалить Файл?"
msgid "Deselect" msgid "Deselect"
msgstr "Отменить выбор" msgstr "Отменить выбор"
@@ -199,7 +196,7 @@ msgstr "Расстояние (mm)"
#, python-format #, python-format
msgid "Do you want to recover %s?" msgid "Do you want to recover %s?"
msgstr "Вы хотите восстановить% s?" msgstr "Вы хотите восстановить%s?"
msgid "Elapsed:" msgid "Elapsed:"
msgstr "Прошло:" msgstr "Прошло:"
@@ -211,7 +208,10 @@ msgid "Estimated Time Method"
msgstr "Расчётное время" msgstr "Расчётное время"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr "Исключить Объект"
msgid "Extra Large"
msgstr "Очень большой"
msgid "Extrude" msgid "Extrude"
msgstr "Заправить" msgstr "Заправить"
@@ -256,7 +256,7 @@ msgid "Finish"
msgstr "Конец" msgstr "Конец"
msgid "Firmware Restart" msgid "Firmware Restart"
msgstr "Прошивка Рестарт" msgstr "Перезапуск прошивки"
msgid "Flow:" msgid "Flow:"
msgstr "Поток:" msgstr "Поток:"
@@ -270,6 +270,9 @@ msgstr "Размер шрифта"
msgid "Full Update" msgid "Full Update"
msgstr "Полный Обновлять" msgstr "Полный Обновлять"
msgid "Fullscreen"
msgstr ""
msgid "Go Back" msgid "Go Back"
msgstr "Назад" msgstr "Назад"
@@ -307,7 +310,7 @@ msgid "Homing"
msgstr "Парковка" msgstr "Парковка"
msgid "Host" msgid "Host"
msgstr "" msgstr "Хост"
msgid "Hostname" msgid "Hostname"
msgstr "Имя хоста" msgstr "Имя хоста"
@@ -315,12 +318,6 @@ msgstr "Имя хоста"
msgid "Icon Theme" msgid "Icon Theme"
msgstr "Темы" msgstr "Темы"
msgid "Increase"
msgstr "Поднять"
msgid "Initializing"
msgstr "Запуск"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Принтер стартует..." msgstr "Принтер стартует..."
@@ -333,6 +330,9 @@ msgstr "Интерфейс"
msgid "Invalid" msgid "Invalid"
msgstr "Неверный" msgstr "Неверный"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Инверсия X" msgstr "Инверсия X"
@@ -360,6 +360,9 @@ msgstr "Klipper готов"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper перезагружается" msgstr "Klipper перезагружается"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen перезагружается"
msgid "Language" msgid "Language"
msgstr "Язык" msgstr "Язык"
@@ -391,7 +394,7 @@ msgid "Main Menu"
msgstr "Главное меню" msgstr "Главное меню"
msgid "Max" msgid "Max"
msgstr "" msgstr "Максимум"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Максимальное ускорение" msgstr "Максимальное ускорение"
@@ -402,6 +405,9 @@ msgstr "Ускорения торможения"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Скорость" msgstr "Скорость"
msgid "Maximum"
msgstr "Максимум"
msgid "Measure Both" msgid "Measure Both"
msgstr "Измерьте и то, и другое" msgstr "Измерьте и то, и другое"
@@ -412,19 +418,19 @@ msgid "Measure Y"
msgstr "Измерьте Y" msgstr "Измерьте Y"
msgid "Medium" msgid "Medium"
msgstr "Среднее" msgstr "Средний"
msgid "Menu" msgid "Menu"
msgstr "Меню" msgstr "Меню"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Калибровка сетки"
msgid "Modified" msgid "Modified"
msgstr "Изменено" msgstr "Изменено"
msgid "Moonraker: connected" msgid "Moonraker: connected"
msgstr "Мунрейкер: подключен" msgstr "Moonraker: подключен"
msgid "Move" msgid "Move"
msgstr "Двигать" msgstr "Двигать"
@@ -439,7 +445,7 @@ msgid "Network"
msgstr "Сеть" msgstr "Сеть"
msgid "Never" msgid "Never"
msgstr "" msgstr "Никогда"
msgid "New" msgid "New"
msgstr "Новый" msgstr "Новый"
@@ -448,6 +454,8 @@ msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen." "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf" "conf"
msgstr "" msgstr ""
"Не поддерживается для автоматического обнаружения, его необходимо настроить "
"в klipperscreen.conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Ничего не выбрано" msgstr "Ничего не выбрано"
@@ -466,7 +474,7 @@ msgstr[1] "Пакеты будут обновляться"
msgstr[2] "Пакеты будут обновляться" msgstr[2] "Пакеты будут обновляться"
msgid "Part Fan" msgid "Part Fan"
msgstr "" msgstr "Частичный вентилятор"
msgid "Password saved" msgid "Password saved"
msgstr "Пароль сохранен" msgstr "Пароль сохранен"
@@ -481,10 +489,10 @@ msgid "Perform a full upgrade?"
msgstr "Выполнить полное обновление?" msgstr "Выполнить полное обновление?"
msgid "Pins" msgid "Pins"
msgstr "" msgstr "Пины"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Пожалуйста, перекомпилируйте и прошейте микроконтроллер." msgstr "Прошейте заново микроконтроллер."
msgid "Power" msgid "Power"
msgstr "Включено" msgstr "Включено"
@@ -505,13 +513,13 @@ msgid "Print Time"
msgstr "Время печати" msgstr "Время печати"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Принтер"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Подключение принтера" msgstr "Подключение принтера"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Выбор принтера"
msgid "Printing" msgid "Printing"
msgstr "Печатается" msgstr "Печатается"
@@ -522,12 +530,18 @@ msgstr "Смещение зонда"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Имя профиля:" msgstr "Имя профиля:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Уровень Quad Gantry" msgstr "Уровень Quad Gantry"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Поднять сопло" msgstr "Поднять сопло"
msgid "Recover"
msgstr "Восстановить"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Восстановить Hard" msgstr "Восстановить Hard"
@@ -538,6 +552,9 @@ msgid "Reference"
msgstr "Ссылка" msgstr "Ссылка"
msgid "Refresh" msgid "Refresh"
msgstr "Обновить"
msgid "Rename/Move:"
msgstr "" msgstr ""
msgid "Restart" msgid "Restart"
@@ -559,14 +576,10 @@ msgid "Retraction Speed"
msgstr "Скорость ретракта" msgstr "Скорость ретракта"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Повторить попытку"
#, python-format
msgid "Retry #%s"
msgstr "Повторить #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr "Повторная попытка"
msgid "Save" msgid "Save"
msgstr "Сохранить" msgstr "Сохранить"
@@ -600,11 +613,7 @@ msgid "Select"
msgstr "Выбирать" msgstr "Выбирать"
msgid "Send" msgid "Send"
msgstr "Отправлять" msgstr "Отправить"
#, python-format
msgid "Sending Power ON signal to: %s"
msgstr "Отправка сигнала включения питания на: %s"
msgid "Set Temp" msgid "Set Temp"
msgstr "Заданная температура" msgstr "Заданная температура"
@@ -616,10 +625,10 @@ msgid "Show"
msgstr "Показывать" msgstr "Показывать"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Показать мощность нагрева"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Выключить"
msgid "Size" msgid "Size"
msgstr "Размер" msgstr "Размер"
@@ -628,17 +637,14 @@ msgid "Slicer"
msgstr "Слайсер" msgstr "Слайсер"
msgid "Slicer Time correction (%)" msgid "Slicer Time correction (%)"
msgstr "Коррекция времени слайсера (%)" msgstr "Коррекция времени Слайсер (%)"
msgid "Slicer:" msgid "Slicer:"
msgstr "" msgstr "Слайсер:"
msgid "Small" msgid "Small"
msgstr "Маленький" msgstr "Маленький"
msgid "Sort:"
msgstr "Сортировать:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Скорость (мм/с)" msgstr "Скорость (мм/с)"
@@ -649,7 +655,7 @@ msgid "Speed -"
msgstr "Скорость -" msgstr "Скорость -"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "Скорость:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Квадратная угловая скорость" msgstr "Квадратная угловая скорость"
@@ -681,27 +687,23 @@ msgstr "Темп (°С)"
msgid "Temperature" msgid "Temperature"
msgstr "Tемпература" msgstr "Tемпература"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Чтобы применить %s необходимо перезапустить KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "Всего:" msgstr "Итого:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Неизвестный обогреватель" msgstr "Неизвестный обогреватель"
msgid "Unknown screw position" msgid "Unknown screw position"
msgstr "" msgstr "Неизвестное положение винта"
msgid "Unload" msgid "Unload"
msgstr "Загружено" msgstr "Загружено"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr "Дополнительная длина подачи перед возобновлением печати"
msgid "Unretract Speed" msgid "Unretract Speed"
msgstr "" msgstr "Скорость дополнительная подачи"
msgid "Up To Date" msgid "Up To Date"
msgstr "Обновлено" msgstr "Обновлено"
@@ -713,25 +715,13 @@ msgid "Updating"
msgstr "Обновление" msgstr "Обновление"
msgid "Uploaded" msgid "Uploaded"
msgstr "Дата" msgstr "Загружено"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Скорость перемещения по осям XY (мм/с)" msgstr "Скорость перемещения по осям XY (мм/с)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr "Скорость по осям XY (мм/с)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Калибр. Z" msgstr "Калибр. Z"
@@ -740,19 +730,13 @@ msgid "Z Move Speed (mm/s)"
msgstr "Скорость перемещения по оси Z (мм/с)" msgstr "Скорость перемещения по оси Z (мм/с)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "Скорость оси Z (мм/с)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "Z Наклон" msgstr "Z Наклон"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr "Смещение Z:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
@@ -781,6 +765,53 @@ msgstr "мм/с"
msgid "mm/s²" msgid "mm/s²"
msgstr "мм/с²" msgstr "мм/с²"
msgid "mm³/s"
msgstr "мм/с³"
#~ msgid "Decrease"
#~ msgstr "Уменьшить"
#~ msgid "Increase"
#~ msgstr "Поднять"
#, python-format
#~ msgid "Sending Power ON signal to: %s"
#~ msgstr "Отправка сигнала включения питания на: %s"
#~ msgid "Sort:"
#~ msgstr "Сортировать:"
#~ msgid "Calibrating..."
#~ msgstr "Калибровка..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#~ msgid "Add Printer"
#~ msgstr "Добавить принтер"
#~ msgid "Initializing"
#~ msgstr "Запуск"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Повторная попытка #%s"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Удалить" #~ msgstr "Удалить"
Binary file not shown.
@@ -7,16 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-04-15 17:25+0200\n" "PO-Revision-Date: 2022-11-21 21:31-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: sv_SE\n" "Language: sv\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,9 +46,6 @@ msgstr "Godkänn"
msgid "Actions" msgid "Actions"
msgstr "Åtgärder" msgstr "Åtgärder"
msgid "Add Printer"
msgstr "Lägg till skrivare"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -114,9 +111,6 @@ msgstr "Kalibrerad, spara konfiguration för att göra den permanent"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Kan inte ställa in över maxgränsen:" msgstr "Kan inte ställa in över maxgränsen:"
@@ -212,6 +206,9 @@ msgstr ""
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Extrudera" msgstr "Extrudera"
@@ -317,9 +314,6 @@ msgstr "Ikon tema"
msgid "Increase" msgid "Increase"
msgstr "Öka" msgstr "Öka"
msgid "Initializing"
msgstr "Initierar"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Initierar skrivaren..." msgstr "Initierar skrivaren..."
@@ -332,6 +326,9 @@ msgstr "Gränssnitt"
msgid "Invalid" msgid "Invalid"
msgstr "Ogiltig" msgstr "Ogiltig"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "Invertera X" msgstr "Invertera X"
@@ -359,6 +356,9 @@ msgstr "Klipper försöker starta"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper kommer att starta om" msgstr "Klipper kommer att starta om"
msgid "KlipperScreen will reboot"
msgstr ""
msgid "Language" msgid "Language"
msgstr "Språk" msgstr "Språk"
@@ -401,6 +401,9 @@ msgstr ""
msgid "Max Velocity" msgid "Max Velocity"
msgstr "" msgstr ""
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -520,12 +523,18 @@ msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilens namn:" msgstr "Profilens namn:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "" msgstr ""
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "" msgstr ""
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "" msgstr ""
@@ -559,10 +568,6 @@ msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr ""
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -634,9 +639,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Liten" msgstr "Liten"
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Hastighet (mm/s)" msgstr "Hastighet (mm/s)"
@@ -679,10 +681,6 @@ msgstr "Temperatur (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Temperatur" msgstr "Temperatur"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "För att tillämpa %s måste KlipperScreen startas om"
msgid "Total:" msgid "Total:"
msgstr "" msgstr ""
@@ -713,24 +711,12 @@ msgstr "Uppdaterar"
msgid "Uploaded" msgid "Uploaded"
msgstr "Uppladdad" msgstr "Uppladdad"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY rörelsehastighet (mm/s)" msgstr "XY rörelsehastighet (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr ""
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z Kalibrering" msgstr "Z Kalibrering"
@@ -746,12 +732,6 @@ msgstr ""
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "" msgstr[0] ""
@@ -777,6 +757,33 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#~ msgid "Add Printer"
#~ msgstr "Lägg till skrivare"
#~ msgid "Initializing"
#~ msgstr "Initierar"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Radera" #~ msgstr "Radera"
Binary file not shown.
@@ -7,16 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-10-30 16:54+0300\n" "PO-Revision-Date: 2022-12-10 14:52+0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: tr_TR\n" "Language: tr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,9 +46,6 @@ msgstr "Kabul et"
msgid "Actions" msgid "Actions"
msgstr "Eylemler" msgstr "Eylemler"
msgid "Add Printer"
msgstr "Yazıcı Ekle"
msgid "Add profile" msgid "Add profile"
msgstr "Profil ekle" msgstr "Profil ekle"
@@ -114,9 +111,6 @@ msgstr "Kalibre edildi, kalıcı hale getirmek için yapılandırmayı kaydedin"
msgid "Calibrating" msgid "Calibrating"
msgstr "Kalibre Ediliyor" msgstr "Kalibre Ediliyor"
msgid "Calibrating..."
msgstr "Kalibre Ediliyor..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Maksimumun üzerine ayarlanamaz:" msgstr "Maksimumun üzerine ayarlanamaz:"
@@ -212,6 +206,9 @@ msgstr "Tahmini Zaman Metodu"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "Nesneyi Hariç Tut" msgstr "Nesneyi Hariç Tut"
msgid "Extra Large"
msgstr "Çok Büyük"
msgid "Extrude" msgid "Extrude"
msgstr "Ekstrüzyon" msgstr "Ekstrüzyon"
@@ -317,9 +314,6 @@ msgstr "Simge Teması"
msgid "Increase" msgid "Increase"
msgstr "Artır" msgstr "Artır"
msgid "Initializing"
msgstr "Başlatılıyor"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Yazıcı başlatılıyor..." msgstr "Yazıcı başlatılıyor..."
@@ -332,6 +326,9 @@ msgstr "Arayüz"
msgid "Invalid" msgid "Invalid"
msgstr "Geçersiz" msgstr "Geçersiz"
msgid "Invalid password"
msgstr "Geçersiz şifre"
msgid "Invert X" msgid "Invert X"
msgstr "X Ters çevir" msgstr "X Ters çevir"
@@ -359,6 +356,9 @@ msgstr "Klipper başlatılmaya çalışılıyor"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper yeniden başlayacak" msgstr "Klipper yeniden başlayacak"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen yeniden başlayacak"
msgid "Language" msgid "Language"
msgstr "Dil" msgstr "Dil"
@@ -401,6 +401,9 @@ msgstr "Maksimum Hızlanma ve Yavaşlama"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Maksimum Hız" msgstr "Maksimum Hız"
msgid "Maximum"
msgstr "Maksimum"
msgid "Measure Both" msgid "Measure Both"
msgstr "İkisini de ölçüle" msgstr "İkisini de ölçüle"
@@ -417,7 +420,7 @@ msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Mesh Kalibre et"
msgid "Modified" msgid "Modified"
msgstr "Değiştirilmiş" msgstr "Değiştirilmiş"
@@ -438,7 +441,7 @@ msgid "Network"
msgstr "Ağ" msgstr "Ağ"
msgid "Never" msgid "Never"
msgstr "" msgstr "Asla"
msgid "New" msgid "New"
msgstr "Yeni" msgstr "Yeni"
@@ -522,12 +525,18 @@ msgstr "Prob ofseti"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profil ismi:" msgstr "Profil ismi:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr "Yardım isterken KlipperScreen.log dosyasını sağlayın.\n"
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Dörtlü Köprü Seviyesi" msgstr "Dörtlü Köprü Seviyesi"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Nozzle yükselt" msgstr "Nozzle yükselt"
msgid "Recover"
msgstr "Kurtar"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Zorla Kurtar" msgstr "Zorla Kurtar"
@@ -559,11 +568,7 @@ msgid "Retraction Speed"
msgstr "Geri Çekme Hızı" msgstr "Geri Çekme Hızı"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Tekrar dene"
#, python-format
msgid "Retry #%s"
msgstr "Yeniden Dene #%s"
msgid "Retrying" msgid "Retrying"
msgstr "Yeniden Deneniyor" msgstr "Yeniden Deneniyor"
@@ -636,9 +641,6 @@ msgstr "Dilimleyici:"
msgid "Small" msgid "Small"
msgstr "Küçük" msgstr "Küçük"
msgid "Sort:"
msgstr "Sırala:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Hız (mm/s)" msgstr "Hız (mm/s)"
@@ -681,10 +683,6 @@ msgstr "Sıcaklık (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Sıcaklık" msgstr "Sıcaklık"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Uygulamak için %s KlipperScreen yeniden başlatılmalı"
msgid "Total:" msgid "Total:"
msgstr "Toplam:" msgstr "Toplam:"
@@ -715,24 +713,12 @@ msgstr "Yükleniyor"
msgid "Uploaded" msgid "Uploaded"
msgstr "Yüklendi" msgstr "Yüklendi"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY Hareket hızı (mm/s)" msgstr "XY Hareket hızı (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY Hızı (mm/s)" msgstr "XY Hızı (mm/s)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z Kalibrasyonu" msgstr "Z Kalibrasyonu"
@@ -748,12 +734,6 @@ msgstr "Z Eğim"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z ofset:" msgstr "Z ofset:"
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "commit" msgstr[0] "commit"
@@ -779,6 +759,43 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr "mm³/s"
#~ msgid "Sort:"
#~ msgstr "Sırala:"
#~ msgid "Calibrating..."
#~ msgstr "Kalibre Ediliyor..."
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Yeniden Dene #%s"
#~ msgid "Add Printer"
#~ msgstr "Yazıcı Ekle"
#~ msgid "Initializing"
#~ msgstr "Başlatılıyor"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Sil" #~ msgstr "Sil"
Binary file not shown.
@@ -7,17 +7,17 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022-09-04 14:53-0300\n" "Project-Id-Version: 2022-09-04 14:53-0300\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-09-16 21:40+0300\n" "PO-Revision-Date: 2023-03-10 20:26-0600\n"
"Last-Translator: Andrii Komarovskyi\n" "Last-Translator: Andrii Komarovskyi\n"
"Language-Team: Andrii Komarovskyi\n" "Language-Team: Andrii Komarovskyi\n"
"Language: uk\n" "Language: uk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.1\n" "X-Generator: Poedit 2.4.2\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -47,9 +47,6 @@ msgstr "Прийняти"
msgid "Actions" msgid "Actions"
msgstr "Дії" msgstr "Дії"
msgid "Add Printer"
msgstr "Додати принтер"
msgid "Add profile" msgid "Add profile"
msgstr "Додати профіль" msgstr "Додати профіль"
@@ -65,7 +62,7 @@ msgid "Apply %s%.2f offset to Probe?"
msgstr "Застосувати зміщення %s%.2f до зонда?" msgstr "Застосувати зміщення %s%.2f до зонда?"
msgid "Are you sure do you want to exclude the object?" msgid "Are you sure do you want to exclude the object?"
msgstr "" msgstr "Ви впевнені, що бажаєте виключити об’єкт?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Ви впевнені, що хочете зробити аварійну зупинку?" msgstr "Ви впевнені, що хочете зробити аварійну зупинку?"
@@ -115,9 +112,6 @@ msgstr "Відкалібровано, збережіть конфігураці
msgid "Calibrating" msgid "Calibrating"
msgstr "Калібрування" msgstr "Калібрування"
msgid "Calibrating..."
msgstr "Калібрування..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Не можна встановити вище максимум:" msgstr "Не можна встановити вище максимум:"
@@ -213,6 +207,9 @@ msgstr "Метод розрахунку часу"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "Виключити об’єкт" msgstr "Виключити об’єкт"
msgid "Extra Large"
msgstr "Дуже Великий"
msgid "Extrude" msgid "Extrude"
msgstr "" msgstr ""
"Заміна\n" "Заміна\n"
@@ -322,9 +319,6 @@ msgstr "Тема оформлення"
msgid "Increase" msgid "Increase"
msgstr "Збільшити" msgstr "Збільшити"
msgid "Initializing"
msgstr "Ініціалізація"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "Ініціалізація принтера..." msgstr "Ініціалізація принтера..."
@@ -337,6 +331,9 @@ msgstr "Інтерфейс"
msgid "Invalid" msgid "Invalid"
msgstr "Недійсний" msgstr "Недійсний"
msgid "Invalid password"
msgstr "Недійсний пароль"
msgid "Invert X" msgid "Invert X"
msgstr "Інвертувати X" msgstr "Інвертувати X"
@@ -366,6 +363,9 @@ msgstr "Кліппер намагається стартувати"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper перезавантажиться" msgstr "Klipper перезавантажиться"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen перезавантажиться"
msgid "Language" msgid "Language"
msgstr "Мова" msgstr "Мова"
@@ -408,6 +408,9 @@ msgstr "Макс. прискорення до гальмування"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "Макс. швидкість" msgstr "Макс. швидкість"
msgid "Maximum"
msgstr "Максимум"
msgid "Measure Both" msgid "Measure Both"
msgstr "Виміряти все" msgstr "Виміряти все"
@@ -424,7 +427,7 @@ msgid "Menu"
msgstr "Меню" msgstr "Меню"
msgid "Mesh calibrate" msgid "Mesh calibrate"
msgstr "" msgstr "Калібрування сітки столу"
msgid "Modified" msgid "Modified"
msgstr "Змінено" msgstr "Змінено"
@@ -442,10 +445,10 @@ msgid "Name"
msgstr "Ім'я" msgstr "Ім'я"
msgid "Network" msgid "Network"
msgstr "Сітка" msgstr "Мережа"
msgid "Never" msgid "Never"
msgstr "" msgstr "Ніколи"
msgid "New" msgid "New"
msgstr "Новий" msgstr "Новий"
@@ -515,13 +518,13 @@ msgid "Print Time"
msgstr "Час друку" msgstr "Час друку"
msgid "Printer" msgid "Printer"
msgstr "" msgstr "Принтер"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Підключення принтера" msgstr "Підключення принтера"
msgid "Printer Select" msgid "Printer Select"
msgstr "" msgstr "Вибір Принтера"
msgid "Printing" msgid "Printing"
msgstr "Друк" msgstr "Друк"
@@ -532,12 +535,18 @@ msgstr "Зміщення зонда"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Ім'я профілю:" msgstr "Ім'я профілю:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr "Надайте KlipperScreen.log, коли звертаєтесь по допомогу.\n"
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "Портальне вирівнювання" msgstr "Портальне вирівнювання"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "Підняти сопло" msgstr "Підняти сопло"
msgid "Recover"
msgstr "Відновити"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "Відновити все" msgstr "Відновити все"
@@ -548,7 +557,9 @@ msgid "Reference"
msgstr "Довідка" msgstr "Довідка"
msgid "Refresh" msgid "Refresh"
msgstr "Оновити" msgstr ""
"Перевірка\n"
"Оновлень"
msgid "Restart" msgid "Restart"
msgstr "Перезапуск" msgstr "Перезапуск"
@@ -571,11 +582,7 @@ msgid "Retraction Speed"
msgstr "Швидкість втягування" msgstr "Швидкість втягування"
msgid "Retry" msgid "Retry"
msgstr "" msgstr "Повторіть спробу"
#, python-format
msgid "Retry #%s"
msgstr "Повторіть #%s"
msgid "Retrying" msgid "Retrying"
msgstr "Повторна спроба" msgstr "Повторна спроба"
@@ -628,10 +635,10 @@ msgid "Show"
msgstr "Показати" msgstr "Показати"
msgid "Show Heater Power" msgid "Show Heater Power"
msgstr "" msgstr "Показати Потужність Нагрівача"
msgid "Shutdown" msgid "Shutdown"
msgstr "" msgstr "Вимкнути"
msgid "Size" msgid "Size"
msgstr "Розмір" msgstr "Розмір"
@@ -648,9 +655,6 @@ msgstr "Слайсер:"
msgid "Small" msgid "Small"
msgstr "Малий" msgstr "Малий"
msgid "Sort:"
msgstr "Сортувати:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Швидкість (мм/с)" msgstr "Швидкість (мм/с)"
@@ -693,10 +697,6 @@ msgstr "Teмп (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "Температура" msgstr "Температура"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "Щоб застосувати %s, потрібно перезапустити KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "Всього:" msgstr "Всього:"
@@ -716,7 +716,7 @@ msgid "Unretract Speed"
msgstr "Швидкість повернення" msgstr "Швидкість повернення"
msgid "Up To Date" msgid "Up To Date"
msgstr "Оновити" msgstr "Актуально"
msgid "Update" msgid "Update"
msgstr "Оновлення" msgstr "Оновлення"
@@ -727,24 +727,12 @@ msgstr "Оновлення"
msgid "Uploaded" msgid "Uploaded"
msgstr "Завантажено" msgstr "Завантажено"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "Швидкість переміщення XY (мм/с)" msgstr "Швидкість переміщення XY (мм/с)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "Швидкість XY (мм/с)" msgstr "Швидкість XY (мм/с)"
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Калібровка Z" msgstr "Калібровка Z"
@@ -760,12 +748,6 @@ msgstr "Z Нахил"
msgid "Z offset:" msgid "Z offset:"
msgstr "Зміщення по Z:" msgstr "Зміщення по Z:"
msgid "Z+"
msgstr "Бебістеп Z+"
msgid "Z-"
msgstr "Бебістеп Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "коментар" msgstr[0] "коментар"
@@ -793,6 +775,43 @@ msgstr "мм/с"
msgid "mm/s²" msgid "mm/s²"
msgstr "мм/с²" msgstr "мм/с²"
msgid "mm³/s"
msgstr "мм/с³"
#~ msgid "Sort:"
#~ msgstr "Сортувати:"
#~ msgid "Calibrating..."
#~ msgstr "Калібрування..."
#~ msgid "Z+"
#~ msgstr "Бебістеп Z+"
#~ msgid "Z-"
#~ msgstr "Бебістеп Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "Повторіть #%s"
#~ msgid "Add Printer"
#~ msgstr "Додати принтер"
#~ msgid "Initializing"
#~ msgstr "Ініціалізація"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "Видалити" #~ msgstr "Видалити"
@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-07-16 23:03+0800\n" "PO-Revision-Date: 2022-11-28 11:36-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,9 +46,6 @@ msgstr "应用"
msgid "Actions" msgid "Actions"
msgstr "控制" msgstr "控制"
msgid "Add Printer"
msgstr "添加打印机"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -114,9 +111,6 @@ msgstr "已校准,保存配置后生效"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr "校准中..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "设置值超出最大值:" msgstr "设置值超出最大值:"
@@ -212,6 +206,9 @@ msgstr "估算剩余时间方式"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "挤出机" msgstr "挤出机"
@@ -317,9 +314,6 @@ msgstr "主题风格"
msgid "Increase" msgid "Increase"
msgstr "增加" msgstr "增加"
msgid "Initializing"
msgstr "初始化"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "初始化打印机中..." msgstr "初始化打印机中..."
@@ -332,6 +326,9 @@ msgstr "接口"
msgid "Invalid" msgid "Invalid"
msgstr "无效" msgstr "无效"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "反转X轴" msgstr "反转X轴"
@@ -359,6 +356,9 @@ msgstr "Klipper正在启动"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper将重新启动" msgstr "Klipper将重新启动"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen 将重新启动"
msgid "Language" msgid "Language"
msgstr "语言" msgstr "语言"
@@ -401,6 +401,9 @@ msgstr "最大加速至减速"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "最大速度" msgstr "最大速度"
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -519,12 +522,18 @@ msgstr "探头偏移"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "配置文件名称:" msgstr "配置文件名称:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "龙门架调平" msgstr "龙门架调平"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "升高喷嘴" msgstr "升高喷嘴"
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "重置(Hard)" msgstr "重置(Hard)"
@@ -558,10 +567,6 @@ msgstr "回抽速度"
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr "重试 #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -633,9 +638,6 @@ msgstr "切片:"
msgid "Small" msgid "Small"
msgstr "小" msgstr "小"
msgid "Sort:"
msgstr "排序:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "速度(mm/s)" msgstr "速度(mm/s)"
@@ -678,10 +680,6 @@ msgstr "温度 (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "温度控制" msgstr "温度控制"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "要应用%s请重新启动KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "总:" msgstr "总:"
@@ -712,24 +710,12 @@ msgstr "更新中"
msgid "Uploaded" msgid "Uploaded"
msgstr "上传时间" msgstr "上传时间"
msgid "X+"
msgstr ""
msgid "X-"
msgstr ""
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY轴移动速度(mm/s)" msgstr "XY轴移动速度(mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "XY轴速度(mm/s)" msgstr "XY轴速度(mm/s)"
msgid "Y+"
msgstr ""
msgid "Y-"
msgstr ""
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z轴校准" msgstr "Z轴校准"
@@ -745,12 +731,6 @@ msgstr "Z 倾斜校准"
msgid "Z offset:" msgid "Z offset:"
msgstr "Z轴偏移:" msgstr "Z轴偏移:"
msgid "Z+"
msgstr ""
msgid "Z-"
msgstr ""
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "更改" msgstr[0] "更改"
@@ -774,6 +754,25 @@ msgstr ""
msgid "mm/s²" msgid "mm/s²"
msgstr "" msgstr ""
msgid "mm³/s"
msgstr ""
#~ msgid "Sort:"
#~ msgstr "排序:"
#~ msgid "Calibrating..."
#~ msgstr "校准中..."
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "重试 #%s"
#~ msgid "Add Printer"
#~ msgstr "添加打印机"
#~ msgid "Initializing"
#~ msgstr "初始化"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "删除" #~ msgstr "删除"
@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: KlipperScreen\n" "Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-12 11:20-0300\n" "POT-Creation-Date: 2022-11-30 18:17-0300\n"
"PO-Revision-Date: 2022-03-31 11:25-0300\n" "PO-Revision-Date: 2022-11-28 11:37-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_TW\n" "Language: zh_TW\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.2.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,9 +46,6 @@ msgstr "接受"
msgid "Actions" msgid "Actions"
msgstr "動作" msgstr "動作"
msgid "Add Printer"
msgstr "新增列印機"
msgid "Add profile" msgid "Add profile"
msgstr "" msgstr ""
@@ -114,9 +111,6 @@ msgstr "校準,保存配置以使其永久化"
msgid "Calibrating" msgid "Calibrating"
msgstr "" msgstr ""
msgid "Calibrating..."
msgstr ""
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "不能設置超過最大值:" msgstr "不能設置超過最大值:"
@@ -212,6 +206,9 @@ msgstr "預估時間方法"
msgid "Exclude Object" msgid "Exclude Object"
msgstr "" msgstr ""
msgid "Extra Large"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "擠出機" msgstr "擠出機"
@@ -317,9 +314,6 @@ msgstr "圖標主題"
msgid "Increase" msgid "Increase"
msgstr "增加" msgstr "增加"
msgid "Initializing"
msgstr "初始化中"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "初始化列印機中.." msgstr "初始化列印機中.."
@@ -332,6 +326,9 @@ msgstr "介面"
msgid "Invalid" msgid "Invalid"
msgstr "無效的" msgstr "無效的"
msgid "Invalid password"
msgstr ""
msgid "Invert X" msgid "Invert X"
msgstr "反轉 X" msgstr "反轉 X"
@@ -359,6 +356,9 @@ msgstr "Klipper 正在嘗試重新啟動"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "Klipper 將重新啟動" msgstr "Klipper 將重新啟動"
msgid "KlipperScreen will reboot"
msgstr "KlipperScreen 將重新啟動"
msgid "Language" msgid "Language"
msgstr "語言" msgstr "語言"
@@ -401,6 +401,9 @@ msgstr "最大加速到減速"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "最大速度" msgstr "最大速度"
msgid "Maximum"
msgstr ""
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -519,12 +522,18 @@ msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "配置檔案名稱:" msgstr "配置檔案名稱:"
msgid "Provide KlipperScreen.log when asking for help.\n"
msgstr ""
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "龍門調平" msgstr "龍門調平"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "上升噴嘴" msgstr "上升噴嘴"
msgid "Recover"
msgstr ""
msgid "Recover Hard" msgid "Recover Hard"
msgstr "恢復 Hard" msgstr "恢復 Hard"
@@ -558,10 +567,6 @@ msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#, python-format
msgid "Retry #%s"
msgstr "重試 #%s"
msgid "Retrying" msgid "Retrying"
msgstr "" msgstr ""
@@ -633,9 +638,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "小的" msgstr "小的"
msgid "Sort:"
msgstr ""
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "速度(mm/s)" msgstr "速度(mm/s)"
@@ -678,10 +680,6 @@ msgstr "溫度(°C)"
msgid "Temperature" msgid "Temperature"
msgstr "溫度" msgstr "溫度"
#, python-format
msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "要應用 %s,需要重新啟動 KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "全部的:" msgstr "全部的:"
@@ -712,24 +710,12 @@ msgstr "更新"
msgid "Uploaded" msgid "Uploaded"
msgstr "上傳時間" msgstr "上傳時間"
msgid "X+"
msgstr "X+"
msgid "X-"
msgstr "X-"
msgid "XY Move Speed (mm/s)" msgid "XY Move Speed (mm/s)"
msgstr "XY 移動速度 (mm/s)" msgstr "XY 移動速度 (mm/s)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr ""
msgid "Y+"
msgstr "Y+"
msgid "Y-"
msgstr "Y-"
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z 校準" msgstr "Z 校準"
@@ -745,12 +731,6 @@ msgstr "Z 傾斜"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr ""
msgid "Z+"
msgstr "Z+"
msgid "Z-"
msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "改變" msgstr[0] "改變"
@@ -774,6 +754,37 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
msgid "mm³/s"
msgstr ""
#~ msgid "Z+"
#~ msgstr "Z+"
#~ msgid "Z-"
#~ msgstr "Z-"
#~ msgid "X+"
#~ msgstr "X+"
#~ msgid "X-"
#~ msgstr "X-"
#~ msgid "Y+"
#~ msgstr "Y+"
#~ msgid "Y-"
#~ msgstr "Y-"
#, python-format
#~ msgid "Retry #%s"
#~ msgstr "重試 #%s"
#~ msgid "Add Printer"
#~ msgstr "新增列印機"
#~ msgid "Initializing"
#~ msgstr "初始化中"
#~ msgid "Delete" #~ msgid "Delete"
#~ msgstr "刪除" #~ msgstr "刪除"
+71 -46
View File
@@ -1,17 +1,18 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, GLib from gi.repository import GLib
class Printer: class Printer:
def __init__(self, state_cb): def __init__(self, state_cb, state_callbacks, busy_cb):
self.config = None self.config = {}
self.data = None self.data = {}
self.state = "disconnected" self.state = "disconnected"
self.state_cb = state_cb self.state_cb = state_cb
self.state_callbacks = None self.state_callbacks = state_callbacks
self.devices = {} self.devices = {}
self.power_devices = {} self.power_devices = {}
self.tools = [] self.tools = []
@@ -21,22 +22,9 @@ class Printer:
self.output_pin_count = 0 self.output_pin_count = 0
self.store_timeout = None self.store_timeout = None
self.tempstore = {} self.tempstore = {}
self.busy_cb = busy_cb
def reset(self): self.busy = False
self.config = None self.tempstore_size = 1200
self.data = None
self.state = None
self.state_cb = None
self.state_callbacks = None
self.devices = None
self.power_devices = None
self.tools = None
self.extrudercount = None
self.tempdevcount = None
self.fancount = None
self.output_pin_count = None
self.store_timeout = None
self.tempstore = None
def reinit(self, printer_info, data): def reinit(self, printer_info, data):
self.config = data['configfile']['config'] self.config = data['configfile']['config']
@@ -48,8 +36,10 @@ class Printer:
self.fancount = 0 self.fancount = 0
self.output_pin_count = 0 self.output_pin_count = 0
self.tempstore = {} self.tempstore = {}
self.busy = False
if not self.store_timeout: if not self.store_timeout:
self.store_timeout = GLib.timeout_add_seconds(1, self._update_temp_store) self.store_timeout = GLib.timeout_add_seconds(1, self._update_temp_store)
self.tempstore_size = 1200
for x in self.config.keys(): for x in self.config.keys():
if x[:8] == "extruder": if x[:8] == "extruder":
@@ -66,10 +56,9 @@ class Printer:
or x.startswith('heater_generic ') \ or x.startswith('heater_generic ') \
or x.startswith('temperature_sensor ') \ or x.startswith('temperature_sensor ') \
or x.startswith('temperature_fan '): or x.startswith('temperature_fan '):
self.devices[x] = { self.devices[x] = {"temperature": 0}
"temperature": 0, if not x.startswith('temperature_sensor '):
"target": 0 self.devices[x]["target"] = 0
}
# Support for hiding devices by name # Support for hiding devices by name
name = x.split()[1] if len(x.split()) > 1 else x name = x.split()[1] if len(x.split()) > 1 else x
if not name.startswith("_"): if not name.startswith("_"):
@@ -93,6 +82,8 @@ class Printer:
logging.info(f"# Output pins: {self.output_pin_count}") logging.info(f"# Output pins: {self.output_pin_count}")
def process_update(self, data): def process_update(self, data):
if self.data is None:
return
for x in (self.get_tools() + self.get_heaters() + self.get_filament_sensors()): for x in (self.get_tools() + self.get_heaters() + self.get_filament_sensors()):
if x in data: if x in data:
for i in data[x]: for i in data[x]:
@@ -105,21 +96,30 @@ class Printer:
self.data[x] = {} self.data[x] = {}
self.data[x].update(data[x]) self.data[x].update(data[x])
if "webhooks" in data or "print_stats" in data: if "webhooks" in data or "print_stats" in data or "idle_timeout" in data:
self.process_status_update() self.process_status_update()
def evaluate_state(self): def evaluate_state(self):
# webhooks states: startup, ready, shutdown, error # webhooks states: startup, ready, shutdown, error
# print_stats: standby, printing, paused, error, complete # print_stats: standby, printing, paused, error, complete
# idle_timeout: Idle, Printing, Ready
if self.data['webhooks']['state'] == "ready" and self.data['print_stats']: if self.data['webhooks']['state'] == "ready" and self.data['print_stats']:
if self.data['print_stats']['state'] == 'paused' or self.data.get('pause_resume').get('is_paused'): if self.data['print_stats']['state'] == 'paused':
return "paused" return "paused"
if self.data['print_stats']['state'] == 'printing': if self.data['print_stats']['state'] == 'printing':
return "printing" return "printing"
if self.data['idle_timeout'] and self.data['idle_timeout']['state'].lower() == "printing":
return "busy"
return self.data['webhooks']['state'] return self.data['webhooks']['state']
def process_status_update(self): def process_status_update(self):
state = self.evaluate_state() state = self.evaluate_state()
if state == "busy":
self.busy = True
return GLib.idle_add(self.busy_cb, True)
if self.busy:
self.busy = False
GLib.idle_add(self.busy_cb, False)
if state != self.state: if state != self.state:
self.change_state(state) self.change_state(state)
@@ -128,8 +128,8 @@ class Printer:
self.power_devices[data['device']]['status'] = data['status'] self.power_devices[data['device']]['status'] = data['status']
def change_state(self, state): def change_state(self, state):
if state not in list(self.state_callbacks): # disconnected, startup, ready, shutdown, error, paused, printing if state not in list(self.state_callbacks):
return return # disconnected, startup, ready, shutdown, error, paused, printing
if state != self.state: if state != self.state:
logging.debug(f"Changing state from '{self.state}' to '{state}'") logging.debug(f"Changing state from '{self.state}' to '{state}'")
self.state = state self.state = state
@@ -155,6 +155,16 @@ class Printer:
def get_config_section(self, section): def get_config_section(self, section):
return self.config[section] if section in self.config else False return self.config[section] if section in self.config else False
def get_macro(self, macro):
return next(
(
self.config[key]
for key in self.config.keys()
if key.find(macro) > -1
),
False,
)
def get_fans(self): def get_fans(self):
fans = [] fans = []
if self.config_section_exists("fan"): if self.config_section_exists("fan"):
@@ -186,6 +196,14 @@ class Printer:
sensors.extend(iter(self.get_config_section_list("filament_motion_sensor "))) sensors.extend(iter(self.get_config_section_list("filament_motion_sensor ")))
return sensors return sensors
def get_probe(self):
probe_types = ["probe", "bltouch", "smart_effector", "dockable_probe"]
for probe_type in probe_types:
if self.config_section_exists(probe_type):
logging.info(f"Probe type: {probe_type}")
return self.get_config_section(probe_type)
return None
def get_printer_status_data(self): def get_printer_status_data(self):
data = { data = {
"printer": { "printer": {
@@ -231,11 +249,12 @@ class Printer:
return self.devices[dev][stat] return self.devices[dev][stat]
return None return None
def get_fan_speed(self, fan="fan", speed=None): def get_fan_speed(self, fan="fan"):
speed = 0
if fan not in self.config or fan not in self.data: if fan not in self.config or fan not in self.data:
logging.debug(f"Error getting {fan} config") logging.debug(f"Error getting {fan} config")
return speed if speed is not None else 0 return speed
if speed is None and "speed" in self.data[fan]: if "speed" in self.data[fan]:
speed = self.data[fan]["speed"] speed = self.data[fan]["speed"]
if 'max_power' in self.config[fan]: if 'max_power' in self.config[fan]:
max_power = float(self.config[fan]['max_power']) max_power = float(self.config[fan]['max_power'])
@@ -258,8 +277,8 @@ class Printer:
if self.tempstore is not None: if self.tempstore is not None:
return list(self.tempstore) return list(self.tempstore)
def get_temp_store_device_has_target(self, device): def device_has_target(self, device):
return device in self.tempstore and "targets" in self.tempstore[device] return "target" in self.devices[device] or (device in self.tempstore and "targets" in self.tempstore[device])
def get_temp_store(self, device, section=False, results=0): def get_temp_store(self, device, section=False, results=0):
if device not in self.tempstore: if device not in self.tempstore:
@@ -289,14 +308,21 @@ class Printer:
if "heater_bed" in self.devices: if "heater_bed" in self.devices:
return True return True
def init_temp_store(self, result): def init_temp_store(self, tempstore):
for dev in result: if tempstore and 'result' in tempstore:
self.tempstore[dev] = {} if self.tempstore and list(self.tempstore) != list(tempstore['result']):
if "targets" in result[dev]: logging.debug("Tempstore has changed")
self.tempstore[dev]["targets"] = result[dev]["targets"] self.tempstore = tempstore['result']
if "temperatures" in result[dev]: self.change_state(self.state)
self.tempstore[dev]["temperatures"] = result[dev]["temperatures"] else:
logging.info(f"Temp store: {list(self.tempstore)}") self.tempstore = tempstore['result']
for device in self.tempstore:
for x in self.tempstore[device]:
length = len(self.tempstore[device][x])
if length < self.tempstore_size:
for i in range(1, self.tempstore_size - length):
self.tempstore[device][x].insert(0, 0)
logging.info(f"Temp store: {list(self.tempstore)}")
def config_section_exists(self, section): def config_section_exists(self, section):
return section in self.get_config_section_list() return section in self.get_config_section_list()
@@ -312,10 +338,9 @@ class Printer:
return False return False
for device in self.tempstore: for device in self.tempstore:
for x in self.tempstore[device]: for x in self.tempstore[device]:
if len(self.tempstore[device][x]) >= 1200: self.tempstore[device][x].pop(0)
self.tempstore[device][x].pop(0)
temp = self.get_dev_stat(device, x[:-1]) temp = self.get_dev_stat(device, x[:-1])
if temp is None: if temp is None:
temp = 0 temp = 0
self.tempstore[device][x].append(round(temp, 2)) self.tempstore[device][x].append(temp)
return True return True
+44 -40
View File
@@ -1,35 +1,43 @@
import gi
import logging import logging
import datetime
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
class ScreenPanel: class ScreenPanel:
_screen = None
_config = None
_files = None
_printer = None
_gtk = None
ks_printer_cfg = None
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
self.menu = None self.menu = None
self._screen = screen ScreenPanel._screen = screen
self._config = screen._config ScreenPanel._config = screen._config
self._files = screen.files ScreenPanel._files = screen.files
self._printer = screen.printer ScreenPanel._printer = screen.printer
ScreenPanel._gtk = screen.gtk
self.labels = {} self.labels = {}
self._gtk = screen.gtk
self.control = {} self.control = {}
self.title = title self.title = title
self.devices = {} self.devices = {}
self.active_heaters = [] self.active_heaters = []
self.ks_printer_cfg = None
self.layout = Gtk.Layout()
self.layout.set_size(self._screen.width, self._screen.height)
self.content = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.content = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.content.get_style_context().add_class("content") self.content.get_style_context().add_class("content")
self.content.set_hexpand(True) self.content.set_hexpand(True)
self.content.set_vexpand(True) self.content.set_vexpand(True)
self._show_heater_power = self._config.get_main_config().getboolean('show_heater_power', False) self._show_heater_power = self._config.get_main_config().getboolean('show_heater_power', False)
self.bts = self._gtk.bsidescale
self.update_dialog = None
def _autoscroll(self, scroll, *args):
adj = scroll.get_vadjustment()
adj.set_value(adj.get_upper() - adj.get_page_size())
def emergency_stop(self, widget): def emergency_stop(self, widget):
if self._config.get_main_config().getboolean('confirm_estop', False): if self._config.get_main_config().getboolean('confirm_estop', False):
@@ -38,45 +46,24 @@ class ScreenPanel:
else: else:
self._screen._ws.klippy.emergency_stop() self._screen._ws.klippy.emergency_stop()
def get(self):
return self.layout
def get_content(self):
return self.content
def get_file_image(self, filename, width=None, height=None, small=False): def get_file_image(self, filename, width=None, height=None, small=False):
if not self._files.has_thumbnail(filename): if not self._files.has_thumbnail(filename):
return None 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) loc = self._files.get_thumbnail_location(filename, small)
if loc is None: if loc is None:
return None 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
if loc[0] == "file": if loc[0] == "file":
return self._gtk.PixbufFromFile(loc[1], width, height) return self._gtk.PixbufFromFile(loc[1], width, height)
if loc[0] == "http": if loc[0] == "http":
return self._gtk.PixbufFromHttp(loc[1], width, height) return self._gtk.PixbufFromHttp(loc[1], width, height)
return None return None
def get_title(self):
return self.title
def menu_item_clicked(self, widget, panel, item): def menu_item_clicked(self, widget, panel, item):
self._screen.show_panel(f'{self._screen._cur_panels[-1]}_{panel}', item['panel'], item['name'], 1, False) self._screen.show_panel(panel, item['panel'], item['name'], 1, False)
def menu_return(self, widget, home=False): def load_menu(self, widget, name, title=None):
if home is False:
self._screen._menu_go_back()
return
self._screen._menu_go_home()
def set_title(self, title):
self.title = title
def show_all(self):
self._screen.show_all()
def load_menu(self, widget, name):
if f"{name}_menu" not in self.labels: if f"{name}_menu" not in self.labels:
return return
@@ -86,12 +73,14 @@ class ScreenPanel:
self.menu.append(f'{name}_menu') self.menu.append(f'{name}_menu')
self.content.add(self.labels[self.menu[-1]]) self.content.add(self.labels[self.menu[-1]])
self.content.show_all() self.content.show_all()
if title:
self._screen.base_panel.set_title(f"{self.title} | {title}")
def unload_menu(self, widget=None): def unload_menu(self, widget=None):
logging.debug(f"self.menu: {self.menu}") logging.debug(f"self.menu: {self.menu}")
if len(self.menu) <= 1 or self.menu[-2] not in self.labels: if len(self.menu) <= 1 or self.menu[-2] not in self.labels:
return return
self._screen.base_panel.set_title(self._screen.panels[self._screen._cur_panels[-1]].title)
self.menu.pop() self.menu.pop()
for child in self.content.get_children(): for child in self.content.get_children():
self.content.remove(child) self.content.remove(child)
@@ -129,7 +118,6 @@ class ScreenPanel:
def format_time(seconds): def format_time(seconds):
if seconds is None or seconds <= 0: if seconds is None or seconds <= 0:
return "-" return "-"
seconds = int(seconds)
days = seconds // 86400 days = seconds // 86400
seconds %= 86400 seconds %= 86400
hours = seconds // 3600 hours = seconds // 3600
@@ -141,6 +129,22 @@ class ScreenPanel:
f"{f'{minutes:2.0f}m ' if minutes > 0 else ''}" \ f"{f'{minutes:2.0f}m ' if minutes > 0 else ''}" \
f"{f'{seconds:2.0f}s' if days == 0 and hours == 0 and minutes == 0 else ''}" f"{f'{seconds:2.0f}s' if days == 0 and hours == 0 and minutes == 0 else ''}"
def format_eta(self, total, elapsed):
if total is None:
return "-"
seconds = total - elapsed
if seconds <= 0:
return "-"
days = seconds // 86400
seconds %= 86400
hours = seconds // 3600
seconds %= 3600
minutes = seconds // 60
eta = datetime.datetime.now() + datetime.timedelta(days=days, hours=hours, minutes=minutes)
if self._config.get_main_config().getboolean("24htime", True):
return f"{self.format_time(total - elapsed)} | {eta:%H:%M} {f' +{days:2.0f}d' if days > 0 else ''}"
return f"{self.format_time(total - elapsed)} | {eta:%I:%M %p} {f' +{days:2.0f}d' if days > 0 else ''}"
@staticmethod @staticmethod
def format_size(size): def format_size(size):
size = float(size) size = float(size)
+6 -1
View File
@@ -48,9 +48,14 @@ class BedMap(Gtk.DrawingArea):
ctx.close_path() ctx.close_path()
ctx.fill() ctx.fill()
ctx.stroke() ctx.stroke()
if rows > 16 or columns > 8:
continue
# Numbers # Numbers
ctx.set_source_rgb(0, 0, 0) ctx.set_source_rgb(0, 0, 0)
ctx.move_to((lx + rx) / 2 - self.font_size, (ty + by + self.font_size) / 2) if column > 0:
ctx.move_to((lx + rx) / 2 - self.font_size, (ty + by + self.font_size) / 2)
else:
ctx.move_to((lx + rx) / 2 - self.font_size * 1.2, (ty + by + self.font_size) / 2)
ctx.show_text(f"{column:.2f}") ctx.show_text(f"{column:.2f}")
ctx.stroke() ctx.stroke()
@@ -1,8 +1,9 @@
import datetime import datetime
import gi
import logging import logging
import math import math
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, Gtk from gi.repository import Gdk, Gtk
@@ -33,7 +34,6 @@ class HeaterGraph(Gtk.DrawingArea):
"fill": fill, "fill": fill,
"rgb": rgb "rgb": rgb
}}) }})
self.max_length = max(self.max_length, len(self.printer.get_temp_store(name, ev_type)))
@staticmethod @staticmethod
def event_cb(da, ev): def event_cb(da, ev):
@@ -91,6 +91,8 @@ class HeaterGraph(Gtk.DrawingArea):
points_per_pixel = self.max_length / graph_width points_per_pixel = self.max_length / graph_width
data_points = int(round(graph_width * points_per_pixel, 0)) data_points = int(round(graph_width * points_per_pixel, 0))
max_num = math.ceil(self.get_max_num(data_points) * 1.1 / 10) * 10 max_num = math.ceil(self.get_max_num(data_points) * 1.1 / 10) * 10
if points_per_pixel == 0:
return
d_width = 1 / points_per_pixel d_width = 1 / points_per_pixel
d_height_scale = self.graph_lines(ctx, gsize, max_num) d_height_scale = self.graph_lines(ctx, gsize, max_num)
@@ -187,7 +189,7 @@ class HeaterGraph(Gtk.DrawingArea):
ctx.set_font_size(self.font_size) ctx.set_font_size(self.font_size)
ctx.show_text(f"{h:2}:{m:02}") ctx.show_text(f"{h:2}:{m:02}")
ctx.stroke() ctx.stroke()
i += 1 if self.max_length < 600 else 2 i += 1 + self.max_length // 601
def is_showing(self, device): def is_showing(self, device):
return False if device not in self.store else self.store[device]['show'] return False if device not in self.store else self.store[device]['show']
+52 -18
View File
@@ -1,5 +1,6 @@
import logging import logging
import os import os
import gi import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
@@ -7,7 +8,7 @@ from gi.repository import Gtk, GLib
class Keyboard(Gtk.Box): class Keyboard(Gtk.Box):
langs = ["de", "en", "es"] langs = ["de", "en", "fr", "es"]
def __init__(self, screen, close_cb, entry=None): def __init__(self, screen, close_cb, entry=None):
super().__init__(orientation=Gtk.Orientation.VERTICAL) super().__init__(orientation=Gtk.Orientation.VERTICAL)
@@ -25,42 +26,73 @@ class Keyboard(Gtk.Box):
[ [
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "⌫"], ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "⌫"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"],
["ABC", "y", "x", "c", "v", "b", "n", "m", ",", ".", "?123"], ["ABC", "123", "#+=", "y", "x", "c", "v", "b", "n", "m"],
], ],
[ [
["Q", "W", "E", "R", "T", "Z", "U", "I", "O", "P", "Ü", "⌫"], ["Q", "W", "E", "R", "T", "Z", "U", "I", "O", "P", "Ü", "⌫"],
["A", "S", "D", "F", "G", "H", "J", "K", "L", "Ö", "Ä"], ["A", "S", "D", "F", "G", "H", "J", "K", "L", "Ö", "Ä"],
["?123", "Y", "X", "C", "V", "B", "N", "M", ",", ".", "abc"], ["abc", "123", "#+=", "Y", "X", "C", "V", "B", "N", "M"],
], ],
[ [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "⌫"], ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "⌫"],
["=", "-", "+", "*", "/", "\\", ":", ";", "'", "\"", "ẞ"], ["-", "/", ":", ";", "(", ")", "$", "&", "@", "\"", "ẞ"],
["abc", "(", ")", "#", "$", "!", "?", "@", "_", ",", "ABC"], ["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "⌫"],
["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "•"],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
]
]
elif language == "fr":
self.keys = [
[
["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "⌫"],
["q", "s", "d", "f", "g", "h", "j", "k", "l", "m"],
["ABC", "123", "#+=", "w", "x", "c", "v", "b", "n"],
],
[
["A", "Z", "E", "R", "T", "Y", "U", "I", "O", "P", "⌫"],
["Q", "S", "D", "F", "G", "H", "J", "K", "L", "M"],
["abc", "123", "#+=", "W", "X", "C", "V", "B", "N"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "⌫"],
["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""],
["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "⌫"],
["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "•"],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
] ]
] ]
else: else:
self.keys = [ self.keys = [
[ [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "⌫"], ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "⌫"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "'"], ["a", "s", "d", "f", "g", "h", "j", "k", "l"],
["ABC", "z", "x", "c", "v", "b", "n", "m", ",", ".", "?123"], ["ABC", "123", "#+=", "z", "x", "c", "v", "b", "n", "m"],
], ],
[ [
["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "⌫"], ["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "⌫"],
["A", "S", "D", "F", "G", "H", "J", "K", "L", "'"], ["A", "S", "D", "F", "G", "H", "J", "K", "L"],
["?123", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "abc"], ["abc", "123", "#+=", "Z", "X", "C", "V", "B", "N", "M"],
], ],
[ [
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "⌫"], ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "⌫"],
["=", "-", "+", "*", "/", "\\", ":", ";", "'", "\""], ["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""],
["abc", "(", ")", "#", "$", "!", "?", "@", "_", ",", "ABC"], ["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", "⌫"],
["_", "\\", "|", "~", "<", ">", "€", "£", "¥", "•"],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
] ]
] ]
if language == "es": if language == "es":
self.keys[0][1].remove("'")
self.keys[0][1].append("ñ") self.keys[0][1].append("ñ")
self.keys[1][1].remove("'")
self.keys[1][1].append("Ñ") self.keys[1][1].append("Ñ")
for pallet in self.keys: for pallet in self.keys:
@@ -71,13 +103,13 @@ class Keyboard(Gtk.Box):
for r, row in enumerate(pallet): for r, row in enumerate(pallet):
for k, key in enumerate(row): for k, key in enumerate(row):
if key == "⌫": if key == "⌫":
self.buttons[p][r][k] = screen.gtk.ButtonImage("backspace", scale=.6) self.buttons[p][r][k] = screen.gtk.Button("backspace", scale=.6)
elif key == "✕": elif key == "✕":
self.buttons[p][r][k] = screen.gtk.ButtonImage("cancel", scale=.6) self.buttons[p][r][k] = screen.gtk.Button("cancel", scale=.6)
elif key == "✔": elif key == "✔":
self.buttons[p][r][k] = screen.gtk.ButtonImage("complete", scale=.6) self.buttons[p][r][k] = screen.gtk.Button("complete", scale=.6)
else: else:
self.buttons[p][r][k] = screen.gtk.Button(key) self.buttons[p][r][k] = screen.gtk.Button(label=key, lines=1)
self.buttons[p][r][k].set_hexpand(True) self.buttons[p][r][k].set_hexpand(True)
self.buttons[p][r][k].set_vexpand(True) self.buttons[p][r][k].set_vexpand(True)
self.buttons[p][r][k].connect('button-press-event', self.repeat, key) self.buttons[p][r][k].connect('button-press-event', self.repeat, key)
@@ -151,7 +183,9 @@ class Keyboard(Gtk.Box):
self.set_pallet(0) self.set_pallet(0)
elif key == "ABC": elif key == "ABC":
self.set_pallet(1) self.set_pallet(1)
elif key == "?123": elif key == "123":
self.set_pallet(2) self.set_pallet(2)
elif key == "#+=":
self.set_pallet(3)
else: else:
Gtk.Entry.do_insert_at_cursor(self.entry, key) Gtk.Entry.do_insert_at_cursor(self.entry, key)
+4 -4
View File
@@ -34,11 +34,11 @@ class Keypad(Gtk.Box):
for i in range(len(keys)): for i in range(len(keys)):
k_id = f'button_{str(keys[i][0])}' k_id = f'button_{str(keys[i][0])}'
if keys[i][0] == "B": if keys[i][0] == "B":
self.labels[k_id] = self._gtk.ButtonImage("backspace", scale=1) self.labels[k_id] = self._gtk.Button("backspace", scale=1)
elif keys[i][0] == "E": elif keys[i][0] == "E":
self.labels[k_id] = self._gtk.ButtonImage("complete", scale=1) self.labels[k_id] = self._gtk.Button("complete", scale=1)
else: else:
self.labels[k_id] = Gtk.Button(keys[i][0]) self.labels[k_id] = Gtk.Button(label=keys[i][0])
self.labels[k_id].connect('clicked', self.update_entry, keys[i][0]) self.labels[k_id].connect('clicked', self.update_entry, keys[i][0])
self.labels[k_id].get_style_context().add_class(keys[i][1]) self.labels[k_id].get_style_context().add_class(keys[i][1])
numpad.attach(self.labels[k_id], i % 3, i / 3, 1, 1) numpad.attach(self.labels[k_id], i % 3, i / 3, 1, 1)
@@ -48,7 +48,7 @@ class Keypad(Gtk.Box):
self.labels['entry'].props.xalign = 0.5 self.labels['entry'].props.xalign = 0.5
self.labels['entry'].connect("activate", self.update_entry, "E") self.labels['entry'].connect("activate", self.update_entry, "E")
b = self._gtk.ButtonImage('cancel', _('Close'), None, .66, Gtk.PositionType.LEFT, 1) b = self._gtk.Button('cancel', _('Close'), None, .66, Gtk.PositionType.LEFT, 1)
b.connect("clicked", close_function) b.connect("clicked", close_function)
self.add(self.labels['entry']) self.add(self.labels['entry'])
+5 -27
View File
@@ -3,9 +3,7 @@ import logging
import re import re
import socket import socket
import threading import threading
from threading import Thread from threading import Thread
from queue import Queue from queue import Queue
import gi import gi
@@ -18,31 +16,25 @@ class WifiManager:
networks_in_supplicant = [] networks_in_supplicant = []
connected = False connected = False
_stop_loop = False _stop_loop = False
thread = None
def __init__(self, interface, *args, **kwargs): def __init__(self, interface, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.loop = None
self._poll_task = None
self._scanning = False
self._callbacks = { self._callbacks = {
"connected": [], "connected": [],
"connecting_status": [], "connecting_status": [],
"scan_results": [] "scan_results": [],
"popup": [],
} }
self._stop_loop = False self._stop_loop = False
self.connected = False self.connected = False
self.connected_ssid = None self.connected_ssid = None
self.connecting_info = []
self.event = threading.Event() self.event = threading.Event()
self.initialized = False self.initialized = False
self.interface = interface self.interface = interface
self.networks = {} self.networks = {}
self.supplicant_networks = {} self.supplicant_networks = {}
self.queue = Queue() self.queue = Queue()
self.tasks = []
self.timeout = None self.timeout = None
self.scan_time = 0
ks_socket_file = "/tmp/.KS_wpa_supplicant" ks_socket_file = "/tmp/.KS_wpa_supplicant"
if os.path.exists(ks_socket_file): if os.path.exists(ks_socket_file):
@@ -117,8 +109,8 @@ class WifiManager:
return False return False
logging.info(f"Attempting to connect to wifi: {netid}") logging.info(f"Attempting to connect to wifi: {netid}")
self.connecting_info = [f"Attempting to connect to {ssid}"] self.callback("connecting_status", f"Attempting to connect to {ssid}")
self.wpa_cli(f"SELECT_NETWORK {id}") self.wpa_cli(f"SELECT_NETWORK {netid}")
self.save_wpa_conf() self.save_wpa_conf()
def delete_network(self, ssid): def delete_network(self, ssid):
@@ -197,7 +189,7 @@ class WifiManager:
for net in self.networks: for net in self.networks:
if mac == net['mac']: if mac == net['mac']:
return net return net
return None return {}
def get_networks(self): def get_networks(self):
return list(self.networks) return list(self.networks)
@@ -205,12 +197,6 @@ class WifiManager:
def get_supplicant_networks(self): def get_supplicant_networks(self):
return self.supplicant_networks return self.supplicant_networks
def is_connected(self):
return self.connected
def is_initialized(self):
return self.initialized
def read_wpa_supplicant(self): def read_wpa_supplicant(self):
results = self.wpa_cli("LIST_NETWORKS").split('\n') results = self.wpa_cli("LIST_NETWORKS").split('\n')
results.pop(0) results.pop(0)
@@ -224,13 +210,8 @@ class WifiManager:
} }
self.networks_in_supplicant.append(self.supplicant_networks[net[0]]) self.networks_in_supplicant.append(self.supplicant_networks[net[0]])
def remove_callback(self, name, callback):
if name in self._callbacks and callback in self._callbacks[name]:
self._callbacks[name].remove(callback)
def rescan(self): def rescan(self):
self.wpa_cli("SCAN", False) self.wpa_cli("SCAN", False)
return True
def save_wpa_conf(self): def save_wpa_conf(self):
logging.info("Saving WPA config") logging.info("Saving WPA config")
@@ -342,9 +323,6 @@ class WpaSocket(Thread):
def skip_command(self): def skip_command(self):
self.skip_commands = self.skip_commands + 1 self.skip_commands = self.skip_commands + 1
def stop(self):
self._stop_loop = True
class WifiChannels: class WifiChannels:
@staticmethod @staticmethod
+274
View File
@@ -0,0 +1,274 @@
# Network in KlipperScreen is a connection in NetworkManager
# Interface in KlipperScreen is a device in NetworkManager
import contextlib
import logging
import uuid
from ks_includes import NetworkManager
import dbus
from dbus.mainloop.glib import DBusGMainLoop
import gi
gi.require_version('Gdk', '3.0')
from gi.repository import GLib
from ks_includes.wifi import WifiChannels
class WifiManager:
networks_in_supplicant = []
def __init__(self, interface_name, *args, **kwargs):
super().__init__(*args, **kwargs)
DBusGMainLoop(set_as_default=True)
self._callbacks = {
"connected": [],
"connecting_status": [],
"scan_results": [],
"popup": [],
}
self.connected = False
self.connected_ssid = None
self.interface_name = interface_name
self.known_networks = {} # List of known connections
self.visible_networks = {} # List of visible access points
self.ssid_by_path = {}
self.path_by_ssid = {}
self.hidden_ssid_index = 0
self.wifi_dev = NetworkManager.NetworkManager.GetDeviceByIpIface(interface_name)
self.wifi_dev.OnAccessPointAdded(self._ap_added)
self.wifi_dev.OnAccessPointRemoved(self._ap_removed)
self.wifi_dev.OnStateChanged(self._ap_state_changed)
for ap in self.wifi_dev.GetAccessPoints():
self._add_ap(ap)
self._update_known_connections()
self.initialized = True
def _update_known_connections(self):
self.known_networks = {}
for con in NetworkManager.Settings.ListConnections():
settings = con.GetSettings()
if "802-11-wireless" in settings:
ssid = settings["802-11-wireless"]['ssid']
self.known_networks[ssid] = con
def _ap_added(self, nm, interface, signal, access_point):
with contextlib.suppress(NetworkManager.ObjectVanished):
access_point.OnPropertiesChanged(self._ap_prop_changed)
ssid = self._add_ap(access_point)
for cb in self._callbacks['scan_results']:
args = (cb, [ssid], [])
GLib.idle_add(*args)
def _ap_removed(self, dev, interface, signal, access_point):
path = access_point.object_path
if path in self.ssid_by_path:
ssid = self.ssid_by_path[path]
self._remove_ap(path)
for cb in self._callbacks['scan_results']:
args = (cb, [ssid], [])
GLib.idle_add(*args)
def _ap_state_changed(self, nm, interface, signal, old_state, new_state, reason):
msg = ""
if new_state in (NetworkManager.NM_DEVICE_STATE_UNKNOWN, NetworkManager.NM_DEVICE_STATE_REASON_UNKNOWN):
msg = "State is unknown"
elif new_state == NetworkManager.NM_DEVICE_STATE_UNMANAGED:
msg = "Error: Not managed by NetworkManager"
elif new_state == NetworkManager.NM_DEVICE_STATE_UNAVAILABLE:
msg = "Error: Not available for use:\nReasons may include the wireless switched off, missing firmware, etc."
elif new_state == NetworkManager.NM_DEVICE_STATE_DISCONNECTED:
msg = "Currently disconnected"
elif new_state == NetworkManager.NM_DEVICE_STATE_PREPARE:
msg = "Preparing the connection to the network"
elif new_state == NetworkManager.NM_DEVICE_STATE_CONFIG:
msg = "Connecting to the requested network..."
elif new_state == NetworkManager.NM_DEVICE_STATE_NEED_AUTH:
msg = "Authorizing"
elif new_state == NetworkManager.NM_DEVICE_STATE_IP_CONFIG:
msg = "Requesting IP addresses and routing information"
elif new_state == NetworkManager.NM_DEVICE_STATE_IP_CHECK:
msg = "Checking whether further action is required for the requested network connection"
elif new_state == NetworkManager.NM_DEVICE_STATE_SECONDARIES:
msg = "Waiting for a secondary connection (like a VPN)"
elif new_state == NetworkManager.NM_DEVICE_STATE_ACTIVATED:
msg = "Connected"
elif new_state == NetworkManager.NM_DEVICE_STATE_DEACTIVATING:
msg = "A disconnection from the current network connection was requested"
elif new_state == NetworkManager.NM_DEVICE_STATE_FAILED:
msg = "Failed to connect to the requested network"
self.callback("popup", msg)
elif new_state == NetworkManager.NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED:
msg = "A dependency of the connection failed"
elif new_state == NetworkManager.NM_DEVICE_STATE_REASON_CARRIER:
msg = ""
else:
logging.info(f"State {new_state}")
if msg != "":
self.callback("connecting_status", msg)
if new_state == NetworkManager.NM_DEVICE_STATE_ACTIVATED:
self.connected = True
for cb in self._callbacks['connected']:
args = (cb, self.get_connected_ssid(), None)
GLib.idle_add(*args)
else:
self.connected = False
def _ap_prop_changed(self, ap, interface, signal, properties):
pass
def _add_ap(self, ap):
ssid = ap.Ssid
if ssid == "":
ssid = _("Hidden") + f" {self.hidden_ssid_index}"
self.hidden_ssid_index += 1
self.ssid_by_path[ap.object_path] = ssid
self.path_by_ssid[ssid] = ap.object_path
self.visible_networks[ap.object_path] = ap
return ssid
def _remove_ap(self, path):
self.ssid_by_path.pop(path, None)
self.visible_networks.pop(path, None)
def add_callback(self, name, callback):
if name in self._callbacks and callback not in self._callbacks[name]:
self._callbacks[name].append(callback)
def callback(self, cb_type, msg):
if cb_type in self._callbacks:
for cb in self._callbacks[cb_type]:
GLib.idle_add(cb, msg)
def add_network(self, ssid, psk):
aps = self._visible_networks_by_ssid()
if ssid in aps:
ap = aps[ssid]
new_connection = {
'802-11-wireless': {
'mode': 'infrastructure',
'security': '802-11-wireless-security',
'ssid': ssid
},
'802-11-wireless-security': {
'auth-alg': 'open',
'key-mgmt': 'wpa-psk',
'psk': psk
},
'connection': {
'id': ssid,
'type': '802-11-wireless',
'uuid': str(uuid.uuid4())
},
'ipv4': {
'method': 'auto'
},
'ipv6': {
'method': 'auto'
}
}
try:
NetworkManager.Settings.AddConnection(new_connection)
except dbus.exceptions.DBusException as e:
msg = _("Invalid password") if "802-11-wireless-security.psk" in e else f"{e}"
self.callback("popup", msg)
logging.info(f"Error adding network {e}")
self._update_known_connections()
return True
def connect(self, ssid):
if ssid in self.known_networks:
conn = self.known_networks[ssid]
with contextlib.suppress(NetworkManager.ObjectVanished):
msg = f"Connecting to: {ssid}"
logging.info(msg)
self.callback("connecting_status", msg)
NetworkManager.NetworkManager.ActivateConnection(conn, self.wifi_dev, "/")
def delete_network(self, ssid):
for ssid in self.known_networks:
con = self.known_networks[ssid]
if con.GetSettings()['connection']['id'] == ssid:
con.Delete()
self._update_known_connections()
def get_connected_ssid(self):
if self.wifi_dev.SpecificDevice().ActiveAccessPoint:
return self.wifi_dev.SpecificDevice().ActiveAccessPoint.Ssid
return None
def _get_connected_ap(self):
return self.wifi_dev.SpecificDevice().ActiveAccessPoint
def _visible_networks_by_ssid(self):
aps = self.wifi_dev.GetAccessPoints()
ret = {}
for ap in aps:
with contextlib.suppress(NetworkManager.ObjectVanished):
ret[ap.Ssid] = ap
return ret
def get_network_info(self, ssid):
netinfo = {}
if ssid in self.known_networks:
con = self.known_networks[ssid]
with contextlib.suppress(NetworkManager.ObjectVanished):
settings = con.GetSettings()
if settings and '802-11-wireless' in settings:
netinfo.update({
"ssid": settings['802-11-wireless']['ssid'],
"connected": self.get_connected_ssid() == ssid
})
path = self.path_by_ssid[ssid]
aps = self.visible_networks
if path in aps:
ap = aps[path]
with contextlib.suppress(NetworkManager.ObjectVanished):
netinfo.update({
"mac": ap.HwAddress,
"channel": WifiChannels.lookup(str(ap.Frequency))[1],
"configured": ssid in self.known_networks,
"frequency": str(ap.Frequency),
"flags": ap.Flags,
"ssid": ssid,
"connected": self._get_connected_ap() == ap,
"encryption": self._get_encryption(ap.RsnFlags),
"signal_level_dBm": str(ap.Strength)
})
return netinfo
@staticmethod
def _get_encryption(flags):
encryption = ""
if (flags & NetworkManager.NM_802_11_AP_SEC_PAIR_WEP40 or
flags & NetworkManager.NM_802_11_AP_SEC_PAIR_WEP104 or
flags & NetworkManager.NM_802_11_AP_SEC_GROUP_WEP40 or
flags & NetworkManager.NM_802_11_AP_SEC_GROUP_WEP104):
encryption += "WEP "
if (flags & NetworkManager.NM_802_11_AP_SEC_PAIR_TKIP or
flags & NetworkManager.NM_802_11_AP_SEC_GROUP_TKIP):
encryption += "TKIP "
if (flags & NetworkManager.NM_802_11_AP_SEC_PAIR_CCMP or
flags & NetworkManager.NM_802_11_AP_SEC_GROUP_CCMP):
encryption += "AES "
if flags & NetworkManager.NM_802_11_AP_SEC_KEY_MGMT_PSK:
encryption += "WPA-PSK "
if flags & NetworkManager.NM_802_11_AP_SEC_KEY_MGMT_802_1X:
encryption += "802.1x "
return encryption.strip()
def get_networks(self):
return list(set(list(self.known_networks.keys()) + list(self.ssid_by_path.values())))
def get_supplicant_networks(self):
return {ssid: {"ssid": ssid} for ssid in self.known_networks.keys()}
def rescan(self):
try:
self.wifi_dev.RequestScan({})
except dbus.exceptions.DBusException as e:
logging.error(f"Error during rescan {e}")
+95 -52
View File
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import contextlib import contextlib
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Pango from gi.repository import GLib, Gtk, Pango
from jinja2 import Environment from jinja2 import Environment
@@ -13,8 +14,8 @@ from ks_includes.screen_panel import ScreenPanel
class BasePanel(ScreenPanel): class BasePanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.current_panel = None self.current_panel = None
self.time_min = -1 self.time_min = -1
self.time_format = self._config.get_main_config().getboolean("24htime", True) self.time_format = self._config.get_main_config().getboolean("24htime", True)
@@ -22,29 +23,28 @@ class BasePanel(ScreenPanel):
self.titlebar_items = [] self.titlebar_items = []
self.titlebar_name_type = None self.titlebar_name_type = None
self.buttons_showing = { self.buttons_showing = {
'back': not back,
'macros_shortcut': False, 'macros_shortcut': False,
'printer_select': False, 'printer_select': len(self._config.get_printers()) > 1,
'estop': False,
} }
self.current_extruder = None self.current_extruder = None
# Action bar buttons # Action bar buttons
self.control['back'] = self._gtk.ButtonImage('back', scale=1) abscale = self.bts * 1.1
self.control['back'] = self._gtk.Button('back', scale=abscale)
self.control['back'].connect("clicked", self.back) self.control['back'].connect("clicked", self.back)
self.control['home'] = self._gtk.ButtonImage('main', scale=1) self.control['home'] = self._gtk.Button('main', scale=abscale)
self.control['home'].connect("clicked", self.menu_return, True) self.control['home'].connect("clicked", self._screen._menu_go_back, True)
if len(self._config.get_printers()) > 1: if len(self._config.get_printers()) > 1:
self.control['printer_select'] = self._gtk.ButtonImage('shuffle', scale=1) self.control['printer_select'] = self._gtk.Button('shuffle', scale=abscale)
self.control['printer_select'].connect("clicked", self._screen.show_printer_select) self.control['printer_select'].connect("clicked", self._screen.show_printer_select)
self.control['macros_shortcut'] = self._gtk.ButtonImage('custom-script', scale=1) self.control['macros_shortcut'] = self._gtk.Button('custom-script', scale=abscale)
self.control['macros_shortcut'].connect("clicked", self.menu_item_clicked, "gcode_macros", { self.control['macros_shortcut'].connect("clicked", self.menu_item_clicked, "gcode_macros", {
"name": "Macros", "name": "Macros",
"panel": "gcode_macros" "panel": "gcode_macros"
}) })
self.control['estop'] = self._gtk.ButtonImage('emergency', scale=1) self.control['estop'] = self._gtk.Button('emergency', scale=abscale)
self.control['estop'].connect("clicked", self.emergency_stop) self.control['estop'].connect("clicked", self.emergency_stop)
# Any action bar button should close the keyboard # Any action bar button should close the keyboard
@@ -56,19 +56,19 @@ class BasePanel(ScreenPanel):
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.action_bar.set_hexpand(True) self.action_bar.set_hexpand(True)
self.action_bar.set_vexpand(False) self.action_bar.set_vexpand(False)
self.action_bar.set_size_request(0, self._gtk.get_action_bar_height())
else: else:
self.action_bar.set_hexpand(False) self.action_bar.set_hexpand(False)
self.action_bar.set_vexpand(True) self.action_bar.set_vexpand(True)
self.action_bar.set_size_request(self._gtk.get_action_bar_width(), 0)
self.action_bar.get_style_context().add_class('action_bar') self.action_bar.get_style_context().add_class('action_bar')
self.action_bar.set_size_request(self._gtk.action_bar_width, self._gtk.action_bar_height)
self.action_bar.add(self.control['back']) self.action_bar.add(self.control['back'])
self.action_bar.add(self.control['home']) self.action_bar.add(self.control['home'])
if len(self._config.get_printers()) > 1: self.show_back(False)
if self.buttons_showing['printer_select']:
self.action_bar.add(self.control['printer_select']) self.action_bar.add(self.control['printer_select'])
self.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True)) self.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
self.action_bar.add(self.control['estop']) self.action_bar.add(self.control['estop'])
self.show_estop(False)
# Titlebar # Titlebar
@@ -87,7 +87,7 @@ class BasePanel(ScreenPanel):
self.control['time_box'].pack_end(self.control['time'], True, True, 10) self.control['time_box'].pack_end(self.control['time'], True, True, 10)
self.titlebar = Gtk.Box(spacing=5) self.titlebar = Gtk.Box(spacing=5)
self.titlebar.set_size_request(0, self._gtk.get_titlebar_height()) self.titlebar.get_style_context().add_class("title_bar")
self.titlebar.set_valign(Gtk.Align.CENTER) self.titlebar.set_valign(Gtk.Align.CENTER)
self.titlebar.add(self.control['temp_box']) self.titlebar.add(self.control['temp_box'])
self.titlebar.add(self.titlelbl) self.titlebar.add(self.titlelbl)
@@ -95,9 +95,6 @@ class BasePanel(ScreenPanel):
# Main layout # Main layout
self.main_grid = Gtk.Grid() self.main_grid = Gtk.Grid()
# To achieve rezisability this needs to be removed
# The main issue is that currently the content doesn't expand correctly
self.main_grid.set_size_request(self._screen.width, self._screen.height)
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.main_grid.attach(self.titlebar, 0, 0, 1, 1) self.main_grid.attach(self.titlebar, 0, 0, 1, 1)
@@ -110,19 +107,17 @@ class BasePanel(ScreenPanel):
self.main_grid.attach(self.titlebar, 1, 0, 1, 1) self.main_grid.attach(self.titlebar, 1, 0, 1, 1)
self.main_grid.attach(self.content, 1, 1, 1, 1) self.main_grid.attach(self.content, 1, 1, 1, 1)
# Layout is and content are on screen_panel
self.layout.add(self.main_grid)
self.update_time() self.update_time()
def show_heaters(self, show=True): def show_heaters(self, show=True):
try: try:
for child in self.control['temp_box'].get_children(): for child in self.control['temp_box'].get_children():
self.control['temp_box'].remove(child) self.control['temp_box'].remove(child)
if not show or self._screen.printer.get_temp_store_devices() is None: if not show or self._printer.get_temp_store_devices() is None:
return return
img_size = self._gtk.img_scale * .5 img_size = self._gtk.img_scale * self.bts
for device in self._screen.printer.get_temp_store_devices(): for device in self._printer.get_temp_store_devices():
self.labels[device] = Gtk.Label(label="100º") self.labels[device] = Gtk.Label(label="100º")
self.labels[device].set_ellipsize(Pango.EllipsizeMode.START) self.labels[device].set_ellipsize(Pango.EllipsizeMode.START)
@@ -136,18 +131,18 @@ class BasePanel(ScreenPanel):
nlimit = int(round(log(self._screen.width, 10) * 5 - 10.5)) nlimit = int(round(log(self._screen.width, 10) * 5 - 10.5))
n = 0 n = 0
if self._screen.printer.get_tools(): if self._printer.get_tools():
self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder") self.current_extruder = self._printer.get_stat("toolhead", "extruder")
if self.current_extruder and f"{self.current_extruder}_box" in self.labels: 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"]) self.control['temp_box'].add(self.labels[f"{self.current_extruder}_box"])
n += 1 n += 1
if self._screen.printer.has_heated_bed(): if self._printer.has_heated_bed():
self.control['temp_box'].add(self.labels['heater_bed_box']) self.control['temp_box'].add(self.labels['heater_bed_box'])
n += 1 n += 1
# Options in the config have priority # Options in the config have priority
for device in self._screen.printer.get_temp_store_devices(): for device in self._printer.get_temp_store_devices():
# Users can fill the bar if they want # Users can fill the bar if they want
if n >= nlimit + 1: if n >= nlimit + 1:
break break
@@ -159,7 +154,7 @@ class BasePanel(ScreenPanel):
break break
# If there is enough space fill with heater_generic # If there is enough space fill with heater_generic
for device in self._screen.printer.get_temp_store_devices(): for device in self._printer.get_temp_store_devices():
if n >= nlimit: if n >= nlimit:
break break
if device.startswith("heater_generic"): if device.startswith("heater_generic"):
@@ -171,7 +166,7 @@ class BasePanel(ScreenPanel):
def get_icon(self, device, img_size): def get_icon(self, device, img_size):
if device.startswith("extruder"): if device.startswith("extruder"):
if self._screen.printer.extrudercount > 1: if self._printer.extrudercount > 1:
if device == "extruder": if device == "extruder":
device = "extruder0" device = "extruder0"
return self._gtk.Image(f"extruder-{device[8:]}", img_size, img_size) return self._gtk.Image(f"extruder-{device[8:]}", img_size, img_size)
@@ -195,10 +190,10 @@ class BasePanel(ScreenPanel):
def add_content(self, panel): def add_content(self, panel):
self.current_panel = panel self.current_panel = panel
self.set_title(panel.get_title()) self.set_title(panel.title)
self.content.add(panel.get_content()) self.content.add(panel.content)
def back(self, widget): def back(self, widget=None):
if self.current_panel is None: if self.current_panel is None:
return return
@@ -210,13 +205,32 @@ class BasePanel(ScreenPanel):
self._screen._menu_go_back() self._screen._menu_go_back()
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_update_response":
if self.update_dialog is None:
self.show_update_dialog()
with contextlib.suppress(KeyError):
self.labels['update_progress'].set_text(
f"{self.labels['update_progress'].get_text().strip()}\n"
f"{data['message']}\n")
with contextlib.suppress(KeyError):
if data['complete']:
logging.info("Update complete")
if self.update_dialog is not None:
try:
self.update_dialog.set_response_sensitive(Gtk.ResponseType.OK, True)
self.update_dialog.get_widget_for_response(Gtk.ResponseType.OK).show()
except AttributeError:
logging.error("error trying to show the updater button the dialog might be closed")
self._screen.updating = False
for dialog in self._screen.dialogs:
self._gtk.remove_dialog(dialog)
if action != "notify_status_update" or self._screen.printer is None: if action != "notify_status_update" or self._screen.printer is None:
return return
devices = self._printer.get_temp_store_devices()
devices = self._screen.printer.get_temp_store_devices()
if devices is not None: if devices is not None:
for device in devices: for device in devices:
temp = self._screen.printer.get_dev_stat(device, "temperature") temp = self._printer.get_dev_stat(device, "temperature")
if temp is not None and device in self.labels: if temp is not None and device in self.labels:
name = "" name = ""
if not (device.startswith("extruder") or device.startswith("heater_bed")): if not (device.startswith("extruder") or device.startswith("heater_bed")):
@@ -228,7 +242,7 @@ class BasePanel(ScreenPanel):
name = f"{name[:1].upper()}: " name = f"{name[:1].upper()}: "
self.labels[device].set_label(f"{name}{int(temp)}°") self.labels[device].set_label(f"{name}{int(temp)}°")
with contextlib.suppress(KeyError): with contextlib.suppress(Exception):
if data["toolhead"]["extruder"] != self.current_extruder: if data["toolhead"]["extruder"] != self.current_extruder:
self.control['temp_box'].remove(self.labels[f"{self.current_extruder}_box"]) self.control['temp_box'].remove(self.labels[f"{self.current_extruder}_box"])
self.current_extruder = data["toolhead"]["extruder"] self.current_extruder = data["toolhead"]["extruder"]
@@ -240,14 +254,12 @@ class BasePanel(ScreenPanel):
self.content.remove(widget) self.content.remove(widget)
def show_back(self, show=True): def show_back(self, show=True):
if show is True and self.buttons_showing['back'] is False: if show:
self.control['back'].set_sensitive(True) self.control['back'].set_sensitive(True)
self.control['home'].set_sensitive(True) self.control['home'].set_sensitive(True)
self.buttons_showing['back'] = True return
elif show is False and self.buttons_showing['back'] is True: self.control['back'].set_sensitive(False)
self.control['back'].set_sensitive(False) self.control['home'].set_sensitive(False)
self.control['home'].set_sensitive(False)
self.buttons_showing['back'] = False
def show_macro_shortcut(self, show=True): def show_macro_shortcut(self, show=True):
if show is True and self.buttons_showing['macros_shortcut'] is False: if show is True and self.buttons_showing['macros_shortcut'] is False:
@@ -263,8 +275,6 @@ class BasePanel(ScreenPanel):
self.buttons_showing['macros_shortcut'] = False self.buttons_showing['macros_shortcut'] = False
def show_printer_select(self, show=True): def show_printer_select(self, show=True):
if len(self._config.get_printers()) <= 1:
return
if show and self.buttons_showing['printer_select'] is False: if show and self.buttons_showing['printer_select'] is False:
self.action_bar.add(self.control['printer_select']) self.action_bar.add(self.control['printer_select'])
self.action_bar.reorder_child(self.control['printer_select'], 2) self.action_bar.reorder_child(self.control['printer_select'], 2)
@@ -301,15 +311,13 @@ class BasePanel(ScreenPanel):
return True return True
def show_estop(self, show=True): def show_estop(self, show=True):
if show and self.buttons_showing['estop'] is False: if show:
self.control['estop'].set_sensitive(True) self.control['estop'].set_sensitive(True)
self.buttons_showing['estop'] = True return
elif show is False and self.buttons_showing['estop']: self.control['estop'].set_sensitive(False)
self.control['estop'].set_sensitive(False)
self.buttons_showing['estop'] = False
def set_ks_printer_cfg(self, printer): def set_ks_printer_cfg(self, printer):
self.ks_printer_cfg = self._config.get_printer_config(printer) ScreenPanel.ks_printer_cfg = self._config.get_printer_config(printer)
if self.ks_printer_cfg is not None: if self.ks_printer_cfg is not None:
self.titlebar_name_type = self.ks_printer_cfg.get("titlebar_name_type", None) self.titlebar_name_type = self.ks_printer_cfg.get("titlebar_name_type", None)
titlebar_items = self.ks_printer_cfg.get("titlebar_items", None) titlebar_items = self.ks_printer_cfg.get("titlebar_items", None)
@@ -318,3 +326,38 @@ class BasePanel(ScreenPanel):
logging.info(f"Titlebar name type: {self.titlebar_name_type} items: {self.titlebar_items}") logging.info(f"Titlebar name type: {self.titlebar_name_type} items: {self.titlebar_items}")
else: else:
self.titlebar_items = [] self.titlebar_items = []
def show_update_dialog(self):
if self.update_dialog is not None:
return
button = [{"name": _("Finish"), "response": Gtk.ResponseType.OK}]
self.labels['update_progress'] = Gtk.Label()
self.labels['update_progress'].set_halign(Gtk.Align.START)
self.labels['update_progress'].set_valign(Gtk.Align.START)
self.labels['update_progress'].set_ellipsize(Pango.EllipsizeMode.END)
self.labels['update_scroll'] = self._gtk.ScrolledWindow()
self.labels['update_scroll'].set_property("overlay-scrolling", True)
self.labels['update_scroll'].add(self.labels['update_progress'])
self.labels['update_scroll'].connect("size-allocate", self._autoscroll)
dialog = self._gtk.Dialog(self._screen, button, self.labels['update_scroll'], self.finish_updating)
dialog.connect("delete-event", self.close_update_dialog)
dialog.set_response_sensitive(Gtk.ResponseType.OK, False)
dialog.get_widget_for_response(Gtk.ResponseType.OK).hide()
dialog.set_title(_("Updating"))
self.update_dialog = dialog
self._screen.updating = True
def finish_updating(self, dialog, response_id):
if response_id != Gtk.ResponseType.OK:
return
logging.info("Finishing update")
self._screen.updating = False
self._gtk.remove_dialog(dialog)
self._screen._menu_go_back(home=True)
def close_update_dialog(self, *args):
logging.info("Closing update dialog")
if self.update_dialog in self._screen.dialogs:
self._screen.dialogs.remove(self.update_dialog)
self.update_dialog = None
self._screen._menu_go_back(home=True)
+192 -145
View File
@@ -1,6 +1,8 @@
import gi
import logging import logging
import re import re
import math
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -13,10 +15,33 @@ def create_panel(*args):
return BedLevelPanel(*args) return BedLevelPanel(*args)
# Find the screw closest to the point,
# but return None if the distance is above max_distance.
# If remove is set to true, the screw is also removed
# from the list of passed in screws.
def find_closest(screws, point, max_distance, remove=False):
if len(screws) == 0:
return None
closest = screws[0]
min_distance = math.hypot(closest[0] - point[0], closest[1] - point[1])
for screw in screws[1:]:
distance = math.hypot(screw[0] - point[0], screw[1] - point[1])
if distance < min_distance:
closest = screw
min_distance = distance
if min_distance > max_distance:
return None
if remove:
screws.remove(closest)
return closest
class BedLevelPanel(ScreenPanel): class BedLevelPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.response_count = 0 self.response_count = 0
self.screw_dict = {} self.screw_dict = {}
self.screws = [] self.screws = []
@@ -24,28 +49,32 @@ class BedLevelPanel(ScreenPanel):
self.x_cnt = 0 self.x_cnt = 0
self.x_offset = 0 self.x_offset = 0
self.y_offset = 0 self.y_offset = 0
self.labels['dm'] = self._gtk.ButtonImage("motor-off", _("Disable XY"), "color3") self.buttons = {'dm': self._gtk.Button("motor-off", _("Disable XY"), "color3")}
self.labels['dm'].connect("clicked", self.disable_motors) self.buttons['dm'].connect("clicked", self.disable_motors)
screw_positions = [] screw_positions = []
rotation = None rotation = None
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.attach(self.labels['dm'], 0, 0, 1, 1) grid.attach(self.buttons['dm'], 0, 0, 1, 1)
if "screws_tilt_adjust" in self._screen.printer.get_config_section_list(): if "screws_tilt_adjust" in self._printer.get_config_section_list():
self.labels['screws'] = self._gtk.ButtonImage("refresh", _("Screws Adjust"), "color4") self.buttons['screws'] = self._gtk.Button("refresh", _("Screws Adjust"), "color4")
self.labels['screws'].connect("clicked", self.screws_tilt_calculate) self.buttons['screws'].connect("clicked", self.screws_tilt_calculate)
grid.attach(self.labels['screws'], 0, 1, 1, 1) grid.attach(self.buttons['screws'], 0, 1, 1, 1)
self.screws = self._get_screws("screws_tilt_adjust") self.screws = self._get_screws("screws_tilt_adjust")
logging.info(f"screws_tilt_adjust: {self.screws}") logging.info(f"screws_tilt_adjust: {self.screws}")
if "bltouch" in self._screen.printer.get_config_section_list(): probe = self._printer.get_probe()
self._get_offsets("bltouch") if probe:
elif "probe" in self._screen.printer.get_config_section_list(): if "x_offset" in probe:
self._get_offsets("probe") self.x_offset = round(float(probe['x_offset']), 1)
if "y_offset" in probe:
self.y_offset = round(float(probe['y_offset']), 1)
logging.debug(f"offset X: {self.x_offset} Y: {self.y_offset}")
# bed_screws uses NOZZLE positions # bed_screws uses NOZZLE positions
# screws_tilt_adjust uses PROBE positions and to be offseted for the buttons to work equal to bed_screws # screws_tilt_adjust uses PROBE positions and
# to be offseted for the buttons to work equal to bed_screws
new_screws = [ new_screws = [
[round(screw[0] + self.x_offset, 1), round(screw[1] + self.y_offset, 1)] [round(screw[0] + self.x_offset, 1), round(screw[1] + self.y_offset, 1)]
for screw in self.screws for screw in self.screws
@@ -53,9 +82,38 @@ class BedLevelPanel(ScreenPanel):
self.screws = new_screws self.screws = new_screws
logging.info(f"screws with offset: {self.screws}") logging.info(f"screws with offset: {self.screws}")
elif "bed_screws" in self._screen.printer.get_config_section_list(): elif "bed_screws" in self._printer.get_config_section_list():
self.screws = self._get_screws("bed_screws") self.screws = self._get_screws("bed_screws")
logging.info(f"bed_screws: {self.screws}") logging.info(f"bed_screws: {self.screws}")
nscrews = len(self.screws)
# KS config
valid_positions = True
valid_screws = ["bl", "fl", "fr", "br", "bm", "fm", "lm", "rm", "center"]
if self.ks_printer_cfg is not None:
screw_positions = self.ks_printer_cfg.get("screw_positions", "")
if screw_positions:
screw_positions = [str(i.strip()) for i in screw_positions.split(',')]
logging.info(f"Positions: {screw_positions}")
for screw in screw_positions:
if screw not in valid_screws:
logging.error(f"Unknown screw: {screw}")
self._screen.show_popup_message(_("Unknown screw position") + f": {screw}")
valid_positions = False
if not (3 <= len(screw_positions) <= 9):
valid_positions = False
else:
if nscrews in (3, 5, 7):
valid_positions = False
screw_positions = valid_screws
rotation = self.ks_printer_cfg.getint("screw_rotation", 0)
logging.info(f"Rotation: {rotation}")
else:
if nscrews in (3, 5, 7):
valid_positions = False
screw_positions = valid_screws
if 'bed_screws' in self._config.get_config():
rotation = self._config.get_config()['bed_screws'].getint("rotation", 0)
logging.debug(f"Rotation: {rotation}")
# get dimensions # get dimensions
x_positions = {x[0] for x in self.screws} x_positions = {x[0] for x in self.screws}
@@ -66,91 +124,73 @@ class BedLevelPanel(ScreenPanel):
min_x = min(x_positions) min_x = min(x_positions)
max_x = max(x_positions) max_x = max(x_positions)
mid_x = round((min_x + max_x) / 2)
min_y = min(y_positions) min_y = min(y_positions)
max_y = max(y_positions) max_y = max(y_positions)
mid_y = round((min_y + max_y) / 2)
fl = [min_x, min_y] max_distance = math.ceil(
bl = [min_x, max_y] math.hypot(max_x - min_x, max_y - min_y)
br = [max_x, max_y] / min(self.x_cnt, self.y_cnt, 3)
fr = [max_x, min_y] )
if self.x_cnt == 3: logging.debug(f"Using max_distance: {max_distance} to fit: {len(self.screws)} screws.")
mid_x = [x for x in list(zip(*self.screws))[0] if x not in (min_x, max_x)][0]
fm = [mid_x, min_y]
bm = [mid_x, max_y]
else:
fm = bm = None
if self.y_cnt == 3:
mid_y = [y for y in list(zip(*self.screws))[1] if y not in (min_y, max_y)][0]
lm = [min_x, mid_y]
rm = [max_x, mid_y]
else:
lm = rm = None
logging.debug(f"Using {len(self.screws)}-screw locations [x,y] [{self.x_cnt}x{self.y_cnt}]") remaining_screws = self.screws[:]
self.labels['bl'] = self._gtk.ButtonImage("bed-level-t-l", scale=2.5) fl = find_closest(remaining_screws, (min_x, min_y), max_distance, remove="fl" in screw_positions)
self.labels['br'] = self._gtk.ButtonImage("bed-level-t-r", scale=2.5) bl = find_closest(remaining_screws, (min_x, max_y), max_distance, remove="bl" in screw_positions)
self.labels['fl'] = self._gtk.ButtonImage("bed-level-b-l", scale=2.5) br = find_closest(remaining_screws, (max_x, max_y), max_distance, remove="br" in screw_positions)
self.labels['fr'] = self._gtk.ButtonImage("bed-level-b-r", scale=2.5) fr = find_closest(remaining_screws, (max_x, min_y), max_distance, remove="fr" in screw_positions)
self.labels['lm'] = self._gtk.ButtonImage("bed-level-l-m", scale=2.5)
self.labels['rm'] = self._gtk.ButtonImage("bed-level-r-m", scale=2.5)
self.labels['fm'] = self._gtk.ButtonImage("bed-level-b-m", scale=2.5)
self.labels['bm'] = self._gtk.ButtonImage("bed-level-t-m", scale=2.5)
valid_positions = True fm = find_closest(remaining_screws, (mid_x, min_y), max_distance, remove="fm" in screw_positions)
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) bm = find_closest(remaining_screws, (mid_x, max_y), max_distance, remove="bm" in screw_positions)
if printer_cfg is not None:
logging.info(f"printer {printer_cfg}") lm = find_closest(remaining_screws, (min_x, mid_y), max_distance, remove="lm" in screw_positions)
screw_positions = printer_cfg.get("screw_positions", "") rm = find_closest(remaining_screws, (max_x, mid_y), max_distance, remove="rm" in screw_positions)
screw_positions = [str(i.strip()) for i in screw_positions.split(',')]
logging.info(f"Positions: {screw_positions}") center = find_closest(remaining_screws, (mid_x, mid_y), max_distance, remove="center" in screw_positions)
for screw in screw_positions:
if screw not in ("bl", "fl", "fr", "br", "bm", "fm", "lm", "rm", ""): if len(remaining_screws) != 0:
logging.error(f"Unknown screw: {screw}") logging.debug(f"Screws not used: {remaining_screws}")
self._screen.show_popup_message(_("Unknown screw position") + f": {screw}")
valid_positions = False logging.debug(f"Using {len(self.screws) - len(remaining_screws)}/{len(self.screws)}-screw locations")
if not (3 <= len(screw_positions) <= 8):
valid_positions = False button_scale = 2
rotation = printer_cfg.getint("screw_rotation", 0)
logging.info(f"Rotation: {rotation}") self.buttons['bl'] = self._gtk.Button("bed-level-t-l", scale=button_scale)
else: self.buttons['br'] = self._gtk.Button("bed-level-t-r", scale=button_scale)
valid_positions = False self.buttons['fl'] = self._gtk.Button("bed-level-b-l", scale=button_scale)
if 'bed_screws' in self._config.get_config(): self.buttons['fr'] = self._gtk.Button("bed-level-b-r", scale=button_scale)
rotation = self._config.get_config()['bed_screws'].getint("rotation", 0) self.buttons['lm'] = self._gtk.Button("bed-level-l-m", scale=button_scale)
logging.debug(f"Rotation: {rotation}") self.buttons['rm'] = self._gtk.Button("bed-level-r-m", scale=button_scale)
self.buttons['fm'] = self._gtk.Button("bed-level-b-m", scale=button_scale)
self.buttons['bm'] = self._gtk.Button("bed-level-t-m", scale=button_scale)
self.buttons['center'] = self._gtk.Button("increase", scale=button_scale)
bedgrid = Gtk.Grid() bedgrid = Gtk.Grid()
nscrews = len(self.screws)
if valid_positions: if valid_positions:
if "bl" in screw_positions: if "bl" in screw_positions and bl:
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1) bedgrid.attach(self.buttons['bl'], 1, 0, 1, 1)
if "fl" in screw_positions: if "fl" in screw_positions and fl:
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1) bedgrid.attach(self.buttons['fl'], 1, 2, 1, 1)
if "fr" in screw_positions: if "fr" in screw_positions and fr:
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1) bedgrid.attach(self.buttons['fr'], 3, 2, 1, 1)
if "br" in screw_positions: if "br" in screw_positions and br:
bedgrid.attach(self.labels['br'], 3, 0, 1, 1) bedgrid.attach(self.buttons['br'], 3, 0, 1, 1)
if "bm" in screw_positions: if "bm" in screw_positions and bm:
bedgrid.attach(self.labels['bm'], 2, 0, 1, 1) bedgrid.attach(self.buttons['bm'], 2, 0, 1, 1)
if "fm" in screw_positions: if "fm" in screw_positions and fm:
bedgrid.attach(self.labels['fm'], 2, 2, 1, 1) bedgrid.attach(self.buttons['fm'], 2, 2, 1, 1)
if "lm" in screw_positions: if "lm" in screw_positions and lm:
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1) bedgrid.attach(self.buttons['lm'], 1, 1, 1, 1)
if "rm" in screw_positions: if "rm" in screw_positions and rm:
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1) bedgrid.attach(self.buttons['rm'], 3, 1, 1, 1)
elif nscrews in {4, 6, 8}: if "center" in screw_positions and center:
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1) bedgrid.attach(self.buttons['center'], 2, 1, 1, 1)
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1) self.buttons['center'].connect("clicked", self.go_to_position, center)
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1)
bedgrid.attach(self.labels['br'], 3, 0, 1, 1)
if self.x_cnt == 3:
bedgrid.attach(self.labels['bm'], 2, 0, 1, 1)
bedgrid.attach(self.labels['fm'], 2, 2, 1, 1)
if self.y_cnt == 3:
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1)
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1)
else: else:
label = Gtk.Label( label = Gtk.Label(
_("Bed screw configuration:") + f" {nscrews}\n\n" _("Bed screw configuration:") + f" {nscrews}\n\n"
@@ -167,14 +207,14 @@ class BedLevelPanel(ScreenPanel):
# fm bm # fm bm
# fr rm br # fr rm br
self.labels['bl'].connect("clicked", self.go_to_position, fl) self.buttons['bl'].connect("clicked", self.go_to_position, fl)
self.labels['bm'].connect("clicked", self.go_to_position, lm) self.buttons['bm'].connect("clicked", self.go_to_position, lm)
self.labels['br'].connect("clicked", self.go_to_position, bl) self.buttons['br'].connect("clicked", self.go_to_position, bl)
self.labels['rm'].connect("clicked", self.go_to_position, bm) self.buttons['rm'].connect("clicked", self.go_to_position, bm)
self.labels['fr'].connect("clicked", self.go_to_position, br) self.buttons['fr'].connect("clicked", self.go_to_position, br)
self.labels['fm'].connect("clicked", self.go_to_position, rm) self.buttons['fm'].connect("clicked", self.go_to_position, rm)
self.labels['fl'].connect("clicked", self.go_to_position, fr) self.buttons['fl'].connect("clicked", self.go_to_position, fr)
self.labels['lm'].connect("clicked", self.go_to_position, fm) self.buttons['lm'].connect("clicked", self.go_to_position, fm)
self.screw_dict = { self.screw_dict = {
'bl': fl, 'bl': fl,
'bm': lm, 'bm': lm,
@@ -189,14 +229,14 @@ class BedLevelPanel(ScreenPanel):
# fr fm fl # fr fm fl
# rm lm # rm lm
# br bm bl # br bm bl
self.labels['bl'].connect("clicked", self.go_to_position, fr) self.buttons['bl'].connect("clicked", self.go_to_position, fr)
self.labels['bm'].connect("clicked", self.go_to_position, fm) self.buttons['bm'].connect("clicked", self.go_to_position, fm)
self.labels['br'].connect("clicked", self.go_to_position, fl) self.buttons['br'].connect("clicked", self.go_to_position, fl)
self.labels['rm'].connect("clicked", self.go_to_position, lm) self.buttons['rm'].connect("clicked", self.go_to_position, lm)
self.labels['fr'].connect("clicked", self.go_to_position, bl) self.buttons['fr'].connect("clicked", self.go_to_position, bl)
self.labels['fm'].connect("clicked", self.go_to_position, bm) self.buttons['fm'].connect("clicked", self.go_to_position, bm)
self.labels['fl'].connect("clicked", self.go_to_position, br) self.buttons['fl'].connect("clicked", self.go_to_position, br)
self.labels['lm'].connect("clicked", self.go_to_position, rm) self.buttons['lm'].connect("clicked", self.go_to_position, rm)
self.screw_dict = { self.screw_dict = {
'bl': fr, 'bl': fr,
'bm': fm, 'bm': fm,
@@ -211,14 +251,14 @@ class BedLevelPanel(ScreenPanel):
# br rm fr # br rm fr
# bm fm # bm fm
# bl lm fl # bl lm fl
self.labels['bl'].connect("clicked", self.go_to_position, br) self.buttons['bl'].connect("clicked", self.go_to_position, br)
self.labels['bm'].connect("clicked", self.go_to_position, rm) self.buttons['bm'].connect("clicked", self.go_to_position, rm)
self.labels['br'].connect("clicked", self.go_to_position, fr) self.buttons['br'].connect("clicked", self.go_to_position, fr)
self.labels['rm'].connect("clicked", self.go_to_position, fm) self.buttons['rm'].connect("clicked", self.go_to_position, fm)
self.labels['fr'].connect("clicked", self.go_to_position, fl) self.buttons['fr'].connect("clicked", self.go_to_position, fl)
self.labels['fm'].connect("clicked", self.go_to_position, lm) self.buttons['fm'].connect("clicked", self.go_to_position, lm)
self.labels['fl'].connect("clicked", self.go_to_position, bl) self.buttons['fl'].connect("clicked", self.go_to_position, bl)
self.labels['lm'].connect("clicked", self.go_to_position, bm) self.buttons['lm'].connect("clicked", self.go_to_position, bm)
self.screw_dict = { self.screw_dict = {
'bl': br, 'bl': br,
'bm': rm, 'bm': rm,
@@ -233,14 +273,14 @@ class BedLevelPanel(ScreenPanel):
# bl bm br # bl bm br
# lm rm # lm rm
# fl fm fr # fl fm fr
self.labels['bl'].connect("clicked", self.go_to_position, bl) self.buttons['bl'].connect("clicked", self.go_to_position, bl)
self.labels['bm'].connect("clicked", self.go_to_position, bm) self.buttons['bm'].connect("clicked", self.go_to_position, bm)
self.labels['br'].connect("clicked", self.go_to_position, br) self.buttons['br'].connect("clicked", self.go_to_position, br)
self.labels['rm'].connect("clicked", self.go_to_position, rm) self.buttons['rm'].connect("clicked", self.go_to_position, rm)
self.labels['fr'].connect("clicked", self.go_to_position, fr) self.buttons['fr'].connect("clicked", self.go_to_position, fr)
self.labels['fm'].connect("clicked", self.go_to_position, fm) self.buttons['fm'].connect("clicked", self.go_to_position, fm)
self.labels['fl'].connect("clicked", self.go_to_position, fl) self.buttons['fl'].connect("clicked", self.go_to_position, fl)
self.labels['lm'].connect("clicked", self.go_to_position, lm) self.buttons['lm'].connect("clicked", self.go_to_position, lm)
self.screw_dict = { self.screw_dict = {
'bl': bl, 'bl': bl,
'bm': bm, 'bm': bm,
@@ -251,19 +291,24 @@ class BedLevelPanel(ScreenPanel):
'fl': fl, 'fl': fl,
'lm': lm 'lm': lm
} }
self.screw_dict['center'] = center
grid.attach(bedgrid, 1, 0, 3, 2) grid.attach(bedgrid, 1, 0, 3, 2)
self.content.add(grid) self.content.add(grid)
def activate(self): def activate(self):
for key, value in self.screw_dict.items(): for key, value in self.screw_dict.items():
self.labels[key].set_label(f"{value}") self.buttons[key].set_label(f"{value}")
if self._printer.config_section_exists("screws_tilt_adjust"):
self.labels['screws'].set_sensitive(True) def home(self):
# Test if all axes have been homed. Home if necessary.
if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
# do Z_TILT_CALIBRATE if applicable.
if self._printer.config_section_exists("z_tilt"):
self._screen._ws.klippy.gcode_script(KlippyGcodes.Z_TILT)
def go_to_position(self, widget, position): def go_to_position(self, widget, position):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": self.home()
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
logging.debug(f"Going to position: {position}") logging.debug(f"Going to position: {position}")
script = [ script = [
f"{KlippyGcodes.MOVE_ABSOLUTE}", f"{KlippyGcodes.MOVE_ABSOLUTE}",
@@ -281,13 +326,24 @@ class BedLevelPanel(ScreenPanel):
"M18" # Disable motors "M18" # Disable motors
) )
def process_update(self, action, data): def process_busy(self, busy):
for button in self.buttons:
if button == "screws":
self.buttons[button].set_sensitive(
self._printer.config_section_exists("screws_tilt_adjust")
and (not busy))
continue
self.buttons[button].set_sensitive((not busy))
def process_update(self, action, data):
if action == "notify_busy":
self.process_busy(data)
return
if action != "notify_gcode_response": if action != "notify_gcode_response":
return return
if data.startswith('!!'): if data.startswith('!!'):
self.response_count = 0 self.response_count = 0
self.labels['screws'].set_sensitive(True) self.buttons['screws'].set_sensitive(True)
return return
result = re.match( result = re.match(
"^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]+ :" + "^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]+ :" +
@@ -302,11 +358,11 @@ class BedLevelPanel(ScreenPanel):
for key, value in self.screw_dict.items(): for key, value in self.screw_dict.items():
if value and x == value[0] and y == value[1]: if value and x == value[0] and y == value[1]:
logging.debug(f"X: {x} Y: {y} Adjust: {result[5]} Pos: {key}") logging.debug(f"X: {x} Y: {y} Adjust: {result[5]} Pos: {key}")
self.labels[key].set_label(result[5]) self.buttons[key].set_label(result[5])
break break
self.response_count += 1 self.response_count += 1
if self.response_count >= len(self.screws) - 1: if self.response_count >= len(self.screws) - 1:
self.labels['screws'].set_sensitive(True) self.buttons['screws'].set_sensitive(True)
else: else:
result = re.match( result = re.match(
"^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]", "^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]",
@@ -321,11 +377,11 @@ class BedLevelPanel(ScreenPanel):
for key, value in self.screw_dict.items(): for key, value in self.screw_dict.items():
if value and x == value[0] and y == value[1]: if value and x == value[0] and y == value[1]:
logging.debug(f"X: {x} Y: {y} Pos: {key}") logging.debug(f"X: {x} Y: {y} Pos: {key}")
self.labels[key].set_label(_("Reference")) self.buttons[key].set_label(_("Reference"))
def _get_screws(self, config_section_name): def _get_screws(self, config_section_name):
screws = [] screws = []
config_section = self._screen.printer.get_config_section(config_section_name) config_section = self._printer.get_config_section(config_section_name)
for item in config_section: for item in config_section:
logging.debug(f"{config_section_name}: {config_section[item]}") logging.debug(f"{config_section_name}: {config_section[item]}")
result = re.match(r"([\-0-9\.]+)\s*,\s*([\-0-9\.]+)", config_section[item]) result = re.match(r"([\-0-9\.]+)\s*,\s*([\-0-9\.]+)", config_section[item])
@@ -336,17 +392,8 @@ class BedLevelPanel(ScreenPanel):
]) ])
return sorted(screws, key=lambda s: (float(s[1]), float(s[0]))) return sorted(screws, key=lambda s: (float(s[1]), float(s[0])))
def _get_offsets(self, section):
probe = self._screen.printer.get_config_section(section)
if "x_offset" in probe:
self.x_offset = round(float(probe['x_offset']), 1)
if "y_offset" in probe:
self.y_offset = round(float(probe['y_offset']), 1)
logging.debug(f"{section} offset X: {self.x_offset} Y: {self.y_offset}")
def screws_tilt_calculate(self, widget): def screws_tilt_calculate(self, widget):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": self.home()
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self.response_count = 0 self.response_count = 0
self.labels['screws'].set_sensitive(False) self.buttons['screws'].set_sensitive(False)
self._screen._ws.klippy.gcode_script("SCREWS_TILT_CALCULATE") self._screen._ws.klippy.gcode_script("SCREWS_TILT_CALCULATE")
+48 -41
View File
@@ -1,7 +1,8 @@
import gi
import logging import logging
import contextlib import contextlib
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -16,32 +17,32 @@ def create_panel(*args):
class BedMeshPanel(ScreenPanel): class BedMeshPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.clear = None
self.profiles = {}
self.show_create = False self.show_create = False
self.active_mesh = None self.active_mesh = None
addprofile = self._gtk.ButtonImage("increase", " " + _("Add profile"), "color1", .66, Gtk.PositionType.LEFT, 1) self.profiles = {}
addprofile.connect("clicked", self.show_create_profile) self.buttons = {
addprofile.set_hexpand(True) 'add': self._gtk.Button("increase", " " + _("Add profile"), "color1", self.bts, Gtk.PositionType.LEFT, 1),
self.clear = self._gtk.ButtonImage("cancel", " " + _("Clear"), "color2", .66, Gtk.PositionType.LEFT, 1) 'calib': self._gtk.Button("refresh", " " + _("Calibrate"), "color3", self.bts, Gtk.PositionType.LEFT, 1),
self.clear.connect("clicked", self.send_clear_mesh) 'clear': self._gtk.Button("cancel", " " + _("Clear"), "color2", self.bts, Gtk.PositionType.LEFT, 1),
self.clear.set_hexpand(True) }
calibrate = self._gtk.ButtonImage("refresh", " " + _("Calibrate"), "color3", .66, Gtk.PositionType.LEFT, 1) self.buttons['add'].connect("clicked", self.show_create_profile)
calibrate.connect("clicked", self.calibrate_mesh) self.buttons['add'].set_hexpand(True)
calibrate.set_hexpand(True) self.buttons['clear'].connect("clicked", self.send_clear_mesh)
self.buttons['clear'].set_hexpand(True)
self.buttons['calib'].connect("clicked", self.calibrate_mesh)
self.buttons['calib'].set_hexpand(True)
topbar = Gtk.Box(spacing=5) topbar = Gtk.Box(spacing=5)
topbar.set_hexpand(True) topbar.set_hexpand(True)
topbar.set_vexpand(False) topbar.set_vexpand(False)
topbar.add(addprofile) topbar.add(self.buttons['add'])
topbar.add(self.clear) topbar.add(self.buttons['clear'])
topbar.add(calibrate) topbar.add(self.buttons['calib'])
# Create a grid for all profiles # Create a grid for all profiles
self.labels['profiles'] = Gtk.Grid() self.labels['profiles'] = Gtk.Grid()
self.labels['profiles'].get_style_context().add_class("frame-item")
self.labels['profiles'].set_valign(Gtk.Align.CENTER) self.labels['profiles'].set_valign(Gtk.Align.CENTER)
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
@@ -53,11 +54,11 @@ class BedMeshPanel(ScreenPanel):
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False) grid.set_row_homogeneous(False)
grid.attach(topbar, 0, 0, 2, 1) grid.attach(topbar, 0, 0, 2, 1)
self.labels['map'] = BedMap(self._gtk.get_font_size(), self.active_mesh) self.labels['map'] = BedMap(self._gtk.font_size, self.active_mesh)
if self._screen.vertical_mode: if self._screen.vertical_mode:
grid.attach(self.labels['map'], 0, 2, 2, 1) grid.attach(self.labels['map'], 0, 2, 2, 1)
grid.attach(scroll, 0, 3, 2, 1) grid.attach(scroll, 0, 3, 2, 1)
self.labels['map'].set_size_request(self._gtk.get_content_width(), self._gtk.get_content_height() * .4) self.labels['map'].set_size_request(self._gtk.content_width, self._gtk.content_height * .4)
else: else:
grid.attach(self.labels['map'], 0, 2, 1, 1) grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1) grid.attach(scroll, 1, 2, 1, 1)
@@ -67,7 +68,7 @@ class BedMeshPanel(ScreenPanel):
def activate(self): def activate(self):
self.load_meshes() self.load_meshes()
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.activate_mesh(self._screen.printer.get_stat("bed_mesh", "profile_name")) self.activate_mesh(self._printer.get_stat("bed_mesh", "profile_name"))
def activate_mesh(self, profile): def activate_mesh(self, profile):
if self.active_mesh is not None: if self.active_mesh is not None:
@@ -77,7 +78,7 @@ class BedMeshPanel(ScreenPanel):
logging.info("Clearing active profile") logging.info("Clearing active profile")
self.active_mesh = None self.active_mesh = None
self.update_graph() self.update_graph()
self.clear.set_sensitive(False) self.buttons['clear'].set_sensitive(False)
return return
if profile not in self.profiles: if profile not in self.profiles:
self.add_profile(profile) self.add_profile(profile)
@@ -88,7 +89,7 @@ class BedMeshPanel(ScreenPanel):
self.profiles[profile]['name'].get_style_context().add_class("button_active") self.profiles[profile]['name'].get_style_context().add_class("button_active")
self.active_mesh = profile self.active_mesh = profile
self.update_graph(profile=profile) self.update_graph(profile=profile)
self.clear.set_sensitive(True) self.buttons['clear'].set_sensitive(True)
def retrieve_bm(self, profile): def retrieve_bm(self, profile):
if profile is None: if profile is None:
@@ -114,7 +115,7 @@ class BedMeshPanel(ScreenPanel):
def add_profile(self, profile): def add_profile(self, profile):
logging.debug(f"Adding Profile: {profile}") logging.debug(f"Adding Profile: {profile}")
name = self._gtk.Button(f"<big><b>{profile}</b></big>") name = self._gtk.Button(label=f"<big><b>{profile}</b></big>")
name.get_children()[0].set_use_markup(True) name.get_children()[0].set_use_markup(True)
name.get_children()[0].set_line_wrap(True) name.get_children()[0].set_line_wrap(True)
name.get_children()[0].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) name.get_children()[0].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
@@ -124,8 +125,8 @@ class BedMeshPanel(ScreenPanel):
name.connect("clicked", self.update_graph, profile) name.connect("clicked", self.update_graph, profile)
buttons = { buttons = {
"save": self._gtk.ButtonImage("complete", None, "color4", .75), "save": self._gtk.Button("complete", None, "color4", self.bts),
"delete": self._gtk.ButtonImage("cancel", None, "color2", .75), "delete": self._gtk.Button("cancel", None, "color2", self.bts),
} }
buttons["save"].connect("clicked", self.send_save_mesh, profile) buttons["save"].connect("clicked", self.send_save_mesh, profile)
buttons["delete"].connect("clicked", self.send_remove_mesh, profile) buttons["delete"].connect("clicked", self.send_remove_mesh, profile)
@@ -141,17 +142,14 @@ class BedMeshPanel(ScreenPanel):
button_box.add(buttons["delete"]) button_box.add(buttons["delete"])
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
box.get_style_context().add_class("frame-item")
box.pack_start(name, True, True, 0) box.pack_start(name, True, True, 0)
box.pack_start(button_box, False, False, 0) box.pack_start(button_box, False, False, 0)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(box)
self.profiles[profile] = { self.profiles[profile] = {
"name": name, "name": name,
"button_box": button_box, "button_box": button_box,
"row": frame, "row": box,
"save": buttons["save"], "save": buttons["save"],
"delete": buttons["delete"], "delete": buttons["delete"],
} }
@@ -181,7 +179,20 @@ class BedMeshPanel(ScreenPanel):
if prof not in bm_profiles: if prof not in bm_profiles:
self.remove_profile(prof) self.remove_profile(prof)
def process_busy(self, busy):
for button in self.buttons:
if button == 'clear':
self.buttons[button].set_sensitive(self.active_mesh is not None)
continue
self.buttons[button].set_sensitive((not busy))
for profile in self.profiles:
self.profiles[profile]["save"].set_sensitive((not busy))
self.profiles[profile]["delete"].set_sensitive((not busy))
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_busy":
self.process_busy(data)
return
if action == "notify_status_update": if action == "notify_status_update":
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.activate_mesh(data['bed_mesh']['profile_name']) self.activate_mesh(data['bed_mesh']['profile_name'])
@@ -212,7 +223,7 @@ class BedMeshPanel(ScreenPanel):
if not self.profiles: if not self.profiles:
self.active_mesh = None self.active_mesh = None
self.update_graph() self.update_graph()
self.clear.set_sensitive(False) self.buttons['clear'].set_sensitive(False)
def show_create_profile(self, widget): def show_create_profile(self, widget):
@@ -226,10 +237,9 @@ class BedMeshPanel(ScreenPanel):
self.labels['profile_name'].set_text('') self.labels['profile_name'].set_text('')
self.labels['profile_name'].set_hexpand(True) self.labels['profile_name'].set_hexpand(True)
self.labels['profile_name'].connect("activate", self.create_profile) self.labels['profile_name'].connect("activate", self.create_profile)
self.labels['profile_name'].connect("focus-in-event", self._show_keyboard) self.labels['profile_name'].connect("focus-in-event", self._screen.show_keyboard)
self.labels['profile_name'].grab_focus_without_selecting()
save = self._gtk.ButtonImage("complete", _("Save"), "color3") save = self._gtk.Button("complete", _("Save"), "color3")
save.set_hexpand(False) save.set_hexpand(False)
save.connect("clicked", self.create_profile) save.connect("clicked", self.create_profile)
@@ -245,12 +255,9 @@ class BedMeshPanel(ScreenPanel):
self.labels['create_profile'].pack_start(box, True, True, 5) self.labels['create_profile'].pack_start(box, True, True, 5)
self.content.add(self.labels['create_profile']) self.content.add(self.labels['create_profile'])
self._show_keyboard() self.labels['profile_name'].grab_focus_without_selecting()
self.show_create = True self.show_create = True
def _show_keyboard(self, widget=None, event=None):
self._screen.show_keyboard(entry=self.labels['profile_name'])
def create_profile(self, widget): def create_profile(self, widget):
name = self.labels['profile_name'].get_text() name = self.labels['profile_name'].get_text()
if self.active_mesh is None: if self.active_mesh is None:
@@ -261,13 +268,13 @@ class BedMeshPanel(ScreenPanel):
def calibrate_mesh(self, widget): def calibrate_mesh(self, widget):
self._screen.show_popup_message(_("Calibrating"), level=1) self._screen.show_popup_message(_("Calibrating"), level=1)
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME) self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE") self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE")
# Load zcalibrate to do a manual mesh # Load zcalibrate to do a manual mesh
if not (self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch")): if not self._printer.get_probe():
self.menu_item_clicked(widget, "refresh", {"name": _("Mesh calibrate"), "panel": "zcalibrate"}) self.menu_item_clicked(widget, "refresh", {"name": _("Mesh calibrate"), "panel": "zcalibrate"})
def send_clear_mesh(self, widget): def send_clear_mesh(self, widget):
+91
View File
@@ -0,0 +1,91 @@
import mpv
import logging
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk
from ks_includes.screen_panel import ScreenPanel
def create_panel(*args):
return CameraPanel(*args)
class CameraPanel(ScreenPanel):
def __init__(self, screen, title):
super().__init__(screen, title)
self.mpv = None
self.da = Gtk.DrawingArea()
self.da.set_hexpand(True)
self.da.set_vexpand(True)
fs = self._gtk.Button("move", _("Fullscreen"), None, self.bts, Gtk.PositionType.LEFT, 1)
fs.connect("clicked", self.play)
fs.set_hexpand(True)
fs.set_vexpand(False)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.add(self.da)
box.add(fs)
self.content.add(box)
self.content.show_all()
self.url = self.ks_printer_cfg.get("camera_url", "http://127.0.0.1/webcam/?action=stream").replace('"', '')
# wayland has no primary monitor with that we can detect it
self.wayland = Gdk.Display.get_default().get_primary_monitor() is None
# gpu output driver doesn't work on a pi3 and the autoselected sdl doesn't size correctly
# consider adding a software switch to enable the gpu backend if set by the user
self.vo = 'wlshm' if self.wayland else 'x11'
logging.debug(f"Camera URL: {self.url} vo: {self.vo} wayland: {self.wayland}")
def activate(self):
self.play()
def deactivate(self):
if self.mpv:
self.mpv.terminate()
self.mpv = None
def play(self, fs=None):
if self.mpv:
self.mpv.terminate()
self.mpv = None
# Create mpv after show or the 'window' property will be None
try:
self.mpv = mpv.MPV(
log_handler=self.log,
vo=self.vo,
profile='sw-fast',
)
except ValueError:
self.mpv = mpv.MPV(
log_handler=self.log,
vo=self.vo,
)
# On wayland mpv cannot be embedded at least for now
# https://github.com/mpv-player/mpv/issues/9654
# if fs or self.wayland:
self.mpv.fullscreen = True
@self.mpv.on_key_press('MBTN_LEFT' or 'MBTN_LEFT_DBL')
def clicked():
self.mpv.quit(0)
# else:
# self.mpv.wid = f'{self.da.get_property("window").get_xid()}'
#
# @self.mpv.on_key_press('MBTN_LEFT' or 'MBTN_LEFT_DBL')
# def clicked():
# self._screen.show_popup_message(self.url, level=1)
self.mpv.play(self.url)
# if fs or self.wayland:
try:
self.mpv.wait_for_playback()
except mpv.ShutdownError:
logging.info('Exiting Fullscreen')
except Exception as e:
logging.exception(e)
self.mpv.terminate()
self.mpv = None
self._screen._menu_go_back()
@staticmethod
def log(loglevel, component, message):
logging.debug(f'[{loglevel}] {component}: {message}')
+31 -24
View File
@@ -1,7 +1,8 @@
import gi
import time import time
import re import re
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
@@ -23,39 +24,44 @@ COLORS = {
class ConsolePanel(ScreenPanel): class ConsolePanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.autoscroll = True self.autoscroll = True
self.hidetemps = True self.hidetemps = True
self._screen._ws.send_method("server.gcode_store", {"count": 100}, self.gcode_response)
o1_lbl = Gtk.Label(_("Auto-scroll")) o1_lbl = Gtk.Label(_("Auto-scroll"))
o1_lbl.set_halign(Gtk.Align.END)
o1_switch = Gtk.Switch() o1_switch = Gtk.Switch()
o1_switch.set_property("width-request", round(self._gtk.get_font_size() * 5))
o1_switch.set_property("height-request", round(self._gtk.get_font_size() * 2.5))
o1_switch.set_active(self.autoscroll) o1_switch.set_active(self.autoscroll)
o1_switch.connect("notify::active", self.set_autoscroll) o1_switch.connect("notify::active", self.set_autoscroll)
o2_lbl = Gtk.Label(_("Hide temp.")) o2_lbl = Gtk.Label(_("Hide temp."))
o2_lbl.set_halign(Gtk.Align.END)
o2_switch = Gtk.Switch() o2_switch = Gtk.Switch()
o2_switch.set_property("width-request", round(self._gtk.get_font_size() * 5))
o2_switch.set_property("height-request", round(self._gtk.get_font_size() * 2.5))
o2_switch.set_active(self.hidetemps) o2_switch.set_active(self.hidetemps)
o2_switch.connect("notify::active", self.hide_temps) o2_switch.connect("notify::active", self.hide_temps)
o3_button = self._gtk.ButtonImage("refresh", _('Clear') + " ", None, .66, Gtk.PositionType.RIGHT, 1) if self._screen.vertical_mode:
o1_lbl.set_halign(Gtk.Align.CENTER)
o2_lbl.set_halign(Gtk.Align.CENTER)
else:
o1_lbl.set_halign(Gtk.Align.END)
o2_lbl.set_halign(Gtk.Align.END)
o3_button = self._gtk.Button("refresh", _('Clear') + " ", None, self.bts, Gtk.PositionType.RIGHT, 1)
o3_button.connect("clicked", self.clear) o3_button.connect("clicked", self.clear)
options = Gtk.Box() options = Gtk.Grid()
options.set_hexpand(True)
options.set_vexpand(False) options.set_vexpand(False)
options.add(o1_lbl) if self._screen.vertical_mode:
options.pack_start(o1_switch, False, False, 5) options.attach(o1_lbl, 0, 0, 1, 1)
options.add(o2_lbl) options.attach(o1_switch, 0, 1, 1, 1)
options.pack_start(o2_switch, False, False, 5) options.attach(o2_lbl, 1, 0, 1, 1)
options.add(o3_button) options.attach(o2_switch, 1, 1, 1, 1)
options.attach(o3_button, 3, 0, 1, 2)
else:
options.attach(o1_lbl, 0, 0, 1, 1)
options.attach(o1_switch, 1, 0, 1, 1)
options.attach(o2_lbl, 2, 0, 1, 1)
options.attach(o2_switch, 3, 0, 1, 1)
options.attach(o3_button, 4, 0, 1, 1)
sw = Gtk.ScrolledWindow() sw = Gtk.ScrolledWindow()
sw.set_hexpand(True) sw.set_hexpand(True)
@@ -78,12 +84,12 @@ class ConsolePanel(ScreenPanel):
entry = Gtk.Entry() entry = Gtk.Entry()
entry.set_hexpand(True) entry.set_hexpand(True)
entry.set_vexpand(False) entry.set_vexpand(False)
entry.connect("button-press-event", self._show_keyboard) entry.connect("button-press-event", self._screen.show_keyboard)
entry.connect("focus-in-event", self._screen.show_keyboard) entry.connect("focus-in-event", self._screen.show_keyboard)
entry.connect("activate", self._send_command) entry.connect("activate", self._send_command)
entry.grab_focus_without_selecting() entry.grab_focus_without_selecting()
enter = self._gtk.ButtonImage("resume", " " + _('Send') + " ", None, .66, Gtk.PositionType.RIGHT, 1) enter = self._gtk.Button("resume", " " + _('Send') + " ", None, .66, Gtk.PositionType.RIGHT, 1)
enter.set_hexpand(False) enter.set_hexpand(False)
enter.connect("clicked", self._send_command) enter.connect("clicked", self._send_command)
@@ -103,10 +109,7 @@ class ConsolePanel(ScreenPanel):
content_box.pack_end(ebox, False, False, 0) content_box.pack_end(ebox, False, False, 0)
self.content.add(content_box) self.content.add(content_box)
def _show_keyboard(self, widget=None, event=None): def clear(self, widget=None):
self._screen.show_keyboard(entry=self.labels['entry'])
def clear(self, widget):
self.labels['tb'].set_text("") self.labels['tb'].set_text("")
def add_gcode(self, msgtype, msgtime, message): def add_gcode(self, msgtype, msgtime, message):
@@ -165,3 +168,7 @@ class ConsolePanel(ScreenPanel):
self.add_gcode("command", time.time(), cmd) self.add_gcode("command", time.time(), cmd)
self._screen._ws.klippy.gcode_script(cmd) self._screen._ws.klippy.gcode_script(cmd)
def activate(self):
self.clear()
self._screen._ws.send_method("server.gcode_store", {"count": 100}, self.gcode_response)
+2 -2
View File
@@ -11,8 +11,8 @@ def create_panel(*args):
class ExamplePanel(ScreenPanel): class ExamplePanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
# Create gtk items here # Create gtk items here
+9 -8
View File
@@ -15,14 +15,14 @@ def create_panel(*args):
class ExcludeObjectPanel(ScreenPanel): class ExcludeObjectPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self._screen = screen self._screen = screen
self.object_list = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) self.object_list = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
self.object_list.set_valign(Gtk.Align.CENTER) self.object_list.set_valign(Gtk.Align.CENTER)
self.object_list.set_halign(Gtk.Align.START) self.object_list.set_halign(Gtk.Align.START)
self.buttons = {} self.buttons = {}
self.current_object = self._gtk.ButtonImage("extrude", "", scale=.66, position=Gtk.PositionType.LEFT, lines=1) self.current_object = self._gtk.Button("extrude", "", scale=self.bts, position=Gtk.PositionType.LEFT, lines=1)
self.current_object.connect("clicked", self.exclude_current) self.current_object.connect("clicked", self.exclude_current)
self.current_object.set_vexpand(False) self.current_object.set_vexpand(False)
self.excluded_objects = self._printer.get_stat("exclude_object", "excluded_objects") self.excluded_objects = self._printer.get_stat("exclude_object", "excluded_objects")
@@ -43,25 +43,25 @@ class ExcludeObjectPanel(ScreenPanel):
grid.attach(Gtk.Separator(), 0, 1, 2, 1) grid.attach(Gtk.Separator(), 0, 1, 2, 1)
if self.objects and "polygon" in self.objects[0]: 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'] = ObjectMap(self._screen, self._printer, self._gtk.font_size)
if self._screen.vertical_mode: if self._screen.vertical_mode:
grid.attach(self.labels['map'], 0, 2, 2, 1) grid.attach(self.labels['map'], 0, 2, 2, 1)
grid.attach(scroll, 0, 3, 2, 1) grid.attach(scroll, 0, 3, 2, 1)
scroll.set_size_request(self._screen.width, -1) scroll.set_size_request(self._gtk.content_width, -1)
else: else:
grid.attach(self.labels['map'], 0, 2, 1, 1) grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1) grid.attach(scroll, 1, 2, 1, 1)
scroll.set_size_request((self._screen.width * .9) // 2, -1) scroll.set_size_request((self._screen.width * .9) // 2, -1)
else: else:
grid.attach(scroll, 0, 2, 2, 1) grid.attach(scroll, 0, 2, 2, 1)
scroll.set_size_request(self._gtk.get_content_width(), -1) scroll.set_size_request(self._gtk.content_width, -1)
self.content.add(grid) self.content.add(grid)
self.content.show_all() self.content.show_all()
def add_object(self, name): def add_object(self, name):
if name not in self.buttons and name not in self.excluded_objects: if name not in self.buttons and name not in self.excluded_objects:
self.buttons[name] = self._gtk.Button(name.replace("_", " ")) self.buttons[name] = self._gtk.Button(label=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_mode(Pango.WrapMode.WORD_CHAR)
self.buttons[name].get_children()[0].set_line_wrap(True) self.buttons[name].get_children()[0].set_line_wrap(True)
self.buttons[name].connect("clicked", self.exclude_object, name) self.buttons[name].connect("clicked", self.exclude_object, name)
@@ -102,6 +102,7 @@ class ExcludeObjectPanel(ScreenPanel):
for obj in self.objects: for obj in self.objects:
logging.info(f"Adding {obj['name']}") logging.info(f"Adding {obj['name']}")
self.add_object(obj["name"]) self.add_object(obj["name"])
self.content.show_all()
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
# Update current objects # Update current objects
if data["exclude_object"]["current_object"]: if data["exclude_object"]["current_object"]:
@@ -116,7 +117,7 @@ class ExcludeObjectPanel(ScreenPanel):
self.object_list.remove(self.buttons[name]) self.object_list.remove(self.buttons[name])
self.update_graph() self.update_graph()
if len(self.excluded_objects) == len(self.objects): if len(self.excluded_objects) == len(self.objects):
self.menu_return(False) self._screen._menu_go_back()
elif action == "notify_gcode_response" and "Excluding object" in data: elif action == "notify_gcode_response" and "Excluding object" in data:
self._screen.show_popup_message(data, level=1) self._screen.show_popup_message(data, level=1)
self.update_graph() self.update_graph()
+56 -49
View File
@@ -1,7 +1,8 @@
import gi
import logging import logging
import re import re
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -15,23 +16,22 @@ def create_panel(*args):
class ExtrudePanel(ScreenPanel): class ExtrudePanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.current_extruder = self._printer.get_stat("toolhead", "extruder") self.current_extruder = self._printer.get_stat("toolhead", "extruder")
macros = self._screen.printer.get_gcode_macros() macros = self._printer.get_gcode_macros()
self.load_filament = any("LOAD_FILAMENT" in macro.upper() for macro in 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.unload_filament = any("UNLOAD_FILAMENT" in macro.upper() for macro in macros)
self.speeds = ['1', '2', '5', '25'] self.speeds = ['1', '2', '5', '25']
self.distances = ['5', '10', '15', '25'] self.distances = ['5', '10', '15', '25']
print_cfg = self._config.get_printer_config(self._screen.connected_printer) if self.ks_printer_cfg is not None:
if print_cfg is not None: dis = self.ks_printer_cfg.get("extrude_distances", '5, 10, 15, 25')
dis = print_cfg.get("extrude_distances", '5, 10, 15, 25')
if re.match(r'^[0-9,\s]+$', dis): if re.match(r'^[0-9,\s]+$', dis):
dis = [str(i.strip()) for i in dis.split(',')] dis = [str(i.strip()) for i in dis.split(',')]
if 1 < len(dis) < 5: if 1 < len(dis) < 5:
self.distances = dis self.distances = dis
vel = print_cfg.get("extrude_speeds", '1, 2, 5, 25') vel = self.ks_printer_cfg.get("extrude_speeds", '1, 2, 5, 25')
if re.match(r'^[0-9,\s]+$', vel): if re.match(r'^[0-9,\s]+$', vel):
vel = [str(i.strip()) for i in vel.split(',')] vel = [str(i.strip()) for i in vel.split(',')]
if 1 < len(vel) < 5: if 1 < len(vel) < 5:
@@ -39,18 +39,18 @@ class ExtrudePanel(ScreenPanel):
self.distance = int(self.distances[1]) self.distance = int(self.distances[1])
self.speed = int(self.speeds[1]) self.speed = int(self.speeds[1])
self.labels['extrude'] = self._gtk.ButtonImage("extrude", _("Extrude"), "color4") self.buttons = {
self.labels['extrude'].connect("clicked", self.extrude, "+") 'extrude': self._gtk.Button("extrude", _("Extrude"), "color4"),
self.labels['load'] = self._gtk.ButtonImage("arrow-down", _("Load"), "color3") 'load': self._gtk.Button("arrow-down", _("Load"), "color3"),
'unload': self._gtk.Button("arrow-up", _("Unload"), "color2"),
self.labels['load'].connect("clicked", self.load_unload, "+") 'retract': self._gtk.Button("retract", _("Retract"), "color1"),
self.labels['unload'] = self._gtk.ButtonImage("arrow-up", _("Unload"), "color2") 'temperature': self._gtk.Button("heat-up", _("Temperature"), "color4"),
}
self.labels['unload'].connect("clicked", self.load_unload, "-") self.buttons['extrude'].connect("clicked", self.extrude, "+")
self.labels['retract'] = self._gtk.ButtonImage("retract", _("Retract"), "color1") self.buttons['load'].connect("clicked", self.load_unload, "+")
self.labels['retract'].connect("clicked", self.extrude, "-") self.buttons['unload'].connect("clicked", self.load_unload, "-")
self.labels['temperature'] = self._gtk.ButtonImage("heat-up", _("Temperature"), "color4") self.buttons['retract'].connect("clicked", self.extrude, "-")
self.labels['temperature'].connect("clicked", self.menu_item_clicked, "temperature", { self.buttons['temperature'].connect("clicked", self.menu_item_clicked, "temperature", {
"name": "Temperature", "name": "Temperature",
"panel": "temperature" "panel": "temperature"
}) })
@@ -60,10 +60,9 @@ class ExtrudePanel(ScreenPanel):
i = 0 i = 0
for extruder in self._printer.get_tools(): for extruder in self._printer.get_tools():
if self._printer.extrudercount > 1: if self._printer.extrudercount > 1:
self.labels[extruder] = self._gtk.ButtonImage(f"extruder-{i}", self.labels[extruder] = self._gtk.Button(f"extruder-{i}", f"T{self._printer.get_tool_number(extruder)}")
f"T{self._printer.get_tool_number(extruder)}")
else: else:
self.labels[extruder] = self._gtk.ButtonImage("extruder", "") self.labels[extruder] = self._gtk.Button("extruder", "")
self.labels[extruder].connect("clicked", self.change_extruder, extruder) self.labels[extruder].connect("clicked", self.change_extruder, extruder)
if extruder == self.current_extruder: if extruder == self.current_extruder:
self.labels[extruder].get_style_context().add_class("button_active") self.labels[extruder].get_style_context().add_class("button_active")
@@ -71,11 +70,11 @@ class ExtrudePanel(ScreenPanel):
extgrid.attach(self.labels[extruder], i, 0, 1, 1) extgrid.attach(self.labels[extruder], i, 0, 1, 1)
i += 1 i += 1
if i < (limit - 1): if i < (limit - 1):
extgrid.attach(self.labels['temperature'], i + 1, 0, 1, 1) extgrid.attach(self.buttons['temperature'], i + 1, 0, 1, 1)
distgrid = Gtk.Grid() distgrid = Gtk.Grid()
for j, i in enumerate(self.distances): for j, i in enumerate(self.distances):
self.labels[f"dist{i}"] = self._gtk.Button(i) self.labels[f"dist{i}"] = self._gtk.Button(label=i)
self.labels[f"dist{i}"].connect("clicked", self.change_distance, int(i)) self.labels[f"dist{i}"].connect("clicked", self.change_distance, int(i))
ctx = self.labels[f"dist{i}"].get_style_context() ctx = self.labels[f"dist{i}"].get_style_context()
if ((self._screen.lang_ltr is True and j == 0) or if ((self._screen.lang_ltr is True and j == 0) or
@@ -92,7 +91,7 @@ class ExtrudePanel(ScreenPanel):
speedgrid = Gtk.Grid() speedgrid = Gtk.Grid()
for j, i in enumerate(self.speeds): for j, i in enumerate(self.speeds):
self.labels[f"speed{i}"] = self._gtk.Button(i) self.labels[f"speed{i}"] = self._gtk.Button(label=i)
self.labels[f"speed{i}"].connect("clicked", self.change_speed, int(i)) self.labels[f"speed{i}"].connect("clicked", self.change_speed, int(i))
ctx = self.labels[f"speed{i}"].get_style_context() ctx = self.labels[f"speed{i}"].get_style_context()
if ((self._screen.lang_ltr is True and j == 0) or if ((self._screen.lang_ltr is True and j == 0) or
@@ -135,17 +134,13 @@ class ExtrudePanel(ScreenPanel):
self.labels[x]['label'].set_halign(Gtk.Align.CENTER) self.labels[x]['label'].set_halign(Gtk.Align.CENTER)
self.labels[x]['label'].set_hexpand(True) self.labels[x]['label'].set_hexpand(True)
self.labels[x]['label'].set_ellipsize(Pango.EllipsizeMode.END) self.labels[x]['label'].set_ellipsize(Pango.EllipsizeMode.END)
self.labels[x]['switch'].set_property("width-request", round(self._gtk.get_font_size() * 2)) self.labels[x]['switch'].set_property("width-request", round(self._gtk.font_size * 2))
self.labels[x]['switch'].set_property("height-request", round(self._gtk.get_font_size())) self.labels[x]['switch'].set_property("height-request", round(self._gtk.font_size))
self.labels[x]['switch'].connect("notify::active", self.enable_disable_fs, name, x) self.labels[x]['switch'].connect("notify::active", self.enable_disable_fs, name, x)
self.labels[x]['box'].pack_start(self.labels[x]['label'], True, True, 5) self.labels[x]['box'].pack_start(self.labels[x]['label'], True, True, 5)
self.labels[x]['box'].pack_start(self.labels[x]['switch'], False, False, 5) self.labels[x]['box'].pack_start(self.labels[x]['switch'], False, False, 5)
self.labels[x]['box'].get_style_context().add_class("filament_sensor") self.labels[x]['box'].get_style_context().add_class("filament_sensor")
self.labels[x]['box'].set_hexpand(True) self.labels[x]['box'].set_hexpand(True)
if self._printer.get_dev_stat(x, "filament_detected"):
self.labels[x]['box'].get_style_context().add_class("filament_sensor_detected")
else:
self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty")
sensors.attach(self.labels[x]['box'], s, 0, 1, 1) sensors.attach(self.labels[x]['box'], s, 0, 1, 1)
grid = Gtk.Grid() grid = Gtk.Grid()
@@ -153,28 +148,36 @@ class ExtrudePanel(ScreenPanel):
grid.attach(extgrid, 0, 0, 4, 1) grid.attach(extgrid, 0, 0, 4, 1)
if self._screen.vertical_mode: if self._screen.vertical_mode:
grid.attach(self.labels['extrude'], 0, 1, 2, 1) grid.attach(self.buttons['extrude'], 0, 1, 2, 1)
grid.attach(self.labels['retract'], 2, 1, 2, 1) grid.attach(self.buttons['retract'], 2, 1, 2, 1)
grid.attach(self.labels['load'], 0, 2, 2, 1) grid.attach(self.buttons['load'], 0, 2, 2, 1)
grid.attach(self.labels['unload'], 2, 2, 2, 1) grid.attach(self.buttons['unload'], 2, 2, 2, 1)
grid.attach(distbox, 0, 3, 4, 1) grid.attach(distbox, 0, 3, 4, 1)
grid.attach(speedbox, 0, 4, 4, 1) grid.attach(speedbox, 0, 4, 4, 1)
grid.attach(sensors, 0, 5, 4, 1) grid.attach(sensors, 0, 5, 4, 1)
else: else:
grid.attach(self.labels['extrude'], 0, 2, 1, 1) grid.attach(self.buttons['extrude'], 0, 2, 1, 1)
grid.attach(self.labels['load'], 1, 2, 1, 1) grid.attach(self.buttons['load'], 1, 2, 1, 1)
grid.attach(self.labels['unload'], 2, 2, 1, 1) grid.attach(self.buttons['unload'], 2, 2, 1, 1)
grid.attach(self.labels['retract'], 3, 2, 1, 1) grid.attach(self.buttons['retract'], 3, 2, 1, 1)
grid.attach(distbox, 0, 3, 2, 1) grid.attach(distbox, 0, 3, 2, 1)
grid.attach(speedbox, 2, 3, 2, 1) grid.attach(speedbox, 2, 3, 2, 1)
grid.attach(sensors, 0, 4, 4, 1) grid.attach(sensors, 0, 4, 4, 1)
self.content.add(grid) self.content.add(grid)
def process_busy(self, busy):
for button in self.buttons:
if button == "temperature":
continue
self.buttons[button].set_sensitive((not busy))
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_busy":
self.process_busy(data)
return
if action != "notify_status_update": if action != "notify_status_update":
return return
for x in self._printer.get_tools(): for x in self._printer.get_tools():
self.update_temp( self.update_temp(
x, x,
@@ -196,16 +199,16 @@ class ExtrudePanel(ScreenPanel):
if 'enabled' in data[x]: if 'enabled' in data[x]:
self._printer.set_dev_stat(x, "enabled", data[x]['enabled']) self._printer.set_dev_stat(x, "enabled", data[x]['enabled'])
self.labels[x]['switch'].set_active(data[x]['enabled']) self.labels[x]['switch'].set_active(data[x]['enabled'])
logging.info(f"{x} Enabled: {data[x]['enabled']}")
if 'filament_detected' in data[x]: if 'filament_detected' in data[x]:
self._printer.set_dev_stat(x, "filament_detected", data[x]['filament_detected']) self._printer.set_dev_stat(x, "filament_detected", data[x]['filament_detected'])
if data[x]['filament_detected']: if self._printer.get_stat(x, "enabled"):
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_empty") if data[x]['filament_detected']:
self.labels[x]['box'].get_style_context().add_class("filament_sensor_detected") self.labels[x]['box'].get_style_context().remove_class("filament_sensor_empty")
else: self.labels[x]['box'].get_style_context().add_class("filament_sensor_detected")
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected") else:
self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty") self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected")
logging.info(f"{x}: Filament detected: {data[x]['filament_detected']}") self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty")
logging.info(f"{x}: {self._printer.get_stat(x)}")
def change_distance(self, widget, distance): def change_distance(self, widget, distance):
logging.info(f"### Distance {distance}") logging.info(f"### Distance {distance}")
@@ -247,6 +250,10 @@ class ExtrudePanel(ScreenPanel):
if switch.get_active(): if switch.get_active():
self._printer.set_dev_stat(x, "enabled", True) self._printer.set_dev_stat(x, "enabled", True)
self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=1") self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=1")
if self._printer.get_stat(x, "filament_detected"):
self.labels[x]['box'].get_style_context().add_class("filament_sensor_detected")
else:
self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty")
else: else:
self._printer.set_dev_stat(x, "enabled", False) self._printer.set_dev_stat(x, "enabled", False)
self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=0") self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=0")
+8 -14
View File
@@ -1,6 +1,7 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Pango from gi.repository import Gtk, GLib, Pango
@@ -16,8 +17,8 @@ CHANGEABLE_FANS = ["fan", "fan_generic"]
class FanPanel(ScreenPanel): class FanPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.fan_speed = {} self.fan_speed = {}
self.devices = {} self.devices = {}
# Create a grid for all devices # Create a grid for all devices
@@ -37,7 +38,7 @@ class FanPanel(ScreenPanel):
for fan in self.devices: for fan in self.devices:
if fan in data and "speed" in data[fan]: if fan in data and "speed" in data[fan]:
self.update_fan_speed(None, fan, self._printer.get_fan_speed(fan, data[fan]["speed"])) self.update_fan_speed(None, fan, self._printer.get_fan_speed(fan))
def update_fan_speed(self, widget, fan, speed): def update_fan_speed(self, widget, fan, speed):
if fan not in self.devices: if fan not in self.devices:
@@ -71,10 +72,10 @@ class FanPanel(ScreenPanel):
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
fan_col = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) fan_col = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
stop_btn = self._gtk.ButtonImage("cancel", None, "color1", 1) stop_btn = self._gtk.Button("cancel", None, "color1")
stop_btn.set_hexpand(False) stop_btn.set_hexpand(False)
stop_btn.connect("clicked", self.update_fan_speed, fan, 0) stop_btn.connect("clicked", self.update_fan_speed, fan, 0)
max_btn = self._gtk.ButtonImage("fan-on", _("Max"), "color2", 1) max_btn = self._gtk.Button("fan-on", _("Max"), "color2")
max_btn.set_hexpand(False) max_btn.set_hexpand(False)
max_btn.connect("clicked", self.update_fan_speed, fan, 100) max_btn.connect("clicked", self.update_fan_speed, fan, 100)
@@ -102,10 +103,6 @@ class FanPanel(ScreenPanel):
fan_row.add(name) fan_row.add(name)
fan_row.add(fan_col) fan_row.add(fan_col)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(fan_row)
self.devices[fan] = { self.devices[fan] = {
"changeable": changeable, "changeable": changeable,
"scale": scale, "scale": scale,
@@ -122,7 +119,7 @@ class FanPanel(ScreenPanel):
pos = devices.index(fan) pos = devices.index(fan)
self.labels['devices'].insert_row(pos) self.labels['devices'].insert_row(pos)
self.labels['devices'].attach(frame, 0, pos, 1, 1) self.labels['devices'].attach(fan_row, 0, pos, 1, 1)
self.labels['devices'].show_all() self.labels['devices'].show_all()
def load_fans(self): def load_fans(self):
@@ -133,9 +130,6 @@ class FanPanel(ScreenPanel):
if name.startswith("_"): if name.startswith("_"):
continue continue
self.add_fan(fan) self.add_fan(fan)
frame = Gtk.Frame()
frame.set_vexpand(False)
self.labels['devices'].attach(frame, 0, -1, 1, 1)
def set_fan_speed(self, widget, event, fan): def set_fan_speed(self, widget, event, fan):
value = self.devices[fan]['scale'].get_value() value = self.devices[fan]['scale'].get_value()
+26 -43
View File
@@ -1,8 +1,9 @@
import gi
import logging import logging
import re import re
import contextlib import contextlib
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
@@ -21,11 +22,10 @@ class FineTunePanel(ScreenPanel):
percent_delta = percent_deltas[-2] percent_delta = percent_deltas[-2]
speed = extrusion = 100 speed = extrusion = 100
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
print_cfg = self._config.get_printer_config(self._screen.connected_printer) if self.ks_printer_cfg is not None:
if print_cfg is not None: bs = self.ks_printer_cfg.get("z_babystep_values", "0.01, 0.05")
bs = print_cfg.get("z_babystep_values", "0.01, 0.05")
if re.match(r'^[0-9,\.\s]+$', bs): if re.match(r'^[0-9,\.\s]+$', bs):
bs = [str(i.strip()) for i in bs.split(',')] bs = [str(i.strip()) for i in bs.split(',')]
if 1 < len(bs) < 3: if 1 < len(bs) < 3:
@@ -35,7 +35,7 @@ class FineTunePanel(ScreenPanel):
# babystepping grid # babystepping grid
bsgrid = Gtk.Grid() bsgrid = Gtk.Grid()
for j, i in enumerate(self.bs_deltas): for j, i in enumerate(self.bs_deltas):
self.labels[f"bdelta{i}"] = self._gtk.Button(i) self.labels[f"bdelta{i}"] = self._gtk.Button(label=i)
self.labels[f"bdelta{i}"].connect("clicked", self.change_bs_delta, float(i)) self.labels[f"bdelta{i}"].connect("clicked", self.change_bs_delta, float(i))
ctx = self.labels[f"bdelta{i}"].get_style_context() ctx = self.labels[f"bdelta{i}"].get_style_context()
if j == 0: if j == 0:
@@ -50,7 +50,7 @@ class FineTunePanel(ScreenPanel):
# Grid for percentage # Grid for percentage
deltgrid = Gtk.Grid() deltgrid = Gtk.Grid()
for j, i in enumerate(self.percent_deltas): for j, i in enumerate(self.percent_deltas):
self.labels[f"pdelta{i}"] = self._gtk.Button(f"{i}%") self.labels[f"pdelta{i}"] = self._gtk.Button(label=f"{i}%")
self.labels[f"pdelta{i}"].connect("clicked", self.change_percent_delta, int(i)) self.labels[f"pdelta{i}"].connect("clicked", self.change_percent_delta, int(i))
ctx = self.labels[f"pdelta{i}"].get_style_context() ctx = self.labels[f"pdelta{i}"].get_style_context()
if j == 0: if j == 0:
@@ -65,50 +65,33 @@ class FineTunePanel(ScreenPanel):
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False) grid.set_row_homogeneous(False)
self.labels['z+'] = self._gtk.Button("z-farther", "Z+", "color1")
self.labels['z-'] = self._gtk.Button("z-closer", "Z-", "color1")
self.labels['zoffset'] = self._gtk.Button("refresh", ' 0.00' + _("mm"),
"color1", self.bts, Gtk.PositionType.LEFT, 1)
self.labels['speed+'] = self._gtk.Button("speed+", _("Speed +"), "color3")
self.labels['speed-'] = self._gtk.Button("speed-", _("Speed -"), "color3")
self.labels['speedfactor'] = self._gtk.Button("refresh", " 100%",
"color3", self.bts, Gtk.PositionType.LEFT, 1)
self.labels['extrude+'] = self._gtk.Button("flow+", _("Extrusion +"), "color4")
self.labels['extrude-'] = self._gtk.Button("flow-", _("Extrusion -"), "color4")
self.labels['extrudefactor'] = self._gtk.Button("refresh", " 100%",
"color4", self.bts, Gtk.PositionType.LEFT, 1)
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
"color1", .6, Gtk.PositionType.LEFT, 1)
self.labels['speed+'] = self._gtk.ButtonImage("speed+", _("Speed +"), "color3")
self.labels['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3")
self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color3", .6, Gtk.PositionType.LEFT, 1)
self.labels['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4")
self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4")
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color4", .6, Gtk.PositionType.LEFT, 1)
grid.attach(self.labels['z+'], 0, 0, 1, 1) grid.attach(self.labels['z+'], 0, 0, 1, 1)
grid.attach(self.labels['z-'], 1, 0, 1, 1) grid.attach(self.labels['z-'], 1, 0, 1, 1)
grid.attach(self.labels['zoffset'], 2, 0, 1, 1) grid.attach(self.labels['zoffset'], 2, 0, 1, 1)
grid.attach(bsgrid, 0, 1, 3, 1) grid.attach(bsgrid, 0, 1, 3, 1)
grid.attach(self.labels['speed-'], 0, 2, 1, 1) grid.attach(self.labels['speed-'], 0, 2, 1, 1)
grid.attach(self.labels['speed+'], 1, 2, 1, 1) grid.attach(self.labels['speed+'], 1, 2, 1, 1)
grid.attach(self.labels['speedfactor'], 2, 2, 1, 1) grid.attach(self.labels['speedfactor'], 2, 2, 1, 1)
grid.attach(self.labels['extrude-'], 0, 3, 1, 1) grid.attach(self.labels['extrude-'], 0, 3, 1, 1)
grid.attach(self.labels['extrude+'], 1, 3, 1, 1) grid.attach(self.labels['extrude+'], 1, 3, 1, 1)
grid.attach(self.labels['extrudefactor'], 2, 3, 1, 1) grid.attach(self.labels['extrudefactor'], 2, 3, 1, 1)
grid.attach(deltgrid, 0, 4, 3, 1) grid.attach(deltgrid, 0, 4, 3, 1)
else: else:
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
"color1", .6, Gtk.PositionType.LEFT, 1)
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
self.labels['speed+'] = self._gtk.ButtonImage("speed+", _("Speed +"), "color3")
self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color3", .6, Gtk.PositionType.LEFT, 1)
self.labels['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3")
self.labels['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4")
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color4", .6, Gtk.PositionType.LEFT, 1)
self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4")
grid.attach(self.labels['zoffset'], 0, 0, 1, 1) grid.attach(self.labels['zoffset'], 0, 0, 1, 1)
grid.attach(self.labels['z+'], 0, 1, 1, 1) grid.attach(self.labels['z+'], 0, 1, 1, 1)
grid.attach(self.labels['z-'], 0, 2, 1, 1) grid.attach(self.labels['z-'], 0, 2, 1, 1)
@@ -142,10 +125,10 @@ class FineTunePanel(ScreenPanel):
if "homing_origin" in data["gcode_move"]: if "homing_origin" in data["gcode_move"]:
self.labels['zoffset'].set_label(f' {data["gcode_move"]["homing_origin"][2]:.2f}mm') self.labels['zoffset'].set_label(f' {data["gcode_move"]["homing_origin"][2]:.2f}mm')
if "extrude_factor" in data["gcode_move"]: if "extrude_factor" in data["gcode_move"]:
self.extrusion = int(round(data["gcode_move"]["extrude_factor"] * 100)) self.extrusion = round(float(data["gcode_move"]["extrude_factor"]) * 100)
self.labels['extrudefactor'].set_label(f" {self.extrusion:3}%") self.labels['extrudefactor'].set_label(f" {self.extrusion:3}%")
if "speed_factor" in data["gcode_move"]: if "speed_factor" in data["gcode_move"]:
self.speed = int(round(data["gcode_move"]["speed_factor"] * 100)) self.speed = round(float(data["gcode_move"]["speed_factor"]) * 100)
self.labels['speedfactor'].set_label(f" {self.speed:3}%") self.labels['speedfactor'].set_label(f" {self.speed:3}%")
def change_babystepping(self, widget, direction): def change_babystepping(self, widget, direction):
@@ -170,9 +153,9 @@ class FineTunePanel(ScreenPanel):
def change_extrusion(self, widget, direction): def change_extrusion(self, widget, direction):
if direction == "+": if direction == "+":
self.extrusion += self.percent_delta self.extrusion += int(self.percent_delta)
elif direction == "-": elif direction == "-":
self.extrusion -= self.percent_delta self.extrusion -= int(self.percent_delta)
elif direction == "reset": elif direction == "reset":
self.extrusion = 100 self.extrusion = 100
+67 -64
View File
@@ -1,5 +1,6 @@
import gi
import logging import logging
import re
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Pango from gi.repository import Gtk, GLib, Pango
@@ -12,27 +13,22 @@ def create_panel(*args):
class MacroPanel(ScreenPanel): class MacroPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.sort_reverse = False self.sort_reverse = False
self.sort_lbl = _("Name") self.sort_btn = self._gtk.Button("arrow-up", _("Name"), "color1", self.bts, Gtk.PositionType.RIGHT, 1)
self.sort_btn = self._gtk.ButtonImage("arrow-up", self.sort_lbl, "color1", .5, Gtk.PositionType.RIGHT, 1)
self.sort_btn.connect("clicked", self.change_sort) self.sort_btn.connect("clicked", self.change_sort)
self.sort_btn.set_hexpand(True) self.sort_btn.set_hexpand(True)
self.allmacros = {} self.options = {}
self.loaded_macros = []
self.macros = {} self.macros = {}
self.menu = ['macros_menu'] self.menu = ['macros_menu']
sort = Gtk.Label(_("Sort:"))
sort.set_hexpand(False)
adjust = self._gtk.ButtonImage("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1) adjust = self._gtk.Button("settings", " " + _("Settings"), "color2", self.bts, Gtk.PositionType.LEFT, 1)
adjust.connect("clicked", self.load_menu, 'options') adjust.connect("clicked", self.load_menu, 'options', _("Settings"))
adjust.set_hexpand(False) adjust.set_hexpand(False)
sbox = Gtk.Box() sbox = Gtk.Box()
sbox.set_vexpand(False) sbox.set_vexpand(False)
sbox.pack_start(sort, False, False, 5)
sbox.pack_start(self.sort_btn, True, True, 5) sbox.pack_start(self.sort_btn, True, True, 5)
sbox.pack_start(adjust, True, True, 5) sbox.pack_start(adjust, True, True, 5)
@@ -67,9 +63,9 @@ class MacroPanel(ScreenPanel):
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
name.set_valign(Gtk.Align.CENTER) name.set_valign(Gtk.Align.CENTER)
name.set_line_wrap(True) name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) name.set_line_wrap_mode(Pango.WrapMode.CHAR)
btn = self._gtk.ButtonImage("resume", style="color3") btn = self._gtk.Button("resume", style="color3")
btn.connect("clicked", self.run_gcode_macro, macro) btn.connect("clicked", self.run_gcode_macro, macro)
btn.set_hexpand(False) btn.set_hexpand(False)
btn.set_halign(Gtk.Align.END) btn.set_halign(Gtk.Align.END)
@@ -77,34 +73,53 @@ class MacroPanel(ScreenPanel):
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
labels.add(name) labels.add(name)
dev = Gtk.Box(spacing=5) row = Gtk.Box(spacing=5)
dev.add(labels) row.get_style_context().add_class("frame-item")
dev.add(btn) row.add(labels)
row.add(btn)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(dev)
self.macros[macro] = { self.macros[macro] = {
"row": frame "row": row,
"params": {},
} }
pattern = r'params\.(?P<param>..*)\|default\((?P<default>..*)\).*'
gcode = self._printer.get_macro(macro)
if gcode and "gcode" in gcode:
gcode = gcode["gcode"].split("\n")
else:
logging.debug(f"Couldn't load {macro}\n{gcode}")
return
i = 0
for line in gcode:
if line.startswith("{") and "params." in line:
result = re.search(pattern, line)
if result:
result = result.groupdict()
default = result["default"] if "default" in result else ""
entry = Gtk.Entry()
entry.set_text(default)
self.macros[macro]["params"].update({result["param"]: entry})
macros = sorted(self.macros, reverse=self.sort_reverse, key=str.casefold) for param in self.macros[macro]["params"]:
pos = macros.index(macro) labels.add(Gtk.Label(param))
self.macros[macro]["params"][param].connect("focus-in-event", self._screen.show_keyboard)
self.loaded_macros.append(macro) self.macros[macro]["params"][param].connect("focus-out-event", self._screen.remove_keyboard)
self.labels['macros'].insert_row(pos) labels.add(self.macros[macro]["params"][param])
self.labels['macros'].attach(self.macros[macro]['row'], 0, pos, 1, 1)
def run_gcode_macro(self, widget, macro): def run_gcode_macro(self, widget, macro):
self._screen._ws.klippy.gcode_script(macro) params = ""
for param in self.macros[macro]["params"]:
value = self.macros[macro]["params"][param].get_text()
if value:
params += f'{param}={value} '
self._screen._ws.klippy.gcode_script(f"{macro} {params}")
def change_sort(self, widget): def change_sort(self, widget):
self.sort_reverse ^= True self.sort_reverse ^= True
if self.sort_reverse: if self.sort_reverse:
self.sort_btn.set_image(self._gtk.Image("arrow-down", self._gtk.img_scale * .5)) self.sort_btn.set_image(self._gtk.Image("arrow-down", self.bts))
else: else:
self.sort_btn.set_image(self._gtk.Image("arrow-up", self._gtk.img_scale * .5)) self.sort_btn.set_image(self._gtk.Image("arrow-up", self.bts))
self.sort_btn.show() self.sort_btn.show()
GLib.idle_add(self.reload_macros) GLib.idle_add(self.reload_macros)
@@ -112,40 +127,31 @@ class MacroPanel(ScreenPanel):
def reload_macros(self): def reload_macros(self):
self.labels['macros'].remove_column(0) self.labels['macros'].remove_column(0)
self.macros = {} self.macros = {}
self.loaded_macros = [] self.options = {}
self.allmacros = {}
self.labels['options'].remove_column(0) self.labels['options'].remove_column(0)
self.load_gcode_macros() self.load_gcode_macros()
def load_gcode_macros(self): def load_gcode_macros(self):
macros = self._screen.printer.get_gcode_macros() for macro in self._printer.get_gcode_macros():
section_name = f"displayed_macros {self._screen.connected_printer}" macro = macro[12:].strip()
logging.info(f"Macro section name [{section_name}]") if macro.startswith("_"): # Support for hiding macros by name
for x in macros:
macro = x[12:].strip()
if macro in self.loaded_macros:
continue continue
self.options[macro] = {
if (section_name not in self._config.get_config().sections() or
self._config.get_config().getboolean(section_name, macro.lower(), fallback=True)):
self.add_gcode_macro(macro)
for macro in self._printer.get_config_section_list("gcode_macro "):
macro = macro[12:]
# Support for hiding macros by name
if macro.startswith("_"):
continue
self.allmacros[macro] = {
"name": macro, "name": macro,
"section": f"displayed_macros {self._screen.connected_printer}", "section": f"displayed_macros {self._screen.connected_printer}",
} }
for macro in list(self.allmacros): show = self._config.get_config().getboolean(self.options[macro]["section"], macro.lower(), fallback=True)
self.add_option('options', self.allmacros, macro, self.allmacros[macro]) if macro not in self.macros and show:
self.add_gcode_macro(macro)
self.labels['macros'].show_all() for macro in list(self.options):
self.add_option('options', self.options, macro, self.options[macro])
macros = sorted(self.macros, reverse=self.sort_reverse, key=str.casefold)
for macro in macros:
pos = macros.index(macro)
self.labels['macros'].insert_row(pos)
self.labels['macros'].attach(self.macros[macro]['row'], 0, pos, 1, 1)
self.labels['macros'].show_all()
def add_option(self, boxname, opt_array, opt_name, option): def add_option(self, boxname, opt_array, opt_name, option):
name = Gtk.Label() name = Gtk.Label()
@@ -164,27 +170,24 @@ class MacroPanel(ScreenPanel):
switch.set_vexpand(False) switch.set_vexpand(False)
switch.set_active(self._config.get_config().getboolean(option['section'], opt_name, fallback=True)) switch.set_active(self._config.get_config().getboolean(option['section'], opt_name, fallback=True))
switch.connect("notify::active", self.switch_config_option, option['section'], opt_name) switch.connect("notify::active", self.switch_config_option, option['section'], opt_name)
switch.set_property("width-request", round(self._gtk.get_font_size() * 7)) switch.set_property("width-request", round(self._gtk.font_size * 7))
switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5)) switch.set_property("height-request", round(self._gtk.font_size * 3.5))
box.add(switch) box.add(switch)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.get_style_context().add_class("frame-item")
dev.set_hexpand(True) dev.set_hexpand(True)
dev.set_vexpand(False) dev.set_vexpand(False)
dev.set_valign(Gtk.Align.CENTER) dev.set_valign(Gtk.Align.CENTER)
dev.add(name) dev.add(name)
dev.add(box) dev.add(box)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(dev)
frame.show_all()
opt_array[opt_name] = { opt_array[opt_name] = {
"name": option['name'], "name": option['name'],
"row": frame "row": dev
} }
opts = sorted(self.allmacros, key=str.casefold) opts = sorted(self.options, key=str.casefold)
pos = opts.index(opt_name) pos = opts.index(opt_name)
self.labels[boxname].insert_row(pos) self.labels[boxname].insert_row(pos)
+13 -18
View File
@@ -1,6 +1,7 @@
import gi
import re import re
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -21,11 +22,11 @@ SHAPERS = ['zv', 'mzv', 'zvd', 'ei', '2hump_ei', '3hump_ei']
class InputShaperPanel(ScreenPanel): class InputShaperPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.freq_xy_adj = {} self.freq_xy_adj = {}
self.freq_xy_combo = {} self.freq_xy_combo = {}
self.calibrate_btn = self._gtk.ButtonImage("move", _('Finding ADXL'), "color1", lines=1) self.calibrate_btn = self._gtk.Button("move", _('Finding ADXL'), "color1", lines=1)
self.calibrate_btn.connect("clicked", self.on_popover_clicked) self.calibrate_btn.connect("clicked", self.on_popover_clicked)
self.calibrate_btn.set_sensitive(False) self.calibrate_btn.set_sensitive(False)
self.status = Gtk.Label("") self.status = Gtk.Label("")
@@ -93,13 +94,13 @@ class InputShaperPanel(ScreenPanel):
self.content.add(box) self.content.add(box)
pobox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) pobox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
test_x = self._gtk.Button(_("Measure X")) test_x = self._gtk.Button(label=_("Measure X"))
test_x.connect("clicked", self.start_calibration, "x") test_x.connect("clicked", self.start_calibration, "x")
pobox.pack_start(test_x, True, True, 5) pobox.pack_start(test_x, True, True, 5)
test_y = self._gtk.Button(_("Measure Y")) test_y = self._gtk.Button(label=_("Measure Y"))
test_y.connect("clicked", self.start_calibration, "y") test_y.connect("clicked", self.start_calibration, "y")
pobox.pack_start(test_y, True, True, 5) pobox.pack_start(test_y, True, True, 5)
test_both = self._gtk.Button(_("Measure Both")) test_both = self._gtk.Button(label=_("Measure Both"))
test_both.connect("clicked", self.start_calibration, "both") test_both.connect("clicked", self.start_calibration, "both")
pobox.pack_start(test_both, True, True, 5) pobox.pack_start(test_both, True, True, 5)
self.labels['popover'] = Gtk.Popover() self.labels['popover'] = Gtk.Popover()
@@ -112,7 +113,7 @@ class InputShaperPanel(ScreenPanel):
def start_calibration(self, widget, method): def start_calibration(self, widget, method):
self.labels['popover'].popdown() self.labels['popover'].popdown()
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME) self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self.calibrating_axis = method self.calibrating_axis = method
if method == "x": if method == "x":
@@ -122,7 +123,7 @@ class InputShaperPanel(ScreenPanel):
if method == "both": if method == "both":
self._screen._ws.klippy.gcode_script('SHAPER_CALIBRATE') self._screen._ws.klippy.gcode_script('SHAPER_CALIBRATE')
self.calibrate_btn.set_label(_('Calibrating...')) self.calibrate_btn.set_label(_('Calibrating') + '...')
self.calibrate_btn.set_sensitive(False) self.calibrate_btn.set_sensitive(False)
def set_opt_value(self, widget, opt, *args): def set_opt_value(self, widget, opt, *args):
@@ -151,17 +152,11 @@ class InputShaperPanel(ScreenPanel):
def activate(self): def activate(self):
# This will return the current values # This will return the current values
self._screen._ws.klippy.gcode_script( self._screen._ws.klippy.gcode_script('SET_INPUT_SHAPER')
'SET_INPUT_SHAPER'
)
# Check for the accelerometer # Check for the accelerometer
self._screen._ws.klippy.gcode_script( self._screen._ws.klippy.gcode_script('ACCELEROMETER_QUERY')
'ACCELEROMETER_QUERY'
)
# Send at least two commands, with my accelerometer the first command after a reboot will fail # Send at least two commands, with my accelerometer the first command after a reboot will fail
self._screen._ws.klippy.gcode_script( self._screen._ws.klippy.gcode_script('MEASURE_AXES_NOISE')
'MEASURE_AXES_NOISE'
)
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_gcode_response": if action != "notify_gcode_response":
+282 -333
View File
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import gi
import logging import logging
import os import os
import time
import contextlib import contextlib
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gtk, Pango from gi.repository import GLib, Gtk, Pango
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
from math import pi, sqrt from math import pi, sqrt
from statistics import median from statistics import median
from time import time
def create_panel(*args): def create_panel(*args):
@@ -17,40 +17,36 @@ def create_panel(*args):
class JobStatusPanel(ScreenPanel): class JobStatusPanel(ScreenPanel):
def __init__(self, screen, title, back=False): def __init__(self, screen, title):
super().__init__(screen, title, False) super().__init__(screen, title)
self.extrusion_button = None
self.elapsed_button = None
self.left_button = None
self.fan_button = None
self.speed_button = None
self.z_button = None
self.heater_button = None
self.extruder_button = None
self.grid = self._gtk.HomogeneousGrid() self.grid = self._gtk.HomogeneousGrid()
self.grid.set_row_homogeneous(False) self.grid.set_row_homogeneous(False)
self.pos_z = 0 self.pos_z = 0
self.extrusion = 100 self.extrusion = 100
self.speed = 100
self.speed_factor = 1 self.speed_factor = 1
self.speed = 100
self.req_speed = 0 self.req_speed = 0
self.f_layer_h = self.layer_h = 1 self.f_layer_h = self.layer_h = 1
self.oheight = 0 self.oheight = 0
self.current_extruder = None self.current_extruder = None
self.fila_section = 0 self.fila_section = 0
self.buttons = {}
self.filename_label = self.filename = self.prev_pos = self.prev_gpos = None self.filename_label = self.filename = self.prev_pos = self.prev_gpos = None
self.close_timeout = self.vel_timeout = self.animation_timeout = None self.can_close = False
self.flow_timeout = self.animation_timeout = None
self.file_metadata = self.fans = {} self.file_metadata = self.fans = {}
self.state = "standby" self.state = "standby"
self.timeleft_type = "auto" self.timeleft_type = "auto"
self.progress = self.zoffset = self.flowrate = self.vel = 0 self.progress = self.zoffset = self.flowrate = self.vel = 0
self.main_status_displayed = True self.flowstore = []
self.velstore = self.flowstore = [] self.mm = _("mm")
self.mms = _("mm/s")
self.mms2 = _("mm/s²")
self.mms3 = _("mm³/s")
self.status_grid = self.move_grid = self.time_grid = self.extrusion_grid = None
data = ['pos_x', 'pos_y', 'pos_z', 'time_left', 'duration', 'slicer_time', 'file_time', data = ['pos_x', 'pos_y', 'pos_z', 'time_left', 'duration', 'slicer_time', 'file_time',
'filament_time', 'est_time', 'speed_factor', 'req_speed', 'max_accel', 'extrude_factor', 'zoffset', 'filament_time', 'est_time', 'speed_factor', 'req_speed', 'max_accel', 'extrude_factor', 'zoffset',
'zoffset', 'filament_used', 'filament_total', 'advance', 'fan', 'layer', 'total_layers', 'height', 'zoffset', 'filament_used', 'filament_total', 'advance', 'layer', 'total_layers', 'height',
'flowrate'] 'flowrate']
for item in data: for item in data:
@@ -90,10 +86,6 @@ class JobStatusPanel(ScreenPanel):
"speed": "-" "speed": "-"
} }
self.create_buttons()
self.buttons['button_grid'] = self._gtk.HomogeneousGrid()
self.buttons['button_grid'].set_vexpand(False)
self.labels['file'] = Gtk.Label("Filename") self.labels['file'] = Gtk.Label("Filename")
self.labels['file'].get_style_context().add_class("printing-filename") self.labels['file'].get_style_context().add_class("printing-filename")
self.labels['file'].set_hexpand(True) self.labels['file'].set_hexpand(True)
@@ -110,6 +102,7 @@ class JobStatusPanel(ScreenPanel):
fi_box.add(self.labels['file']) fi_box.add(self.labels['file'])
fi_box.add(self.labels['status']) fi_box.add(self.labels['status'])
fi_box.add(self.labels['lcdmessage']) fi_box.add(self.labels['lcdmessage'])
self.grid.attach(fi_box, 1, 0, 3, 1)
self.labels['darea'] = Gtk.DrawingArea() self.labels['darea'] = Gtk.DrawingArea()
self.labels['darea'].connect("draw", self.on_draw) self.labels['darea'].connect("draw", self.on_draw)
@@ -124,76 +117,91 @@ class JobStatusPanel(ScreenPanel):
overlay.set_hexpand(True) overlay.set_hexpand(True)
overlay.add(self.labels['darea']) overlay.add(self.labels['darea'])
overlay.add_overlay(box) overlay.add_overlay(box)
self.grid.attach(overlay, 0, 0, 1, 1)
self.labels['thumbnail'] = self._gtk.Image("file", self._screen.width / 4, self._screen.height / 4) self.labels['thumbnail'] = self._gtk.Image()
self.labels['info_grid'] = Gtk.Grid() self.labels['info_grid'] = Gtk.Grid()
self.labels['info_grid'].attach(self.labels['thumbnail'], 0, 0, 1, 1) self.labels['info_grid'].attach(self.labels['thumbnail'], 0, 0, 1, 1)
if self._screen.printer.get_tools(): if self._printer.get_tools():
self.current_extruder = self._printer.get_stat("toolhead", "extruder") self.current_extruder = self._printer.get_stat("toolhead", "extruder")
diameter = float(self._printer.get_config_section(self.current_extruder)['filament_diameter']) diameter = float(self._printer.get_config_section(self.current_extruder)['filament_diameter'])
self.fila_section = pi * ((diameter / 2) ** 2) self.fila_section = pi * ((diameter / 2) ** 2)
self.create_status_grid()
self.grid.attach(overlay, 0, 0, 1, 1) self.buttons = {}
self.grid.attach(fi_box, 1, 0, 3, 1) self.create_buttons()
self.grid.attach(self.labels['info_grid'], 0, 1, 4, 2) self.buttons['button_grid'] = self._gtk.HomogeneousGrid()
self.buttons['button_grid'].set_vexpand(False)
self.grid.attach(self.buttons['button_grid'], 0, 3, 4, 1) self.grid.attach(self.buttons['button_grid'], 0, 3, 4, 1)
self.create_status_grid()
self.create_extrusion_grid()
self.create_time_grid()
self.create_move_grid()
self.grid.attach(self.labels['info_grid'], 0, 1, 4, 2)
self.switch_info(info=self.status_grid)
self.content.add(self.grid) self.content.add(self.grid)
def create_status_grid(self, widget=None): def create_status_grid(self, widget=None):
self.main_status_displayed = True buttons = {
'speed': self._gtk.Button("speed+", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
'z': self._gtk.Button("home-z", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
'extrusion': self._gtk.Button("extrude", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
'fan': self._gtk.Button("fan", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
'elapsed': self._gtk.Button("clock", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
'left': self._gtk.Button("hourglass", "-", None, self.bts, Gtk.PositionType.LEFT, 1),
}
for button in buttons:
buttons[button].set_halign(Gtk.Align.START)
buttons['fan'].connect("clicked", self.menu_item_clicked, "fan", {"panel": "fan", "name": _("Fan")})
self.buttons.update(buttons)
self.labels['temp_grid'] = Gtk.Grid() self.labels['temp_grid'] = Gtk.Grid()
nlimit = 2 if self._screen.width <= 480 else 3 nlimit = 2 if self._screen.width <= 480 else 3
n = 0 n = 0
self.extruder_button = {} self.buttons['extruder'] = {}
if self._screen.printer.get_tools(): if self._printer.get_tools():
for i, extruder in enumerate(self._printer.get_tools()): for i, extruder in enumerate(self._printer.get_tools()):
self.labels[extruder] = Gtk.Label("-") self.labels[extruder] = Gtk.Label("-")
self.extruder_button[extruder] = self._gtk.ButtonImage(f"extruder-{i}", self.buttons['extruder'][extruder] = self._gtk.Button(f"extruder-{i}", "", None, self.bts,
None, None, .6, Gtk.PositionType.LEFT) Gtk.PositionType.LEFT, 1)
self.extruder_button[extruder].set_label(self.labels[extruder].get_text()) self.buttons['extruder'][extruder].set_label(self.labels[extruder].get_text())
self.extruder_button[extruder].connect("clicked", self.menu_item_clicked, "temperature", self.buttons['extruder'][extruder].connect("clicked", self.menu_item_clicked, "temperature",
{"panel": "temperature", "name": _("Temperature")}) {"panel": "temperature", "name": _("Temperature")})
self.extruder_button[extruder].set_halign(Gtk.Align.START) self.buttons['extruder'][extruder].set_halign(Gtk.Align.START)
self.current_extruder = self._printer.get_stat("toolhead", "extruder") self.current_extruder = self._printer.get_stat("toolhead", "extruder")
self.labels['temp_grid'].attach(self.extruder_button[self.current_extruder], n, 0, 1, 1) self.labels['temp_grid'].attach(self.buttons['extruder'][self.current_extruder], n, 0, 1, 1)
n += 1 n += 1
else: else:
self.current_extruder = None self.current_extruder = None
self.heater_button = {} self.buttons['heater'] = {}
if self._printer.has_heated_bed(): if self._printer.has_heated_bed():
self.heater_button['heater_bed'] = self._gtk.ButtonImage("bed", self.buttons['heater']['heater_bed'] = self._gtk.Button("bed", "", None, self.bts, Gtk.PositionType.LEFT, 1)
None, None, .6, Gtk.PositionType.LEFT)
self.labels['heater_bed'] = Gtk.Label("-") self.labels['heater_bed'] = Gtk.Label("-")
self.heater_button['heater_bed'].set_label(self.labels['heater_bed'].get_text()) self.buttons['heater']['heater_bed'].set_label(self.labels['heater_bed'].get_text())
self.heater_button['heater_bed'].connect("clicked", self.menu_item_clicked, "temperature", self.buttons['heater']['heater_bed'].connect("clicked", self.menu_item_clicked, "temperature",
{"panel": "temperature", "name": _("Temperature")}) {"panel": "temperature", "name": _("Temperature")})
self.heater_button['heater_bed'].set_halign(Gtk.Align.START) self.buttons['heater']['heater_bed'].set_halign(Gtk.Align.START)
self.labels['temp_grid'].attach(self.heater_button['heater_bed'], n, 0, 1, 1) self.labels['temp_grid'].attach(self.buttons['heater']['heater_bed'], n, 0, 1, 1)
n += 1 n += 1
for device in self._screen.printer.get_heaters(): for dev in self._printer.get_heaters():
if n >= nlimit: if n >= nlimit:
break break
if device.startswith("heater_generic"): if dev.startswith("heater_generic"):
self.heater_button[device] = self._gtk.ButtonImage("heater", self.buttons['heater'][dev] = self._gtk.Button("heater", "", None, self.bts, Gtk.PositionType.LEFT, 1)
None, None, .6, Gtk.PositionType.LEFT) self.labels[dev] = Gtk.Label("-")
self.labels[device] = Gtk.Label("-") self.buttons['heater'][dev].set_label(self.labels[dev].get_text())
self.heater_button[device].set_label(self.labels[device].get_text()) self.buttons['heater'][dev].connect("clicked", self.menu_item_clicked, "temperature",
self.heater_button[device].connect("clicked", self.menu_item_clicked, "temperature", {"panel": "temperature", "name": _("Temperature")})
{"panel": "temperature", "name": _("Temperature")}) self.buttons['heater'][dev].set_halign(Gtk.Align.START)
self.heater_button[device].set_halign(Gtk.Align.START) self.labels['temp_grid'].attach(self.buttons['heater'][dev], n, 0, 1, 1)
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1)
n += 1 n += 1
extra_item = not self._show_heater_power extra_item = not self._show_heater_power
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) if self.ks_printer_cfg is not None:
if printer_cfg is not None: titlebar_items = self.ks_printer_cfg.get("titlebar_items", "")
titlebar_items = printer_cfg.get("titlebar_items", "")
if titlebar_items is not None: if titlebar_items is not None:
titlebar_items = [str(i.strip()) for i in titlebar_items.split(',')] titlebar_items = [str(i.strip()) for i in titlebar_items.split(',')]
logging.info(f"Titlebar items: {titlebar_items}") logging.info(f"Titlebar items: {titlebar_items}")
for device in self._screen.printer.get_heaters(): for device in self._printer.get_heaters():
if device.startswith("temperature_sensor"): if device.startswith("temperature_sensor"):
name = " ".join(device.split(" ")[1:]) name = " ".join(device.split(" ")[1:])
for item in titlebar_items: for item in titlebar_items:
@@ -203,67 +211,39 @@ class JobStatusPanel(ScreenPanel):
nlimit += 1 nlimit += 1
if n >= nlimit: if n >= nlimit:
break break
self.heater_button[device] = self._gtk.ButtonImage("heat-up", None, None, .6, self.buttons['heater'][device] = self._gtk.Button("heat-up", "", None, self.bts,
Gtk.PositionType.LEFT) Gtk.PositionType.LEFT, 1)
self.labels[device] = Gtk.Label("-") self.labels[device] = Gtk.Label("-")
self.heater_button[device].set_label(self.labels[device].get_text()) self.buttons['heater'][device].set_label(self.labels[device].get_text())
self.heater_button[device].connect("clicked", self.menu_item_clicked, "temperature", self.buttons['heater'][device].connect("clicked", self.menu_item_clicked, "temperature",
{"panel": "temperature", "name": _("Temperature")}) {"panel": "temperature",
self.heater_button[device].set_halign(Gtk.Align.START) "name": _("Temperature")})
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1) self.buttons['heater'][device].set_halign(Gtk.Align.START)
self.labels['temp_grid'].attach(self.buttons['heater'][device], n, 0, 1, 1)
n += 1 n += 1
break break
self.z_button = self._gtk.ButtonImage("home-z", None, None, .6, Gtk.PositionType.LEFT)
self.z_button.set_label(self.labels['pos_z'].get_text())
self.z_button.connect("clicked", self.create_move_grid)
self.z_button.set_halign(Gtk.Align.START)
self.speed_button = self._gtk.ButtonImage("speed+", None, None, .6, Gtk.PositionType.LEFT)
self.speed_button.set_label(self.labels['speed_factor'].get_text())
self.speed_button.connect("clicked", self.create_move_grid)
self.speed_button.set_halign(Gtk.Align.START)
self.extrusion_button = self._gtk.ButtonImage("extrude", None, None, .6, Gtk.PositionType.LEFT)
self.extrusion_button.set_label(self.labels['extrude_factor'].get_text())
self.extrusion_button.connect("clicked", self.create_extrusion_grid)
self.extrusion_button.set_halign(Gtk.Align.START)
self.fan_button = self._gtk.ButtonImage("fan", None, None, .6, Gtk.PositionType.LEFT)
self.fan_button.set_label(self.labels['fan'].get_text())
self.fan_button.connect("clicked", self.menu_item_clicked, "fan", {"panel": "fan", "name": _("Fan")})
self.fan_button.set_halign(Gtk.Align.START)
elapsed_label = self.labels['elapsed'].get_text() + " " + self.labels['duration'].get_text()
self.elapsed_button = self._gtk.ButtonImage("clock", elapsed_label, None, .6, Gtk.PositionType.LEFT, False)
self.elapsed_button.connect("clicked", self.create_time_grid)
self.elapsed_button.set_halign(Gtk.Align.START)
remaining_label = self.labels['left'].get_text() + " " + self.labels['time_left'].get_text()
self.left_button = self._gtk.ButtonImage("hourglass", remaining_label, None, .6, Gtk.PositionType.LEFT, False)
self.left_button.connect("clicked", self.create_time_grid)
self.left_button.set_halign(Gtk.Align.START)
szfe = Gtk.Grid() szfe = Gtk.Grid()
szfe.attach(self.speed_button, 0, 0, 1, 1) szfe.set_column_homogeneous(True)
szfe.attach(self.z_button, 1, 0, 1, 1) szfe.attach(self.buttons['speed'], 0, 0, 3, 1)
if self._screen.printer.get_tools(): szfe.attach(self.buttons['z'], 2, 0, 2, 1)
szfe.attach(self.extrusion_button, 0, 1, 1, 1) if self._printer.get_tools():
if self._screen.printer.get_fans(): szfe.attach(self.buttons['extrusion'], 0, 1, 3, 1)
szfe.attach(self.fan_button, 1, 1, 1, 1) if self._printer.get_fans():
szfe.attach(self.buttons['fan'], 2, 1, 2, 1)
info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) info = Gtk.Grid()
info.set_row_homogeneous(True)
info.get_style_context().add_class("printing-info") info.get_style_context().add_class("printing-info")
info.add(self.labels['temp_grid']) info.attach(self.labels['temp_grid'], 0, 0, 1, 1)
info.add(szfe) info.attach(szfe, 0, 1, 1, 2)
info.add(self.elapsed_button) info.attach(self.buttons['elapsed'], 0, 3, 1, 1)
info.add(self.left_button) info.attach(self.buttons['left'], 0, 4, 1, 1)
self.switch_info(info) self.status_grid = info
def create_extrusion_grid(self, widget=None): def create_extrusion_grid(self, widget=None):
self.main_status_displayed = False goback = self._gtk.Button("back", None, "color1", self.bts, Gtk.PositionType.TOP, False)
goback = self._gtk.ButtonImage("back", None, "color1", .66, Gtk.PositionType.TOP, False) goback.connect("clicked", self.switch_info, self.status_grid)
goback.connect("clicked", self.create_status_grid)
goback.set_hexpand(False) goback.set_hexpand(False)
goback.get_style_context().add_class("printing-info") goback.get_style_context().add_class("printing-info")
@@ -283,12 +263,12 @@ class JobStatusPanel(ScreenPanel):
info.attach(self.labels['filament_used'], 2, 3, 1, 1) info.attach(self.labels['filament_used'], 2, 3, 1, 1)
info.attach(self.labels['fila_total_lbl'], 1, 4, 1, 1) info.attach(self.labels['fila_total_lbl'], 1, 4, 1, 1)
info.attach(self.labels['filament_total'], 2, 4, 1, 1) info.attach(self.labels['filament_total'], 2, 4, 1, 1)
self.switch_info(info) self.extrusion_grid = info
self.buttons['extrusion'].connect("clicked", self.switch_info, self.extrusion_grid)
def create_move_grid(self, widget=None): def create_move_grid(self, widget=None):
self.main_status_displayed = False goback = self._gtk.Button("back", None, "color2", self.bts, Gtk.PositionType.TOP, False)
goback = self._gtk.ButtonImage("back", None, "color2", .66, Gtk.PositionType.TOP, False) goback.connect("clicked", self.switch_info, self.status_grid)
goback.connect("clicked", self.create_status_grid)
goback.set_hexpand(False) goback.set_hexpand(False)
goback.get_style_context().add_class("printing-info") goback.get_style_context().add_class("printing-info")
@@ -314,12 +294,13 @@ class JobStatusPanel(ScreenPanel):
info.attach(self.labels['height'], 2, 4, 1, 1) info.attach(self.labels['height'], 2, 4, 1, 1)
info.attach(self.labels['layer_lbl'], 1, 5, 1, 1) info.attach(self.labels['layer_lbl'], 1, 5, 1, 1)
info.attach(self.labels['layer'], 2, 5, 1, 1) info.attach(self.labels['layer'], 2, 5, 1, 1)
self.switch_info(info) self.move_grid = info
self.buttons['z'].connect("clicked", self.switch_info, self.move_grid)
self.buttons['speed'].connect("clicked", self.switch_info, self.move_grid)
def create_time_grid(self, widget=None): def create_time_grid(self, widget=None):
self.main_status_displayed = False goback = self._gtk.Button("back", None, "color3", self.bts, Gtk.PositionType.TOP, False)
goback = self._gtk.ButtonImage("back", None, "color3", .66, Gtk.PositionType.TOP, False) goback.connect("clicked", self.switch_info, self.status_grid)
goback.connect("clicked", self.create_status_grid)
goback.set_hexpand(False) goback.set_hexpand(False)
info = Gtk.Grid() info = Gtk.Grid()
@@ -327,19 +308,24 @@ class JobStatusPanel(ScreenPanel):
info.attach(goback, 0, 0, 1, 6) info.attach(goback, 0, 0, 1, 6)
info.attach(self.labels['elapsed'], 1, 0, 1, 1) info.attach(self.labels['elapsed'], 1, 0, 1, 1)
info.attach(self.labels['duration'], 2, 0, 1, 1) info.attach(self.labels['duration'], 2, 0, 1, 1)
info.attach(self.labels['total'], 1, 1, 1, 1) info.attach(self.labels['left'], 1, 1, 1, 1)
info.attach(self.labels['est_time'], 2, 1, 1, 1) info.attach(self.labels['time_left'], 2, 1, 1, 1)
info.attach(self.labels['left'], 1, 2, 1, 1) info.attach(self.labels['total'], 1, 2, 1, 1)
info.attach(self.labels['time_left'], 2, 2, 1, 1) info.attach(self.labels['est_time'], 2, 2, 1, 1)
info.attach(self.labels['slicer'], 1, 3, 1, 1) info.attach(self.labels['slicer'], 1, 3, 1, 1)
info.attach(self.labels['slicer_time'], 2, 3, 1, 1) info.attach(self.labels['slicer_time'], 2, 3, 1, 1)
info.attach(self.labels['file_tlbl'], 1, 4, 1, 1) info.attach(self.labels['file_tlbl'], 1, 4, 1, 1)
info.attach(self.labels['file_time'], 2, 4, 1, 1) info.attach(self.labels['file_time'], 2, 4, 1, 1)
info.attach(self.labels['fila_tlbl'], 1, 5, 1, 1) info.attach(self.labels['fila_tlbl'], 1, 5, 1, 1)
info.attach(self.labels['filament_time'], 2, 5, 1, 1) info.attach(self.labels['filament_time'], 2, 5, 1, 1)
self.switch_info(info) self.time_grid = info
self.buttons['elapsed'].connect("clicked", self.switch_info, self.time_grid)
self.buttons['left'].connect("clicked", self.switch_info, self.time_grid)
def switch_info(self, info): def switch_info(self, widget=None, info=None):
if not info:
logging.debug("No info to attach")
return
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.labels['info_grid'].remove_row(1) self.labels['info_grid'].remove_row(1)
self.labels['info_grid'].attach(info, 0, 1, 1, 1) self.labels['info_grid'].attach(info, 0, 1, 1, 1)
@@ -354,7 +340,7 @@ class JobStatusPanel(ScreenPanel):
r = min(w, h) * .42 r = min(w, h) * .42
ctx.set_source_rgb(0.13, 0.13, 0.13) ctx.set_source_rgb(0.13, 0.13, 0.13)
ctx.set_line_width(self._gtk.get_font_size() * .75) ctx.set_line_width(self._gtk.font_size * .75)
ctx.translate(w / 2, h / 2) ctx.translate(w / 2, h / 2)
ctx.arc(0, 0, r, 0, 2 * pi) ctx.arc(0, 0, r, 0, 2 * pi)
ctx.stroke() ctx.stroke()
@@ -365,28 +351,32 @@ class JobStatusPanel(ScreenPanel):
def activate(self): def activate(self):
ps = self._printer.get_stat("print_stats") ps = self._printer.get_stat("print_stats")
self.set_state(ps['state']) self.set_state(ps['state'])
self.create_status_grid() if 'filename' in ps and (ps['filename'] != self.filename):
if self.vel_timeout is None: logging.debug(f"Changing filename: '{self.filename}' to '{ps['filename']}'")
self.vel_timeout = GLib.timeout_add_seconds(1, self.update_velocity) self.update_filename()
if self.flow_timeout is None:
self.flow_timeout = GLib.timeout_add_seconds(2, self.update_flow)
self._screen.base_panel_show_all() self._screen.base_panel_show_all()
logging.debug("Job_status panel")
self._screen.memory_trace()
def deactivate(self): def deactivate(self):
if self.vel_timeout is not None: if self.flow_timeout is not None:
GLib.source_remove(self.vel_timeout) GLib.source_remove(self.flow_timeout)
self.vel_timeout = None self.flow_timeout = None
def create_buttons(self): def create_buttons(self):
self.buttons = { self.buttons = {
'cancel': self._gtk.ButtonImage("stop", _("Cancel"), "color2"), 'cancel': self._gtk.Button("stop", _("Cancel"), "color2"),
'control': self._gtk.ButtonImage("settings", _("Settings"), "color3"), 'control': self._gtk.Button("settings", _("Settings"), "color3"),
'fine_tune': self._gtk.ButtonImage("fine-tune", _("Fine Tuning"), "color4"), 'fine_tune': self._gtk.Button("fine-tune", _("Fine Tuning"), "color4"),
'menu': self._gtk.ButtonImage("complete", _("Main Menu"), "color4"), 'menu': self._gtk.Button("complete", _("Main Menu"), "color4"),
'pause': self._gtk.ButtonImage("pause", _("Pause"), "color1"), 'pause': self._gtk.Button("pause", _("Pause"), "color1"),
'restart': self._gtk.ButtonImage("refresh", _("Restart"), "color3"), 'restart': self._gtk.Button("refresh", _("Restart"), "color3"),
'resume': self._gtk.ButtonImage("resume", _("Resume"), "color1"), 'resume': self._gtk.Button("resume", _("Resume"), "color1"),
'save_offset_probe': self._gtk.ButtonImage("home-z", _("Save Z") + "\n" + "Probe", "color1"), 'save_offset_probe': self._gtk.Button("home-z", _("Save Z") + "\n" + "Probe", "color1"),
'save_offset_endstop': self._gtk.ButtonImage("home-z", _("Save Z") + "\n" + "Endstop", "color2"), 'save_offset_endstop': self._gtk.Button("home-z", _("Save Z") + "\n" + "Endstop", "color2"),
} }
self.buttons['cancel'].connect("clicked", self.cancel) self.buttons['cancel'].connect("clicked", self.cancel)
self.buttons['control'].connect("clicked", self._screen._go_to_submenu, "") self.buttons['control'].connect("clicked", self._screen._go_to_submenu, "")
@@ -400,20 +390,16 @@ class JobStatusPanel(ScreenPanel):
self.buttons['save_offset_endstop'].connect("clicked", self.save_offset, "endstop") self.buttons['save_offset_endstop'].connect("clicked", self.save_offset, "endstop")
def save_offset(self, widget, device): def save_offset(self, widget, device):
saved_z_offset = 0
if self._printer.config_section_exists("probe"):
saved_z_offset = float(self._screen.printer.get_config_section("probe")['z_offset'])
elif self._printer.config_section_exists("bltouch"):
saved_z_offset = float(self._screen.printer.get_config_section("bltouch")['z_offset'])
sign = "+" if self.zoffset > 0 else "-" sign = "+" if self.zoffset > 0 else "-"
label = Gtk.Label() label = Gtk.Label()
if device == "probe": if device == "probe":
label.set_text(_("Apply %s%.2f offset to Probe?") % (sign, abs(self.zoffset)) probe = self._printer.get_probe()
+ "\n\n" saved_z_offset = probe['z_offset'] if probe else "?"
+ _("Saved offset: %s") % saved_z_offset) label.set_label(_("Apply %s%.2f offset to Probe?") % (sign, abs(self.zoffset))
+ "\n\n"
+ _("Saved offset: %s") % saved_z_offset)
elif device == "endstop": elif device == "endstop":
label.set_text(_("Apply %.2f offset to Endstop?") % self.zoffset) label.set_label(_("Apply %s%.2f offset to Endstop?") % (sign, abs(self.zoffset)))
label.set_hexpand(True) label.set_hexpand(True)
label.set_halign(Gtk.Align.CENTER) label.set_halign(Gtk.Align.CENTER)
label.set_vexpand(True) label.set_vexpand(True)
@@ -427,19 +413,23 @@ class JobStatusPanel(ScreenPanel):
{"name": _("Apply"), "response": Gtk.ResponseType.APPLY}, {"name": _("Apply"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL} {"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
] ]
self._gtk.Dialog(self._screen, buttons, grid, self.save_confirm, device) dialog = self._gtk.Dialog(self._screen, buttons, grid, self.save_confirm, device)
dialog.set_title(_("Save Z"))
def save_confirm(self, widget, response_id, device): def save_confirm(self, dialog, response_id, device):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.APPLY: if response_id == Gtk.ResponseType.APPLY:
if device == "probe": if device == "probe":
self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_PROBE") self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_PROBE")
if device == "endstop": if device == "endstop":
self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_ENDSTOP") self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_ENDSTOP")
self._screen._ws.klippy.gcode_script("SAVE_CONFIG") self._screen._ws.klippy.gcode_script("SAVE_CONFIG")
widget.destroy()
def restart(self, widget): def restart(self, widget):
if self.filename != "none": if self.filename != "none":
if self.state == "error":
script = {"script": "SDCARD_RESET_FILE"}
self._screen._send_action(None, "printer.gcode.script", script)
self._screen._ws.klippy.print_start(self.filename) self._screen._ws.klippy.print_start(self.filename)
self.new_print() self.new_print()
@@ -467,19 +457,17 @@ class JobStatusPanel(ScreenPanel):
label.set_line_wrap(True) label.set_line_wrap(True)
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self._gtk.Dialog(self._screen, buttons, label, self.cancel_confirm) dialog = self._gtk.Dialog(self._screen, buttons, label, self.cancel_confirm)
dialog.set_title(_("Cancel"))
def cancel_confirm(self, widget, response_id):
widget.destroy()
def cancel_confirm(self, dialog, response_id):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.APPLY: if response_id == Gtk.ResponseType.APPLY:
self.menu_item_clicked(None, "exclude", {"panel": "exclude", "name": _("Exclude Object")}) self.menu_item_clicked(None, "exclude", {"panel": "exclude", "name": _("Exclude Object")})
return return
if response_id == Gtk.ResponseType.CANCEL: if response_id == Gtk.ResponseType.CANCEL:
self.enable_button("pause", "cancel") self.enable_button("pause", "cancel")
return return
logging.debug("Canceling print") logging.debug("Canceling print")
self.set_state("cancelling") self.set_state("cancelling")
self.disable_button("pause", "resume", "cancel") self.disable_button("pause", "resume", "cancel")
@@ -490,18 +478,10 @@ class JobStatusPanel(ScreenPanel):
self.enable_button(*args) self.enable_button(*args)
def close_panel(self, widget=None): def close_panel(self, widget=None):
logging.debug("Closing job_status panel") if self.can_close:
self.remove_close_timeout() logging.debug("Closing job_status panel")
self.state_check()
if self.state not in ["printing", "paused", "cancelling"]:
self._screen.printer_ready() self._screen.printer_ready()
self._printer.change_state("ready") self._printer.change_state("ready")
return False
def remove_close_timeout(self):
if self.close_timeout is not None:
GLib.source_remove(self.close_timeout)
self.close_timeout = None
def enable_button(self, *args): def enable_button(self, *args):
for arg in args: for arg in args:
@@ -517,7 +497,6 @@ class JobStatusPanel(ScreenPanel):
self._files.remove_file_callback(self._callback_metadata) self._files.remove_file_callback(self._callback_metadata)
def new_print(self): def new_print(self):
self.remove_close_timeout()
self._screen.close_screensaver() self._screen.close_screensaver()
self.state_check() self.state_check()
@@ -533,24 +512,24 @@ class JobStatusPanel(ScreenPanel):
elif action != "notify_status_update": elif action != "notify_status_update":
return return
if self.main_status_displayed: for x in self._printer.get_tools():
for x in self._printer.get_tools(): if x in self.buttons['extruder']:
self.update_temp( self.update_temp(
x, x,
self._printer.get_dev_stat(x, "temperature"), 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._printer.get_dev_stat(x, "power"),
) )
self.extruder_button[x].set_label(self.labels[x].get_text()) self.buttons['extruder'][x].set_label(self.labels[x].get_text())
for x in self._printer.get_heaters(): for x in self._printer.get_heaters():
if x in self.labels: if x in self.buttons['heater']:
self.update_temp( self.update_temp(
x, x,
self._printer.get_dev_stat(x, "temperature"), 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._printer.get_dev_stat(x, "power"),
) )
self.heater_button[x].set_label(self.labels[x].get_text()) self.buttons['heater'][x].set_label(self.labels[x].get_text())
self.update_message() self.update_message()
@@ -559,77 +538,63 @@ class JobStatusPanel(ScreenPanel):
self.labels['temp_grid'].remove_column(0) self.labels['temp_grid'].remove_column(0)
self.labels['temp_grid'].insert_column(0) self.labels['temp_grid'].insert_column(0)
self.current_extruder = data["toolhead"]["extruder"] self.current_extruder = data["toolhead"]["extruder"]
self.labels['temp_grid'].attach(self.extruder_button[self.current_extruder], 0, 0, 1, 1) self.labels['temp_grid'].attach(self.buttons['extruder'][self.current_extruder], 0, 0, 1, 1)
self._screen.show_all() self._screen.show_all()
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.labels['max_accel'].set_text(f"{data['toolhead']['max_accel']:.0f} mm/s²") self.labels['max_accel'].set_label(f"{data['toolhead']['max_accel']:.0f} {self.mms2}")
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.labels['advance'].set_text(f"{data['extruder']['pressure_advance']:.2f}") self.labels['advance'].set_label(f"{data['extruder']['pressure_advance']:.2f}")
if "gcode_move" in data: if "gcode_move" in data:
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:6.2f}") self.pos_z = round(float(data['gcode_move']['gcode_position'][2]), 2)
self.labels['pos_y'].set_text(f"Y: {data['gcode_move']['gcode_position'][1]:6.2f}") self.buttons['z'].set_label(f"Z: {self.pos_z:6.2f}{f'/{self.oheight}' if self.oheight > 0 else ''}")
self.labels['pos_z'].set_text(f"Z: {data['gcode_move']['gcode_position'][2]:6.2f}")
self.pos_z = data["gcode_move"]["gcode_position"][2]
if self.main_status_displayed:
self.z_button.set_label(self.labels['pos_z'].get_text())
now = time.time()
pos = data["gcode_move"]["gcode_position"]
if self.prev_gpos is not None:
interval = now - self.prev_gpos[1]
# Calculate Velocity
vel = sqrt(sum([
(pos[0] - self.prev_gpos[0][0]) ** 2,
(pos[1] - self.prev_gpos[0][1]) ** 2,
(pos[2] - self.prev_gpos[0][2]) ** 2]
)) / interval
self.velstore.append(vel)
self.prev_gpos = [pos, now]
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.extrusion = int(round(data["gcode_move"]["extrude_factor"] * 100)) self.extrusion = round(float(data["gcode_move"]["extrude_factor"]) * 100)
self.labels['extrude_factor'].set_text(f"{self.extrusion:3}%") self.labels['extrude_factor'].set_label(f"{self.extrusion:3}%")
if self.main_status_displayed:
self.extrusion_button.set_label(f"{self.extrusion:3}%")
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.speed = int(round(data["gcode_move"]["speed_factor"] * 100)) self.speed = round(float(data["gcode_move"]["speed_factor"]) * 100)
self.speed_factor = float(data["gcode_move"]["speed_factor"]) self.speed_factor = float(data["gcode_move"]["speed_factor"])
self.labels['speed_factor'].set_text(f"{self.speed:3}%") self.labels['speed_factor'].set_label(f"{self.speed:3}%")
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.req_speed = int(round(data["gcode_move"]["speed"] / 60 * self.speed_factor)) self.req_speed = round(float(data["gcode_move"]["speed"]) / 60 * self.speed_factor)
self.labels['req_speed'].set_label(
f"{self.speed}% {self.vel:3.0f}/{self.req_speed:3.0f} "
f"{f'{self.mms}' if self.vel < 1000 and self.req_speed < 1000 and self._screen.width > 480 else ''}"
)
self.buttons['speed'].set_label(self.labels['req_speed'].get_label())
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.zoffset = data["gcode_move"]["homing_origin"][2] self.zoffset = float(data["gcode_move"]["homing_origin"][2])
self.labels['zoffset'].set_text(f"{self.zoffset:.2f}") self.labels['zoffset'].set_label(f"{self.zoffset:.2f} {self.mm}")
if "motion_report" in data: if "motion_report" in data:
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.labels['pos_x'].set_label(f"X: {data['motion_report']['live_position'][0]:6.2f}")
self.labels['pos_y'].set_label(f"Y: {data['motion_report']['live_position'][1]:6.2f}")
self.labels['pos_z'].set_label(f"Z: {data['motion_report']['live_position'][2]:6.2f}")
pos = data["motion_report"]["live_position"] pos = data["motion_report"]["live_position"]
now = time.time() now = time()
if self.prev_pos is not None: if self.prev_pos is not None:
interval = (now - self.prev_pos[1]) interval = (now - self.prev_pos[1])
# Calculate Flowrate # Calculate Flowrate
evelocity = (pos[3] - self.prev_pos[0][3]) / interval evelocity = (pos[3] - self.prev_pos[0][3]) / interval
self.flowstore.append(self.fila_section * evelocity) self.flowstore.append(self.fila_section * evelocity)
# Calculate Velocity
vel = sqrt(sum([
(pos[0] - self.prev_pos[0][0]) ** 2,
(pos[1] - self.prev_pos[0][1]) ** 2,
(pos[2] - self.prev_pos[0][2]) ** 2]
)) / interval
self.velstore.append(vel)
self.prev_pos = [pos, now] self.prev_pos = [pos, now]
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.velstore.append(float(data["motion_report"]["live_velocity"])) self.vel = float(data["motion_report"]["live_velocity"])
self.labels['req_speed'].set_label(
f"{self.speed}% {self.vel:3.0f}/{self.req_speed:3.0f} "
f"{f'{self.mms}' if self.vel < 1000 and self.req_speed < 1000 and self._screen.width > 480 else ''}"
)
self.buttons['speed'].set_label(self.labels['req_speed'].get_label())
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
self.flowstore.append(self.fila_section * float(data["motion_report"]["live_extruder_velocity"])) self.flowstore.append(self.fila_section * float(data["motion_report"]["live_extruder_velocity"]))
fan_label = "" fan_label = ""
for fan in self.fans: for fan in self.fans:
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
fan_speed = int(round(self._printer.get_fan_speed(fan, data[fan]["speed"]), 2) * 100) self.fans[fan]['speed'] = f"{self._printer.get_fan_speed(fan) * 100:3.0f}%"
self.fans[fan]['speed'] = f"{fan_speed:3}%"
fan_label += f" {self.fans[fan]['name']}{self.fans[fan]['speed']}" fan_label += f" {self.fans[fan]['name']}{self.fans[fan]['speed']}"
if fan_label: if fan_label:
self.labels['fan'].set_text(fan_label[:12]) self.buttons['fan'].set_label(fan_label[:12])
self.state_check() self.state_check()
if self.state not in ["printing", "paused"]: if self.state not in ["printing", "paused"]:
@@ -650,85 +615,69 @@ class JobStatusPanel(ScreenPanel):
f"{1 + round((self.pos_z - self.f_layer_h) / self.layer_h)} / {self.labels['total_layers'].get_text()}") f"{1 + round((self.pos_z - self.f_layer_h) / self.layer_h)} / {self.labels['total_layers'].get_text()}")
if 'print_duration' in ps: if 'print_duration' in ps:
if int(ps['print_duration']) == 0 and self.progress > 0.001:
# Print duration remains at 0 when using No-extusion tests
duration = ps['total_duration']
else:
duration = ps['print_duration']
if 'filament_used' in ps: if 'filament_used' in ps:
self.labels['filament_used'].set_text(f"{float(ps['filament_used']) / 1000:.1f} m") self.labels['filament_used'].set_label(f"{float(ps['filament_used']) / 1000:.1f} m")
self.update_time_left(duration, ps['filament_used']) self.update_time_left(ps['total_duration'], ps['print_duration'], ps['filament_used'])
else: else:
self.update_time_left(duration) self.update_time_left(ps['total_duration'], ps['print_duration'])
if self.main_status_displayed: elapsed_label = f"{self.labels['elapsed'].get_text()} {self.labels['duration'].get_text()}"
self.fan_button.set_label(self.labels['fan'].get_text()) self.buttons['elapsed'].set_label(elapsed_label)
elapsed_label = f"{self.labels['elapsed'].get_text()} {self.labels['duration'].get_text()}" remaining_label = f"{self.labels['left'].get_text()} {self.labels['time_left'].get_text()}"
self.elapsed_button.set_label(elapsed_label) self.buttons['left'].set_label(remaining_label)
remaining_label = f"{self.labels['left'].get_text()} {self.labels['time_left'].get_text()}"
self.left_button.set_label(remaining_label)
def update_velocity(self): def update_flow(self):
if not self.velstore:
self.velstore.append(0)
if not self.flowstore: if not self.flowstore:
self.flowstore.append(0) self.flowstore.append(0)
self.flowrate = median(self.flowstore) self.flowrate = median(self.flowstore)
self.vel = median(self.velstore)
self.velstore = []
self.flowstore = [] self.flowstore = []
self.labels['flowrate'].set_label(f"{self.flowrate:.1f} mm³/s") self.labels['flowrate'].set_label(f"{self.flowrate:.1f} {self.mms3}")
self.labels['req_speed'].set_text(f"{self.vel:.0f}/{self.req_speed:.0f} mm/s") self.buttons['extrusion'].set_label(f"{self.extrusion:3}% {self.flowrate:5.1f} {self.mms3}")
if self.main_status_displayed:
self.speed_button.set_label(f"{self.speed:3.0f}% {self.vel:5.0f} mm/s")
self.extrusion_button.set_label(f"{self.extrusion:3}% {self.flowrate:5.1f} mm³/s")
return True return True
def update_time_left(self, duration=0, fila_used=0): def update_time_left(self, total_duration, print_duration, fila_used=0):
total_duration = None self.labels["duration"].set_label(self.format_time(total_duration))
if self.progress < 1: non_printing = total_duration - print_duration
slicer_time = filament_time = file_time = None estimated = None
timeleft_type = self._config.get_config()['main'].get('print_estimate_method', 'auto') slicer_time = filament_time = file_time = None
timeleft_type = self._config.get_config()['main'].get('print_estimate_method', 'auto')
with contextlib.suppress(KeyError): with contextlib.suppress(KeyError):
if self.file_metadata['estimated_time'] > 0: if self.file_metadata['estimated_time'] > 0:
usrcomp = (self._config.get_config()['main'].getint('print_estimate_compensation', 100) / 100) usrcomp = (self._config.get_config()['main'].getint('print_estimate_compensation', 100) / 100)
# speed_factor compensation based on empirical testing # speed_factor compensation based on empirical testing
spdcomp = sqrt(self.speed_factor) spdcomp = sqrt(self.speed_factor)
slicer_time = (self.file_metadata['estimated_time'] * usrcomp) / spdcomp slicer_time = ((self.file_metadata['estimated_time'] * usrcomp) / spdcomp) + non_printing
self.update_text("slicer_time", self.format_time(slicer_time)) self.labels["slicer_time"].set_label(self.format_time(slicer_time))
with contextlib.suppress(Exception): with contextlib.suppress(Exception):
if self.file_metadata['filament_total'] > fila_used: if self.file_metadata['filament_total'] > fila_used:
filament_time = duration / (fila_used / self.file_metadata['filament_total']) filament_time = (total_duration / (fila_used / self.file_metadata['filament_total'])) + non_printing
self.update_text("filament_time", self.format_time(filament_time)) self.labels["filament_time"].set_label(self.format_time(filament_time))
with contextlib.suppress(ZeroDivisionError):
file_time = (total_duration / self.progress) + non_printing
self.labels["file_time"].set_label(self.format_time(file_time))
with contextlib.suppress(ZeroDivisionError): if timeleft_type == "file":
file_time = duration / self.progress estimated = file_time
self.update_text("file_time", self.format_time(file_time)) elif timeleft_type == "filament":
estimated = filament_time
if timeleft_type == "file": elif slicer_time is not None:
total_duration = file_time if timeleft_type == "slicer":
elif timeleft_type == "filament": estimated = slicer_time
total_duration = filament_time elif filament_time is not None and self.progress > 0.14:
elif slicer_time is not None: # Weighted arithmetic mean (Slicer is the most accurate)
if timeleft_type == "slicer": estimated = (slicer_time * 3 + filament_time + file_time) / 5
total_duration = slicer_time else:
elif filament_time is not None and self.progress > 0.14: # At the begining file and filament are innacurate
# Weighted arithmetic mean (Slicer is the most accurate) estimated = slicer_time
total_duration = (slicer_time * 3 + filament_time + file_time) / 5 elif file_time is not None:
else: if filament_time is not None:
# At the begining file and filament are innacurate estimated = (filament_time + file_time) / 2
total_duration = slicer_time else:
elif file_time is not None: estimated = file_time
if filament_time is not None: self.labels["est_time"].set_label(self.format_time(estimated))
total_duration = (filament_time + file_time) / 2 self.labels["time_left"].set_label(self.format_eta(estimated, total_duration))
else:
total_duration = file_time
self.update_text("duration", self.format_time(duration))
self.update_text("est_time", self.format_time(total_duration))
if total_duration is not None:
self.update_text("time_left", self.format_time(total_duration - duration))
def state_check(self): def state_check(self):
ps = self._printer.get_stat("print_stats") ps = self._printer.get_stat("print_stats")
@@ -745,42 +694,39 @@ class JobStatusPanel(ScreenPanel):
self.progress = 1 self.progress = 1
self.update_progress() self.update_progress()
self.set_state("complete") self.set_state("complete")
return self._add_timeout("job_complete_timeout") return self._add_timeout(self._config.get_main_config().getint("job_complete_timeout", 0))
elif ps['state'] == "error": elif ps['state'] == "error":
self.set_state("error") self.set_state("error")
self.labels['status'].set_text(_("Error")) self.labels['status'].set_label(_("Error"))
self._screen.show_popup_message(ps['message']) self._screen.show_popup_message(ps['message'])
return self._add_timeout("job_error_timeout") return self._add_timeout(self._config.get_main_config().getint("job_error_timeout", 0))
elif ps['state'] == "cancelled": elif ps['state'] == "cancelled":
self.set_state("cancelled") self.set_state("cancelled")
return self._add_timeout("job_cancelled_timeout") return self._add_timeout(self._config.get_main_config().getint("job_cancelled_timeout", 0))
elif ps['state'] == "paused": elif ps['state'] == "paused":
self.set_state("paused") self.set_state("paused")
elif ps['state'] == "standby": elif ps['state'] == "standby":
self.set_state("standby") self.set_state("standby")
return True return True
def _add_timeout(self, job_timeout): def _add_timeout(self, timeout):
self._screen.close_screensaver() self._screen.close_screensaver()
self.remove_close_timeout()
timeout = self._config.get_main_config().getint(job_timeout, 0)
if timeout != 0: if timeout != 0:
self.close_timeout = GLib.timeout_add_seconds(timeout, self.close_panel) GLib.timeout_add_seconds(timeout, self.close_panel)
return False
def set_state(self, state): def set_state(self, state):
if self.state != state: if self.state != state:
logging.debug(f"Changing job_status state from '{self.state}' to '{state}'") logging.debug(f"Changing job_status state from '{self.state}' to '{state}'")
if state == "paused": if state == "paused":
self.update_text("status", _("Paused")) self.labels["status"].set_label(_("Paused"))
elif state == "printing": elif state == "printing":
self.update_text("status", _("Printing")) self.labels["status"].set_label(_("Printing"))
elif state == "cancelling": elif state == "cancelling":
self.update_text("status", _("Cancelling")) self.labels["status"].set_label(_("Cancelling"))
elif state == "cancelled" or (state == "standby" and self.state == "cancelling"): elif state == "cancelled" or (state == "standby" and self.state == "cancelling"):
self.update_text("status", _("Cancelled")) self.labels["status"].set_label(_("Cancelled"))
elif state == "complete": elif state == "complete":
self.update_text("status", _("Complete")) self.labels["status"].set_label(_("Complete"))
self.state = state self.state = state
self.show_buttons_for_state() self.show_buttons_for_state()
@@ -793,21 +739,25 @@ class JobStatusPanel(ScreenPanel):
self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1)
self.enable_button("pause", "cancel") self.enable_button("pause", "cancel")
self.can_close = False
elif self.state == "paused": elif self.state == "paused":
self.buttons['button_grid'].attach(self.buttons['resume'], 0, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['resume'], 0, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['cancel'], 1, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['cancel'], 1, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1)
self.enable_button("resume", "cancel") self.enable_button("resume", "cancel")
self.can_close = False
else: else:
offset = self._printer.get_stat("gcode_move", "homing_origin")
self.zoffset = float(offset[2]) if offset else 0
if self.zoffset != 0: if self.zoffset != 0:
endstop = (self._screen.printer.config_section_exists("stepper_z") and endstop = (self._printer.config_section_exists("stepper_z") and
not self._screen.printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe")) not self._printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"))
if endstop: if endstop:
self.buttons['button_grid'].attach(self.buttons["save_offset_endstop"], 0, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons["save_offset_endstop"], 0, 0, 1, 1)
else: else:
self.buttons['button_grid'].attach(Gtk.Label(""), 0, 0, 1, 1) self.buttons['button_grid'].attach(Gtk.Label(""), 0, 0, 1, 1)
if self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch"): if self._printer.get_probe():
self.buttons['button_grid'].attach(self.buttons["save_offset_probe"], 1, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons["save_offset_probe"], 1, 0, 1, 1)
else: else:
self.buttons['button_grid'].attach(Gtk.Label(""), 1, 0, 1, 1) self.buttons['button_grid'].attach(Gtk.Label(""), 1, 0, 1, 1)
@@ -819,28 +769,31 @@ class JobStatusPanel(ScreenPanel):
self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1)
if self.state != "cancelling": if self.state != "cancelling":
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1)
self.show_all() self.can_close = True
self.content.show_all()
def show_file_thumbnail(self): def show_file_thumbnail(self):
if self._files.has_thumbnail(self.filename): if self._screen.vertical_mode:
if self._screen.vertical_mode: width = self._screen.width * 0.9
width = self._screen.width * 0.9 height = self._screen.height / 4
height = self._screen.height / 4 else:
else: width = self._screen.width / 3
width = self._screen.width / 3 height = self._gtk.content_height * 0.47
height = self._gtk.get_content_height() * 0.47 pixbuf = self.get_file_image(self.filename, width, height)
pixbuf = self.get_file_image(self.filename, width, height) logging.debug(self.filename)
if pixbuf is not None: if pixbuf is None:
self.labels['thumbnail'].set_from_pixbuf(pixbuf) logging.debug("no pixbuf")
pixbuf = self._gtk.PixbufFromIcon("file", width / 2, height / 2)
self.labels['thumbnail'].set_from_pixbuf(pixbuf)
def update_filename(self): def update_filename(self):
self.filename = self._printer.get_stat('print_stats', 'filename') self.filename = self._printer.get_stat('print_stats', 'filename')
self.update_text("file", os.path.splitext(self.filename)[0]) self.labels["file"].set_label(os.path.splitext(self.filename)[0])
self.filename_label = { self.filename_label = {
"complete": self.labels['file'].get_label(), "complete": self.labels['file'].get_label(),
"current": self.labels['file'].get_label(), "current": self.labels['file'].get_label(),
"position": 0, "position": 0,
"limit": (self._screen.width * 24 / 480) // (self._gtk.get_font_size() / 11), "limit": (self._screen.width * 37 / 480) // (self._gtk.font_size / 11),
"length": len(self.labels['file'].get_label()) "length": len(self.labels['file'].get_label())
} }
if self.animation_timeout is None and (self.filename_label['length'] - self.filename_label['limit']) > 0: if self.animation_timeout is None and (self.filename_label['length'] - self.filename_label['limit']) > 0:
@@ -863,11 +816,10 @@ class JobStatusPanel(ScreenPanel):
self.file_metadata = self._files.get_file_info(self.filename) self.file_metadata = self._files.get_file_info(self.filename)
logging.info(f"Update Metadata. File: {self.filename} Size: {self.file_metadata['size']}") logging.info(f"Update Metadata. File: {self.filename} Size: {self.file_metadata['size']}")
if "estimated_time" in self.file_metadata and self.timeleft_type == "slicer": if "estimated_time" in self.file_metadata and self.timeleft_type == "slicer":
self.update_text("est_time", self.format_time(self.file_metadata['estimated_time'])) self.labels["est_time"].set_label(self.format_time(self.file_metadata['estimated_time']))
self.show_file_thumbnail()
if "object_height" in self.file_metadata: if "object_height" in self.file_metadata:
self.oheight = float(self.file_metadata['object_height']) self.oheight = float(self.file_metadata['object_height'])
self.labels['height'].set_label(f"{self.oheight} mm") self.labels['height'].set_label(f"{self.oheight} {self.mm}")
if "layer_height" in self.file_metadata: if "layer_height" in self.file_metadata:
self.layer_h = float(self.file_metadata['layer_height']) self.layer_h = float(self.file_metadata['layer_height'])
if "first_layer_height" in self.file_metadata: if "first_layer_height" in self.file_metadata:
@@ -876,11 +828,12 @@ class JobStatusPanel(ScreenPanel):
self.f_layer_h = self.layer_h self.f_layer_h = self.layer_h
self.labels['total_layers'].set_label(f"{((self.oheight - self.f_layer_h) / self.layer_h) + 1:.0f}") self.labels['total_layers'].set_label(f"{((self.oheight - self.f_layer_h) / self.layer_h) + 1:.0f}")
if "filament_total" in self.file_metadata: if "filament_total" in self.file_metadata:
self.labels['filament_total'].set_text(f"{float(self.file_metadata['filament_total']) / 1000:.1f} m") self.labels['filament_total'].set_label(f"{float(self.file_metadata['filament_total']) / 1000:.1f} m")
else: else:
self.file_metadata = {} self.file_metadata = {}
logging.debug("Cannot find file metadata. Listening for updated metadata") logging.debug("Cannot find file metadata. Listening for updated metadata")
self._screen.files.add_file_callback(self._callback_metadata) self._screen.files.add_file_callback(self._callback_metadata)
self.show_file_thumbnail()
def update_percent_complete(self): def update_percent_complete(self):
if self.state not in ["printing", "paused"]: if self.state not in ["printing", "paused"]:
@@ -898,15 +851,11 @@ class JobStatusPanel(ScreenPanel):
self.labels['darea'].queue_draw() self.labels['darea'].queue_draw()
self.update_progress() self.update_progress()
def update_text(self, label, text):
if label in self.labels:
self.labels[label].set_text(text)
def update_progress(self): def update_progress(self):
self.labels['progress_text'].set_text(f"{self.progress * 100:.0f}%") self.labels['progress_text'].set_label(f"{self.progress * 100:.0f}%")
def update_message(self): def update_message(self):
msg = self._printer.get_stat("display_status", "message") msg = self._printer.get_stat("display_status", "message")
if msg is None: if msg is None:
msg = " " msg = " "
self.labels['lcdmessage'].set_text(f"{msg}") self.labels['lcdmessage'].set_label(f"{msg}")
+6 -9
View File
@@ -1,6 +1,7 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -13,8 +14,8 @@ def create_panel(*args):
class LimitsPanel(ScreenPanel): class LimitsPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.limits = {} self.limits = {}
self.options = None self.options = None
self.values = {} self.values = {}
@@ -93,7 +94,7 @@ class LimitsPanel(ScreenPanel):
scale.connect("button-release-event", self.set_opt_value, option) scale.connect("button-release-event", self.set_opt_value, option)
self.values[option] = value self.values[option] = value
reset = self._gtk.ButtonImage("refresh", style="color1") reset = self._gtk.Button("refresh", style="color1")
reset.connect("clicked", self.reset_value, option) reset.connect("clicked", self.reset_value, option)
reset.set_hexpand(False) reset.set_hexpand(False)
@@ -102,12 +103,8 @@ class LimitsPanel(ScreenPanel):
item.attach(scale, 0, 1, 1, 1) item.attach(scale, 0, 1, 1, 1)
item.attach(reset, 1, 1, 1, 1) item.attach(reset, 1, 1, 1, 1)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(item)
self.limits[option] = { self.limits[option] = {
"row": frame, "row": item,
"scale": scale, "scale": scale,
"adjustment": adj, "adjustment": adj,
} }
+16 -24
View File
@@ -1,11 +1,12 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib from gi.repository import Gtk, GLib
from panels.menu import MenuPanel from panels.menu import MenuPanel
from ks_includes.widgets.graph import HeaterGraph from ks_includes.widgets.heatergraph import HeaterGraph
from ks_includes.widgets.keypad import Keypad from ks_includes.widgets.keypad import Keypad
@@ -14,8 +15,8 @@ def create_panel(*args):
class MainPanel(MenuPanel): class MainPanel(MenuPanel):
def __init__(self, screen, title, back=False): def __init__(self, screen, title):
super().__init__(screen, title, False) super().__init__(screen, title)
self.left_panel = None self.left_panel = None
self.items = None self.items = None
self.devices = {} self.devices = {}
@@ -46,10 +47,9 @@ class MainPanel(MenuPanel):
grid.attach(self.labels['menu'], 1, 0, 1, 1) grid.attach(self.labels['menu'], 1, 0, 1, 1)
self.grid = grid self.grid = grid
self.content.add(self.grid) self.content.add(self.grid)
self.layout.show_all()
def update_graph_visibility(self): def update_graph_visibility(self):
if self.left_panel is None: if self.left_panel is None or not self._printer.get_temp_store_devices():
return return
count = 0 count = 0
for device in self.devices: for device in self.devices:
@@ -65,10 +65,11 @@ class MainPanel(MenuPanel):
self.devices[device]['name'].get_style_context().add_class("graph_label_hidden") self.devices[device]['name'].get_style_context().add_class("graph_label_hidden")
self.devices[device]['name'].get_style_context().remove_class(self.devices[device]['class']) self.devices[device]['name'].get_style_context().remove_class(self.devices[device]['class'])
if count > 0: if count > 0:
self.left_panel.add(self.labels['da']) if self.labels['da'] not in self.left_panel:
self.left_panel.add(self.labels['da'])
self.labels['da'].queue_draw() self.labels['da'].queue_draw()
self.labels['da'].show() self.labels['da'].show()
else: elif self.labels['da'] in self.left_panel:
self.left_panel.remove(self.labels['da']) self.left_panel.remove(self.labels['da'])
def activate(self): def activate(self):
@@ -129,12 +130,12 @@ class MainPanel(MenuPanel):
rgb = self._gtk.get_temp_color(dev_type) rgb = self._gtk.get_temp_color(dev_type)
can_target = self._printer.get_temp_store_device_has_target(device) can_target = self._printer.device_has_target(device)
self.labels['da'].add_object(device, "temperatures", rgb, False, True) self.labels['da'].add_object(device, "temperatures", rgb, False, True)
if can_target: if can_target:
self.labels['da'].add_object(device, "targets", rgb, True, False) self.labels['da'].add_object(device, "targets", rgb, True, False)
name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "), None, .5, Gtk.PositionType.LEFT, 1) name = self._gtk.Button(image, devname.capitalize().replace("_", " "), None, self.bts, Gtk.PositionType.LEFT, 1)
name.connect("clicked", self.toggle_visibility, device) name.connect("clicked", self.toggle_visibility, device)
name.set_alignment(0, .5) name.set_alignment(0, .5)
visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", device, fallback=True) visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", device, fallback=True)
@@ -144,7 +145,7 @@ class MainPanel(MenuPanel):
name.get_style_context().add_class("graph_label_hidden") name.get_style_context().add_class("graph_label_hidden")
self.labels['da'].set_showing(device, visible) self.labels['da'].set_showing(device, visible)
temp = self._gtk.Button("") temp = self._gtk.Button(label="", lines=1)
if can_target: if can_target:
temp.connect("clicked", self.show_numpad, device) temp.connect("clicked", self.show_numpad, device)
@@ -207,12 +208,12 @@ class MainPanel(MenuPanel):
name = Gtk.Label("") name = Gtk.Label("")
temp = Gtk.Label(_("Temp (°C)")) temp = Gtk.Label(_("Temp (°C)"))
temp.set_size_request(round(self._gtk.get_font_size() * 7.7), -1) temp.get_style_context().add_class("heater-grid-temp")
self.labels['devices'].attach(name, 0, 0, 1, 1) self.labels['devices'].attach(name, 0, 0, 1, 1)
self.labels['devices'].attach(temp, 1, 0, 1, 1) self.labels['devices'].attach(temp, 1, 0, 1, 1)
self.labels['da'] = HeaterGraph(self._printer, self._gtk.get_font_size()) self.labels['da'] = HeaterGraph(self._printer, self._gtk.font_size)
self.labels['da'].set_vexpand(True) self.labels['da'].set_vexpand(True)
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
@@ -222,7 +223,7 @@ class MainPanel(MenuPanel):
self.left_panel = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) self.left_panel = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
self.left_panel.add(scroll) self.left_panel.add(scroll)
for d in self._printer.get_temp_store_devices(): for d in (self._printer.get_tools() + self._printer.get_heaters()):
self.add_device(d) self.add_device(d)
return self.left_panel return self.left_panel
@@ -242,22 +243,13 @@ class MainPanel(MenuPanel):
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_status_update": if action != "notify_status_update":
return return
for x in (self._printer.get_tools() + self._printer.get_heaters()):
for x in self._printer.get_tools():
self.update_temp( self.update_temp(
x, x,
self._printer.get_dev_stat(x, "temperature"), 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._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
def show_numpad(self, widget, device): def show_numpad(self, widget, device):
+29 -14
View File
@@ -1,6 +1,9 @@
import gi
import logging import logging
import gi
import json
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from jinja2 import Environment, Template from jinja2 import Environment, Template
@@ -16,8 +19,8 @@ class MenuPanel(ScreenPanel):
i = 0 i = 0
j2_data = None j2_data = None
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.items = None self.items = None
self.grid = self._gtk.HomogeneousGrid() self.grid = self._gtk.HomogeneousGrid()
@@ -30,10 +33,6 @@ class MenuPanel(ScreenPanel):
self.content.add(scroll) self.content.add(scroll)
def activate(self): def activate(self):
self.j2_data = self._printer.get_printer_status_data()
self.j2_data.update({
'moonraker_connected': self._screen._ws.connected
})
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.arrangeMenuItems(self.items, 3) self.arrangeMenuItems(self.items, 3)
else: else:
@@ -68,7 +67,7 @@ class MenuPanel(ScreenPanel):
self.grid.attach(self.labels[key], col, row, width, height) self.grid.attach(self.labels[key], col, row, width, height)
i += 1 i += 1
self.j2_data = None
return self.grid return self.grid
def create_menu_items(self): def create_menu_items(self):
@@ -78,14 +77,29 @@ class MenuPanel(ScreenPanel):
env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True) env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self._config.get_lang()) env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(item['name'])
parsed_name = j2_temp.render()
b = self._gtk.ButtonImage(item['icon'], parsed_name, f"color{(i % 4) + 1}") printer = self._printer.get_printer_status_data()
name = env.from_string(item['name']).render(printer)
icon = env.from_string(item['icon']).render(printer) if item['icon'] else None
style = env.from_string(item['style']).render(printer) if item['style'] else None
b = self._gtk.Button(icon, name, (style if style else f"color{(i % 4) + 1}"))
if item['panel'] is not None: if item['panel'] is not None:
b.connect("clicked", self.menu_item_clicked, item['panel'], item) panel = env.from_string(item['panel']).render(printer)
b.connect("clicked", self.menu_item_clicked, panel, item)
elif item['method'] is not None: elif item['method'] is not None:
params = item['params'] if item['params'] is not False else {} params = {}
if item['params'] is not False:
try:
p = env.from_string(item['params']).render(printer)
params = json.loads(p)
except Exception as e:
logging.exception(f"Unable to parse parameters for [{name}]:\n{e}")
params = {}
if item['confirm'] is not None: if item['confirm'] is not None:
b.connect("clicked", self._screen._confirm_send_action, item['confirm'], item['method'], params) b.connect("clicked", self._screen._confirm_send_action, item['confirm'], item['method'], params)
else: else:
@@ -98,7 +112,8 @@ class MenuPanel(ScreenPanel):
if enable == "{{ moonraker_connected }}": if enable == "{{ moonraker_connected }}":
logging.info(f"moonraker connected {self._screen._ws.connected}") logging.info(f"moonraker connected {self._screen._ws.connected}")
return self._screen._ws.connected return self._screen._ws.connected
elif enable == "{{ camera_configured }}":
return self.ks_printer_cfg and self.ks_printer_cfg.get("camera_url", None) is not None
self.j2_data = self._printer.get_printer_status_data() self.j2_data = self._printer.get_printer_status_data()
try: try:
j2_temp = Template(enable, autoescape=True) j2_temp = Template(enable, autoescape=True)
+78 -82
View File
@@ -1,6 +1,7 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -16,85 +17,79 @@ class MovePanel(ScreenPanel):
distances = ['.1', '.5', '1', '5', '10', '25', '50'] distances = ['.1', '.5', '1', '5', '10', '25', '50']
distance = distances[-2] distance = distances[-2]
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.settings = {} self.settings = {}
self.menu = ['move_menu'] self.menu = ['move_menu']
self.buttons = {
self.labels['x+'] = self._gtk.ButtonImage("arrow-right", _("X+"), "color1") 'x+': self._gtk.Button("arrow-right", "X+", "color1"),
self.labels['x+'].connect("clicked", self.move, "X", "+") 'x-': self._gtk.Button("arrow-left", "X-", "color1"),
self.labels['x-'] = self._gtk.ButtonImage("arrow-left", _("X-"), "color1") 'y+': self._gtk.Button("arrow-up", "Y+", "color2"),
self.labels['x-'].connect("clicked", self.move, "X", "-") 'y-': self._gtk.Button("arrow-down", "Y-", "color2"),
'z+': self._gtk.Button("z-farther", "Z+", "color3"),
self.labels['y+'] = self._gtk.ButtonImage("arrow-up", _("Y+"), "color2") 'z-': self._gtk.Button("z-closer", "Z-", "color3"),
self.labels['y+'].connect("clicked", self.move, "Y", "+") 'home': self._gtk.Button("home", _("Home All"), "color4"),
self.labels['y-'] = self._gtk.ButtonImage("arrow-down", _("Y-"), "color2") 'home_xy': self._gtk.Button("home", _("Home XY"), "color4"),
self.labels['y-'].connect("clicked", self.move, "Y", "-") 'z_tilt': self._gtk.Button("z-tilt", _("Z Tilt"), "color4"),
'quad_gantry_level': self._gtk.Button("z-tilt", _("Quad Gantry Level"), "color4"),
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color3") 'motors_off': self._gtk.Button("motor-off", _("Disable Motors"), "color4"),
self.labels['z+'].connect("clicked", self.move, "Z", "+") }
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color3") self.buttons['x+'].connect("clicked", self.move, "X", "+")
self.labels['z-'].connect("clicked", self.move, "Z", "-") self.buttons['x-'].connect("clicked", self.move, "X", "-")
self.buttons['y+'].connect("clicked", self.move, "Y", "+")
self.labels['home'] = self._gtk.ButtonImage("home", _("Home All"), "color4") self.buttons['y-'].connect("clicked", self.move, "Y", "-")
self.labels['home'].connect("clicked", self.home) self.buttons['z+'].connect("clicked", self.move, "Z", "+")
self.buttons['z-'].connect("clicked", self.move, "Z", "-")
self.labels['home-xy'] = self._gtk.ButtonImage("home", _("Home XY"), "color4") self.buttons['home'].connect("clicked", self.home)
self.labels['home-xy'].connect("clicked", self.homexy) self.buttons['home_xy'].connect("clicked", self.homexy)
self.buttons['z_tilt'].connect("clicked", self.z_tilt)
self.labels['z_tilt'] = self._gtk.ButtonImage("z-tilt", _("Z Tilt"), "color4") self.buttons['quad_gantry_level'].connect("clicked", self.quad_gantry_level)
self.labels['z_tilt'].connect("clicked", self.z_tilt)
self.labels['quad_gantry_level'] = self._gtk.ButtonImage("z-tilt", _("Quad Gantry Level"), "color4")
self.labels['quad_gantry_level'].connect("clicked", self.quad_gantry_level)
self.labels['motors-off'] = self._gtk.ButtonImage("motor-off", _("Disable Motors"), "color4")
script = {"script": "M18"} script = {"script": "M18"}
self.labels['motors-off'].connect("clicked", self._screen._confirm_send_action, self.buttons['motors_off'].connect("clicked", self._screen._confirm_send_action,
_("Are you sure you wish to disable motors?"), _("Are you sure you wish to disable motors?"),
"printer.gcode.script", script) "printer.gcode.script", script)
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
if self._screen.vertical_mode: if self._screen.vertical_mode:
if self._screen.lang_ltr: if self._screen.lang_ltr:
grid.attach(self.labels['x+'], 2, 1, 1, 1) grid.attach(self.buttons['x+'], 2, 1, 1, 1)
grid.attach(self.labels['x-'], 0, 1, 1, 1) grid.attach(self.buttons['x-'], 0, 1, 1, 1)
grid.attach(self.labels['z+'], 2, 2, 1, 1) grid.attach(self.buttons['z+'], 2, 2, 1, 1)
grid.attach(self.labels['z-'], 0, 2, 1, 1) grid.attach(self.buttons['z-'], 0, 2, 1, 1)
else: else:
grid.attach(self.labels['x+'], 0, 1, 1, 1) grid.attach(self.buttons['x+'], 0, 1, 1, 1)
grid.attach(self.labels['x-'], 2, 1, 1, 1) grid.attach(self.buttons['x-'], 2, 1, 1, 1)
grid.attach(self.labels['z+'], 0, 2, 1, 1) grid.attach(self.buttons['z+'], 0, 2, 1, 1)
grid.attach(self.labels['z-'], 2, 2, 1, 1) grid.attach(self.buttons['z-'], 2, 2, 1, 1)
grid.attach(self.labels['y+'], 1, 0, 1, 1) grid.attach(self.buttons['y+'], 1, 0, 1, 1)
grid.attach(self.labels['y-'], 1, 1, 1, 1) grid.attach(self.buttons['y-'], 1, 1, 1, 1)
else: else:
if self._screen.lang_ltr: if self._screen.lang_ltr:
grid.attach(self.labels['x+'], 2, 1, 1, 1) grid.attach(self.buttons['x+'], 2, 1, 1, 1)
grid.attach(self.labels['x-'], 0, 1, 1, 1) grid.attach(self.buttons['x-'], 0, 1, 1, 1)
else: else:
grid.attach(self.labels['x+'], 0, 1, 1, 1) grid.attach(self.buttons['x+'], 0, 1, 1, 1)
grid.attach(self.labels['x-'], 2, 1, 1, 1) grid.attach(self.buttons['x-'], 2, 1, 1, 1)
grid.attach(self.labels['y+'], 1, 0, 1, 1) grid.attach(self.buttons['y+'], 1, 0, 1, 1)
grid.attach(self.labels['y-'], 1, 1, 1, 1) grid.attach(self.buttons['y-'], 1, 1, 1, 1)
grid.attach(self.labels['z+'], 3, 0, 1, 1) grid.attach(self.buttons['z+'], 3, 0, 1, 1)
grid.attach(self.labels['z-'], 3, 1, 1, 1) grid.attach(self.buttons['z-'], 3, 1, 1, 1)
grid.attach(self.labels['home'], 0, 0, 1, 1) grid.attach(self.buttons['home'], 0, 0, 1, 1)
if self._printer.config_section_exists("z_tilt"): if self._printer.config_section_exists("z_tilt"):
grid.attach(self.labels['z_tilt'], 2, 0, 1, 1) grid.attach(self.buttons['z_tilt'], 2, 0, 1, 1)
elif self._printer.config_section_exists("quad_gantry_level"): elif self._printer.config_section_exists("quad_gantry_level"):
grid.attach(self.labels['quad_gantry_level'], 2, 0, 1, 1) grid.attach(self.buttons['quad_gantry_level'], 2, 0, 1, 1)
elif "delta" in self._screen.printer.get_config_section("printer")['kinematics']: elif "delta" in self._printer.get_config_section("printer")['kinematics']:
grid.attach(self.labels['motors-off'], 2, 0, 1, 1) grid.attach(self.buttons['motors_off'], 2, 0, 1, 1)
else: else:
grid.attach(self.labels['home-xy'], 2, 0, 1, 1) grid.attach(self.buttons['home_xy'], 2, 0, 1, 1)
distgrid = Gtk.Grid() distgrid = Gtk.Grid()
for j, i in enumerate(self.distances): for j, i in enumerate(self.distances):
self.labels[i] = self._gtk.Button(i) self.labels[i] = self._gtk.Button(label=i)
self.labels[i].set_direction(Gtk.TextDirection.LTR) self.labels[i].set_direction(Gtk.TextDirection.LTR)
self.labels[i].connect("clicked", self.change_distance, i) self.labels[i].connect("clicked", self.change_distance, i)
ctx = self.labels[i].get_style_context() ctx = self.labels[i].get_style_context()
@@ -108,11 +103,10 @@ class MovePanel(ScreenPanel):
ctx.add_class("distbutton_active") ctx.add_class("distbutton_active")
distgrid.attach(self.labels[i], j, 0, 1, 1) distgrid.attach(self.labels[i], j, 0, 1, 1)
self.labels['pos_x'] = Gtk.Label("X: 0") for p in ('pos_x', 'pos_y', 'pos_z'):
self.labels['pos_y'] = Gtk.Label("Y: 0") self.labels[p] = Gtk.Label()
self.labels['pos_z'] = Gtk.Label("Z: 0") adjust = self._gtk.Button("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1)
adjust = self._gtk.ButtonImage("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1) adjust.connect("clicked", self.load_menu, 'options', _('Settings'))
adjust.connect("clicked", self.load_menu, 'options')
adjust.set_hexpand(False) adjust.set_hexpand(False)
self.labels['move_dist'] = Gtk.Label(_("Move Distance (mm)")) self.labels['move_dist'] = Gtk.Label(_("Move Distance (mm)"))
@@ -124,11 +118,10 @@ class MovePanel(ScreenPanel):
bottomgrid.attach(self.labels['move_dist'], 0, 1, 3, 1) bottomgrid.attach(self.labels['move_dist'], 0, 1, 3, 1)
bottomgrid.attach(adjust, 3, 0, 1, 2) bottomgrid.attach(adjust, 3, 0, 1, 2)
self.labels['move_menu'] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.labels['move_menu'] = self._gtk.HomogeneousGrid()
self.labels['move_menu'].set_vexpand(True) self.labels['move_menu'].attach(grid, 0, 0, 1, 3)
self.labels['move_menu'].pack_start(grid, True, True, 0) self.labels['move_menu'].attach(bottomgrid, 0, 3, 1, 1)
self.labels['move_menu'].pack_start(bottomgrid, True, True, 0) self.labels['move_menu'].attach(distgrid, 0, 4, 1, 1)
self.labels['move_menu'].pack_start(distgrid, True, True, 0)
self.content.add(self.labels['move_menu']) self.content.add(self.labels['move_menu'])
@@ -159,11 +152,19 @@ class MovePanel(ScreenPanel):
name = list(option)[0] name = list(option)[0]
self.add_option('options', self.settings, name, option[name]) self.add_option('options', self.settings, name, option[name])
def process_busy(self, busy):
buttons = ("home", "home_xy", "z_tilt", "quad_gantry_level")
for button in buttons:
if button in self.buttons:
self.buttons[button].set_sensitive(not busy)
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_busy":
self.process_busy(data)
return
if action != "notify_status_update": if action != "notify_status_update":
return return
homed_axes = self._printer.get_stat("toolhead", "homed_axes")
homed_axes = self._screen.printer.get_stat("toolhead", "homed_axes")
if homed_axes == "xyz": if homed_axes == "xyz":
if "gcode_move" in data and "gcode_position" in data["gcode_move"]: if "gcode_move" in data and "gcode_position" in data["gcode_move"]:
self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:.2f}") self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:.2f}")
@@ -198,8 +199,7 @@ class MovePanel(ScreenPanel):
dist = f"{direction}{self.distance}" dist = f"{direction}{self.distance}"
config_key = "move_speed_z" if axis == "Z" else "move_speed_xy" config_key = "move_speed_z" if axis == "Z" else "move_speed_xy"
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) speed = None if self.ks_printer_cfg is None else self.ks_printer_cfg.getint(config_key, None)
speed = None if printer_cfg is None else printer_cfg.getint(config_key, None)
if speed is None: if speed is None:
speed = self._config.get_config()['main'].getint(config_key, 20) speed = self._config.get_config()['main'].getint(config_key, 20)
speed = 60 * max(1, speed) speed = 60 * max(1, speed)
@@ -219,6 +219,7 @@ class MovePanel(ScreenPanel):
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.get_style_context().add_class("frame-item")
dev.set_hexpand(True) dev.set_hexpand(True)
dev.set_vexpand(False) dev.set_vexpand(False)
dev.set_valign(Gtk.Align.CENTER) dev.set_valign(Gtk.Align.CENTER)
@@ -232,8 +233,8 @@ class MovePanel(ScreenPanel):
switch.set_vexpand(False) switch.set_vexpand(False)
switch.set_active(self._config.get_config().getboolean(option['section'], opt_name)) switch.set_active(self._config.get_config().getboolean(option['section'], opt_name))
switch.connect("notify::active", self.switch_config_option, option['section'], opt_name) switch.connect("notify::active", self.switch_config_option, option['section'], opt_name)
switch.set_property("width-request", round(self._gtk.get_font_size() * 7)) switch.set_property("width-request", round(self._gtk.font_size * 7))
switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5)) switch.set_property("height-request", round(self._gtk.font_size * 3.5))
box.add(switch) box.add(switch)
dev.add(box) dev.add(box)
elif option['type'] == "scale": elif option['type'] == "scale":
@@ -246,14 +247,9 @@ class MovePanel(ScreenPanel):
scale.connect("button-release-event", self.scale_moved, option['section'], opt_name) scale.connect("button-release-event", self.scale_moved, option['section'], opt_name)
dev.add(scale) dev.add(scale)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(dev)
frame.show_all()
opt_array[opt_name] = { opt_array[opt_name] = {
"name": option['name'], "name": option['name'],
"row": frame "row": dev
} }
opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name']) opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name'])
+35 -43
View File
@@ -1,8 +1,8 @@
import gi
import logging import logging
import netifaces
import os import os
from ks_includes.wifi import WifiManager
import gi
import netifaces
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib, Pango from gi.repository import Gtk, Gdk, GLib, Pango
@@ -16,8 +16,8 @@ def create_panel(*args):
class NetworkPanel(ScreenPanel): class NetworkPanel(ScreenPanel):
initialized = False initialized = False
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.show_add = False self.show_add = False
self.networks = {} self.networks = {}
self.interface = None self.interface = None
@@ -26,8 +26,15 @@ class NetworkPanel(ScreenPanel):
self.network_interfaces = netifaces.interfaces() self.network_interfaces = netifaces.interfaces()
self.wireless_interfaces = [iface for iface in self.network_interfaces if iface.startswith('w')] self.wireless_interfaces = [iface for iface in self.network_interfaces if iface.startswith('w')]
self.wifi = None self.wifi = None
self.use_network_manager = os.system('systemctl is-active --quiet NetworkManager.service') == 0
if len(self.wireless_interfaces) > 0: if len(self.wireless_interfaces) > 0:
logging.info(f"Found wireless interfaces: {self.wireless_interfaces}") logging.info(f"Found wireless interfaces: {self.wireless_interfaces}")
if self.use_network_manager:
logging.info("Using NetworkManager")
from ks_includes.wifi_nm import WifiManager
else:
logging.info("Using wpa_cli")
from ks_includes.wifi import WifiManager
self.wifi = WifiManager(self.wireless_interfaces[0]) self.wifi = WifiManager(self.wireless_interfaces[0])
# Get IP Address # Get IP Address
@@ -56,7 +63,7 @@ class NetworkPanel(ScreenPanel):
self.labels['interface'].set_hexpand(True) self.labels['interface'].set_hexpand(True)
self.labels['ip'] = Gtk.Label() self.labels['ip'] = Gtk.Label()
self.labels['ip'].set_hexpand(True) self.labels['ip'].set_hexpand(True)
reload_networks = self._gtk.ButtonImage("refresh", None, "color1", .66) reload_networks = self._gtk.Button("refresh", None, "color1", .66)
reload_networks.connect("clicked", self.reload_networks) reload_networks.connect("clicked", self.reload_networks)
reload_networks.set_hexpand(False) reload_networks.set_hexpand(False)
@@ -76,7 +83,7 @@ class NetworkPanel(ScreenPanel):
self.labels['networklist'] = Gtk.Grid() self.labels['networklist'] = Gtk.Grid()
if self.wifi is not None and self.wifi.is_initialized(): if self.wifi is not None and self.wifi.initialized:
box.pack_start(sbox, False, False, 5) box.pack_start(sbox, False, False, 5)
box.pack_start(scroll, True, True, 0) box.pack_start(scroll, True, True, 0)
@@ -85,6 +92,7 @@ class NetworkPanel(ScreenPanel):
self.wifi.add_callback("connected", self.connected_callback) self.wifi.add_callback("connected", self.connected_callback)
self.wifi.add_callback("scan_results", self.scan_callback) self.wifi.add_callback("scan_results", self.scan_callback)
self.wifi.add_callback("popup", self.popup_callback)
if self.update_timeout is None: if self.update_timeout is None:
self.update_timeout = GLib.timeout_add_seconds(5, self.update_all_networks) self.update_timeout = GLib.timeout_add_seconds(5, self.update_all_networks)
else: else:
@@ -101,13 +109,10 @@ class NetworkPanel(ScreenPanel):
def load_networks(self): def load_networks(self):
networks = self.wifi.get_networks() networks = self.wifi.get_networks()
if not networks: if not networks:
return return
for net in networks: for net in networks:
self.add_network(net, False) self.add_network(net, False)
self.update_all_networks() self.update_all_networks()
self.content.show_all() self.content.show_all()
@@ -117,7 +122,6 @@ class NetworkPanel(ScreenPanel):
return return
ssid = ssid.strip() ssid = ssid.strip()
if ssid in list(self.networks): if ssid in list(self.networks):
logging.info("SSID already listed")
return return
configured_networks = self.wifi.get_supplicant_networks() configured_networks = self.wifi.get_supplicant_networks()
@@ -155,18 +159,18 @@ class NetworkPanel(ScreenPanel):
labels.set_valign(Gtk.Align.CENTER) labels.set_valign(Gtk.Align.CENTER)
labels.set_halign(Gtk.Align.START) labels.set_halign(Gtk.Align.START)
connect = self._gtk.ButtonImage("load", style="color3") connect = self._gtk.Button("load", None, "color3", .66)
connect.connect("clicked", self.connect_network, ssid) connect.connect("clicked", self.connect_network, ssid)
connect.set_hexpand(False) connect.set_hexpand(False)
connect.set_halign(Gtk.Align.END) connect.set_halign(Gtk.Align.END)
delete = self._gtk.ButtonImage("delete", style="color3") delete = self._gtk.Button("delete", None, "color3", .66)
delete.connect("clicked", self.remove_wifi_network, ssid) delete.connect("clicked", self.remove_wifi_network, ssid)
delete.set_size_request(60, 0)
delete.set_hexpand(False) delete.set_hexpand(False)
delete.set_halign(Gtk.Align.END) delete.set_halign(Gtk.Align.END)
network = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) network = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
network.get_style_context().add_class("frame-item")
network.set_hexpand(True) network.set_hexpand(True)
network.set_vexpand(False) network.set_vexpand(False)
@@ -174,15 +178,12 @@ class NetworkPanel(ScreenPanel):
buttons = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) buttons = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
if network_id != -1 or netinfo['connected']: if network_id != -1 or netinfo['connected']:
buttons.pack_end(connect, False, False, 0)
buttons.pack_end(delete, False, False, 0) buttons.pack_end(delete, False, False, 0)
else: else:
buttons.pack_end(connect, False, False, 0) buttons.pack_end(connect, False, False, 0)
network.add(buttons) network.add(buttons)
self.networks[ssid] = network
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
self.networks[ssid] = frame
frame.add(network)
nets = sorted(list(self.networks), reverse=False) nets = sorted(list(self.networks), reverse=False)
if connected_ssid in nets: if connected_ssid in nets:
@@ -249,9 +250,8 @@ class NetworkPanel(ScreenPanel):
del self.labels[i] del self.labels[i]
self.show_add = False self.show_add = False
@staticmethod def popup_callback(self, msg):
def close_dialog(widget, response_id): self._screen.show_popup_message(msg)
widget.destroy()
def connected_callback(self, ssid, prev_ssid): def connected_callback(self, ssid, prev_ssid):
logging.info("Now connected to a new network") logging.info("Now connected to a new network")
@@ -281,17 +281,13 @@ class NetworkPanel(ScreenPanel):
{"name": _("Close"), "response": Gtk.ResponseType.CANCEL} {"name": _("Close"), "response": Gtk.ResponseType.CANCEL}
] ]
scroll = Gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
scroll.set_property("overlay-scrolling", False)
scroll.set_hexpand(True)
scroll.set_vexpand(True)
scroll.add_events(Gdk.EventMask.TOUCH_MASK)
scroll.add_events(Gdk.EventMask.BUTTON_PRESS_MASK)
self.labels['connecting_info'] = Gtk.Label(_("Starting WiFi Association")) self.labels['connecting_info'] = Gtk.Label(_("Starting WiFi Association"))
self.labels['connecting_info'].set_halign(Gtk.Align.START) self.labels['connecting_info'].set_halign(Gtk.Align.START)
self.labels['connecting_info'].set_valign(Gtk.Align.START) self.labels['connecting_info'].set_valign(Gtk.Align.START)
scroll.add(self.labels['connecting_info']) scroll.add(self.labels['connecting_info'])
self._gtk.Dialog(self._screen, buttons, scroll, self.close_dialog) dialog = self._gtk.Dialog(self._screen, buttons, scroll, self._gtk.remove_dialog)
dialog.set_title(_("Starting WiFi Association"))
self._screen.show_all() self._screen.show_all()
if ssid in list(self.networks): if ssid in list(self.networks):
@@ -339,16 +335,15 @@ class NetworkPanel(ScreenPanel):
if "add_network" in self.labels: if "add_network" in self.labels:
del self.labels['add_network'] del self.labels['add_network']
label = self._gtk.Label(_("PSK for") + f' ssid') label = self._gtk.Label(_("PSK for") + ' ssid')
label.set_hexpand(False) label.set_hexpand(False)
self.labels['network_psk'] = Gtk.Entry() self.labels['network_psk'] = Gtk.Entry()
self.labels['network_psk'].set_text('') self.labels['network_psk'].set_text('')
self.labels['network_psk'].set_hexpand(True) self.labels['network_psk'].set_hexpand(True)
self.labels['network_psk'].connect("activate", self.add_new_network, ssid, True) self.labels['network_psk'].connect("activate", self.add_new_network, ssid, True)
self.labels['network_psk'].connect("focus-in-event", self._show_keyboard) self.labels['network_psk'].connect("focus-in-event", self._screen.show_keyboard)
self.labels['network_psk'].grab_focus_without_selecting()
save = self._gtk.ButtonImage("sd", _("Save"), "color3") save = self._gtk.Button("sd", _("Save"), "color3")
save.set_hexpand(False) save.set_hexpand(False)
save.connect("clicked", self.add_new_network, ssid, True) save.connect("clicked", self.add_new_network, ssid, True)
@@ -364,13 +359,10 @@ class NetworkPanel(ScreenPanel):
self.labels['add_network'].pack_start(box, True, True, 5) self.labels['add_network'].pack_start(box, True, True, 5)
self.content.add(self.labels['add_network']) self.content.add(self.labels['add_network'])
self._screen.show_keyboard() self.labels['network_psk'].grab_focus_without_selecting()
self.content.show_all() self.content.show_all()
self.show_add = True self.show_add = True
def _show_keyboard(self, widget=None, event=None):
self._screen.show_keyboard(entry=self.labels['network_psk'])
def update_all_networks(self): def update_all_networks(self):
for network in list(self.networks): for network in list(self.networks):
self.update_network_info(network) self.update_network_info(network)
@@ -384,8 +376,6 @@ class NetworkPanel(ScreenPanel):
logging.info(f"Unknown SSID {ssid}") logging.info(f"Unknown SSID {ssid}")
return return
netinfo = self.wifi.get_network_info(ssid) netinfo = self.wifi.get_network_info(ssid)
if netinfo is None:
netinfo = {}
if "connected" in netinfo: if "connected" in netinfo:
connected = netinfo['connected'] connected = netinfo['connected']
else: else:
@@ -397,9 +387,10 @@ class NetworkPanel(ScreenPanel):
ifadd = netifaces.ifaddresses(self.interface) ifadd = netifaces.ifaddresses(self.interface)
if netifaces.AF_INET in ifadd and len(ifadd[netifaces.AF_INET]) > 0: if netifaces.AF_INET in ifadd and len(ifadd[netifaces.AF_INET]) > 0:
ipv4 = f"<b>IPv4:</b> {ifadd[netifaces.AF_INET][0]['addr']} " ipv4 = f"<b>IPv4:</b> {ifadd[netifaces.AF_INET][0]['addr']} "
self.labels['ip'].set_text(f"IP: {ifadd[netifaces.AF_INET][0]['addr']} ")
if netifaces.AF_INET6 in ifadd and len(ifadd[netifaces.AF_INET6]) > 0: if netifaces.AF_INET6 in ifadd and len(ifadd[netifaces.AF_INET6]) > 0:
ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} " ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} "
info = f'<b>' + _("Hostname") + f':</b> {hostname}\n{ipv4}\n{ipv6}\n' info = '<b>' + _("Hostname") + f':</b> {hostname}\n{ipv4}\n{ipv6}\n'
elif "psk" in netinfo: elif "psk" in netinfo:
info = _("Password saved") info = _("Password saved")
if "encryption" in netinfo: if "encryption" in netinfo:
@@ -424,12 +415,13 @@ class NetworkPanel(ScreenPanel):
ipv6 = "" ipv6 = ""
if netifaces.AF_INET in ifadd and len(ifadd[netifaces.AF_INET]) > 0: if netifaces.AF_INET in ifadd and len(ifadd[netifaces.AF_INET]) > 0:
ipv4 = f"<b>IPv4:</b> {ifadd[netifaces.AF_INET][0]['addr']} " ipv4 = f"<b>IPv4:</b> {ifadd[netifaces.AF_INET][0]['addr']} "
self.labels['ip'].set_text(f"IP: {ifadd[netifaces.AF_INET][0]['addr']} ")
if netifaces.AF_INET6 in ifadd and len(ifadd[netifaces.AF_INET6]) > 0: if netifaces.AF_INET6 in ifadd and len(ifadd[netifaces.AF_INET6]) > 0:
ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} " ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} "
connected = ( connected = (
f'<b>{self.interface}</b>\n\n' f'<b>{self.interface}</b>\n\n'
f'<small><b>' + _("Connected") + f'</b></small>\n' f'<small><b>' + _("Connected") + f'</b></small>\n'
f'<b>' + _("Hostname") + f':</b> {hostname}\n' + '<b>' + _("Hostname") + f':</b> {hostname}\n'
f'{ipv4}\n' f'{ipv4}\n'
f'{ipv6}\n' f'{ipv6}\n'
) )
@@ -440,7 +432,7 @@ class NetworkPanel(ScreenPanel):
def reload_networks(self, widget=None): def reload_networks(self, widget=None):
self.networks = {} self.networks = {}
self.labels['networklist'].remove_column(0) self.labels['networklist'].remove_column(0)
if self.wifi is not None and self.wifi.is_initialized(): if self.wifi is not None and self.wifi.initialized:
self.wifi.rescan() self.wifi.rescan()
GLib.idle_add(self.load_networks) GLib.idle_add(self.load_networks)
@@ -448,7 +440,7 @@ class NetworkPanel(ScreenPanel):
if self.initialized: if self.initialized:
self.reload_networks() self.reload_networks()
if self.update_timeout is None: if self.update_timeout is None:
if self.wifi is not None and self.wifi.is_initialized(): if self.wifi is not None and self.wifi.initialized:
self.update_timeout = GLib.timeout_add_seconds(5, self.update_all_networks) self.update_timeout = GLib.timeout_add_seconds(5, self.update_all_networks)
else: else:
self.update_timeout = GLib.timeout_add_seconds(5, self.update_single_network_info) self.update_timeout = GLib.timeout_add_seconds(5, self.update_single_network_info)
+6 -13
View File
@@ -1,6 +1,7 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Pango from gi.repository import Gtk, GLib, Pango
@@ -13,8 +14,8 @@ def create_panel(*args):
class OutputPinPanel(ScreenPanel): class OutputPinPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.devices = {} self.devices = {}
# Create a grid for all devices # Create a grid for all devices
self.labels['devices'] = Gtk.Grid() self.labels['devices'] = Gtk.Grid()
@@ -36,10 +37,6 @@ class OutputPinPanel(ScreenPanel):
continue continue
self.add_pin(pin) self.add_pin(pin)
frame = Gtk.Frame()
frame.set_vexpand(False)
self.labels['devices'].attach(frame, 0, -1, 1, 1)
def add_pin(self, pin): def add_pin(self, pin):
logging.info(f"Adding pin: {pin}") logging.info(f"Adding pin: {pin}")
@@ -60,7 +57,7 @@ class OutputPinPanel(ScreenPanel):
scale.get_style_context().add_class("fan_slider") scale.get_style_context().add_class("fan_slider")
scale.connect("button-release-event", self.set_output_pin, pin) scale.connect("button-release-event", self.set_output_pin, pin)
min_btn = self._gtk.ButtonImage("cancel", None, "color1", 1) min_btn = self._gtk.Button("cancel", None, "color1", 1)
min_btn.set_hexpand(False) min_btn.set_hexpand(False)
min_btn.connect("clicked", self.update_pin_value, pin, 0) min_btn.connect("clicked", self.update_pin_value, pin, 0)
@@ -72,12 +69,8 @@ class OutputPinPanel(ScreenPanel):
pin_row.add(name) pin_row.add(name)
pin_row.add(pin_col) pin_row.add(pin_col)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(pin_row)
self.devices[pin] = { self.devices[pin] = {
"row": frame, "row": pin_row,
"scale": scale, "scale": scale,
} }
+11 -18
View File
@@ -1,6 +1,7 @@
import gi
import logging import logging
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -12,8 +13,8 @@ def create_panel(*args):
class PowerPanel(ScreenPanel): class PowerPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.devices = {} self.devices = {}
# Create a grid for all devices # Create a grid for all devices
@@ -29,17 +30,14 @@ class PowerPanel(ScreenPanel):
self.content.add(scroll) self.content.add(scroll)
def activate(self): def activate(self):
devices = self._screen.printer.get_power_devices() devices = self._printer.get_power_devices()
for x in devices: for x in devices:
self.devices[x]['switch'].disconnect_by_func(self.on_switch) self.devices[x]['switch'].disconnect_by_func(self.on_switch)
self.devices[x]['switch'].set_active(self._screen.printer.get_power_device_status(x) == "on") self.devices[x]['switch'].set_active(self._printer.get_power_device_status(x) == "on")
self.devices[x]['switch'].connect("notify::active", self.on_switch, x) self.devices[x]['switch'].connect("notify::active", self.on_switch, x)
def add_device(self, device): def add_device(self, device):
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
name = Gtk.Label() name = Gtk.Label()
name.set_markup(f"<big><b>{device}</b></big>") name.set_markup(f"<big><b>{device}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
@@ -51,10 +49,10 @@ class PowerPanel(ScreenPanel):
switch = Gtk.Switch() switch = Gtk.Switch()
switch.set_hexpand(False) switch.set_hexpand(False)
switch.set_active(self._screen.printer.get_power_device_status(device) == "on") switch.set_active(self._printer.get_power_device_status(device) == "on")
switch.connect("notify::active", self.on_switch, device) switch.connect("notify::active", self.on_switch, device)
switch.set_property("width-request", round(self._gtk.get_font_size() * 7)) switch.set_property("width-request", round(self._gtk.font_size * 7))
switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5)) switch.set_property("height-request", round(self._gtk.font_size * 3.5))
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
labels.add(name) labels.add(name)
@@ -65,10 +63,9 @@ class PowerPanel(ScreenPanel):
dev.set_valign(Gtk.Align.CENTER) dev.set_valign(Gtk.Align.CENTER)
dev.add(labels) dev.add(labels)
dev.add(switch) dev.add(switch)
frame.add(dev)
self.devices[device] = { self.devices[device] = {
"row": frame, "row": dev,
"switch": switch "switch": switch
} }
@@ -80,13 +77,9 @@ class PowerPanel(ScreenPanel):
self.labels['devices'].show_all() self.labels['devices'].show_all()
def load_power_devices(self): def load_power_devices(self):
devices = self._screen.printer.get_power_devices() devices = self._printer.get_power_devices()
for x in devices: for x in devices:
self.add_device(x) 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): def on_switch(self, switch, gparam, device):
logging.debug(f"Power toggled {device}") logging.debug(f"Power toggled {device}")
+198 -140
View File
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import gi
import logging import logging
import os import os
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Pango from gi.repository import Gtk, GLib, Pango
from datetime import datetime from datetime import datetime
@@ -19,8 +20,8 @@ class PrintPanel(ScreenPanel):
dir_panels = {} dir_panels = {}
filelist = {'gcodes': {'directories': [], 'files': []}} filelist = {'gcodes': {'directories': [], 'files': []}}
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
sortdir = self._config.get_main_config().get("print_sort_dir", "name_asc") sortdir = self._config.get_main_config().get("print_sort_dir", "name_asc")
sortdir = sortdir.split('_') sortdir = sortdir.split('_')
if sortdir[0] not in ["name", "date"] or sortdir[1] not in ["asc", "desc"]: if sortdir[0] not in ["name", "date"] or sortdir[1] not in ["asc", "desc"]:
@@ -36,18 +37,20 @@ class PrintPanel(ScreenPanel):
self.directories = {} self.directories = {}
self.labels['directories'] = {} self.labels['directories'] = {}
self.labels['files'] = {} self.labels['files'] = {}
sort = Gtk.Label(_("Sort:")) self.source = ""
self.time_24 = self._config.get_main_config().getboolean("24htime", True)
logging.info(f"24h time is {self.time_24}")
sbox = Gtk.Box(spacing=0) sbox = Gtk.Box(spacing=0)
sbox.set_vexpand(False) sbox.set_vexpand(False)
sbox.pack_start(sort, False, False, 5)
for i, (name, val) in enumerate(self.sort_items.items(), start=1): 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) s = self._gtk.Button(None, val, f"color{i % 4}", .5, Gtk.PositionType.RIGHT, 1)
if name == self.sort_current[0]: if name == self.sort_current[0]:
s.set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], self._gtk.img_scale * .5)) s.set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], self._gtk.img_scale * self.bts))
s.connect("clicked", self.change_sort, name) s.connect("clicked", self.change_sort, name)
self.labels[f'sort_{name}'] = s self.labels[f'sort_{name}'] = s
sbox.add(s) sbox.add(s)
refresh = self._gtk.ButtonImage("refresh", scale=.66) refresh = self._gtk.Button("refresh", style="color4", scale=self.bts)
refresh.connect('clicked', self._refresh_files) refresh.connect('clicked', self._refresh_files)
sbox.add(refresh) sbox.add(refresh)
sbox.set_hexpand(True) sbox.set_hexpand(True)
@@ -56,36 +59,39 @@ class PrintPanel(ScreenPanel):
pbox = Gtk.Box(spacing=0) pbox = Gtk.Box(spacing=0)
pbox.set_hexpand(True) pbox.set_hexpand(True)
pbox.set_vexpand(False) pbox.set_vexpand(False)
self.labels['path'] = Gtk.Label(" /") self.labels['path'] = Gtk.Label()
pbox.add(self.labels['path']) pbox.add(self.labels['path'])
self.labels['path_box'] = pbox self.labels['path_box'] = pbox
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) self.main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True) self.main.set_vexpand(True)
box.pack_start(sbox, False, False, 0) self.main.pack_start(sbox, False, False, 0)
box.pack_start(pbox, False, False, 0) self.main.pack_start(pbox, False, False, 0)
box.pack_start(self.scroll, True, True, 0) self.main.pack_start(self.scroll, True, True, 0)
self.dir_panels['gcodes'] = Gtk.Grid() self.dir_panels['gcodes'] = Gtk.Grid()
GLib.idle_add(self.reload_files) GLib.idle_add(self.reload_files)
self.scroll.add(self.dir_panels['gcodes']) self.scroll.add(self.dir_panels['gcodes'])
self.content.add(box) self.content.add(self.main)
self._screen.files.add_file_callback(self._callback) self._screen.files.add_file_callback(self._callback)
self.showing_rename = False
def activate(self): def activate(self):
if self.cur_directory != "gcodes": if self.cur_directory != "gcodes":
self.change_dir(None, "gcodes") self.change_dir(None, "gcodes")
self._refresh_files()
logging.debug("Print panel")
def add_directory(self, directory, show=True): def add_directory(self, directory, show=True):
parent_dir = '/'.join(directory.split('/')[:-1]) parent_dir = os.path.dirname(directory)
if directory not in self.filelist: if directory not in self.filelist:
self.filelist[directory] = {'directories': [], 'files': [], 'modified': 0} self.filelist[directory] = {'directories': [], 'files': [], 'modified': 0}
self.filelist[parent_dir]['directories'].append(directory) self.filelist[parent_dir]['directories'].append(directory)
if directory not in self.labels['directories']: if directory not in self.labels['directories']:
self._create_frame(directory) self._create_row(directory)
reverse = self.sort_current[1] != 0 reverse = self.sort_current[1] != 0
dirs = sorted( dirs = sorted(
self.filelist[parent_dir]['directories'], self.filelist[parent_dir]['directories'],
@@ -100,19 +106,17 @@ class PrintPanel(ScreenPanel):
self.dir_panels[parent_dir].show_all() self.dir_panels[parent_dir].show_all()
def add_file(self, filepath, show=True): def add_file(self, filepath, show=True):
fileinfo = self._screen.files.get_file_info(filepath) fileinfo = self._screen.files.get_file_info(filepath)
if fileinfo is None: if fileinfo is None:
return return
filename = os.path.basename(filepath)
d = f"gcodes/{filepath}".split('/')[:-1]
directory = '/'.join(d)
filename = filepath.split('/')[-1]
if filename.startswith("."): if filename.startswith("."):
return return
directory = os.path.dirname(os.path.join("gcodes", filepath))
d = directory.split(os.sep)
for i in range(1, len(d)): for i in range(1, len(d)):
curdir = "/".join(d[:i]) curdir = os.path.join(*d[:i])
newdir = "/".join(d[:i + 1]) newdir = os.path.join(*d[:i + 1])
if newdir not in self.filelist[curdir]['directories']: if newdir not in self.filelist[curdir]['directories']:
if d[i].startswith("."): if d[i].startswith("."):
return return
@@ -120,18 +124,20 @@ class PrintPanel(ScreenPanel):
if filename not in self.filelist[directory]['files']: if filename not in self.filelist[directory]['files']:
for i in range(1, len(d)): for i in range(1, len(d)):
curdir = "/".join(d[:i + 1]) curdir = os.path.join(*d[:i + 1])
if curdir != "gcodes" and fileinfo['modified'] > self.filelist[curdir]['modified']: if curdir != "gcodes" and fileinfo['modified'] > self.filelist[curdir]['modified']:
self.filelist[curdir]['modified'] = fileinfo['modified'] self.filelist[curdir]['modified'] = fileinfo['modified']
self.labels['directories'][curdir]['info'].set_markup( if self.time_24:
'<small>' + _("Modified") time = f':<b> {datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %H:%M}</b>'
+ f' <b>{datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %H:%M}</b></small>' else:
) time = f':<b> {datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %I:%M %p}</b>'
info = _("Modified") + time
info += "\n" + _("Size") + f':<b> {self.format_size(fileinfo["size"])}</b>'
self.labels['directories'][curdir]['info'].set_markup(info)
self.filelist[directory]['files'].append(filename) self.filelist[directory]['files'].append(filename)
if filepath not in self.files: if filepath not in self.files:
self._create_frame_file(filename, filepath) self._create_row(filepath, filename)
reverse = self.sort_current[1] != 0 reverse = self.sort_current[1] != 0
files = sorted( files = sorted(
self.filelist[directory]['files'], self.filelist[directory]['files'],
@@ -147,98 +153,77 @@ class PrintPanel(ScreenPanel):
if show is True: if show is True:
self.dir_panels[directory].show_all() self.dir_panels[directory].show_all()
def _create_frame(self, directory): def _create_row(self, fullpath, filename=None):
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
name = Gtk.Label() name = Gtk.Label()
name.set_markup(f"<big><b>{directory.split('/')[-1]}</b></big>") name.get_style_context().add_class("print-filename")
name.set_hexpand(True) if filename:
name.set_halign(Gtk.Align.START) name.set_markup(f'<big><b>{os.path.splitext(filename)[0].replace("_", " ")}</b></big>')
name.set_line_wrap(True) else:
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) name.set_markup(f"<big><b>{os.path.split(fullpath)[-1]}</b></big>")
info = Gtk.Label()
info.set_halign(Gtk.Align.START)
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
labels.add(name)
labels.add(info)
labels.set_vexpand(True)
labels.set_valign(Gtk.Align.CENTER)
labels.set_halign(Gtk.Align.START)
actions = self._gtk.ButtonImage("load", style="color3")
actions.connect("clicked", self.change_dir, directory)
actions.set_hexpand(False)
actions.set_halign(Gtk.Align.END)
file = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
file.set_hexpand(True)
file.set_vexpand(False)
icon = self._gtk.Image("folder")
file.add(icon)
file.add(labels)
file.add(actions)
frame.add(file)
self.directories[directory] = frame
self.labels['directories'][directory] = {
"info": info,
"name": name
}
self.dir_panels[directory] = Gtk.Grid()
def _create_frame_file(self, filename, filepath):
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
name = Gtk.Label()
name.set_markup(f'<big><b>{os.path.splitext(filename)[0].replace("_", " ")}</b></big>')
name.set_hexpand(True) name.set_hexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
name.set_line_wrap(True) name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.CHAR) name.set_line_wrap_mode(Pango.WrapMode.CHAR)
info = Gtk.Label() info = Gtk.Label()
info.set_hexpand(True)
info.set_halign(Gtk.Align.START) info.set_halign(Gtk.Align.START)
info.set_markup(self.get_file_info_str(filepath)) info.get_style_context().add_class("print-info")
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
labels.add(name)
labels.add(info)
labels.set_vexpand(True)
labels.set_valign(Gtk.Align.CENTER)
labels.set_halign(Gtk.Align.START)
actions = self._gtk.ButtonImage("print", style="color3") delete = self._gtk.Button("delete", style="color1", scale=self.bts)
actions.connect("clicked", self.confirm_print, filepath) delete.set_hexpand(False)
actions.set_hexpand(False) rename = self._gtk.Button("files", style="color2", scale=self.bts)
actions.set_halign(Gtk.Align.END) rename.set_hexpand(False)
file = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) if filename:
file.set_hexpand(True) action = self._gtk.Button("print", style="color3")
file.set_vexpand(False) action.connect("clicked", self.confirm_print, fullpath)
info.set_markup(self.get_file_info_str(fullpath))
icon = Gtk.Button()
icon.connect("clicked", self.confirm_print, fullpath)
delete.connect("clicked", self.confirm_delete_file, f"gcodes/{fullpath}")
rename.connect("clicked", self.show_rename, f"gcodes/{fullpath}")
GLib.idle_add(self.image_load, fullpath)
else:
action = self._gtk.Button("load", style="color3")
action.connect("clicked", self.change_dir, fullpath)
icon = self._gtk.Button("folder")
icon.connect("clicked", self.change_dir, fullpath)
delete.connect("clicked", self.confirm_delete_directory, fullpath)
rename.connect("clicked", self.show_rename, fullpath)
icon.set_hexpand(False)
action.set_hexpand(False)
action.set_halign(Gtk.Align.END)
icon = Gtk.Button() delete.connect("clicked", self.confirm_delete_file, f"gcodes/{fullpath}")
GLib.idle_add(self.image_load, filepath)
icon.connect("clicked", self.confirm_delete_file, f"gcodes/{filepath}")
file.add(icon) row = Gtk.Grid()
file.add(labels) row.get_style_context().add_class("frame-item")
if os.path.splitext(filename)[1] in [".gcode", ".g", ".gco"]: row.set_hexpand(True)
file.add(actions) row.set_vexpand(False)
frame.add(file) row.attach(icon, 0, 0, 1, 2)
row.attach(name, 1, 0, 3, 1)
row.attach(info, 1, 1, 1, 1)
row.attach(rename, 2, 1, 1, 1)
row.attach(delete, 3, 1, 1, 1)
self.files[filepath] = frame if not filename or (filename and os.path.splitext(filename)[1] in [".gcode", ".g", ".gco"]):
self.labels['files'][filepath] = { row.attach(action, 4, 0, 1, 2)
"icon": icon,
"info": info, if filename is not None:
"name": name self.files[fullpath] = row
} self.labels['files'][fullpath] = {
"icon": icon,
"info": info,
"name": name
}
else:
self.directories[fullpath] = row
self.labels['directories'][fullpath] = {
"info": info,
"name": name
}
self.dir_panels[fullpath] = Gtk.Grid()
def image_load(self, filepath): def image_load(self, filepath):
pixbuf = self.get_file_image(filepath, small=True) pixbuf = self.get_file_image(filepath, small=True)
@@ -257,9 +242,22 @@ class PrintPanel(ScreenPanel):
params params
) )
def confirm_delete_directory(self, widget, dirpath):
logging.debug(f"Sending delete_directory {dirpath}")
params = {"path": f"{dirpath}", "force": True}
self._screen._confirm_send_action(
None,
_("Delete Directory?") + "\n\n" + dirpath,
"server.files.delete_directory",
params
)
def back(self): def back(self):
if len(self.cur_directory.split('/')) > 1: if self.showing_rename:
self.change_dir(None, '/'.join(self.cur_directory.split('/')[:-1])) self.hide_rename()
return True
if os.path.dirname(self.cur_directory):
self.change_dir(None, os.path.dirname(self.cur_directory))
return True return True
return False return False
@@ -271,7 +269,7 @@ class PrintPanel(ScreenPanel):
for child in self.scroll.get_children(): for child in self.scroll.get_children():
self.scroll.remove(child) self.scroll.remove(child)
self.cur_directory = directory self.cur_directory = directory
self.labels['path'].set_text(f" /{self.cur_directory[7:]}") self.labels['path'].set_text(f" {self.cur_directory[7:]}")
self.scroll.add(self.dir_panels[directory]) self.scroll.add(self.dir_panels[directory])
self.content.show_all() self.content.show_all()
@@ -286,7 +284,7 @@ class PrintPanel(ScreenPanel):
self.labels[f'sort_{oldkey}'].show_all() self.labels[f'sort_{oldkey}'].show_all()
self.sort_current = [key, 0] self.sort_current = [key, 0]
self.labels[f'sort_{key}'].set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]], self.labels[f'sort_{key}'].set_image(self._gtk.Image(self.sort_icon[self.sort_current[1]],
self._gtk.img_scale * .5)) self._gtk.img_scale * self.bts))
self.labels[f'sort_{key}'].show() self.labels[f'sort_{key}'].show()
GLib.idle_add(self.reload_files) GLib.idle_add(self.reload_files)
@@ -321,42 +319,47 @@ class PrintPanel(ScreenPanel):
image.set_vexpand(False) image.set_vexpand(False)
grid.attach_next_to(image, label, Gtk.PositionType.BOTTOM, 1, 1) grid.attach_next_to(image, label, Gtk.PositionType.BOTTOM, 1, 1)
self._gtk.Dialog(self._screen, buttons, grid, self.confirm_print_response, filename) dialog = self._gtk.Dialog(self._screen, buttons, grid, self.confirm_print_response, filename)
dialog.set_title(_("Print"))
def confirm_print_response(self, widget, response_id, filename):
widget.destroy()
def confirm_print_response(self, dialog, response_id, filename):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.CANCEL: if response_id == Gtk.ResponseType.CANCEL:
return return
logging.info(f"Starting print: {filename}") logging.info(f"Starting print: {filename}")
self._screen._ws.klippy.print_start(filename) self._screen._ws.klippy.print_start(filename)
def delete_file(self, filename): def delete_file(self, filename):
dir_parts = f"gcodes/{filename}".split('/')[:-1] directory = os.path.join("gcodes", os.path.dirname(filename)) if os.path.dirname(filename) else "gcodes"
directory = '/'.join(dir_parts) if directory not in self.filelist or os.path.basename(filename).startswith("."):
if directory not in self.filelist or filename.split('/')[-1].startswith("."):
return return
self.filelist[directory]["files"].pop(self.filelist[directory]["files"].index(filename.split('/')[-1])) try:
self.filelist[directory]["files"].pop(self.filelist[directory]["files"].index(os.path.basename(filename)))
except Exception as e:
logging.exception(e)
dir_parts = directory.split(os.sep)
i = len(dir_parts) i = len(dir_parts)
while i > 1: while i > 1:
cur_dir = '/'.join(dir_parts[:i]) cur_dir = os.path.join(*dir_parts[:i])
if len(self.filelist[cur_dir]['directories']) > 0 or len(self.filelist[cur_dir]['files']) > 0: if len(self.filelist[cur_dir]['directories']) > 0 or len(self.filelist[cur_dir]['files']) > 0:
break break
par_dir = '/'.join(cur_dir.split('/')[:-1]) parent_dir = os.path.dirname(cur_dir)
if self.cur_directory == cur_dir: if self.cur_directory == cur_dir:
self.change_dir(None, par_dir) self.change_dir(None, parent_dir)
del self.filelist[cur_dir] del self.filelist[cur_dir]
self.filelist[par_dir]['directories'].pop(self.filelist[par_dir]['directories'].index(cur_dir)) self.filelist[parent_dir]['directories'].pop(self.filelist[parent_dir]['directories'].index(cur_dir))
self.dir_panels[par_dir].remove(self.directories[cur_dir]) self.dir_panels[parent_dir].remove(self.directories[cur_dir])
del self.directories[cur_dir] del self.directories[cur_dir]
del self.labels['directories'][cur_dir] del self.labels['directories'][cur_dir]
self.dir_panels[par_dir].show_all() self.dir_panels[parent_dir].show_all()
i -= 1 i -= 1
self.dir_panels[directory].remove(self.files[filename]) try:
self.dir_panels[directory].remove(self.files[filename])
except Exception as e:
logging.exception(e)
self.dir_panels[directory].show_all() self.dir_panels[directory].show_all()
self.files.pop(filename) self.files.pop(filename)
@@ -365,14 +368,16 @@ class PrintPanel(ScreenPanel):
fileinfo = self._screen.files.get_file_info(filename) fileinfo = self._screen.files.get_file_info(filename)
if fileinfo is None: if fileinfo is None:
return return
info = '<small>' + _("Uploaded") + f': <b>{datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %H:%M}</b>\n' info = _("Uploaded")
if self.time_24:
info += f':<b> {datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %H:%M}</b>\n'
else:
info += f':<b> {datetime.fromtimestamp(fileinfo["modified"]):%Y-%m-%d %I:%M %p}</b>\n'
if "size" in fileinfo: if "size" in fileinfo:
info += _("Size") + f': <b>{self.format_size(fileinfo["size"])}</b>\n' info += _("Size") + f': <b>{self.format_size(fileinfo["size"])}</b>\n'
if "estimated_time" in fileinfo: if "estimated_time" in fileinfo:
info += _("Print Time") + f': <b>{self.format_time(fileinfo["estimated_time"])}</b>' info += _("Print Time") + f': <b>{self.format_time(fileinfo["estimated_time"])}</b>'
info += "</small>"
return info return info
def reload_files(self, widget=None): def reload_files(self, widget=None):
@@ -408,10 +413,63 @@ class PrintPanel(ScreenPanel):
for file in updatedfiles: for file in updatedfiles:
self.update_file(file) self.update_file(file)
def _refresh_files(self, widget): def _refresh_files(self, widget=None):
self._files.refresh_files() self._files.refresh_files()
self._screen.memory_trace()
def process_update(self, action, data): def show_rename(self, widget, fullpath):
if action == "notify_gcode_response" and "unknown" in data.lower(): self.source = fullpath
self._screen.show_popup_message(data) logging.info(self.source)
return
for child in self.content.get_children():
self.content.remove(child)
if "rename_file" not in self.labels:
self._create_rename_box(fullpath)
self.content.add(self.labels['rename_file'])
self.labels['new_name'].set_text(fullpath[7:])
self.labels['new_name'].grab_focus_without_selecting()
self.showing_rename = True
def _create_rename_box(self, fullpath):
lbl = self._gtk.Label(_("Rename/Move:"))
lbl.set_halign(Gtk.Align.START)
lbl.set_hexpand(False)
self.labels['new_name'] = Gtk.Entry()
self.labels['new_name'].set_text(fullpath)
self.labels['new_name'].set_hexpand(True)
self.labels['new_name'].connect("activate", self.rename)
self.labels['new_name'].connect("focus-in-event", self._screen.show_keyboard)
save = self._gtk.Button("complete", _("Save"), "color3")
save.set_hexpand(False)
save.connect("clicked", self.rename)
box = Gtk.Box()
box.pack_start(self.labels['new_name'], True, True, 5)
box.pack_start(save, False, False, 5)
self.labels['rename_file'] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=5)
self.labels['rename_file'].set_valign(Gtk.Align.CENTER)
self.labels['rename_file'].set_hexpand(True)
self.labels['rename_file'].set_vexpand(True)
self.labels['rename_file'].pack_start(lbl, True, True, 5)
self.labels['rename_file'].pack_start(box, True, True, 5)
def hide_rename(self):
self._screen.remove_keyboard()
for child in self.content.get_children():
self.content.remove(child)
self.content.add(self.main)
self.content.show()
self.showing_rename = False
def rename(self, widget):
params = {"source": self.source, "dest": f"gcodes/{self.labels['new_name'].get_text()}"}
self._screen._send_action(
widget,
"server.files.move",
params
)
self.back()
GLib.timeout_add_seconds(2, self._refresh_files)
+5 -4
View File
@@ -10,8 +10,8 @@ def create_panel(*args):
class PrinterSelect(ScreenPanel): class PrinterSelect(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, False) super().__init__(screen, title)
printers = self._config.get_printers() printers = self._config.get_printers()
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
@@ -32,7 +32,7 @@ class PrinterSelect(ScreenPanel):
for i, printer in enumerate(printers): for i, printer in enumerate(printers):
name = list(printer)[0] name = list(printer)[0]
self.labels[name] = self._gtk.ButtonImage("extruder", name, f"color{1 + i % 4}") self.labels[name] = self._gtk.Button("extruder", name, f"color{1 + i % 4}")
self.labels[name].connect("clicked", self.connect_printer, name) self.labels[name].connect("clicked", self.connect_printer, name)
if self._screen.vertical_mode: if self._screen.vertical_mode:
row = i % columns row = i % columns
@@ -47,5 +47,6 @@ class PrinterSelect(ScreenPanel):
def activate(self): def activate(self):
self._screen.base_panel.action_bar.hide() self._screen.base_panel.action_bar.hide()
self._screen._ws.connecting = False
GLib.timeout_add(100, self._screen.base_panel.action_bar.hide) GLib.timeout_add(100, self._screen.base_panel.action_bar.hide)
if self._screen._ws:
self._screen._ws.connecting = False
+6 -9
View File
@@ -1,7 +1,8 @@
import gi
import logging import logging
import re import re
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -14,8 +15,8 @@ def create_panel(*args):
class FWRetractionPanel(ScreenPanel): class FWRetractionPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.options = None self.options = None
self.grid = Gtk.Grid() self.grid = Gtk.Grid()
self.values = {} self.values = {}
@@ -130,7 +131,7 @@ class FWRetractionPanel(ScreenPanel):
scale.get_style_context().add_class("option_slider") scale.get_style_context().add_class("option_slider")
scale.connect("button-release-event", self.set_opt_value, option) scale.connect("button-release-event", self.set_opt_value, option)
reset = self._gtk.ButtonImage("refresh", style="color1") reset = self._gtk.Button("refresh", style="color1")
reset.connect("clicked", self.reset_value, option) reset.connect("clicked", self.reset_value, option)
reset.set_hexpand(False) reset.set_hexpand(False)
@@ -139,12 +140,8 @@ class FWRetractionPanel(ScreenPanel):
item.attach(scale, 0, 1, 1, 1) item.attach(scale, 0, 1, 1, 1)
item.attach(reset, 1, 1, 1, 1) item.attach(reset, 1, 1, 1, 1)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(item)
self.list[option] = { self.list[option] = {
"row": frame, "row": item,
"scale": scale, "scale": scale,
"adjustment": adj, "adjustment": adj,
} }
+7 -22
View File
@@ -1,5 +1,4 @@
import gi import gi
import logging
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -12,8 +11,8 @@ def create_panel(*args):
class SettingsPanel(ScreenPanel): class SettingsPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.printers = self.settings = {} self.printers = self.settings = {}
self.menu = ['settings_menu'] self.menu = ['settings_menu']
options = self._config.get_configurable_options().copy() options = self._config.get_configurable_options().copy()
@@ -34,7 +33,6 @@ class SettingsPanel(ScreenPanel):
self.labels['printers'] = Gtk.Grid() self.labels['printers'] = Gtk.Grid()
self.labels['printers_menu'].add(self.labels['printers']) self.labels['printers_menu'].add(self.labels['printers'])
for printer in self._config.get_printers(): for printer in self._config.get_printers():
logging.debug(f"Printer: {printer}")
pname = list(printer)[0] pname = list(printer)[0]
self.printers[pname] = { self.printers[pname] = {
"name": pname, "name": pname,
@@ -60,10 +58,6 @@ class SettingsPanel(ScreenPanel):
def add_option(self, boxname, opt_array, opt_name, option): def add_option(self, boxname, opt_array, opt_name, option):
if option['type'] is None: if option['type'] is None:
return return
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
name = Gtk.Label() name = Gtk.Label()
name.set_markup(f"<big><b>{option['name']}</b></big>") name.set_markup(f"<big><b>{option['name']}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
@@ -77,24 +71,18 @@ class SettingsPanel(ScreenPanel):
labels.add(name) labels.add(name)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.get_style_context().add_class("frame-item")
dev.set_hexpand(True) dev.set_hexpand(True)
dev.set_vexpand(False) dev.set_vexpand(False)
dev.set_valign(Gtk.Align.CENTER) dev.set_valign(Gtk.Align.CENTER)
dev.add(labels) dev.add(labels)
if option['type'] == "binary": if option['type'] == "binary":
box = Gtk.Box()
box.set_vexpand(False)
switch = Gtk.Switch() switch = Gtk.Switch()
switch.set_hexpand(False)
switch.set_vexpand(False)
switch.set_active(self._config.get_config().getboolean(option['section'], opt_name)) switch.set_active(self._config.get_config().getboolean(option['section'], opt_name))
switch.connect("notify::active", self.switch_config_option, option['section'], opt_name, switch.connect("notify::active", self.switch_config_option, option['section'], opt_name,
option['callback'] if "callback" in option else None) option['callback'] if "callback" in option else None)
switch.set_property("width-request", round(self._gtk.get_font_size() * 7)) dev.add(switch)
switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5))
box.add(switch)
dev.add(box)
elif option['type'] == "dropdown": elif option['type'] == "dropdown":
dropdown = Gtk.ComboBoxText() dropdown = Gtk.ComboBoxText()
for i, opt in enumerate(option['options']): for i, opt in enumerate(option['options']):
@@ -121,18 +109,15 @@ class SettingsPanel(ScreenPanel):
box.add(label) box.add(label)
dev.add(box) dev.add(box)
elif option['type'] == "menu": elif option['type'] == "menu":
open_menu = self._gtk.ButtonImage("settings", style="color3") open_menu = self._gtk.Button("settings", style="color3")
open_menu.connect("clicked", self.load_menu, option['menu']) open_menu.connect("clicked", self.load_menu, option['menu'], option['name'])
open_menu.set_hexpand(False) open_menu.set_hexpand(False)
open_menu.set_halign(Gtk.Align.END) open_menu.set_halign(Gtk.Align.END)
dev.add(open_menu) dev.add(open_menu)
frame.add(dev)
frame.show_all()
opt_array[opt_name] = { opt_array[opt_name] = {
"name": option['name'], "name": option['name'],
"row": frame "row": dev
} }
opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name']) opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name'])
+32 -32
View File
@@ -1,7 +1,8 @@
import gi
import logging import logging
import os import os
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
@@ -14,26 +15,26 @@ def create_panel(*args):
class SplashScreenPanel(ScreenPanel): class SplashScreenPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
image = self._gtk.Image("klipper", self._screen.width / 5, self._screen.height * .5) image = self._gtk.Image("klipper", self._gtk.content_width * .2, self._gtk.content_height * .5)
self.labels['text'] = Gtk.Label(_("Initializing printer...")) self.labels['text'] = Gtk.Label(_("Initializing printer..."))
self.labels['text'].set_line_wrap(True) self.labels['text'].set_line_wrap(True)
self.labels['text'].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) self.labels['text'].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self.labels['text'].set_halign(Gtk.Align.CENTER) self.labels['text'].set_halign(Gtk.Align.CENTER)
self.labels['text'].set_valign(Gtk.Align.CENTER) self.labels['text'].set_valign(Gtk.Align.CENTER)
self.labels['menu'] = self._gtk.ButtonImage("settings", _("Menu"), "color4") self.labels['menu'] = self._gtk.Button("settings", _("Menu"), "color4")
self.labels['menu'].connect("clicked", self._screen._go_to_submenu, "") self.labels['menu'].connect("clicked", self._screen._go_to_submenu, "")
self.labels['restart'] = self._gtk.ButtonImage("refresh", _("Klipper Restart"), "color1") self.labels['restart'] = self._gtk.Button("refresh", _("Klipper Restart"), "color1")
self.labels['restart'].connect("clicked", self.restart) self.labels['restart'].connect("clicked", self.restart)
self.labels['firmware_restart'] = self._gtk.ButtonImage("refresh", _("Firmware Restart"), "color2") self.labels['firmware_restart'] = self._gtk.Button("refresh", _("Firmware Restart"), "color2")
self.labels['firmware_restart'].connect("clicked", self.firmware_restart) self.labels['firmware_restart'].connect("clicked", self.firmware_restart)
self.labels['restart_system'] = self._gtk.ButtonImage("refresh", _("System Restart"), "color1") self.labels['restart_system'] = self._gtk.Button("refresh", _("System Restart"), "color1")
self.labels['restart_system'].connect("clicked", self.restart_system) self.labels['restart_system'].connect("clicked", self.restart_system)
self.labels['shutdown'] = self._gtk.ButtonImage("shutdown", _('System Shutdown'), "color2") self.labels['shutdown'] = self._gtk.Button("shutdown", _('System Shutdown'), "color2")
self.labels['shutdown'].connect("clicked", self.shutdown) self.labels['shutdown'].connect("clicked", self.shutdown)
self.labels['retry'] = self._gtk.ButtonImage("load", _('Retry'), "color3") self.labels['retry'] = self._gtk.Button("load", _('Retry'), "color3")
self.labels['retry'].connect("clicked", self.retry) self.labels['retry'].connect("clicked", self.retry)
self.labels['actions'] = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) self.labels['actions'] = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
@@ -41,7 +42,7 @@ class SplashScreenPanel(ScreenPanel):
self.labels['actions'].set_vexpand(False) self.labels['actions'].set_vexpand(False)
self.labels['actions'].set_halign(Gtk.Align.CENTER) self.labels['actions'].set_halign(Gtk.Align.CENTER)
self.labels['actions'].set_homogeneous(True) self.labels['actions'].set_homogeneous(True)
self.labels['actions'].set_size_request(self._screen.base_panel.content.get_allocation().width, 0) self.labels['actions'].set_size_request(self._gtk.content_width, -1)
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
scroll.set_hexpand(True) scroll.set_hexpand(True)
@@ -61,7 +62,7 @@ class SplashScreenPanel(ScreenPanel):
self.content.add(main) self.content.add(main)
def update_text(self, text): def update_text(self, text):
self.labels['text'].set_markup(f"{text}") self.labels['text'].set_label(f"{text}")
self.show_restart_buttons() self.show_restart_buttons()
def clear_action_bar(self): def clear_action_bar(self):
@@ -71,33 +72,28 @@ class SplashScreenPanel(ScreenPanel):
def show_restart_buttons(self): def show_restart_buttons(self):
self.clear_action_bar() self.clear_action_bar()
printer = self._screen.connected_printer if self.ks_printer_cfg is not None and self._screen._ws.connected:
if printer is not None and self._screen._ws.connected: power_devices = self.ks_printer_cfg.get("power_devices", "")
printer_cfg = self._config.get_printer_config(printer) if power_devices and self._printer.get_power_devices():
if printer_cfg is not None: logging.info(f"Associated power devices: {power_devices}")
power_devices = printer_cfg.get("power_devices", "") self.add_power_button(power_devices)
power_devices = [str(i.strip()) for i in power_devices.split(',')]
if power_devices[0]:
logging.info(f"Associated power devices: {power_devices}")
self.add_power_button(self._screen.search_power_devices(power_devices))
if self._screen._ws and self._screen._ws.connected: if self._screen.initialized:
self.labels['actions'].add(self.labels['restart']) self.labels['actions'].add(self.labels['restart'])
self.labels['actions'].add(self.labels['firmware_restart']) self.labels['actions'].add(self.labels['firmware_restart'])
else: else:
self.labels['actions'].add(self.labels['restart_system']) self.labels['actions'].add(self.labels['restart_system'])
self.labels['actions'].add(self.labels['shutdown']) self.labels['actions'].add(self.labels['shutdown'])
self.labels['actions'].add(self.labels['menu']) self.labels['actions'].add(self.labels['menu'])
if self._screen._ws and not self._screen._ws.connecting: if self._screen._ws and not self._screen._ws.connecting or self._screen.reinit_count > self._screen.max_retries:
self.labels['actions'].add(self.labels['retry']) self.labels['actions'].add(self.labels['retry'])
self.labels['actions'].show_all() self.labels['actions'].show_all()
def add_power_button(self, powerdevs): def add_power_button(self, powerdevs):
if powerdevs is not None: self.labels['power'] = self._gtk.Button("shutdown", _("Power On Printer"), "color3")
self.labels['power'] = self._gtk.ButtonImage("shutdown", _("Power On Printer"), "color3") self.labels['power'].connect("clicked", self._screen.power_devices, powerdevs, True)
self.labels['power'].connect("clicked", self._screen.power_on, powerdevs) self.check_power_status()
self.check_power_status() self.labels['actions'].add(self.labels['power'])
self.labels['actions'].add(self.labels['power'])
def activate(self): def activate(self):
self.check_power_status() self.check_power_status()
@@ -107,13 +103,13 @@ class SplashScreenPanel(ScreenPanel):
def check_power_status(self): def check_power_status(self):
if 'power' in self.labels: if 'power' in self.labels:
devices = self._screen.printer.get_power_devices() devices = self._printer.get_power_devices()
if devices is not None: if devices is not None:
for device in devices: for device in devices:
if self._screen.printer.get_power_device_status(device) == "off": if self._printer.get_power_device_status(device) == "off":
self.labels['power'].set_sensitive(True) self.labels['power'].set_sensitive(True)
break break
elif self._screen.printer.get_power_device_status(device) == "on": elif self._printer.get_power_device_status(device) == "on":
self.labels['power'].set_sensitive(False) self.labels['power'].set_sensitive(False)
def firmware_restart(self, widget): def firmware_restart(self, widget):
@@ -143,5 +139,9 @@ class SplashScreenPanel(ScreenPanel):
def retry(self, widget): def retry(self, widget):
self.update_text((_("Connecting to %s") % self._screen.connecting_to_printer)) self.update_text((_("Connecting to %s") % self._screen.connecting_to_printer))
self._screen._ws.retry() if self._screen._ws and not self._screen._ws.connecting:
self._screen._ws.retry()
else:
self._screen.reinit_count = 0
self._screen.init_printer()
self.show_restart_buttons() self.show_restart_buttons()
+48 -113
View File
@@ -1,7 +1,8 @@
import gi
import logging import logging
import os import os
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango, GLib from gi.repository import Gtk, Pango, GLib
@@ -27,25 +28,24 @@ ALLOWED_SERVICES = (
class SystemPanel(ScreenPanel): class SystemPanel(ScreenPanel):
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.refresh = None self.refresh = None
self.update_status = None
self.update_dialog = None self.update_dialog = None
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False) grid.set_row_homogeneous(False)
update_all = self._gtk.ButtonImage('arrow-up', _('Full Update'), 'color1') update_all = self._gtk.Button('arrow-up', _('Full Update'), 'color1')
update_all.connect("clicked", self.show_update_info, "full") update_all.connect("clicked", self.show_update_info, "full")
update_all.set_vexpand(False) update_all.set_vexpand(False)
self.refresh = self._gtk.ButtonImage('refresh', _('Refresh'), 'color2') self.refresh = self._gtk.Button('refresh', _('Refresh'), 'color2')
self.refresh.connect("clicked", self.refresh_updates) self.refresh.connect("clicked", self.refresh_updates)
self.refresh.set_vexpand(False) self.refresh.set_vexpand(False)
reboot = self._gtk.ButtonImage('refresh', _('Restart'), 'color3') reboot = self._gtk.Button('refresh', _('Restart'), 'color3')
reboot.connect("clicked", self.reboot_poweroff, "reboot") reboot.connect("clicked", self.reboot_poweroff, "reboot")
reboot.set_vexpand(False) reboot.set_vexpand(False)
shutdown = self._gtk.ButtonImage('shutdown', _('Shutdown'), 'color4') shutdown = self._gtk.Button('shutdown', _('Shutdown'), 'color4')
shutdown.connect("clicked", self.reboot_poweroff, "poweroff") shutdown.connect("clicked", self.reboot_poweroff, "poweroff")
shutdown.set_vexpand(False) shutdown.set_vexpand(False)
@@ -55,9 +55,9 @@ class SystemPanel(ScreenPanel):
infogrid = Gtk.Grid() infogrid = Gtk.Grid()
infogrid.get_style_context().add_class("system-program-grid") infogrid.get_style_context().add_class("system-program-grid")
update_resp = self._screen.apiclient.send_request("machine/update/status") update_resp = self._screen.apiclient.send_request("machine/update/status")
self.update_status = None
if not update_resp: if not update_resp:
self.update_status = {}
logging.info("No update manager configured") logging.info("No update manager configured")
else: else:
self.update_status = update_resp['result'] self.update_status = update_resp['result']
@@ -74,7 +74,7 @@ class SystemPanel(ScreenPanel):
self.labels[f"{prog}_status"].connect("clicked", self.show_update_info, prog) self.labels[f"{prog}_status"].connect("clicked", self.show_update_info, prog)
if prog in ALLOWED_SERVICES: if prog in ALLOWED_SERVICES:
self.labels[f"{prog}_restart"] = self._gtk.ButtonImage("refresh", scale=.7) self.labels[f"{prog}_restart"] = self._gtk.Button("refresh", scale=.7)
self.labels[f"{prog}_restart"].connect("clicked", self.restart, prog) self.labels[f"{prog}_restart"].connect("clicked", self.restart, prog)
infogrid.attach(self.labels[f"{prog}_restart"], 0, i, 1, 1) infogrid.attach(self.labels[f"{prog}_restart"], 0, i, 1, 1)
@@ -97,11 +97,6 @@ class SystemPanel(ScreenPanel):
def activate(self): def activate(self):
self.get_updates() self.get_updates()
def finish_updating(self, widget, response_id):
widget.destroy()
self._screen.set_updating(False)
self.get_updates()
def refresh_updates(self, widget=None): def refresh_updates(self, widget=None):
self.refresh.set_sensitive(False) self.refresh.set_sensitive(False)
self._screen.show_popup_message(_("Checking for updates, please wait..."), level=1) self._screen.show_popup_message(_("Checking for updates, please wait..."), level=1)
@@ -110,6 +105,7 @@ class SystemPanel(ScreenPanel):
def get_updates(self, refresh="false"): def get_updates(self, refresh="false"):
update_resp = self._screen.apiclient.send_request(f"machine/update/status?refresh={refresh}") update_resp = self._screen.apiclient.send_request(f"machine/update/status?refresh={refresh}")
if not update_resp: if not update_resp:
self.update_status = {}
logging.info("No update manager configured") logging.info("No update manager configured")
else: else:
self.update_status = update_resp['result'] self.update_status = update_resp['result']
@@ -120,18 +116,6 @@ class SystemPanel(ScreenPanel):
self.refresh.set_sensitive(True) self.refresh.set_sensitive(True)
self._screen.close_popup_message() self._screen.close_popup_message()
def process_update(self, action, data):
if action == "notify_update_response":
logging.info(f"Update: {data}")
if 'application' in data:
self.labels['update_progress'].set_text(
f"{self.labels['update_progress'].get_text().strip()}\n"
f"{data['message']}\n"
)
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): def restart(self, widget, program):
if program not in ALLOWED_SERVICES: if program not in ALLOWED_SERVICES:
return return
@@ -140,13 +124,7 @@ class SystemPanel(ScreenPanel):
self._screen._ws.send_method("machine.services.restart", {"service": program}) self._screen._ws.send_method("machine.services.restart", {"service": program})
def show_update_info(self, widget, program): def show_update_info(self, widget, program):
info = self.update_status['version_info'][program] if program in self.update_status['version_info'] else {}
if not self.update_status:
return
if program in self.update_status['version_info']:
info = self.update_status['version_info'][program]
else:
info = {"full": True}
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
@@ -157,7 +135,10 @@ class SystemPanel(ScreenPanel):
label = Gtk.Label() label = Gtk.Label()
label.set_line_wrap(True) label.set_line_wrap(True)
if 'configured_type' in info and info['configured_type'] == 'git_repo': if program == "full":
label.set_markup('<b>' + _("Perform a full upgrade?") + '</b>')
vbox.add(label)
elif 'configured_type' in info and info['configured_type'] == 'git_repo':
if not info['is_valid'] or info['is_dirty']: if not info['is_valid'] or info['is_dirty']:
label.set_markup(_("Do you want to recover %s?") % program) label.set_markup(_("Do you want to recover %s?") % program)
vbox.add(label) vbox.add(label)
@@ -167,7 +148,8 @@ class SystemPanel(ScreenPanel):
{"name": _("Recover Soft"), "response": Gtk.ResponseType.APPLY}, {"name": _("Recover Soft"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL} {"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
] ]
self._gtk.Dialog(self._screen, recoverybuttons, scroll, self.reset_confirm, program) dialog = self._gtk.Dialog(self._screen, recoverybuttons, scroll, self.reset_confirm, program)
dialog.set_title(_("Recover"))
return return
else: else:
if info['version'] == info['remote_version']: if info['version'] == info['remote_version']:
@@ -195,11 +177,11 @@ class SystemPanel(ScreenPanel):
commit_box.add(Gtk.Separator()) commit_box.add(Gtk.Separator())
vbox.add(commit_box) vbox.add(commit_box)
if "package_count" in info: elif "package_count" in info:
label.set_markup(( label.set_markup((
f'<b>{info["package_count"]} ' f'<b>{info["package_count"]} '
+ ngettext("Package will be updated", "Packages will be updated", info["package_count"]) + ngettext("Package will be updated", "Packages will be updated", info["package_count"])
+ f':</b>\n' + ':</b>\n'
)) ))
label.set_halign(Gtk.Align.CENTER) label.set_halign(Gtk.Align.CENTER)
vbox.add(label) vbox.add(label)
@@ -218,9 +200,6 @@ class SystemPanel(ScreenPanel):
if pos == 2: if pos == 2:
i += 1 i += 1
vbox.add(grid) vbox.add(grid)
elif "full" in info:
label.set_markup('<b>' + _("Perform a full upgrade?") + '</b>')
vbox.add(label)
else: else:
label.set_markup( label.set_markup(
"<b>" + _("%s will be updated to version") % program.capitalize() "<b>" + _("%s will be updated to version") % program.capitalize()
@@ -234,92 +213,48 @@ class SystemPanel(ScreenPanel):
{"name": _("Update"), "response": Gtk.ResponseType.OK}, {"name": _("Update"), "response": Gtk.ResponseType.OK},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL} {"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
] ]
self._gtk.Dialog(self._screen, buttons, scroll, self.update_confirm, program) dialog = self._gtk.Dialog(self._screen, buttons, scroll, self.update_confirm, program)
dialog.set_title(_("Update"))
def update_confirm(self, widget, response_id, program): def update_confirm(self, dialog, response_id, program):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.OK: if response_id == Gtk.ResponseType.OK:
logging.debug(f"Updating {program}") logging.debug(f"Updating {program}")
self.update_program(self, program) self.update_program(self, program)
widget.destroy()
def reset_confirm(self, widget, response_id, program): def reset_confirm(self, dialog, response_id, program):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.OK: if response_id == Gtk.ResponseType.OK:
logging.debug(f"Recovering hard {program}") logging.debug(f"Recovering hard {program}")
self.reset_repo(self, program, True) self.reset_repo(self, program, True)
if response_id == Gtk.ResponseType.APPLY: if response_id == Gtk.ResponseType.APPLY:
logging.debug(f"Recovering soft {program}") logging.debug(f"Recovering soft {program}")
self.reset_repo(self, program, False) self.reset_repo(self, program, False)
widget.destroy()
def reset_repo(self, widget, program, hard): def reset_repo(self, widget, program, hard):
if self._screen.is_updating(): if self._screen.updating:
return return
self._screen.base_panel.show_update_dialog()
buttons = [ msg = _("Starting recovery for") + f' {program}...'
{"name": _("Finish"), "response": Gtk.ResponseType.CANCEL} self._screen._websocket_callback("notify_update_response",
] {'application': {program}, 'message': msg, 'complete': False})
logging.info(f"Sending machine.update.recover name: {program} hard: {hard}")
scroll = self._gtk.ScrolledWindow()
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)
self.labels['update_progress'].set_valign(Gtk.Align.START)
self.labels['update_progress'].set_ellipsize(Pango.EllipsizeMode.END)
self.labels['update_progress'].connect("size-allocate", self._autoscroll)
scroll.add(self.labels['update_progress'])
self.labels['update_scroll'] = scroll
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_dialog = dialog
logging.info(f"Sending machine.update.recover name: {program}")
self._screen._ws.send_method("machine.update.recover", {"name": program, "hard": hard}) self._screen._ws.send_method("machine.update.recover", {"name": program, "hard": hard})
self._screen.set_updating(True)
def update_program(self, widget, program): def update_program(self, widget, program):
if self._screen.is_updating(): if self._screen.updating or not self.update_status:
return
if not self.update_status:
return return
if program in self.update_status['version_info']: if program in self.update_status['version_info']:
info = self.update_status['version_info'][program] info = self.update_status['version_info'][program]
logging.info(f"program: {info}") logging.info(f"program: {info}")
else: if "package_count" in info and info['package_count'] == 0 \
info = {"full": True} or "version" in info and info['version'] == info['remote_version']:
logging.info("full upgrade") return
self._screen.base_panel.show_update_dialog()
if "package_count" in info and info['package_count'] == 0 \ msg = _("Updating") if program == "full" else _("Starting update for") + f' {program}...'
or "version" in info and info['version'] == info['remote_version']: self._screen._websocket_callback("notify_update_response",
return {'application': {program}, 'message': msg, 'complete': False})
buttons = [
{"name": _("Finish"), "response": Gtk.ResponseType.CANCEL}
]
scroll = self._gtk.ScrolledWindow()
scroll.set_property("overlay-scrolling", True)
if "full" in info:
self.labels['update_progress'] = Gtk.Label(_("Updating") + '\n')
else:
self.labels['update_progress'] = Gtk.Label(_("Starting update for") + f' {program}...')
self.labels['update_progress'].set_halign(Gtk.Align.START)
self.labels['update_progress'].set_valign(Gtk.Align.START)
self.labels['update_progress'].connect("size-allocate", self._autoscroll)
scroll.add(self.labels['update_progress'])
self.labels['update_scroll'] = scroll
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_dialog = dialog
if program in ['klipper', 'moonraker', 'system', 'full']: if program in ['klipper', 'moonraker', 'system', 'full']:
logging.info(f"Sending machine.update.{program}") logging.info(f"Sending machine.update.{program}")
@@ -327,7 +262,6 @@ class SystemPanel(ScreenPanel):
else: else:
logging.info(f"Sending machine.update.client name: {program}") logging.info(f"Sending machine.update.client name: {program}")
self._screen._ws.send_method("machine.update.client", {"name": program}) self._screen._ws.send_method("machine.update.client", {"name": program})
self._screen.set_updating(True)
def update_program_info(self, p): def update_program_info(self, p):
@@ -355,6 +289,7 @@ class SystemPanel(ScreenPanel):
self.labels[p].set_markup(f"<b>{p}</b>\n{info['version']} -> {info['remote_version']}") self.labels[p].set_markup(f"<b>{p}</b>\n{info['version']} -> {info['remote_version']}")
self._needs_update(p, info['version'], info['remote_version']) self._needs_update(p, info['version'], info['remote_version'])
else: else:
logging.info(f"Invalid {p} {info['version']}")
self.labels[p].set_markup(f"<b>{p}</b>\n{info['version']}") self.labels[p].set_markup(f"<b>{p}</b>\n{info['version']}")
self.labels[f"{p}_status"].set_label(_("Invalid")) self.labels[f"{p}_status"].set_label(_("Invalid"))
self.labels[f"{p}_status"].get_style_context().add_class('invalid') self.labels[f"{p}_status"].get_style_context().add_class('invalid')
@@ -378,10 +313,6 @@ class SystemPanel(ScreenPanel):
self.labels[f"{p}_status"].get_style_context().add_class('update') self.labels[f"{p}_status"].get_style_context().add_class('update')
self.labels[f"{p}_status"].set_sensitive(True) self.labels[f"{p}_status"].set_sensitive(True)
def _autoscroll(self, *args):
adj = self.labels['update_scroll'].get_vadjustment()
adj.set_value(adj.get_upper() - adj.get_page_size())
def reboot_poweroff(self, widget, method): def reboot_poweroff(self, widget, method):
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
@@ -399,9 +330,14 @@ class SystemPanel(ScreenPanel):
{"name": _("Printer"), "response": Gtk.ResponseType.APPLY}, {"name": _("Printer"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL} {"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
] ]
self._gtk.Dialog(self._screen, buttons, scroll, self.reboot_poweroff_confirm, method) dialog = self._gtk.Dialog(self._screen, buttons, scroll, self.reboot_poweroff_confirm, method)
if method == "reboot":
dialog.set_title(_("Restart"))
else:
dialog.set_title(_("Shutdown"))
def reboot_poweroff_confirm(self, widget, response_id, method): def reboot_poweroff_confirm(self, dialog, response_id, method):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.OK: if response_id == Gtk.ResponseType.OK:
if method == "reboot": if method == "reboot":
os.system("systemctl reboot") os.system("systemctl reboot")
@@ -412,4 +348,3 @@ class SystemPanel(ScreenPanel):
self._screen._ws.send_method("machine.reboot") self._screen._ws.send_method("machine.reboot")
else: else:
self._screen._ws.send_method("machine.shutdown") self._screen._ws.send_method("machine.shutdown")
widget.destroy()
+29 -41
View File
@@ -1,12 +1,13 @@
import gi
import logging import logging
import contextlib import contextlib
import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib from gi.repository import Gtk, GLib
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
from ks_includes.widgets.graph import HeaterGraph from ks_includes.widgets.heatergraph import HeaterGraph
from ks_includes.widgets.keypad import Keypad from ks_includes.widgets.keypad import Keypad
@@ -18,8 +19,8 @@ class TemperaturePanel(ScreenPanel):
graph_update = None graph_update = None
active_heater = None active_heater = None
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, back) super().__init__(screen, title)
self.popover_timeout = None self.popover_timeout = None
self.left_panel = None self.left_panel = None
self.popover_device = None self.popover_device = None
@@ -28,7 +29,6 @@ class TemperaturePanel(ScreenPanel):
self.tempdelta = self.tempdeltas[-2] self.tempdelta = self.tempdeltas[-2]
self.show_preheat = False self.show_preheat = False
self.preheat_options = self._screen._config.get_preheat_options() self.preheat_options = self._screen._config.get_preheat_options()
logging.debug(f"Preheat options: {self.preheat_options}")
self.grid = self._gtk.HomogeneousGrid() self.grid = self._gtk.HomogeneousGrid()
self._gtk.reset_temp_color() self._gtk.reset_temp_color()
self.grid.attach(self.create_left_panel(), 0, 0, 1, 1) self.grid.attach(self.create_left_panel(), 0, 0, 1, 1)
@@ -43,7 +43,7 @@ class TemperaturePanel(ScreenPanel):
self.show_preheat = True self.show_preheat = True
selection.extend(self._printer.get_heaters()) selection.extend(self._printer.get_heaters())
else: else:
current_extruder = self._screen.printer.get_stat("toolhead", "extruder") current_extruder = self._printer.get_stat("toolhead", "extruder")
if current_extruder: if current_extruder:
selection.append(current_extruder) selection.append(current_extruder)
@@ -64,24 +64,20 @@ class TemperaturePanel(ScreenPanel):
self.grid.attach(self.create_right_panel(), 1, 0, 1, 1) self.grid.attach(self.create_right_panel(), 1, 0, 1, 1)
self.content.add(self.grid) self.content.add(self.grid)
self.layout.show_all()
def create_right_panel(self): def create_right_panel(self):
cooldown = self._gtk.Button('cool-down', _('Cooldown'), "color4", self.bts, Gtk.PositionType.LEFT, 1)
cooldown = self._gtk.ButtonImage('cool-down', _('Cooldown'), "color4", .5, Gtk.PositionType.LEFT, 1) adjust = self._gtk.Button('fine-tune', None, "color3", self.bts * 1.4, Gtk.PositionType.LEFT, 1)
adjust = self._gtk.ButtonImage('fine-tune', '', "color3", 1, Gtk.PositionType.LEFT, 1) cooldown.connect("clicked", self.set_temperature, "cooldown")
adjust.connect("clicked", self.switch_preheat_adjust)
right = self._gtk.HomogeneousGrid() right = self._gtk.HomogeneousGrid()
right.attach(cooldown, 0, 0, 2, 1) right.attach(cooldown, 0, 0, 2, 1)
right.attach(adjust, 2, 0, 1, 1) right.attach(adjust, 2, 0, 1, 1)
if self.show_preheat: if self.show_preheat:
right.attach(self.preheat(), 0, 1, 3, 4) right.attach(self.preheat(), 0, 1, 3, 3)
else: else:
right.attach(self.delta_adjust(), 0, 1, 3, 4) right.attach(self.delta_adjust(), 0, 1, 3, 3)
cooldown.connect("clicked", self.set_temperature, "cooldown")
adjust.connect("clicked", self.switch_preheat_adjust)
return right return right
def switch_preheat_adjust(self, widget): def switch_preheat_adjust(self, widget):
@@ -99,25 +95,24 @@ class TemperaturePanel(ScreenPanel):
i = 0 i = 0
for option in self.preheat_options: for option in self.preheat_options:
if option != "cooldown": if option != "cooldown":
self.labels[option] = self._gtk.Button(option, f"color{(i % 4) + 1}") self.labels[option] = self._gtk.Button(label=option, style=f"color{(i % 4) + 1}")
self.labels[option].connect("clicked", self.set_temperature, option) self.labels[option].connect("clicked", self.set_temperature, option)
self.labels['preheat_grid'].attach(self.labels[option], (i % 2), int(i / 2), 1, 1) self.labels['preheat_grid'].attach(self.labels[option], (i % 2), int(i / 2), 1, 1)
i += 1 i += 1
scroll = Gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
scroll.add(self.labels["preheat_grid"]) scroll.add(self.labels["preheat_grid"])
return scroll return scroll
def delta_adjust(self): def delta_adjust(self):
deltagrid = self._gtk.HomogeneousGrid() deltagrid = self._gtk.HomogeneousGrid()
self.labels["increase"] = self._gtk.ButtonImage("increase", _("Increase"), "color1") self.labels["increase"] = self._gtk.Button("increase", None, "color1")
self.labels["increase"].connect("clicked", self.change_target_temp_incremental, "+") self.labels["increase"].connect("clicked", self.change_target_temp_incremental, "+")
self.labels["decrease"] = self._gtk.ButtonImage("decrease", _("Decrease"), "color3") self.labels["decrease"] = self._gtk.Button("decrease", None, "color3")
self.labels["decrease"].connect("clicked", self.change_target_temp_incremental, "-") self.labels["decrease"].connect("clicked", self.change_target_temp_incremental, "-")
tempgrid = Gtk.Grid() tempgrid = Gtk.Grid()
for j, i in enumerate(self.tempdeltas): for j, i in enumerate(self.tempdeltas):
self.labels[f'deg{i}'] = self._gtk.Button(i) self.labels[f'deg{i}'] = self._gtk.Button(label=i)
self.labels[f'deg{i}'].connect("clicked", self.change_temp_delta, i) self.labels[f'deg{i}'].connect("clicked", self.change_temp_delta, i)
ctx = self.labels[f'deg{i}'].get_style_context() ctx = self.labels[f'deg{i}'].get_style_context()
if j == 0: if j == 0:
@@ -179,6 +174,8 @@ class TemperaturePanel(ScreenPanel):
logging.info(f"Setting {heater} to {target}") logging.info(f"Setting {heater} to {target}")
def update_graph_visibility(self): def update_graph_visibility(self):
if not self._printer.get_temp_store_devices():
return
count = 0 count = 0
for device in self.devices: for device in self.devices:
visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}",
@@ -193,10 +190,11 @@ class TemperaturePanel(ScreenPanel):
self.devices[device]['name'].get_style_context().add_class("graph_label_hidden") self.devices[device]['name'].get_style_context().add_class("graph_label_hidden")
self.devices[device]['name'].get_style_context().remove_class(self.devices[device]['class']) self.devices[device]['name'].get_style_context().remove_class(self.devices[device]['class'])
if count > 0: if count > 0:
self.left_panel.add(self.labels['da']) if self.labels['da'] not in self.left_panel:
self.left_panel.add(self.labels['da'])
self.labels['da'].queue_draw() self.labels['da'].queue_draw()
self.labels['da'].show() self.labels['da'].show()
else: elif self.labels['da'] in self.left_panel:
self.left_panel.remove(self.labels['da']) self.left_panel.remove(self.labels['da'])
def activate(self): def activate(self):
@@ -330,7 +328,7 @@ class TemperaturePanel(ScreenPanel):
rgb = self._gtk.get_temp_color(dev_type) rgb = self._gtk.get_temp_color(dev_type)
name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "), None, .5, Gtk.PositionType.LEFT, 1) name = self._gtk.Button(image, devname.capitalize().replace("_", " "), None, self.bts, Gtk.PositionType.LEFT, 1)
name.set_alignment(0, .5) name.set_alignment(0, .5)
visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", device, fallback=True) visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", device, fallback=True)
if visible: if visible:
@@ -338,7 +336,7 @@ class TemperaturePanel(ScreenPanel):
else: else:
name.get_style_context().add_class("graph_label_hidden") name.get_style_context().add_class("graph_label_hidden")
can_target = self._printer.get_temp_store_device_has_target(device) can_target = self._printer.device_has_target(device)
self.labels['da'].add_object(device, "temperatures", rgb, False, True) self.labels['da'].add_object(device, "temperatures", rgb, False, True)
if can_target: if can_target:
self.labels['da'].add_object(device, "targets", rgb, True, False) self.labels['da'].add_object(device, "targets", rgb, True, False)
@@ -348,7 +346,7 @@ class TemperaturePanel(ScreenPanel):
name.connect("clicked", self.toggle_visibility, device) name.connect("clicked", self.toggle_visibility, device)
self.labels['da'].set_showing(device, visible) self.labels['da'].set_showing(device, visible)
temp = self._gtk.Button("") temp = self._gtk.Button(label="", lines=1)
if can_target: if can_target:
temp.connect("clicked", self.show_numpad, device) temp.connect("clicked", self.show_numpad, device)
@@ -429,12 +427,12 @@ class TemperaturePanel(ScreenPanel):
name = Gtk.Label("") name = Gtk.Label("")
temp = Gtk.Label(_("Temp (°C)")) temp = Gtk.Label(_("Temp (°C)"))
temp.set_size_request(round(self._gtk.get_font_size() * 7.7), -1) temp.get_style_context().add_class("heater-grid-temp")
self.labels['devices'].attach(name, 0, 0, 1, 1) self.labels['devices'].attach(name, 0, 0, 1, 1)
self.labels['devices'].attach(temp, 1, 0, 1, 1) self.labels['devices'].attach(temp, 1, 0, 1, 1)
self.labels['da'] = HeaterGraph(self._printer, self._gtk.get_font_size()) self.labels['da'] = HeaterGraph(self._printer, self._gtk.font_size)
self.labels['da'].set_vexpand(True) self.labels['da'].set_vexpand(True)
scroll = self._gtk.ScrolledWindow() scroll = self._gtk.ScrolledWindow()
@@ -443,7 +441,6 @@ class TemperaturePanel(ScreenPanel):
self.left_panel = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) self.left_panel = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
self.left_panel.add(scroll) self.left_panel.add(scroll)
self.left_panel.add(self.labels['da'])
self.labels['graph_settemp'] = self._gtk.Button(label=_("Set Temp")) self.labels['graph_settemp'] = self._gtk.Button(label=_("Set Temp"))
self.labels['graph_settemp'].connect("clicked", self.show_numpad) self.labels['graph_settemp'].connect("clicked", self.show_numpad)
@@ -459,7 +456,7 @@ class TemperaturePanel(ScreenPanel):
popover.connect('closed', self.popover_closed) popover.connect('closed', self.popover_closed)
self.labels['popover'] = popover self.labels['popover'] = popover
for d in self._printer.get_temp_store_devices(): for d in (self._printer.get_tools() + self._printer.get_heaters()):
self.add_device(d) self.add_device(d)
return self.left_panel return self.left_panel
@@ -505,22 +502,13 @@ class TemperaturePanel(ScreenPanel):
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_status_update": if action != "notify_status_update":
return return
for x in (self._printer.get_tools() + self._printer.get_heaters()):
for x in self._printer.get_tools():
self.update_temp( self.update_temp(
x, x,
self._printer.get_dev_stat(x, "temperature"), 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._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
def show_numpad(self, widget, device=None): def show_numpad(self, widget, device=None):
for d in self.active_heaters: for d in self.active_heaters:
+91 -96
View File
@@ -14,20 +14,17 @@ def create_panel(*args):
class ZCalibratePanel(ScreenPanel): class ZCalibratePanel(ScreenPanel):
_screen = None
widgets = {} widgets = {}
distances = ['.01', '.05', '.1', '.5', '1', '5'] distances = ['.01', '.05', '.1', '.5', '1', '5']
distance = distances[-2] distance = distances[-2]
probe_types = ["probe", "bltouch", "smart_effector", "dockable_probe"]
def __init__(self, screen, title, back=True): def __init__(self, screen, title):
super().__init__(screen, title, False) super().__init__(screen, title)
self.z_offset = None self.z_offset = None
for probe_type in self.probe_types: self.probe = self._printer.get_probe()
if self._printer.config_section_exists(probe_type): if self.probe:
self.z_offset = float(self._screen.printer.get_config_section(probe_type)['z_offset']) self.z_offset = float(self.probe['z_offset'])
logging.info(f"Using: {probe_type} Z offset: {self.z_offset}") logging.info(f"Z offset: {self.z_offset}")
break
self.widgets['zposition'] = Gtk.Label("Z: ?") self.widgets['zposition'] = Gtk.Label("Z: ?")
pos = self._gtk.HomogeneousGrid() pos = self._gtk.HomogeneousGrid()
@@ -39,33 +36,32 @@ class ZCalibratePanel(ScreenPanel):
pos.attach(Gtk.Label(_("New")), 1, 3, 1, 1) pos.attach(Gtk.Label(_("New")), 1, 3, 1, 1)
pos.attach(Gtk.Label(f"{self.z_offset:.2f}"), 0, 4, 1, 1) pos.attach(Gtk.Label(f"{self.z_offset:.2f}"), 0, 4, 1, 1)
pos.attach(self.widgets['zoffset'], 1, 4, 1, 1) pos.attach(self.widgets['zoffset'], 1, 4, 1, 1)
self.buttons = {
self.widgets['zpos'] = self._gtk.ButtonImage('z-farther', _("Raise Nozzle"), 'color4') 'zpos': self._gtk.Button('z-farther', _("Raise Nozzle"), 'color4'),
self.widgets['zpos'].connect("clicked", self.move, "+") 'zneg': self._gtk.Button('z-closer', _("Lower Nozzle"), 'color1'),
self.widgets['zneg'] = self._gtk.ButtonImage('z-closer', _("Lower Nozzle"), 'color1') 'start': self._gtk.Button('resume', _("Start"), 'color3'),
self.widgets['zneg'].connect("clicked", self.move, "-") 'complete': self._gtk.Button('complete', _('Accept'), 'color3'),
self.widgets['start'] = self._gtk.ButtonImage('resume', _("Start"), 'color3') 'cancel': self._gtk.Button('cancel', _('Abort'), 'color2'),
self.widgets['complete'] = self._gtk.ButtonImage('complete', _('Accept'), 'color3') }
self.widgets['complete'].connect("clicked", self.accept) self.buttons['zpos'].connect("clicked", self.move, "+")
self.widgets['cancel'] = self._gtk.ButtonImage('cancel', _('Abort'), 'color2') self.buttons['zneg'].connect("clicked", self.move, "-")
self.widgets['cancel'].connect("clicked", self.abort) self.buttons['complete'].connect("clicked", self.accept)
self.buttons['cancel'].connect("clicked", self.abort)
functions = [] functions = []
pobox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) pobox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
if self._printer.config_section_exists("stepper_z") \ if self._printer.config_section_exists("stepper_z") \
and not self._screen.printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"): and not self._printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"):
self._add_button("Endstop", "endstop", pobox) self._add_button("Endstop", "endstop", pobox)
functions.append("endstop") functions.append("endstop")
for probe_type in self.probe_types: if self.probe:
if self._printer.config_section_exists(probe_type): self._add_button("Probe", "probe", pobox)
self._add_button("Probe", "probe", pobox) functions.append("probe")
functions.append("probe")
break
if self._printer.config_section_exists("bed_mesh") and "probe" not in functions: if self._printer.config_section_exists("bed_mesh") and "probe" not in functions:
# This is used to do a manual bed mesh if there is no probe # This is used to do a manual bed mesh if there is no probe
self._add_button("Bed mesh", "mesh", pobox) self._add_button("Bed mesh", "mesh", pobox)
functions.append("mesh") functions.append("mesh")
if "delta" in self._screen.printer.get_config_section("printer")['kinematics']: if "delta" in self._printer.get_config_section("printer")['kinematics']:
if "probe" in functions: if "probe" in functions:
self._add_button("Delta Automatic", "delta", pobox) self._add_button("Delta Automatic", "delta", pobox)
functions.append("delta") functions.append("delta")
@@ -80,13 +76,13 @@ class ZCalibratePanel(ScreenPanel):
self.labels['popover'].set_position(Gtk.PositionType.BOTTOM) self.labels['popover'].set_position(Gtk.PositionType.BOTTOM)
if len(functions) > 1: if len(functions) > 1:
self.widgets['start'].connect("clicked", self.on_popover_clicked) self.buttons['start'].connect("clicked", self.on_popover_clicked)
else: else:
self.widgets['start'].connect("clicked", self.start_calibration, functions[0]) self.buttons['start'].connect("clicked", self.start_calibration, functions[0])
distgrid = Gtk.Grid() distgrid = Gtk.Grid()
for j, i in enumerate(self.distances): for j, i in enumerate(self.distances):
self.widgets[i] = self._gtk.Button(i) self.widgets[i] = self._gtk.Button(label=i)
self.widgets[i].set_direction(Gtk.TextDirection.LTR) self.widgets[i].set_direction(Gtk.TextDirection.LTR)
self.widgets[i].connect("clicked", self.change_distance, i) self.widgets[i].connect("clicked", self.change_distance, i)
ctx = self.widgets[i].get_style_context() ctx = self.widgets[i].get_style_context()
@@ -108,22 +104,21 @@ class ZCalibratePanel(ScreenPanel):
grid = Gtk.Grid() grid = Gtk.Grid()
grid.set_column_homogeneous(True) grid.set_column_homogeneous(True)
if self._screen.vertical_mode: if self._screen.vertical_mode:
grid.attach(self.widgets['zpos'], 0, 1, 1, 1) grid.attach(self.buttons['zpos'], 0, 1, 1, 1)
grid.attach(self.widgets['zneg'], 0, 2, 1, 1) grid.attach(self.buttons['zneg'], 0, 2, 1, 1)
grid.attach(self.widgets['start'], 0, 0, 1, 1) grid.attach(self.buttons['start'], 0, 0, 1, 1)
grid.attach(pos, 1, 0, 1, 1) grid.attach(pos, 1, 0, 1, 1)
grid.attach(self.widgets['complete'], 1, 1, 1, 1) grid.attach(self.buttons['complete'], 1, 1, 1, 1)
grid.attach(self.widgets['cancel'], 1, 2, 1, 1) grid.attach(self.buttons['cancel'], 1, 2, 1, 1)
grid.attach(distances, 0, 3, 2, 1) grid.attach(distances, 0, 3, 2, 1)
else: else:
grid.attach(self.widgets['zpos'], 0, 0, 1, 1) grid.attach(self.buttons['zpos'], 0, 0, 1, 1)
grid.attach(self.widgets['zneg'], 0, 1, 1, 1) grid.attach(self.buttons['zneg'], 0, 1, 1, 1)
grid.attach(self.widgets['start'], 1, 0, 1, 1) grid.attach(self.buttons['start'], 1, 0, 1, 1)
grid.attach(pos, 1, 1, 1, 1) grid.attach(pos, 1, 1, 1, 1)
grid.attach(self.widgets['complete'], 2, 0, 1, 1) grid.attach(self.buttons['complete'], 2, 0, 1, 1)
grid.attach(self.widgets['cancel'], 2, 1, 1, 1) grid.attach(self.buttons['cancel'], 2, 1, 1, 1)
grid.attach(distances, 0, 2, 3, 1) grid.attach(distances, 0, 2, 3, 1)
self.buttons_not_calibrating()
self.content.add(grid) self.content.add(grid)
def _add_button(self, label, method, pobox): def _add_button(self, label, method, pobox):
@@ -137,7 +132,7 @@ class ZCalibratePanel(ScreenPanel):
def start_calibration(self, widget, method): def start_calibration(self, widget, method):
self.labels['popover'].popdown() self.labels['popover'].popdown()
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME) self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
if method == "probe": if method == "probe":
@@ -156,27 +151,23 @@ class ZCalibratePanel(ScreenPanel):
x_position = y_position = None x_position = y_position = None
z_hop = speed = None z_hop = speed = None
# Get position from config # Get position from config
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) if self.ks_printer_cfg is not None:
if printer_cfg is not None: x_position = self.ks_printer_cfg.getfloat("calibrate_x_position", None)
x_position = printer_cfg.getfloat("calibrate_x_position", None) y_position = self.ks_printer_cfg.getfloat("calibrate_y_position", None)
y_position = printer_cfg.getfloat("calibrate_y_position", None)
elif 'z_calibrate_position' in self._config.get_config(): elif 'z_calibrate_position' in self._config.get_config():
# OLD global way, this should be deprecated # OLD global way, this should be deprecated
x_position = self._config.get_config()['z_calibrate_position'].getfloat("calibrate_x_position", None) x_position = self._config.get_config()['z_calibrate_position'].getfloat("calibrate_x_position", None)
y_position = self._config.get_config()['z_calibrate_position'].getfloat("calibrate_y_position", None) y_position = self._config.get_config()['z_calibrate_position'].getfloat("calibrate_y_position", None)
klipper_cfg = self._screen.printer.get_config_section_list() if self.probe:
for probe_type in self.probe_types: if "sample_retract_dist" in self.probe:
if probe_type in klipper_cfg: z_hop = self.probe['sample_retract_dist']
probe = self._screen.printer.get_config_section(probe_type) if "speed" in self.probe:
if "sample_retract_dist" in probe: speed = self.probe['speed']
z_hop = probe['sample_retract_dist']
if "speed" in probe:
speed = probe['speed']
# Use safe_z_home position # Use safe_z_home position
if "safe_z_home" in self._screen.printer.get_config_section_list(): if "safe_z_home" in self._printer.get_config_section_list():
safe_z = self._screen.printer.get_config_section("safe_z_home") safe_z = self._printer.get_config_section("safe_z_home")
safe_z_xy = safe_z['home_xy_position'] safe_z_xy = safe_z['home_xy_position']
safe_z_xy = [str(i.strip()) for i in safe_z_xy.split(',')] safe_z_xy = [str(i.strip()) for i in safe_z_xy.split(',')]
if x_position is None: if x_position is None:
@@ -192,22 +183,24 @@ class ZCalibratePanel(ScreenPanel):
speed = 15 if speed is None else speed speed = 15 if speed is None else speed
z_hop = 5 if z_hop is None else z_hop z_hop = 5 if z_hop is None else z_hop
self._screen._ws.klippy.gcode_script(f"G0 Z{z_hop} F{float(speed) * 60}") self._screen._ws.klippy.gcode_script(f"G91\nG0 Z{z_hop} F{float(speed) * 60}")
if self._printer.get_stat("gcode_move", "absolute_coordinates"):
self._screen._ws.klippy.gcode_script("G90")
if x_position is not None and y_position is not None: if x_position is not None and y_position is not None:
logging.debug(f"Configured probing position X: {x_position} Y: {y_position}") logging.debug(f"Configured probing position X: {x_position} Y: {y_position}")
self._screen._ws.klippy.gcode_script(f'G0 X{x_position} Y{y_position} F3000') self._screen._ws.klippy.gcode_script(f'G0 X{x_position} Y{y_position} F3000')
elif "delta" in self._screen.printer.get_config_section("printer")['kinematics']: elif "delta" in self._printer.get_config_section("printer")['kinematics']:
logging.info("Detected delta kinematics calibrating at 0,0") logging.info("Detected delta kinematics calibrating at 0,0")
self._screen._ws.klippy.gcode_script('G0 X0 Y0 F3000') self._screen._ws.klippy.gcode_script('G0 X0 Y0 F3000')
else: else:
self._calculate_position(klipper_cfg) self._calculate_position()
def _calculate_position(self, klipper_cfg): def _calculate_position(self):
logging.debug("Position not configured, probing the middle of the bed") logging.debug("Position not configured, probing the middle of the bed")
try: try:
xmax = float(self._screen.printer.get_config_section("stepper_x")['position_max']) xmax = float(self._printer.get_config_section("stepper_x")['position_max'])
ymax = float(self._screen.printer.get_config_section("stepper_y")['position_max']) ymax = float(self._printer.get_config_section("stepper_y")['position_max'])
except KeyError: except KeyError:
logging.error("Couldn't get max position from stepper_x and stepper_y") logging.error("Couldn't get max position from stepper_x and stepper_y")
return return
@@ -217,14 +210,11 @@ class ZCalibratePanel(ScreenPanel):
# Find probe offset # Find probe offset
x_offset = y_offset = None x_offset = y_offset = None
for probe_type in self.probe_types: if self.probe:
if probe_type in klipper_cfg: if "x_offset" in self.probe:
probe = self._screen.printer.get_config_section(probe_type) x_offset = float(self.probe['x_offset'])
if "x_offset" in probe: if "y_offset" in self.probe:
x_offset = float(probe['x_offset']) y_offset = float(self.probe['y_offset'])
if "y_offset" in probe:
y_offset = float(probe['y_offset'])
break
logging.info(f"Offset X:{x_offset} Y:{y_offset}") logging.info(f"Offset X:{x_offset} Y:{y_offset}")
if x_offset is not None: if x_offset is not None:
x_position = x_position - x_offset x_position = x_position - x_offset
@@ -234,13 +224,19 @@ class ZCalibratePanel(ScreenPanel):
logging.info(f"Moving to X:{x_position} Y:{y_position}") logging.info(f"Moving to X:{x_position} Y:{y_position}")
self._screen._ws.klippy.gcode_script(f'G0 X{x_position} Y{y_position} F3000') self._screen._ws.klippy.gcode_script(f'G0 X{x_position} Y{y_position} F3000')
def process_update(self, action, data): def process_busy(self, busy):
for button in self.buttons:
self.buttons[button].set_sensitive(not busy)
def process_update(self, action, data):
if action == "notify_busy":
self.process_busy(data)
return
if action == "notify_status_update": if action == "notify_status_update":
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if self._printer.get_stat("toolhead", "homed_axes") != "xyz":
self.widgets['zposition'].set_text("Z: ?") self.widgets['zposition'].set_text("Z: ?")
elif "toolhead" in data and "position" in data['toolhead']: elif "gcode_move" in data and "gcode_position" in data['gcode_move']:
self.update_position(data['toolhead']['position']) self.update_position(data['gcode_move']['gcode_position'])
elif action == "notify_gcode_response": elif action == "notify_gcode_response":
data = data.lower() data = data.lower()
if "unknown" in data: if "unknown" in data:
@@ -248,7 +244,6 @@ class ZCalibratePanel(ScreenPanel):
logging.info(data) logging.info(data)
elif "save_config" in data: elif "save_config" in data:
self.buttons_not_calibrating() self.buttons_not_calibrating()
self._screen.show_popup_message(_("Calibrated, save configuration to make it permanent"), level=1)
elif "out of range" in data: elif "out of range" in data:
self._screen.show_popup_message(data) self._screen.show_popup_message(data)
self.buttons_not_calibrating() self.buttons_not_calibrating()
@@ -264,7 +259,7 @@ class ZCalibratePanel(ScreenPanel):
def update_position(self, position): def update_position(self, position):
self.widgets['zposition'].set_text(f"Z: {position[2]:.2f}") self.widgets['zposition'].set_text(f"Z: {position[2]:.2f}")
if self.z_offset is not None: if self.z_offset is not None:
self.widgets['zoffset'].set_text(f"{-position[2] + self.z_offset:.2f}") self.widgets['zoffset'].set_text(f"{position[2] - self.z_offset:.2f}")
def change_distance(self, widget, distance): def change_distance(self, widget, distance):
logging.info(f"### Distance {distance}") logging.info(f"### Distance {distance}")
@@ -279,37 +274,37 @@ class ZCalibratePanel(ScreenPanel):
logging.info("Aborting calibration") logging.info("Aborting calibration")
self._screen._ws.klippy.gcode_script(KlippyGcodes.ABORT) self._screen._ws.klippy.gcode_script(KlippyGcodes.ABORT)
self.buttons_not_calibrating() self.buttons_not_calibrating()
self.menu_return(widget) self._screen._menu_go_back()
def accept(self, widget): def accept(self, widget):
logging.info("Accepting Z position") logging.info("Accepting Z position")
self._screen._ws.klippy.gcode_script(KlippyGcodes.ACCEPT) self._screen._ws.klippy.gcode_script(KlippyGcodes.ACCEPT)
def buttons_calibrating(self): def buttons_calibrating(self):
self.widgets['start'].get_style_context().remove_class('color3') self.buttons['start'].get_style_context().remove_class('color3')
self.widgets['start'].set_sensitive(False) self.buttons['start'].set_sensitive(False)
self.widgets['zpos'].set_sensitive(True) self.buttons['zpos'].set_sensitive(True)
self.widgets['zpos'].get_style_context().add_class('color4') self.buttons['zpos'].get_style_context().add_class('color4')
self.widgets['zneg'].set_sensitive(True) self.buttons['zneg'].set_sensitive(True)
self.widgets['zneg'].get_style_context().add_class('color1') self.buttons['zneg'].get_style_context().add_class('color1')
self.widgets['complete'].set_sensitive(True) self.buttons['complete'].set_sensitive(True)
self.widgets['complete'].get_style_context().add_class('color3') self.buttons['complete'].get_style_context().add_class('color3')
self.widgets['cancel'].set_sensitive(True) self.buttons['cancel'].set_sensitive(True)
self.widgets['cancel'].get_style_context().add_class('color2') self.buttons['cancel'].get_style_context().add_class('color2')
def buttons_not_calibrating(self): def buttons_not_calibrating(self):
self.widgets['start'].get_style_context().add_class('color3') self.buttons['start'].get_style_context().add_class('color3')
self.widgets['start'].set_sensitive(True) self.buttons['start'].set_sensitive(True)
self.widgets['zpos'].set_sensitive(False) self.buttons['zpos'].set_sensitive(False)
self.widgets['zpos'].get_style_context().remove_class('color4') self.buttons['zpos'].get_style_context().remove_class('color4')
self.widgets['zneg'].set_sensitive(False) self.buttons['zneg'].set_sensitive(False)
self.widgets['zneg'].get_style_context().remove_class('color1') self.buttons['zneg'].get_style_context().remove_class('color1')
self.widgets['complete'].set_sensitive(False) self.buttons['complete'].set_sensitive(False)
self.widgets['complete'].get_style_context().remove_class('color3') self.buttons['complete'].get_style_context().remove_class('color3')
self.widgets['cancel'].set_sensitive(False) self.buttons['cancel'].set_sensitive(False)
self.widgets['cancel'].get_style_context().remove_class('color2') self.buttons['cancel'].get_style_context().remove_class('color2')
def activate(self): def activate(self):
# This is only here because klipper doesn't provide a method to detect if it's calibrating # This is only here because klipper doesn't provide a method to detect if it's calibrating
Regular → Executable
+309 -281
View File
@@ -1,21 +1,22 @@
#!/usr/bin/python #!/usr/bin/python
import argparse import argparse
import gi
import json import json
import importlib
import logging import logging
import os import os
import signal
import subprocess import subprocess
import pathlib import pathlib
import traceback # noqa import traceback # noqa
import locale
import sys
import gi
import tracemalloc
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib, Pango from gi.repository import Gtk, Gdk, GLib, Pango
from importlib import import_module
from jinja2 import Environment from jinja2 import Environment
from signal import SIGTERM
from ks_includes import functions from ks_includes import functions
from ks_includes.KlippyWebsocket import KlippyWebsocket from ks_includes.KlippyWebsocket import KlippyWebsocket
@@ -52,10 +53,10 @@ klipperscreendir = pathlib.Path(__file__).parent.resolve()
def set_text_direction(lang=None): def set_text_direction(lang=None):
rtl_languages = ['he_IL'] rtl_languages = ['he']
if lang is None: if lang is None:
for lng in rtl_languages: for lng in rtl_languages:
if os.getenv('LANG').startswith(lng): if locale.getdefaultlocale()[0].startswith(lng):
lang = lng lang = lng
break break
if lang in rtl_languages: if lang in rtl_languages:
@@ -66,6 +67,10 @@ def set_text_direction(lang=None):
return True return True
def state_execute(callback):
callback()
class KlipperScreen(Gtk.Window): class KlipperScreen(Gtk.Window):
""" Class for creating a screen for Klipper via HDMI """ """ Class for creating a screen for Klipper via HDMI """
_cur_panels = [] _cur_panels = []
@@ -78,16 +83,24 @@ class KlipperScreen(Gtk.Window):
panels = {} panels = {}
popup_message = None popup_message = None
screensaver = None screensaver = None
printer = None printers = printer = None
subscriptions = [] subscriptions = []
updating = False updating = False
update_queue = []
_ws = None _ws = None
dpms_timeout = None
screensaver_timeout = None screensaver_timeout = None
reinit_count = 0 reinit_count = 0
max_retries = 4
initialized = False
initial_snapshot = None
switch_count = 0
def __init__(self, args, version): def __init__(self, args, version):
tracemalloc.start()
try:
super().__init__(title="KlipperScreen")
except Exception as e:
logging.exception(e)
raise RuntimeError from e
self.blanking_time = 600 self.blanking_time = 600
self.use_dpms = True self.use_dpms = True
self.apiclient = None self.apiclient = None
@@ -100,28 +113,32 @@ class KlipperScreen(Gtk.Window):
self._config = KlipperScreenConfig(configfile, self) self._config = KlipperScreenConfig(configfile, self)
self.lang_ltr = set_text_direction(self._config.get_main_config().get("language", None)) self.lang_ltr = set_text_direction(self._config.get_main_config().get("language", None))
Gtk.Window.__init__(self) self.connect("key-press-event", self._key_press_event)
self.set_title("KlipperScreen") self.connect("configure_event", self.update_size)
monitor = Gdk.Display.get_default().get_primary_monitor() monitor = Gdk.Display.get_default().get_primary_monitor()
if monitor is None:
monitor = Gdk.Display.get_default().get_monitor(0)
if monitor is None:
raise RuntimeError("Couldn't get default monitor")
self.width = self._config.get_main_config().getint("width", monitor.get_geometry().width) self.width = self._config.get_main_config().getint("width", monitor.get_geometry().width)
self.height = self._config.get_main_config().getint("height", monitor.get_geometry().height) self.height = self._config.get_main_config().getint("height", monitor.get_geometry().height)
self.set_default_size(self.width, self.height) self.set_default_size(self.width, self.height)
self.set_resizable(False) self.set_resizable(True)
if not (self._config.get_main_config().get("width") or self._config.get_main_config().get("height")): if not (self._config.get_main_config().get("width") or self._config.get_main_config().get("height")):
self.fullscreen() self.fullscreen()
self.vertical_mode = self.width < self.height self.aspect_ratio = self.width / self.height
self.vertical_mode = self.aspect_ratio < 1.0
logging.info(f"Screen resolution: {self.width}x{self.height}") logging.info(f"Screen resolution: {self.width}x{self.height}")
self.theme = self._config.get_main_config().get('theme') self.theme = self._config.get_main_config().get('theme')
show_cursor = self._config.get_main_config().getboolean("show_cursor", fallback=False) self.show_cursor = self._config.get_main_config().getboolean("show_cursor", fallback=False)
self.gtk = KlippyGtk(self, self.width, self.height, self.theme, show_cursor, self.gtk = KlippyGtk(self)
self._config.get_main_config().get("font_size", "medium"))
self.init_style() self.init_style()
self.set_icon_from_file(os.path.join(klipperscreendir, "styles", "icon.svg")) self.set_icon_from_file(os.path.join(klipperscreendir, "styles", "icon.svg"))
self.base_panel = BasePanel(self, title="Base Panel", back=False) self.base_panel = BasePanel(self, title="Base Panel")
self.add(self.base_panel.get()) self.add(self.base_panel.main_grid)
self.show_all() self.show_all()
if show_cursor: if self.show_cursor:
self.get_window().set_cursor( self.get_window().set_cursor(
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.ARROW)) Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.ARROW))
os.system("xsetroot -cursor_name arrow") os.system("xsetroot -cursor_name arrow")
@@ -139,13 +156,24 @@ class KlipperScreen(Gtk.Window):
self.initial_connection() self.initial_connection()
def initial_connection(self): def initial_connection(self):
printers = self._config.get_printers() self.printers = self._config.get_printers()
state_callbacks = {
"disconnected": self.state_disconnected,
"error": self.state_error,
"paused": self.state_paused,
"printing": self.state_printing,
"ready": self.state_ready,
"startup": self.state_startup,
"shutdown": self.state_shutdown
}
for printer in self.printers:
printer["data"] = Printer(state_execute, state_callbacks, self.process_busy_state)
default_printer = self._config.get_main_config().get('default_printer') default_printer = self._config.get_main_config().get('default_printer')
logging.debug(f"Default printer: {default_printer}") logging.debug(f"Default printer: {default_printer}")
if [True for p in printers if default_printer in p]: if [True for p in self.printers if default_printer in p]:
self.connect_printer(default_printer) self.connect_printer(default_printer)
elif len(printers) == 1: elif len(self.printers) == 1:
pname = list(printers[0])[0] pname = list(self.printers[0])[0]
self.connect_printer(pname) self.connect_printer(pname)
else: else:
self.base_panel.show_printer_select(True) self.base_panel.show_printer_select(True)
@@ -155,35 +183,29 @@ class KlipperScreen(Gtk.Window):
self.connecting_to_printer = name self.connecting_to_printer = name
if self._ws is not None and self._ws.connected: if self._ws is not None and self._ws.connected:
self._ws.close() self._ws.close()
return self.connected_printer = None
self.printer.state = "disconnected"
if self.files:
self.files.reset()
self.files = None
data = { self.connecting = True
"moonraker_host": "127.0.0.1", self.initialized = False
"moonraker_port": "7125",
"moonraker_api_key": False
}
logging.info(f"Connecting to printer: {name}") logging.info(f"Connecting to printer: {name}")
for printer in self._config.get_printers(): for printer in self.printers:
pname = list(printer)[0] if name == list(printer)[0]:
if pname != name: ind = self.printers.index(printer)
continue break
data = printer[pname]
break
self.apiclient = KlippyRest(data["moonraker_host"], data["moonraker_port"], data["moonraker_api_key"]) self.printer = self.printers[ind]["data"]
self.printer = Printer(self.state_execute) self.apiclient = KlippyRest(
self.printer.state_callbacks = { self.printers[ind][name]["moonraker_host"],
"disconnected": self.state_disconnected, self.printers[ind][name]["moonraker_port"],
"error": self.state_error, self.printers[ind][name]["moonraker_api_key"],
"paused": self.state_paused, )
"printing": self.state_printing,
"ready": self.state_ready, self.printer_initializing(_("Connecting to %s") % name, remove=True)
"startup": self.state_startup,
"shutdown": self.state_shutdown
}
self._remove_all_panels()
self.printer_initializing(_("Connecting to %s") % name)
self._ws = KlippyWebsocket(self, self._ws = KlippyWebsocket(self,
{ {
@@ -191,13 +213,30 @@ class KlipperScreen(Gtk.Window):
"on_message": self._websocket_callback, "on_message": self._websocket_callback,
"on_close": self.websocket_disconnected "on_close": self.websocket_disconnected
}, },
data["moonraker_host"], self.printers[ind][name]["moonraker_host"],
data["moonraker_port"] self.printers[ind][name]["moonraker_port"],
) )
self.files = KlippyFiles(self) self.files = KlippyFiles(self)
self._ws.initial_connect() self._ws.initial_connect()
def memory_trace(self):
snapshot = tracemalloc.take_snapshot()
snapshot = snapshot.filter_traces((
tracemalloc.Filter(False, "<frozen importlib._bootstrap_external>"),
tracemalloc.Filter(False, "<unknown>"),
tracemalloc.Filter(False, tracemalloc.__file__),
))
if self.initial_snapshot is None:
self.initial_snapshot = snapshot
logging.debug("[ Initial memory snapshot ]")
else:
self.switch_count += 1
logging.debug("[ Top 10 memory diffs (Shown: %d times)]", self.switch_count)
top_stats = snapshot.compare_to(self.initial_snapshot, 'lineno')
for stat in top_stats[:10]:
logging.debug(stat)
def ws_subscribe(self): def ws_subscribe(self):
requested_updates = { requested_updates = {
"objects": { "objects": {
@@ -242,7 +281,7 @@ class KlipperScreen(Gtk.Window):
logging.error(f"Panel {panel} does not exist") logging.error(f"Panel {panel} does not exist")
raise FileNotFoundError(os.strerror(2), "\n" + panel_path) raise FileNotFoundError(os.strerror(2), "\n" + panel_path)
module = importlib.import_module(f"panels.{panel}") module = import_module(f"panels.{panel}")
if not hasattr(module, "create_panel"): if not hasattr(module, "create_panel"):
raise ImportError(f"Cannot locate create_panel function for {panel}") raise ImportError(f"Cannot locate create_panel function for {panel}")
self.load_panel[panel] = getattr(module, "create_panel") self.load_panel[panel] = getattr(module, "create_panel")
@@ -250,6 +289,7 @@ class KlipperScreen(Gtk.Window):
try: try:
return self.load_panel[panel](*args) return self.load_panel[panel](*args)
except Exception as e: except Exception as e:
logging.exception(e)
raise RuntimeError(f"Unable to create panel: {panel}\n{e}") from e raise RuntimeError(f"Unable to create panel: {panel}\n{e}") from e
def show_panel(self, panel_name, panel_type, title, remove=None, pop=True, **kwargs): def show_panel(self, panel_name, panel_type, title, remove=None, pop=True, **kwargs):
@@ -267,26 +307,24 @@ class KlipperScreen(Gtk.Window):
except Exception as e: except Exception as e:
if panel_name in self.panels: if panel_name in self.panels:
del self.panels[panel_name] del self.panels[panel_name]
logging.exception(f"Unable to load panel {panel_type}")
self.show_error_modal(f"Unable to load panel {panel_type}", f"{e}") self.show_error_modal(f"Unable to load panel {panel_type}", f"{e}")
return return
self._cur_panels.append(panel_name)
logging.debug(f"Attaching panel {panel_name}") self.attach_panel(panel_name)
self.base_panel.add_content(self.panels[panel_name])
self.base_panel.show_back(len(self._cur_panels) > 0)
self.show_all()
if hasattr(self.panels[panel_name], "process_update"):
self.add_subscription(panel_name)
if hasattr(self.panels[panel_name], "activate"):
self.panels[panel_name].activate()
self.show_all()
except Exception as e: except Exception as e:
logging.exception(f"Error attaching panel:\n{e}") logging.exception(f"Error attaching panel:\n{e}")
self._cur_panels.append(panel_name) def attach_panel(self, panel_name):
self.base_panel.add_content(self.panels[panel_name])
logging.debug(f"Current panel hierarchy: {' > '.join(self._cur_panels)}") logging.debug(f"Current panel hierarchy: {' > '.join(self._cur_panels)}")
self.base_panel.show_back(len(self._cur_panels) > 1)
if hasattr(self.panels[panel_name], "process_update"):
self.add_subscription(panel_name)
self.process_update("notify_status_update", self.printer.data)
self.process_update("notify_busy", self.printer.busy)
if hasattr(self.panels[panel_name], "activate"):
self.panels[panel_name].activate()
self.show_all()
def show_popup_message(self, message, level=3): def show_popup_message(self, message, level=3):
self.close_screensaver() self.close_screensaver()
@@ -298,33 +336,25 @@ class KlipperScreen(Gtk.Window):
msg.set_vexpand(True) msg.set_vexpand(True)
msg.get_child().set_line_wrap(True) msg.get_child().set_line_wrap(True)
msg.get_child().set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) msg.get_child().set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
msg.get_child().set_max_width_chars(40)
msg.connect("clicked", self.close_popup_message) msg.connect("clicked", self.close_popup_message)
msg.get_style_context().add_class("message_popup")
close = Gtk.Button(label="<b><big>X</big></b>")
close.set_hexpand(False)
close.set_vexpand(True)
close.get_child().set_use_markup(True)
close.set_can_focus(False)
close.connect("clicked", self.close_popup_message)
box = Gtk.Box()
box.set_size_request(self.width, -1)
box.set_halign(Gtk.Align.CENTER)
box.get_style_context().add_class("message_popup")
if level == 1: if level == 1:
box.get_style_context().add_class("message_popup_echo") msg.get_style_context().add_class("message_popup_echo")
elif level == 2: elif level == 2:
box.get_style_context().add_class("message_popup_warning") msg.get_style_context().add_class("message_popup_warning")
else: else:
box.get_style_context().add_class("message_popup_error") msg.get_style_context().add_class("message_popup_error")
box.add(msg) popup = Gtk.Popover.new(self.base_panel.titlebar)
box.add(close) popup.get_style_context().add_class("message_popup_popover")
popup.set_size_request(self.width * .9, -1)
popup.set_halign(Gtk.Align.CENTER)
popup.add(msg)
popup.popup()
self.base_panel.get().put(box, 0, 0) self.popup_message = popup
self.popup_message.show_all()
self.show_all()
self.popup_message = box
if self._config.get_main_config().getboolean('autoclose_popups', True): if self._config.get_main_config().getboolean('autoclose_popups', True):
GLib.timeout_add_seconds(10, self.close_popup_message) GLib.timeout_add_seconds(10, self.close_popup_message)
@@ -334,12 +364,11 @@ class KlipperScreen(Gtk.Window):
def close_popup_message(self, widget=None): def close_popup_message(self, widget=None):
if self.popup_message is None: if self.popup_message is None:
return return
self.popup_message.popdown()
self.base_panel.get().remove(self.popup_message)
self.popup_message = None self.popup_message = None
def show_error_modal(self, err, e=""): def show_error_modal(self, err, e=""):
logging.error(f"Showing error modal: {err}") logging.error(f"Showing error modal: {err} {e}")
title = Gtk.Label() title = Gtk.Label()
title.set_markup(f"<b>{err}</b>\n") title.set_markup(f"<b>{err}</b>\n")
@@ -356,7 +385,9 @@ class KlipperScreen(Gtk.Window):
scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
scroll.add(message) scroll.add(message)
help_notice = Gtk.Label(label="Provide /tmp/KlipperScreen.log when asking for help.\n") help_msg = _("Provide KlipperScreen.log when asking for help.\n")
help_msg += _("KlipperScreen will reboot")
help_notice = Gtk.Label(label=help_msg)
help_notice.set_line_wrap(True) help_notice.set_line_wrap(True)
grid = Gtk.Grid() grid = Gtk.Grid()
@@ -369,38 +400,22 @@ class KlipperScreen(Gtk.Window):
buttons = [ buttons = [
{"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL} {"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL}
] ]
self.gtk.Dialog(self, buttons, grid, self.error_modal_response) dialog = self.gtk.Dialog(self, buttons, grid, self.error_modal_response)
dialog.set_title(_("Error"))
def error_modal_response(self, widget, response_id): def error_modal_response(self, dialog, response_id):
widget.destroy() self.gtk.remove_dialog(dialog)
self.reload_panels() self.restart_ks()
def restart_warning(self, value): def restart_ks(self, *args):
logging.debug(f"Showing restart warning because: {value}") logging.debug(f"Restarting {sys.executable} {' '.join(sys.argv)}")
os.execv(sys.executable, ['python'] + sys.argv)
buttons = [ self._ws.send_method("machine.services.restart", {"service": "KlipperScreen"}) # Fallback
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL},
{"name": _("Restart"), "response": Gtk.ResponseType.OK}
]
label = Gtk.Label()
label.set_markup(_("To apply %s KlipperScreen needs to be restarted") % value)
label.set_hexpand(True)
label.set_halign(Gtk.Align.CENTER)
label.set_vexpand(True)
label.set_valign(Gtk.Align.CENTER)
label.set_line_wrap(True)
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self.gtk.Dialog(self, buttons, label, self.restart_ks)
def restart_ks(self, widget, response_id):
if response_id == Gtk.ResponseType.OK:
logging.debug("Restarting")
self._ws.send_method("machine.services.restart", {"service": "KlipperScreen"})
widget.destroy()
def init_style(self): def init_style(self):
settings = Gtk.Settings.get_default()
settings.set_property("gtk-theme-name", "Adwaita")
settings.set_property("gtk-application-prefer-dark-theme", False)
css_data = pathlib.Path(os.path.join(klipperscreendir, "styles", "base.css")).read_text() css_data = pathlib.Path(os.path.join(klipperscreendir, "styles", "base.css")).read_text()
with open(os.path.join(klipperscreendir, "styles", "base.conf")) as f: with open(os.path.join(klipperscreendir, "styles", "base.conf")) as f:
@@ -444,7 +459,7 @@ class KlipperScreen(Gtk.Window):
style_options['graph_colors']['sensor']['colors'][i] style_options['graph_colors']['sensor']['colors'][i]
) )
css_data = css_data.replace("KS_FONT_SIZE", f"{self.gtk.get_font_size()}") css_data = css_data.replace("KS_FONT_SIZE", f"{self.gtk.font_size}")
style_provider = Gtk.CssProvider() style_provider = Gtk.CssProvider()
style_provider.load_from_data(css_data.encode()) style_provider.load_from_data(css_data.encode())
@@ -455,9 +470,6 @@ class KlipperScreen(Gtk.Window):
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
) )
def is_updating(self):
return self.updating
def _go_to_submenu(self, widget, name): def _go_to_submenu(self, widget, name):
logging.info(f"#### Go to submenu {name}") logging.info(f"#### Go to submenu {name}")
# Find current menu item # Find current menu item
@@ -471,11 +483,10 @@ class KlipperScreen(Gtk.Window):
logging.info(f"#### Menu {menu}") logging.info(f"#### Menu {menu}")
disname = self._config.get_menu_name(menu, name) disname = self._config.get_menu_name(menu, name)
menuitems = self._config.get_menu_items(menu, name) menuitems = self._config.get_menu_items(menu, name)
if len(menuitems) == 0: if len(menuitems) != 0:
logging.info("No items in menu, returning.") self.show_panel(name, "menu", disname, 1, False, items=menuitems)
return else:
logging.info("No items in menu")
self.show_panel(f'{self._cur_panels[-1]}_{name}', "menu", disname, 1, False, items=menuitems)
def _remove_all_panels(self): def _remove_all_panels(self):
self.subscriptions = [] self.subscriptions = []
@@ -486,49 +497,38 @@ class KlipperScreen(Gtk.Window):
if panel not in ["printer_select", "splash_screen"]: if panel not in ["printer_select", "splash_screen"]:
del self.panels[panel] del self.panels[panel]
for dialog in self.dialogs: for dialog in self.dialogs:
dialog.destroy() self.gtk.remove_dialog(dialog)
self.close_screensaver() self.close_screensaver()
def _remove_current_panel(self, pop=True): def _remove_current_panel(self, pop=True):
if len(self._cur_panels) <= 0: if len(self._cur_panels) < 1:
self.reload_panels() self.reload_panels()
return return
self.base_panel.remove(self.panels[self._cur_panels[-1]].get_content()) self.base_panel.remove(self.panels[self._cur_panels[-1]].content)
if hasattr(self.panels[self._cur_panels[-1]], "deactivate"): if hasattr(self.panels[self._cur_panels[-1]], "deactivate"):
self.panels[self._cur_panels[-1]].deactivate() self.panels[self._cur_panels[-1]].deactivate()
if self._cur_panels[-1] in self.subscriptions: if self._cur_panels[-1] in self.subscriptions:
self.subscriptions.remove(self._cur_panels[-1]) self.subscriptions.remove(self._cur_panels[-1])
if pop is True: if pop:
self._cur_panels.pop() del self._cur_panels[-1]
if len(self._cur_panels) > 0: self.attach_panel(self._cur_panels[-1])
self.base_panel.add_content(self.panels[self._cur_panels[-1]])
self.base_panel.show_back(len(self._cur_panels) != 1)
if hasattr(self.panels[self._cur_panels[-1]], "activate"):
self.panels[self._cur_panels[-1]].activate()
if hasattr(self.panels[self._cur_panels[-1]], "process_update"):
self.add_subscription(self._cur_panels[-1])
self.show_all()
def _menu_go_back(self, widget=None): def _menu_go_back(self, widget=None, home=False):
logging.info("#### Menu go back") logging.info(f"#### Menu go {'home' if home else 'back'}")
self.remove_keyboard() self.remove_keyboard()
if self._config.get_main_config().getboolean('autoclose_popups', True): if self._config.get_main_config().getboolean('autoclose_popups', True):
self.close_popup_message() self.close_popup_message()
self._remove_current_panel()
def _menu_go_home(self):
logging.info("#### Menu go home")
self.remove_keyboard()
self.close_popup_message()
while len(self._cur_panels) > 1: while len(self._cur_panels) > 1:
self._remove_current_panel() self._remove_current_panel()
if not home:
break
def add_subscription(self, panel_name): def add_subscription(self, panel_name):
if panel_name not in self.subscriptions: if panel_name not in self.subscriptions:
self.subscriptions.append(panel_name) self.subscriptions.append(panel_name)
def reset_screensaver_timeout(self, *args): def reset_screensaver_timeout(self, *args):
if self.screensaver_timeout is not None: if not self.use_dpms and self.screensaver_timeout is not None:
GLib.source_remove(self.screensaver_timeout) GLib.source_remove(self.screensaver_timeout)
self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver) self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver)
@@ -538,6 +538,7 @@ class KlipperScreen(Gtk.Window):
self.close_screensaver() self.close_screensaver()
self.remove_keyboard() self.remove_keyboard()
for dialog in self.dialogs: for dialog in self.dialogs:
logging.debug("Hiding dialog")
dialog.hide() dialog.hide()
close = Gtk.Button() close = Gtk.Button()
@@ -548,36 +549,41 @@ class KlipperScreen(Gtk.Window):
box.pack_start(close, True, True, 0) box.pack_start(close, True, True, 0)
box.set_halign(Gtk.Align.CENTER) box.set_halign(Gtk.Align.CENTER)
box.get_style_context().add_class("screensaver") box.get_style_context().add_class("screensaver")
self.base_panel.get().put(box, 0, 0) self.remove(self.base_panel.main_grid)
self.add(box)
# Avoid leaving a cursor-handle # Avoid leaving a cursor-handle
close.grab_focus() close.grab_focus()
self.screensaver = box self.screensaver = box
self.screensaver.show_all() self.screensaver.show_all()
self.power_devices(None, self._config.get_main_config().get("screen_off_devices", ""), on=False)
return False return False
def close_screensaver(self, widget=None): def close_screensaver(self, widget=None):
if self.screensaver is None: if self.screensaver is None:
return False return False
logging.debug("Closing Screensaver") logging.debug("Closing Screensaver")
self.base_panel.get().remove(self.screensaver) self.remove(self.screensaver)
self.screensaver = None self.screensaver = None
self.add(self.base_panel.main_grid)
if self.use_dpms: if self.use_dpms:
self.wake_screen() self.wake_screen()
else: else:
self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver) self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver)
for dialog in self.dialogs: for dialog in self.dialogs:
logging.info(f"Restoring Dialog {dialog}")
dialog.show() dialog.show()
self.show_all() self.show_all()
self.power_devices(None, self._config.get_main_config().get("screen_on_devices", ""), on=True)
return False return False
def check_dpms_state(self): def check_dpms_state(self):
if not self.use_dpms:
return False
state = functions.get_DPMS_state() state = functions.get_DPMS_state()
if state == functions.DPMS_State.Fail: if state == functions.DPMS_State.Fail:
logging.info("DPMS State FAIL: Stopping DPMS Check") logging.info("DPMS State FAIL: Stopping DPMS Check")
if self.screensaver_timeout is None: self.set_dpms(False)
self.set_dpms(False)
return False return False
elif state != functions.DPMS_State.On: elif state != functions.DPMS_State.On:
if self.screensaver is None: if self.screensaver is None:
@@ -602,9 +608,6 @@ class KlipperScreen(Gtk.Window):
if time == "off": if time == "off":
logging.debug(f"Screen blanking: {time}") logging.debug(f"Screen blanking: {time}")
if self.dpms_timeout is not None:
GLib.source_remove(self.dpms_timeout)
self.dpms_timeout = None
if self.screensaver_timeout is not None: if self.screensaver_timeout is not None:
GLib.source_remove(self.screensaver_timeout) GLib.source_remove(self.screensaver_timeout)
os.system("xset -display :0 dpms 0 0 0") os.system("xset -display :0 dpms 0 0 0")
@@ -616,70 +619,54 @@ class KlipperScreen(Gtk.Window):
os.system("xset -display :0 +dpms") os.system("xset -display :0 +dpms")
if functions.get_DPMS_state() == functions.DPMS_State.Fail: if functions.get_DPMS_state() == functions.DPMS_State.Fail:
logging.info("DPMS State FAIL") logging.info("DPMS State FAIL")
self.show_popup_message("DPMS has failed to load")
self._config.set("main", "use_dpms", "False")
else: else:
logging.debug("Using DPMS") logging.debug("Using DPMS")
os.system("xset -display :0 s off") os.system("xset -display :0 s off")
os.system(f"xset -display :0 dpms 0 {self.blanking_time} 0") os.system(f"xset -display :0 dpms 0 {self.blanking_time} 0")
if self.dpms_timeout is None: GLib.timeout_add_seconds(1, self.check_dpms_state)
self.dpms_timeout = GLib.timeout_add_seconds(1, self.check_dpms_state)
return return
# Without dpms just blank the screen # Without dpms just blank the screen
logging.debug("Not using DPMS") logging.debug("Not using DPMS")
if self.dpms_timeout is not None:
GLib.source_remove(self.dpms_timeout)
self.dpms_timeout = None
os.system("xset -display :0 dpms 0 0 0") os.system("xset -display :0 dpms 0 0 0")
if self.screensaver_timeout is None: if self.screensaver_timeout is None:
self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver) self.screensaver_timeout = GLib.timeout_add_seconds(self.blanking_time, self.show_screensaver)
return return
def set_updating(self, updating=False):
if self.updating is True and updating is False and len(self.update_queue) > 0:
i = self.update_queue.pop()
self.update_queue = []
i[0]()
self.updating = updating
def show_printer_select(self, widget=None): def show_printer_select(self, widget=None):
self.base_panel.show_heaters(False) self.base_panel.show_heaters(False)
self.show_panel("printer_select", "printer_select", _("Printer Select"), 2) self.show_panel("printer_select", "printer_select", _("Printer Select"), 2)
def state_execute(self, callback): def process_busy_state(self, busy):
if self.is_updating(): self.process_update("notify_busy", busy)
self.update_queue.append([callback])
else:
self.init_printer()
callback()
def websocket_disconnected(self, msg): def websocket_disconnected(self, msg):
self.printer_initializing(msg) self.printer_initializing(msg, remove=True)
self.connecting = True self.connecting = True
self.connected_printer = None self.connected_printer = None
self.files.reset() self.files.reset()
self.files = None self.files = None
self.printer.reset() self.initialized = False
self.printer = None
self.connect_printer(self.connecting_to_printer) self.connect_printer(self.connecting_to_printer)
def state_disconnected(self): def state_disconnected(self):
logging.debug("### Going to disconnected") logging.debug("### Going to disconnected")
self.close_screensaver() self.close_screensaver()
self.printer_initializing(_("Klipper has disconnected")) self.initialized = False
self.printer_initializing(_("Klipper has disconnected"), remove=True)
self.reinit_count = 0
self.init_printer()
def state_error(self): def state_error(self):
self.close_screensaver() self.close_screensaver()
msg = self.printer.get_stat("webhooks", "state_message") msg = _("Klipper has encountered an error.") + "\n"
if "FIRMWARE_RESTART" in msg: state = self.printer.get_stat("webhooks", "state_message")
self.printer_initializing("<b>" + _("Klipper has encountered an error.") + "\n" + if "FIRMWARE_RESTART" in state:
_("A FIRMWARE_RESTART may fix the issue.") + msg += _("A FIRMWARE_RESTART may fix the issue.") + "\n"
"</b>" + "\n\n" + msg) elif "micro-controller" in state:
elif "micro-controller" in msg: msg += _("Please recompile and flash the micro-controller.") + "\n"
self.printer_initializing("<b>" + _("Klipper has encountered an error.") + self.printer_initializing(msg + "\n" + state, remove=True)
_("Please recompile and flash the micro-controller.") +
"</b>" + "\n\n" + msg)
else:
self.printer_initializing("<b>" + _("Klipper has encountered an error.") +
"</b>" + "\n\n" + msg)
def state_paused(self): def state_paused(self):
if "job_status" not in self._cur_panels: if "job_status" not in self._cur_panels:
@@ -704,8 +691,7 @@ class KlipperScreen(Gtk.Window):
self.close_screensaver() self.close_screensaver()
msg = self.printer.get_stat("webhooks", "state_message") msg = self.printer.get_stat("webhooks", "state_message")
msg = msg if "ready" not in msg else "" msg = msg if "ready" not in msg else ""
self.printer_initializing("<b>" + _("Klipper has shutdown") + self.printer_initializing(_("Klipper has shutdown") + "\n\n" + msg, remove=True)
"</b>" + "\n\n" + msg)
def toggle_macro_shortcut(self, value): def toggle_macro_shortcut(self, value):
self.base_panel.show_macro_shortcut(value) self.base_panel.show_macro_shortcut(value)
@@ -717,19 +703,23 @@ class KlipperScreen(Gtk.Window):
self.reload_panels() self.reload_panels()
def reload_panels(self, *args): def reload_panels(self, *args):
if "printer_select" in self._cur_panels:
self.show_printer_select()
return
self._remove_all_panels() self._remove_all_panels()
self.printer.change_state(self.printer.state) if self.printer is not None:
self.printer.change_state(self.printer.state)
def _websocket_callback(self, action, data): def _websocket_callback(self, action, data):
if self.connecting: if self.connecting:
return return
if action == "notify_klippy_disconnected": if action == "notify_klippy_disconnected":
self.printer.change_state("disconnected") self.printer.process_update({'webhooks': {'state': "disconnected"}})
return return
elif action == "notify_klippy_shutdown": elif action == "notify_klippy_shutdown":
self.printer.change_state("shutdown") self.printer.process_update({'webhooks': {'state': "shutdown"}})
elif action == "notify_klippy_ready": elif action == "notify_klippy_ready":
self.printer.change_state("ready") self.printer.process_update({'webhooks': {'state': "ready"}})
elif action == "notify_status_update" and self.printer.state != "shutdown": elif action == "notify_status_update" and self.printer.state != "shutdown":
self.printer.process_update(data) self.printer.process_update(data)
elif action == "notify_filelist_changed": elif action == "notify_filelist_changed":
@@ -738,7 +728,11 @@ class KlipperScreen(Gtk.Window):
elif action == "notify_metadata_update": elif action == "notify_metadata_update":
self.files.request_metadata(data['filename']) self.files.request_metadata(data['filename'])
elif action == "notify_update_response": elif action == "notify_update_response":
logging.info(f"{action}: {data}") if 'message' in data and 'Error' in data['message']:
logging.error(f"{action}:{data['message']}")
self.show_popup_message(data['message'], 3)
if "KlipperScreen" in data['message']:
self.restart_ks()
elif action == "notify_power_changed": elif action == "notify_power_changed":
logging.debug("Power status changed: %s", data) logging.debug("Power status changed: %s", data)
self.printer.process_power_update(data) self.printer.process_power_update(data)
@@ -749,7 +743,10 @@ class KlipperScreen(Gtk.Window):
self.show_popup_message(data[6:], 1) self.show_popup_message(data[6:], 1)
elif data.startswith("!! "): elif data.startswith("!! "):
self.show_popup_message(data[3:], 3) self.show_popup_message(data[3:], 3)
if "SAVE_CONFIG" in data and self.printer.state == "ready": elif "unknown" in data.lower() and \
not ("TESTZ" in data or "MEASURE_AXES_NOISE" in data or "ACCELEROMETER_QUERY" in data):
self.show_popup_message(data)
elif "SAVE_CONFIG" in data and self.printer.state == "ready":
script = {"script": "SAVE_CONFIG"} script = {"script": "SAVE_CONFIG"}
self._confirm_send_action( self._confirm_send_action(
None, None,
@@ -757,9 +754,12 @@ class KlipperScreen(Gtk.Window):
"printer.gcode.script", "printer.gcode.script",
script script
) )
self.base_panel.process_update(action, data) self.process_update(action, data)
if self._cur_panels and self._cur_panels[-1] in self.subscriptions:
self.panels[self._cur_panels[-1]].process_update(action, data) def process_update(self, *args):
GLib.idle_add(self.base_panel.process_update, *args)
for x in self.subscriptions:
GLib.idle_add(self.panels[x].process_update, *args)
def _confirm_send_action(self, widget, text, method, params=None): def _confirm_send_action(self, widget, text, method, params=None):
buttons = [ buttons = [
@@ -785,53 +785,49 @@ class KlipperScreen(Gtk.Window):
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR) label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
if self.confirm is not None: if self.confirm is not None:
self.confirm.destroy() self.gtk.remove_dialog(self.confirm)
self.confirm = self.gtk.Dialog(self, buttons, label, self._confirm_send_action_response, method, params) self.confirm = self.gtk.Dialog(self, buttons, label, self._confirm_send_action_response, method, params)
self.confirm.set_title("KlipperScreen")
def _confirm_send_action_response(self, widget, response_id, method, params): def _confirm_send_action_response(self, dialog, response_id, method, params):
self.gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.OK: if response_id == Gtk.ResponseType.OK:
self._send_action(widget, method, params) self._send_action(None, method, params)
if method == "server.files.delete_directory":
widget.destroy() GLib.timeout_add_seconds(2, self.files.refresh_files)
def _send_action(self, widget, method, params): def _send_action(self, widget, method, params):
logging.info(f"{method}: {params}") logging.info(f"{method}: {params}")
self._ws.send_method(method, params) self._ws.send_method(method, params)
def printer_initializing(self, msg): def printer_initializing(self, msg, remove=False):
self.close_popup_message() self.close_popup_message()
if 'splash_screen' not in self.panels or 'printer_select' not in self._cur_panels: if 'splash_screen' not in self.panels or remove:
self.show_panel('splash_screen', "splash_screen", None, 2) self.show_panel('splash_screen', "splash_screen", None, 2)
self.panels['splash_screen'].update_text(msg) self.panels['splash_screen'].update_text(msg)
def search_power_devices(self, power_devices): def search_power_devices(self, devices):
if self.connected_printer is None or not power_devices:
return
found_devices = [] found_devices = []
devices = self.printer.get_power_devices() if self.connected_printer is None or not devices:
logging.debug("Power devices: %s", devices)
if devices is not None:
for device in devices:
for power_device in power_devices:
if device == power_device and power_device not in found_devices:
found_devices.append(power_device)
if found_devices:
logging.info("Found %s", found_devices)
return found_devices return found_devices
else: devices = [str(i.strip()) for i in devices.split(',')]
logging.info("Associated power devices not found") power_devices = self.printer.get_power_devices()
return None if power_devices:
found_devices = [dev for dev in devices if dev in power_devices]
logging.info(f"Found {found_devices}", )
return found_devices
def power_on(self, widget, devices): def power_devices(self, widget=None, devices=None, on=False):
for device in devices: devs = self.search_power_devices(devices)
if self.printer.get_power_device_status(device) == "off": for dev in devs:
self.show_popup_message(_("Sending Power ON signal to: %s") % devices, level=1) if on:
logging.info("%s is OFF, Sending Power ON signal", device) self._ws.klippy.power_device_on(dev)
self._ws.klippy.power_device_on(device) else:
elif self.printer.get_power_device_status(device) == "on": self._ws.klippy.power_device_off(dev)
logging.info("%s is ON", device)
def init_printer(self): def init_printer(self):
if self.reinit_count > self.max_retries or 'printer_select' in self._cur_panels:
return
state = self.apiclient.get_server_info() state = self.apiclient.get_server_info()
if state is False: if state is False:
logging.info("Moonraker not connected") logging.info("Moonraker not connected")
@@ -849,11 +845,11 @@ class KlipperScreen(Gtk.Window):
if state['result']['klippy_connected'] is False: if state['result']['klippy_connected'] is False:
logging.info("Klipper not connected") logging.info("Klipper not connected")
self.printer_initializing( msg = _("Moonraker: connected") + "\n\n"
_("Moonraker: connected") msg += f"Klipper: {state['result']['klippy_state']}" + "\n\n"
+ f"\n\nKlipper: {state['result']['klippy_state']}\n\n" if self.reinit_count <= self.max_retries:
+ _("Retry #%s") % self.reinit_count msg += _("Retrying") + f' #{self.reinit_count}'
) self.printer_initializing(msg)
GLib.timeout_add_seconds(3, self.init_printer) GLib.timeout_add_seconds(3, self.init_printer)
return return
@@ -886,18 +882,27 @@ class KlipperScreen(Gtk.Window):
self.printer_initializing("Error getting printer object data with extra items") self.printer_initializing("Error getting printer object data with extra items")
GLib.timeout_add_seconds(3, self.init_printer) GLib.timeout_add_seconds(3, self.init_printer)
return return
tempstore = self.apiclient.send_request("server/temperature_store")
if tempstore is not False:
self.printer.init_temp_store(tempstore['result'])
self.printer.process_update(data['result']['status']) self.printer.process_update(data['result']['status'])
self.init_tempstore()
GLib.timeout_add_seconds(2, self.init_tempstore) # If devices changed it takes a while to register
self.files.initialize() self.files.initialize()
self.files.refresh_files() self.files.refresh_files()
logging.info("Printer initialized") logging.info("Printer initialized")
self.initialized = True
self.reinit_count = 0 self.reinit_count = 0
def init_tempstore(self):
self.printer.init_temp_store(self.apiclient.send_request("server/temperature_store"))
server_config = self.apiclient.send_request("server/config")
if server_config:
try:
self.printer.tempstore_size = server_config["result"]["config"]["data_store"]["temperature_store_size"]
logging.info(f"Temperature store size: {self.printer.tempstore_size}")
except KeyError:
logging.error("Couldn't get the temperature store size")
def base_panel_show_all(self): def base_panel_show_all(self):
self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True)) self.base_panel.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
self.base_panel.show_heaters(True) self.base_panel.show_heaters(True)
@@ -911,66 +916,82 @@ class KlipperScreen(Gtk.Window):
def printer_printing(self): def printer_printing(self):
self.close_screensaver() self.close_screensaver()
self.close_popup_message() self.close_popup_message()
self.show_panel('job_status', "job_status", _("Printing"), 2)
self.base_panel_show_all() self.base_panel_show_all()
for dialog in self.dialogs: for dialog in self.dialogs:
dialog.destroy() self.gtk.remove_dialog(dialog)
self.show_panel('job_status', "job_status", _("Printing"), 2)
def show_keyboard(self, widget=None, event=None, entry=None): def show_keyboard(self, entry=None, event=None):
if self.keyboard is not None: if self.keyboard is not None:
return return
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.set_size_request(self.gtk.get_content_width(), self.gtk.get_keyboard_height()) box.set_size_request(self.gtk.content_width, self.gtk.keyboard_height)
if self._config.get_main_config().getboolean("use-matchbox-keyboard", False): if self._config.get_main_config().getboolean("use-matchbox-keyboard", False):
env = os.environ.copy() return self._show_matchbox_keyboard(box)
usrkbd = os.path.expanduser("~/.matchbox/keyboard.xml")
if os.path.isfile(usrkbd):
env["MB_KBD_CONFIG"] = usrkbd
else:
env["MB_KBD_CONFIG"] = "ks_includes/locales/keyboard.xml"
p = subprocess.Popen(["matchbox-keyboard", "--xid"], stdout=subprocess.PIPE,
stderr=subprocess.PIPE, env=env)
xid = int(p.stdout.readline())
logging.debug(f"XID {xid}")
logging.debug(f"PID {p.pid}")
keyboard = Gtk.Socket()
box.get_style_context().add_class("keyboard_matchbox")
box.pack_start(keyboard, True, True, 0)
self.base_panel.get_content().pack_end(box, False, False, 0)
self.show_all()
keyboard.add_id(xid)
self.keyboard = {
"box": box,
"process": p,
"socket": keyboard
}
return
if entry is None: if entry is None:
logging.debug("Error: no entry provided for keyboard") logging.debug("Error: no entry provided for keyboard")
return return
box.get_style_context().add_class("keyboard_box") box.get_style_context().add_class("keyboard_box")
box.add(Keyboard(self, self.remove_keyboard, entry=entry)) box.add(Keyboard(self, self.remove_keyboard, entry=entry))
self.keyboard = {"box": box}
self.base_panel.content.pack_end(box, False, False, 0)
self.base_panel.content.show_all()
def _show_matchbox_keyboard(self, box):
env = os.environ.copy()
usrkbd = os.path.expanduser("~/.matchbox/keyboard.xml")
if os.path.isfile(usrkbd):
env["MB_KBD_CONFIG"] = usrkbd
else:
env["MB_KBD_CONFIG"] = "ks_includes/locales/keyboard.xml"
p = subprocess.Popen(["matchbox-keyboard", "--xid"], stdout=subprocess.PIPE,
stderr=subprocess.PIPE, env=env)
xid = int(p.stdout.readline())
logging.debug(f"XID {xid}")
logging.debug(f"PID {p.pid}")
keyboard = Gtk.Socket()
box.get_style_context().add_class("keyboard_matchbox")
box.pack_start(keyboard, True, True, 0)
self.base_panel.content.pack_end(box, False, False, 0)
self.show_all()
keyboard.add_id(xid)
self.keyboard = { self.keyboard = {
"entry": entry, "box": box,
"box": box "process": p,
"socket": keyboard
} }
self.base_panel.get_content().pack_end(box, False, False, 0) return
self.base_panel.get_content().show_all()
def remove_keyboard(self, widget=None, event=None): def remove_keyboard(self, widget=None, event=None):
if self.keyboard is None: if self.keyboard is None:
return return
if 'process' in self.keyboard: if 'process' in self.keyboard:
os.kill(self.keyboard['process'].pid, signal.SIGTERM) os.kill(self.keyboard['process'].pid, SIGTERM)
self.base_panel.get_content().remove(self.keyboard['box']) self.base_panel.content.remove(self.keyboard['box'])
self.keyboard = None self.keyboard = None
def _key_press_event(self, widget, event):
keyval_name = Gdk.keyval_name(event.keyval)
if keyval_name == "Escape":
self._menu_go_back(home=True)
elif keyval_name == "BackSpace" and len(self._cur_panels) > 1 and self.keyboard is None:
self.base_panel.back()
def update_size(self, *args):
self.width, self.height = self.get_size()
new_ratio = self.width / self.height
new_mode = new_ratio < 1.0
ratio_delta = abs(self.aspect_ratio - new_ratio)
if ratio_delta > 0.1 and self.vertical_mode != new_mode:
self.reload_panels()
self.vertical_mode = new_mode
self.aspect_ratio = new_ratio
def main(): def main():
version = functions.get_software_version() version = functions.get_software_version()
@@ -998,8 +1019,14 @@ def main():
functions.patch_threading_excepthook() functions.patch_threading_excepthook()
logging.info(f"KlipperScreen version: {version}") logging.info(f"KlipperScreen version: {version}")
if not Gtk.init_check(None)[0]:
win = KlipperScreen(args, version) logging.critical("Failed to initialize Gtk")
raise RuntimeError
try:
win = KlipperScreen(args, version)
except Exception as e:
logging.exception("Failed to initialize window")
raise RuntimeError from e
win.connect("destroy", Gtk.main_quit) win.connect("destroy", Gtk.main_quit)
win.show_all() win.show_all()
Gtk.main() Gtk.main()
@@ -1010,3 +1037,4 @@ if __name__ == "__main__":
main() main()
except Exception as ex: except Exception as ex:
logging.exception(f"Fatal error in main loop:\n{ex}") logging.exception(f"Fatal error in main loop:\n{ex}")
sys.exit(1)
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff. Show more