Compare commits

...
276 Commits
Author SHA1 Message Date
Thomas Malkewitz 5d12addbba Xserver-XSDL cmd args to stop screen blanking (#794)
Added documentation to stop Xserver-XSDL from enabling its 5 minute default screen saver and blanking the screen.  In this scenario even after enabling the 'stay away' option in the debugging or developer options of the android device, the screen will still go black, but leave the back light on.  To stop this this, you must disable the Xserver screen saver option in the start up arguments of the server app itself.  I spend more than a few hours looking for and figuring this out, when this little bit of info would have saved me a lot of time.

Not sure if where I placed it is the best place in the doc, but the info is sound.  I am using my android over USB, FYI.
2022-11-18 13:38:55 -03:00
alfrix 92e899cf56 scripts: update naming and remove unused 2022-11-18 13:38:20 -03:00
mattlalumiere 6cb18816e2 Fixed Xclient scripts and added some examples (#717) 2022-11-18 13:31:41 -03:00
alfrix 6ca35ffab0 log: reduce max log size 2022-11-18 13:29:12 -03:00
alfrix 7ca37c56b6 websocket: refactor how the connection is handled 2022-11-18 12:56:05 -03:00
alfrix 675f28b318 Use GLib.idle_add instead of Gdk.threads_add_idle 2022-11-18 02:51:41 -03:00
alfrix cfa35ba8e4 screen: init_printer change how the timeout functions 2022-11-18 01:46:15 -03:00
alfrix 380df961e5 cleanup dead code 2022-11-18 01:17:57 -03:00
alfrix 8dc12bea2c screen: import traceback 2022-11-18 01:17:57 -03:00
alfrix 5215c8f985 menu: less logging 2022-11-18 01:17:57 -03:00
alfrix 45b172f85c files: reset 2022-11-18 01:17:57 -03:00
alfrix 2c30bdeddf printer: cleanup 2022-11-18 01:17:57 -03:00
alfrix 09f992d3b5 screen: cleanup unused vars 2022-11-18 01:17:57 -03:00
alfrix 128fee5e96 screen: cleanup panel subscriptions 2022-11-18 01:17:57 -03:00
alfrix 529b111fce screen: call close_screensaver on remove_all_panels 2022-11-18 00:53:53 -03:00
alfrix d55bc160ac docs: update config location 2022-11-18 00:53:53 -03:00
alfrix 7a71fa75f7 input_shaper: refactor process_update 2022-11-18 00:53:53 -03:00
alfrix 1db6388798 menu: use None 2022-11-18 00:53:53 -03:00
alfrix bdafb31522 menu: simplify enable 2022-11-18 00:53:53 -03:00
alfrix bd82d211f5 screen: raise more specific errors if panels cannot load 2022-11-18 00:53:53 -03:00
alfrix 45ab86204b panels: remove initialize from the panels that do not have a menu 2022-11-18 00:53:53 -03:00
alfrix 972a09df41 config: fix None appearing in config if the file doesn't exist close #777 2022-11-18 00:53:53 -03:00
alfrix 9b1b9593e8 ws: add 7130 as default for wss close #786 2022-11-18 00:53:53 -03:00
alfrix dd33ee04bb docs: android: show script directly with example close #791 2022-11-18 00:53:53 -03:00
alfrix 04f3c5b7a5 settings: cleanup printer list 2022-11-18 00:53:53 -03:00
alfrix 18d8f835a9 always reinit printer on state changes 2022-11-18 00:53:53 -03:00
alfrix b68cfa40fd refactor ws reconnect/retry 2022-11-18 00:53:53 -03:00
alfrix 86c52dece8 move connect_printer_widget to printer_select 2022-11-18 00:53:53 -03:00
alfrix 4272109a27 use screen printer_initializing method instead of direct calls 2022-11-18 00:53:53 -03:00
alfrix c5fe8b02a4 exclude: fix list width if no polygons are provided 2022-11-18 00:53:53 -03:00
alfrix fdf13102fe screen: remove shutdown variable and change on_close to disconnect 2022-11-18 00:53:53 -03:00
alfrix e1ea41f147 screen: refactor panel removal 2022-11-18 00:53:53 -03:00
alfrix 6b1fd23e35 screen: reduce the complexity of the status changes close #792 2022-11-18 00:53:53 -03:00
alfrix 9020d0b0ea screen: set_cursor new_for_display 2022-11-18 00:53:53 -03:00
alfrix 022954918c create ks_printer_cfg 2022-11-18 00:53:53 -03:00
alfrix e4ff009ef6 main_menu: init left_panel 2022-11-18 00:53:53 -03:00
alfrix f7cbff3ed8 heater_graph: better max value selection 2022-11-18 00:53:53 -03:00
alfrix f80c2687c5 screen: simplify panel subscription add-remove 2022-11-18 00:53:53 -03:00
alfrix 0bfbe90dcd screen: show_panel no need to differentiate if there are kwargs 2022-11-18 00:53:53 -03:00
alfrix 04e060c43c screen_panel: cleanup menu_item_clicked 2022-11-18 00:53:53 -03:00
alfrix 6083248dfa menu: simplify back and prevent a situation with no panels 2022-11-18 00:53:53 -03:00
alfrix df401d4924 main_menu: remove unused argument 2022-11-18 00:53:53 -03:00
alfrix 731a78b2f2 ws_cb: first check if there are panels 2022-11-18 00:53:53 -03:00
alfrix 1e6a9ec8ae log: cleanup logs for files, system and bed_mesh
functions: log if DPMS fails to load
screen: log send_action
2022-11-18 00:52:55 -03:00
alfrix 300eed4d29 translations: update 2022-11-12 11:23:01 -03:00
alfrix 7bef1d45c8 exclude: adjust vertical mode 2022-11-12 10:18:31 -03:00
alfrix 2aec78ff4c bed_mesh: adjust vertical mode 2022-11-12 10:11:09 -03:00
alfrix 4d0edf3c0b move: cleanup and move stuff out of screen_panel 2022-11-12 09:56:09 -03:00
alfrix a695c68a25 screen: simplify cursor changes 2022-11-12 09:30:43 -03:00
alfrix 6ca80baea8 job_status: remove glib timers that could cause issues 2022-11-12 09:25:37 -03:00
alfrix 260d4b16e5 --amend 2022-11-11 10:46:45 -03:00
alfrix 67dc2c9fdf --amend 2022-11-11 10:38:59 -03:00
alfrix 8b55d2f2b1 splash_screen: limit reconnections, clear log, add reconnect button 2022-11-11 10:25:55 -03:00
alfrix f05cbe9f0b job_status: fix layer info sometimes causing issues close #788 2022-11-10 23:10:44 -03:00
alfrix 3bbefd8bd5 lang: make set_text_direction a function 2022-11-10 07:15:04 -03:00
alfrix b8e819629a log: reduce spam 2022-11-10 07:15:04 -03:00
alfrix f5b8ae1002 screen: remove matplotlib from preload close #787 2022-11-10 07:12:29 -03:00
alfrix 78f76d659c menu: log a more descriptive item enable status 2022-11-09 10:37:30 -03:00
alfrix ce6158ad91 bed_mesh: improvements an changes:
use current profiles instead of the ones saved in the config file
remove matplotlib and numpy, caused many intall issues, graph was slow and not great for small screens
create a custom 2D graph to show the probed matrix
2022-11-09 10:25:52 -03:00
alfrix 0ca410acba zcalibrate: use sample_retract_dist if available close #748 2022-11-09 10:25:37 -03:00
alfrix 02c043eece zcalibrate: add dockable_probe #750 2022-11-09 08:51:59 -03:00
alfrix 88461910c9 job_status: remove numpy dependency 2022-11-08 17:33:38 -03:00
dependabot[bot] 19506292b5 build(deps): bump websocket-client from 1.4.1 to 1.4.2 (#781)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.4.1 to 1.4.2.
- [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.1...v1.4.2)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:33:09 -03:00
marcin-koziolandMarcin Kozioł 1dc3433e02 Set distance and speed variables after config is loaded (#782)
Co-authored-by: Marcin Kozioł <marcin.koziol@outi.pl>
2022-11-08 17:32:54 -03:00
alfrix ca7143f776 base_panel: estop set not sensitive instead of hiding 2022-11-06 13:21:52 -03:00
alfrix 26d10a949b job_status: use the new print_stats layer info 2022-11-06 13:04:07 -03:00
alfrix 8855d9b98f screensaver: change calls to close instead of wake 2022-11-05 00:25:11 -03:00
alfrix df195a0135 zcalibrate: use a tiny movement to detect state, need status 2022-11-04 19:27:08 -03:00
alfrix 23b64b1625 zcalibrate: use safe_z z_hop if defined close #748 2022-11-04 18:27:16 -03:00
alfrix 44623b44d1 menu: reduce logging 2022-11-04 18:13:06 -03:00
alfrix 6e4d0ff962 config: add lang list to init, reduce logging 2022-11-04 18:12:39 -03:00
alfrix 2fef5660cb base_panel: change how it shows controls and heaters to avoid issues 2022-11-04 10:30:14 -03:00
alfrix 3be65a686a docs: xserver-xorg-legacy is installed by default 2022-11-04 10:30:14 -03:00
alfrix 9c4f4c5fe7 config: try to save in printer_data first 2022-11-04 10:30:14 -03:00
alfrix ba392d75b9 docs: explain logfile location with images 2022-11-04 10:30:14 -03:00
jordanruthe 39b786c198 Update Hardware.md
Add BTT HDMI5/7
2022-11-04 08:27:07 -04:00
alfrix e36cf78e40 zcalirbrate: fix e225 2022-11-03 23:51:44 -03:00
alfrix 11dd95b939 functions: do not rotate logs at startup, it's useful to see old logs when users attach them 2022-11-03 23:44:17 -03:00
alfrix e0950247d2 zcalibrate: use safe_z_home if available 2022-11-03 23:40:30 -03:00
alfrix 8d1ca4eba1 fix E741 2022-11-03 23:29:11 -03:00
alfrix 6c66ccada7 job_status: remove menu button delay 2022-11-03 23:06:12 -03:00
alfrix 01fde5a1e9 keyboard: fix sometimes not changing language 2022-11-03 22:50:01 -03:00
alfrix 64745c8578 fix codestyle issues 2022-11-03 22:40:36 -03:00
Selim b77321ce28 Update Turkish Language (#771) 2022-11-03 22:35:02 -03:00
AntoszHUN f4a0b0f8b1 Update Hungarian Language (#774) 2022-11-03 22:33:54 -03:00
alfrix 7ee162092c fix #775 2022-11-03 22:20:03 -03:00
alfrix 2fc01c07b6 base_panel: allow to have no title 2022-11-03 22:07:45 -03:00
alfrix 73e4645df0 installer: add input drivers by default close #772 2022-11-02 11:13:16 -03:00
alfrix 5e4760771d screen: set to fullscreen unless overrided with size #773 2022-11-02 11:13:16 -03:00
alfrix 38d006c8a7 job_status and splash: fixup image size on ultrawide 2022-11-02 11:13:16 -03:00
alfrix 79c858ded6 functions: logging: use printer_data 2022-11-01 21:22:07 -03:00
alfrix 03e4681aa6 functions: logging changes, rotate based on filesize and on startup, print a warning in if log is not created 2022-11-01 15:36:52 -03:00
alfrix 5154e41fed windowed: add title and icon 2022-11-01 15:36:52 -03:00
alfrix 371968b458 base_panel: hide estop 2022-11-01 15:36:52 -03:00
alfrix c3128ef508 base_panel: always hide macro shortcut on splash_screen 2022-11-01 15:36:49 -03:00
alfrix 09ccd46528 keyboard: add spanish and german, change backscpace, clear and accept to icons 2022-11-01 07:36:07 -03:00
alfrix 874212e166 lang: fix widgets close #768 2022-10-28 13:22:47 -03:00
alfrix f749969c07 config: fix default en if system lang not found 2022-10-28 06:25:20 -03:00
alfrix f6e4e231b1 translation: update all translations 2022-10-27 23:42:23 -03:00
alfrix d536b054b8 translation: update hebrew (Tal Rahav) close #766 2022-10-27 23:40:59 -03:00
alfrix 5d539d0059 translation: update spanish 2022-10-27 23:36:30 -03:00
AntoszHUN 8a82590829 Update Hungarian Language (#762) 2022-10-27 23:19:21 -03:00
alfrix f588571bdd fix PEP E303 2022-10-27 23:18:21 -03:00
northcoastam d27227aede Update fine_tune.py (#765)
Fix for custom z_babystep_values from KlipperScreen.conf not respected
2022-10-27 23:15:45 -03:00
alfrix 7666a91872 splash_screen and job_status title translation 2022-10-27 22:47:01 -03:00
alfrix 51ddee28c3 printer_select: hide action_bar on startup and translate name 2022-10-27 21:24:23 -03:00
alfrix 0620d660f5 Change how the printer state is handled 2022-10-27 20:54:13 -03:00
alfrix b988c3c8c9 limits: fix sliders rescaling and not restoring values when set lower than the max configured value 2022-10-27 12:15:18 -03:00
alfrix d3d7104ec4 languages: refactor
- No full restart requirement just reload
- Fix some systems not loading the language
- Fix RTL not applied if the lang was not set by the system
2022-10-26 22:36:52 -03:00
alfrix 93457b2961 temperature: select all extruders while not printing and the active extruder if printing 2022-10-26 22:36:52 -03:00
alfrix b36e75ec1a temperature: fix #763 2022-10-26 22:36:52 -03:00
alfrix d6e4ad0a35 base_panel: fix macro shorcut not hiding at startup if configured to off 2022-10-26 22:36:52 -03:00
alfrix 0de49ee0cd base_panel: calculate the amount of titlebar items to be shown 2022-10-26 22:36:52 -03:00
alfrix 8cc86dfd7c config: add width and height for development purposes
Do not use this when KS is meant to be fullscreen, this should be used for window size on a desktop
2022-10-26 22:36:52 -03:00
alfrix da9051a9b2 base_panel: create get_icon for show_heaters 2022-10-26 22:36:52 -03:00
alfrix 32fab0482f gtk: add .png icons support close #733 2022-10-26 22:36:52 -03:00
alfrix 792e1bf8bf print: improve initialization performance with async. load of images 2022-10-26 22:36:52 -03:00
alfrix b346d765a2 base_panel: clock simplify also increase margin 2022-10-26 22:36:52 -03:00
alfrix c5413e51c9 config: add printer_data to default config search locations
close #759
2022-10-26 22:36:52 -03:00
alfrix 2121d4a6aa system: updater: hide the end button until the update completes
it's already not sensitive but that is not intuitive sometimes
2022-10-26 22:36:52 -03:00
alfrix 17e4bb704e exclude: fix vertical mode, fix last object cancel and make it exit 2022-10-26 22:36:52 -03:00
alfrix d3281379ee gtk: change scaling of images
This reduces the amount of magic numbers used, some images will scale to bigger sizes, most of the icons and images in vertical mode will be bigger, thumbnails should be bigger in both modes.
2022-10-26 22:36:52 -03:00
alfrix 62fd6b96f8 job_status: change filename max characters
now it's more consistent and takes into account font size
2022-10-26 22:36:52 -03:00
alfrix b9effb5447 screensaver: fix dialogs not hiding 2022-10-26 22:36:52 -03:00
alfrix 70b5532695 bed_mesh: fix issues and improve
Fix sometimes not showing the current mesh
Remove calibrate from the list, (use the top bar)
Minimum Zscale is now -1 to 1 mm
Colorscale is now -0.2 to 0.2 mm tends to clip less on the usable range
Code cleanup and de-duplication
2022-10-21 14:58:07 -03:00
alfrix 1332045128 installer: the workaround for pip 22 should not be needed by now 2022-10-15 18:56:05 -03:00
alfrix 1305b40c41 refactors and cleanup 2022-10-14 13:27:01 -03:00
alfrix e208873e46 temperature: merge nested ifs 2022-10-14 10:19:44 -03:00
alfrix 723662074e Change togglebuttons to regular buttons to simplify code 2022-10-14 10:19:44 -03:00
alfrix 4b7fda9ba0 zcalibrate: fix XY offset not applied if one of them is not defined 2022-10-14 10:19:44 -03:00
alfrix 2e026aef56 extrude: make the speed and distance configurable close #673 2022-10-14 10:19:44 -03:00
alfrix 28fe1bf6d8 Update Locales: Thanks Tal Rahav for the Hebrew translation 2022-10-14 10:19:44 -03:00
alfrix 4076e6349a limits and retraction: infinite sliders 2022-10-14 10:19:44 -03:00
alfrix d0d171e676 print: hide files and directories starting with . 2022-10-14 10:19:44 -03:00
alfrix 978bb72e20 Fix: Printer not connecting if [pause_resume] is missing
fix #752
2022-10-14 10:19:44 -03:00
Ben Konsemüller 74dee10d39 Fix: Heaters not showing their respective power percentages (#747) 2022-10-08 09:52:46 -03:00
Alfredo Monclus a83bbed85a exclude: graph (#743)
Also support name wrapping and remove the object from the list if it was excluded (easier to see)
2022-10-04 10:52:44 -03:00
alfrix c2991364ba fine-tune: fix PEP8 E303 2022-10-01 12:35:01 -03:00
alfrix 2224478ea0 fine-tune: change the labels as soon as the button was pressed, this should give better feedback when the change is delayed by klipper 2022-10-01 12:32:28 -03:00
alfrix 089076c72c docs: zcalibrate: explain move
close #738
2022-09-30 16:14:08 -03:00
alfrix 72413544c8 job_status: animated label compute max characters 2022-09-27 16:49:24 -03:00
alfrix 032638e027 docs: move and improve thumbnail information 2022-09-27 16:49:11 -03:00
alfrix 79b3429837 network: fix panel not loading if the wifi module has not ben initialized
close #736
2022-09-27 15:16:04 -03:00
Selim 35571fce8a Turkish language Update (#734) 2022-09-22 09:50:40 -03:00
Nick Doumaandalfrix 1b758b85c6 Add Desktop file to easily start KlipperScreen on a normal Linux desktop (#713)
Co-authored-by: alfrix <alfredomonclus@gmail.com>
2022-09-21 20:18:22 -03:00
alfrix 2f427f7b82 lint fixes and minor refactorings 2022-09-21 11:54:49 -03:00
dependabot[bot] c061378e62 build(deps): bump websocket-client from 1.4.0 to 1.4.1 (#721)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.4.0...v1.4.1)

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

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

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

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

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

* Prefer extra items on job_status over the power

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

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

* job_status: inherit the parent config

* screen: create reload_panels to avoid some service restarts

* extrude: fix power breaking multi-extruder setups

* main and temp: remove degrees char from the table

* main and temp: revert removal of the header

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

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

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

* Move checks for non-validated sections to start

Rather than looping through the whole if..elif.. block, fail fast if
we're not actually going to validate the section.
2022-09-05 21:27:09 -03:00
alfrix abe12cca30 printer: fix issue that could cause the panels to not show up on startup if moonraker is not connected 2022-09-05 21:02:04 -03:00
alfrix 43c3a4b20d screensaver fix color 2022-09-05 19:44:26 -03:00
alfrix 856e204750 config: fix validator not recognizing calibrate positions 2022-09-04 11:37:50 -03:00
alfrix 2d7486974c config: validator fix floats 2022-09-03 18:25:57 -03:00
alfrix fd7ff6b0cd Update Spanish 2022-09-02 21:21:48 -03:00
alfrix 2939bbe543 system: fix an issue with the updater dialog getting off screen 2022-09-02 21:19:17 -03:00
alfrix 07b134f1a0 Update translation files 2022-09-02 21:03:19 -03:00
dependabot[bot] 5392b9337d build(deps): bump pygobject from 3.42.1 to 3.42.2 (#677)
Bumps [pygobject](https://pygobject.readthedocs.io) from 3.42.1 to 3.42.2.

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 20:09:04 -03:00
dependabot[bot] d2fccca2fc build(deps): bump websocket-client from 1.3.3 to 1.4.0 (#711)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.3.3 to 1.4.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.3.3...v1.4.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 20:08:50 -03:00
Nick Douma 89e89ae1b2 Change URL protocol to HTTPS and WSS when connecting to port 443 2022-09-02 19:58:53 -03:00
alfrix a599d667e9 docs:add wifi fix to troubleshooting 2022-09-02 19:58:35 -03:00
alfrix 09375c138c docs: fix command in troubleshooting 2022-09-02 19:58:35 -03:00
alfrix 28303573f9 print: shorter sort label (same as macros panel) 2022-09-02 19:58:35 -03:00
alfrix 54764be269 job_status: show acceleration as integer
usually is in the thousands, it shouldn't matter
2022-09-02 19:58:35 -03:00
alfrix 657f1b133f zcalibrate: fix wrong sign in new offset 2022-09-02 19:58:35 -03:00
alfrix 1704276c2d config: silently remove quotes from the api_key
This fixes a user error where it copies the quotes too
2022-09-02 19:58:35 -03:00
alfrix 97f170ba59 buttons: resize side images for better alignment 2022-09-02 19:58:35 -03:00
alfrix 553423e3d8 klippygtk: fix cases where wrap and ellipsize was not applied 2022-09-02 19:58:35 -03:00
alfrix de7b57f6b7 files: change reset to reinitialize 2022-09-02 19:58:35 -03:00
alfrix 2d8b5c1974 job_status: fix issue when checking the state too early 2022-09-02 19:58:35 -03:00
alfrix be2d5b040c temperature: do set temperature_fan to 0 when pressing cooldown 2022-09-02 19:58:35 -03:00
alfrix d1604c68d6 temp: do not change preheat selections while in the numpad
it's possible to just use one selection list and unselect the rest,
but i think that there is some benefit in usability keeping the selections separated
2022-09-02 19:58:35 -03:00
alfrix 2902e95068 temp: show the popover if name is pressed for 1 second (longpress) 2022-09-02 19:58:35 -03:00
alfrix 4cb17c18a9 main temp: add the ability to hide the graph 2022-09-02 19:58:35 -03:00
alfrix e140120b44 main temp: load the visibility of items 2022-09-02 19:58:35 -03:00
alfrix 0d2c1b013b graph: fix error on touch 2022-09-02 19:58:35 -03:00
alfrix 70e3091127 system: use separators 2022-09-02 19:58:35 -03:00
alfrix c57915ef19 temp: fix styling not updating when entering and exiting numpad 2022-09-02 19:58:35 -03:00
alfrix c604c25d71 system: simplify restart labels 2022-09-02 19:58:35 -03:00
alfrix e986e3cd8e fix PEP8 E303 and make the code check more strict 2022-09-02 19:58:35 -03:00
alfrix ce8762da19 installer: drop matchbox requirement and add an updater note 2022-09-02 19:58:35 -03:00
alfrix 4f959696bd gtk: remove newlines to properly wrap lines if needed
this fixes the issue caused by labels with a newlines detected as 1 line even if it has more than one
2022-09-02 19:58:35 -03:00
alfrix 64335b3fef docs: only list main configurations not changeable from the UI 2022-09-02 19:58:35 -03:00
alfrix 22081148fe screen: close dialogs when job_status is loaded 2022-09-02 19:58:35 -03:00
alfrix b1237ea75e config: add fallback values to booleans 2022-09-02 19:58:35 -03:00
alfrix c1f17b154c system: add shutdown and restart host 2022-09-02 19:58:35 -03:00
alfrix ea5c5afa5e gtk: do not try to ellipsize if the label is None 2022-09-02 19:58:35 -03:00
alfrix f60a878e7b main and temp: save visibility of items 2022-09-02 19:58:35 -03:00
alfrix 38ceea5204 gtk: improve wrapping of labels 2022-09-02 19:58:35 -03:00
alfrix 836e4a3aea screen: some models need blanking for dpms to work properly 2022-09-02 19:58:35 -03:00
alfrix 4124a67450 gtk: fix scrolling stuck on some cases 2022-09-02 19:58:35 -03:00
alfrix 6db43af8cb exclude: add exclude objects support 2022-09-02 19:58:35 -03:00
alfrix 3e5855d207 config: add validator 2022-09-02 19:58:35 -03:00
alfrix 2c8436500c base_panel: fix possible causes of error in show heaters fixes #706 2022-08-21 15:15:24 -03:00
AntoszHUN 5366df6e2c Hungarian Language Update (#703)
The Hungarian language package has been updated.

    I updated the words that were included earlier.
    I translated the words that were included earlier.
    I translated the most recently added words.
    Fixed other translation errors.

Signed-off-by: AntoszHUN zsikaiantal@gmail.com
2022-08-18 23:45:00 -03:00
Selim 036ba207ee Turkish Language Update (#696) 2022-08-11 14:57:45 -03:00
alfrix 6cebf6ad0d docs: create specific pages for some panels 2022-08-11 14:56:43 -03:00
alfrix 3847fea315 Update translation files 2022-08-10 12:02:07 -03:00
alfrix 200dca9dd3 dump more info during exceptions 2022-08-10 10:49:23 -03:00
Selim 6863d1c32e Turkish Update 8 (#694) 2022-08-10 10:48:59 -03:00
alfrix 737447939f main_menu: more direct temp input fix #626 2022-08-08 11:20:26 -03:00
alfrix 393586b191 pins: fix #689 2022-08-08 11:01:25 -03:00
alfrix 5a39e24230 docs: update configuration filter list for menu
close #374 this updates the available filter list
2022-08-07 06:48:51 -03:00
alfrix 054fc80006 bed_level: fix label rounding 2022-08-07 06:30:18 -03:00
alfrix 2d2605b526 scripts: add build_docs to test locally doc changes 2022-08-06 14:47:50 -03:00
alfrix 58bddd58a8 system: remove unneeded extra blank line 2022-08-06 14:46:18 -03:00
alfrix 79cef455af screen: make the error message more clear and provide more details 2022-08-06 14:39:31 -03:00
alfrix 6094d4b6c0 system: add autoscroll and improve how the list of changes look 2022-08-06 12:56:57 -03:00
alfrix be1b5228c1 bed_level: fix label rounding issues 2022-08-06 12:08:05 -03:00
alfrix 36225ed59f docs: add bed level 2022-08-06 09:41:48 -03:00
alfrix 835803d329 screen: do not ask to save unless printer is in standby close #692 2022-08-03 11:56:02 -03:00
alfrix 0ec2baf302 bed_level: fix for printers without name/config 2022-08-02 13:21:03 -03:00
alfrix c1b34839bc move: fix cannot move if the printer was not named 2022-08-02 12:18:08 -03:00
alfrix 83c6f87281 temperature: fix blank space if the special cooldown is not at the bottom of the config #688 2022-08-02 09:31:48 -03:00
alfrix 455cb9da99 temperature: fix cooldown after 207914a 2022-08-02 08:57:16 -03:00
alfrix f37a6b579f docs: add an alternative to calibration 2022-08-01 22:47:01 -03:00
alfrix e332ccc22a pins: assign initial value if configured fix #689 2022-08-01 21:27:19 -03:00
alfrix 207914a5b5 temperature: fix for users that want to have temps in cooldown fix #688 2022-08-01 21:11:37 -03:00
alfrix c06ca56ea0 job_status: fix #690 2022-08-01 20:44:04 -03:00
alfrix b1f149495d themes: update material-dark and material-darker 2022-08-01 17:25:13 -03:00
alfrix 16871f967e Add bed-mesh icon 2022-08-01 13:59:09 -03:00
alfrix 7ba83227bd system: autoclose popup 2022-08-01 12:59:52 -03:00
alfrix 6fee87fb18 Update translations 2022-08-01 12:34:11 -03:00
Franklyn Tackitt 4e701c88ad Make installation configurable
```sh
KLIPPERSCREEN_VENV=$HOME/.venvs/klipperscreen ./scripts/KlipperScreen-install.sh
```
2022-08-01 12:24:18 -03:00
alfrix a68a3df2e6 docs: use_dpms must be in main not in printer 2022-08-01 12:23:40 -03:00
alfrix af1ae9a0ec system: Add check for updates close #681 2022-08-01 12:23:40 -03:00
alfrix de84bd6597 only allow 1 confirm dialog 2022-08-01 12:23:40 -03:00
alfrix d5bc271788 close dialogs on klippy restart 2022-08-01 12:23:40 -03:00
alfrix e8e4555d46 temperature: Support specific preheat items close #428 2022-08-01 12:23:40 -03:00
alfrix af158a4279 bed_level: support 3 screws close #606 2022-08-01 12:23:40 -03:00
alfrix ad614e6734 fix macros shortcut not showing in the action_bar 2022-08-01 12:23:40 -03:00
alfrix eb17bb58ad screen_panel: remove unused parameters 2022-08-01 12:23:40 -03:00
alfrix 9c2b52009a built-in keyboard 2022-08-01 12:23:40 -03:00
alfrix 0d8746d3e3 bed_mesh: clear button calibrate button, fixed sizes cleanups 2022-08-01 12:23:40 -03:00
alfrix a0cff7ec56 simplify name spliting 2022-08-01 12:23:40 -03:00
alfrix 317f9df4b5 job_status: now works without extruders or fans 2022-08-01 12:23:40 -03:00
alfrix 422f5619be system: add webcamd to allowed services to restart 2022-08-01 12:23:40 -03:00
alfrix 88ca902a4b popups: wrap long messages, increase margins, touch anywhere to close 2022-08-01 12:23:40 -03:00
alfrix c047bed518 bed_level: hide the panel if bed_screws or screws_tilt_calculate are not defined
there are printers with fixed beds that don't need this panel
2022-08-01 12:23:40 -03:00
alfrix aa2bfcbaee print: add delete file
this is temporary, to delete a file click the thumbnail
TODO: context menu or other solution to be decided
2022-08-01 12:23:40 -03:00
alfrix 752e53ff56 screen: popups can be configured to not close #456 2022-08-01 12:23:40 -03:00
alfrix 5234a5dc15 main_menu: don't show the graph if there are no available devices 2022-08-01 12:23:40 -03:00
alfrix 3bae1a4da8 menu: show temp if there are only extruders, heater_pin in klipper is mandatory for extruders 2022-08-01 12:23:40 -03:00
alfrix fda5589531 screen: Always ask to save config if we detect it on responses 2022-08-01 12:23:40 -03:00
alfrix f9e6ac62b7 main menu and temp cleanups and tweaks 2022-08-01 12:23:40 -03:00
alfrix fcbe264d1a network: panel tweaks 2022-08-01 12:23:40 -03:00
alfrix 25e6110dab output_pin panel close #546 2022-08-01 12:23:40 -03:00
alfrix aa5f91a548 Wait more time to initialize 2022-08-01 12:23:40 -03:00
alfrix 6510b2ec6b Refactor
Use f-strings
Avoid unnecessary casts to str()bool()int()
Ensure file closure
Merge nested ifs
Simplify for-assigns-appends with comprehensions and internal functions
Avoid shadowing internal function names
Initialize variables
Return value directly instead of assign then return
Make some methods static
2022-08-01 12:23:40 -03:00
alfrix 68d4f9c534 keyboard: fix for long vertical screens 2022-08-01 12:23:40 -03:00
alfrix a44f8f7b13 job_status: fix issue with thumbnails in some resolutions 2022-07-19 11:39:13 -03:00
alfrix e1961db6e9 docs: add an alternative way of booting to console 2022-07-18 18:49:03 -03:00
alfrix 41f0a4c4ce fix matchbox-keyboard not opening on Buster fix #674 2022-07-18 18:42:04 -03:00
AntoszHUN fedb0a3387 Update Hungarian Language (#675) 2022-07-17 17:29:22 -03:00
fengz41 d69b0ac66a Update Chinese Translation (#676) 2022-07-17 17:29:07 -03:00
Selim 020e20db44 Turkish_update (#672) 2022-07-12 14:59:01 -03:00
AntoszHUN 050cc13e57 Update Hungarian Language (#669) 2022-07-08 08:45:16 -03:00
alfrix 37c10fc8b3 keyboard: fix for long vertical screens 2022-07-04 16:33:26 -03:00
alfrix e70c9d37e9 layout: fixes for long vertical screens
KS is not optimized for this aspect-ratio, but at least it shouldn't be broken
2022-07-04 16:23:21 -03:00
alfrix fd221bde86 docs: fix location of rotation guide 2022-07-04 14:39:20 -03:00
alfrix e616c842ed docs: add a screen rotation guide 2022-07-04 14:16:26 -03:00
alfrix f97bed826b style: deprecate active_device class 2022-07-04 13:46:04 -03:00
alfrix 9833b887ad screen: fix restart #667 2022-07-04 13:30:16 -03:00
alfrix 92335b78a0 docs: fix links 2022-07-04 10:58:53 -03:00
alfrix 6b88ac0558 base_panel: fix #666 2022-07-03 18:04:57 -03:00
alfrix 3babd0e02c job_status: fix issue with layer height 2022-07-03 15:57:02 -03:00
alfrix d295129fa0 docs: fix missing extension 2022-07-03 12:18:43 -03:00
151 changed files with 7330 additions and 5472 deletions

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ name: test-code
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
lint-python-code: lint-python-code:
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: ricardochaves/python-lint@v1.4.0 - uses: ricardochaves/python-lint@v1.4.0
@@ -14,4 +14,4 @@ jobs:
use-black: false use-black: false
use-mypy: false use-mypy: false
use-isort: false use-isort: false
extra-pycodestyle-options: "--ignore=E226,E301,E302,E303,E402,W503,W504 --max-line-length=120 --max-doc-length=120" extra-pycodestyle-options: "--ignore=E402,W503,W504 --max-line-length=120 --max-doc-length=120"
+1
View File
@@ -0,0 +1 @@
screen.py
+15 -6
View File
@@ -28,8 +28,8 @@ search "how to enable android debugging on device-model-and-brand"
```bash ```bash
cd ~/KlipperScreen/scripts cd ~/KlipperScreen/scripts
cp android-adb.sh launch_KlipperScreen cp sample-android-adb.sh launch_KlipperScreen.sh
chmod +x launch_KlipperScreen chmod +x launch_KlipperScreen.sh
``` ```
* Go to [Startup](#startup) * Go to [Startup](#startup)
@@ -41,13 +41,13 @@ chmod +x launch_KlipperScreen
```bash ```bash
cd ~/KlipperScreen/scripts cd ~/KlipperScreen/scripts
touch launch_KlipperScreen.sh touch launch_KlipperScreen.sh
chmod +x launch_KlipperScreen chmod +x launch_KlipperScreen.sh
nano launch_KlipperScreen nano launch_KlipperScreen.sh
``` ```
* Paste this into the script (edit the IP for example: 192.168.1.2:0) * Paste this into the script (replace the example IP)
```bash ```bash
DISPLAY=(ip address from blue screen):0 $KS_XCLIENT DISPLAY=192.168.150.122:0 $KS_XCLIENT
``` ```
!!! important !!! important
@@ -73,6 +73,15 @@ sudo service KlipperScreen stop
sudo service KlipperScreen start sudo service KlipperScreen start
``` ```
## Stop Screen Blanking in Xserver-XSDL
Even after enabling the "Stay Awake" option in the Developer/USB Debugging options of your Android device, the Xserver-XSDL may still go to a black screen but keep the backlight of your device on. To keep the screen always active, upon start up of Xserver-XSDL app, select the `Change Device Configuration` at the top of the splash screen and then select the `Command line parameters, one argument per line` option. Append the following argument (must be on seperate lines):
```
-s
0
```
This will disable the screen-saver in Xserver and keep KlipperScreen always active.
## Migration from other tutorials ## Migration from other tutorials
KlipperScreen says error option "service" is not supported anymore. KlipperScreen says error option "service" is not supported anymore.
+43 -37
View File
@@ -1,7 +1,7 @@
# Configuration # Configuration
Usually you don't need to create a configuration file, but if you need to change something that is not changeable in the UI Usually you don't need to create a configuration file, but if you need to change something that is not changeable in the UI
create a blank file in `~/klipper_config/KlipperScreen.conf`, if the file already exist then just edit it. create a blank file in `~/printer_data/config/KlipperScreen.conf`, if the file already exist then just edit it.
Write in the file only the options that need to be changed, and restart KlipperScreen. Write in the file only the options that need to be changed, and restart KlipperScreen.
@@ -13,13 +13,9 @@ Write in the file only the options that need to be changed, and restart KlipperS
## Main Options ## Main Options
The options listed here are not changeable from within the ui.
```py ```py
[main] [main]
# Invert axis in move panel. Default is False. Change to true to invert
invert_x: False
invert_y: False
invert_z: False
# Time in seconds before the Job Status page closes itself after a successful job/print # Time in seconds before the Job Status page closes itself after a successful job/print
# 0 means disabled # 0 means disabled
job_complete_timeout: 0 job_complete_timeout: 0
@@ -27,23 +23,15 @@ job_complete_timeout: 0
# Time in seconds before the Job Status closes itself if an error is encountered # Time in seconds before the Job Status closes itself if an error is encountered
job_error_timeout: 0 job_error_timeout: 0
# Specify the language
# The language can be specified here instead of using the system default language.
language: en
# Allows the cursor to be displayed on the screen # Allows the cursor to be displayed on the screen
show_cursor: False show_cursor: False
# Allows to define custom systemctl command for restart like xrdp
service: KlipperScreen
# If multiple printers are defined, this can be set the name of the one to show at startup. # If multiple printers are defined, this can be set the name of the one to show at startup.
default_printer: Ender 3 Pro 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
``` ```
## Printer Options ## Printer Options
@@ -84,24 +72,34 @@ titlebar_name_type: None
calibrate_x_position: 100 calibrate_x_position: 100
calibrate_y_position: 100 calibrate_y_position: 100
# Screen DPMS # Bed Screws
# By default DPMS is used to turn off the screen, this should prevent burn-in and save power. # define the screw positons required for odd number of screws in a comma separated list
# However if you find that your screen doesn't turn off because it doesn't support it # possible values are: bl, br, bm, fl, fr, fm, lm, rm
# Setting this to false will just turn the screen black. # they correspond to back-left, back-right, back-middle, front-left, front-right, front-middle, left-middle, left-right
use_dpms: True screw_positions: ""
# Rotation is useful if the screen is not directly in front of the machine.
# Valid values are 0 90 180 270
screw_rotation: 0
# Define distances and speeds for the extrude panel. CSV list 2 to 4 integers
extrude_distances: 5, 10, 15, 25
extrude_speeds: 1, 2, 5, 25
``` ```
## Preheat Options ## Preheat Options
```py ```py
[preheat my_temp_setting] [preheat my_temp_setting]
# Temperature for the heated bed
bed: 40
# Temperature for the tools
extruder: 195 extruder: 195
# Temperature for generic heaters extruder1: 60
heater_generic: 40 heater_bed: 40
# Temperature controlled fans (temperature_fan in klipper config) # Use the name
chamber: 60
# or the full name
heater_generic chamber: 60
# or for example apply the same temp to devices of the same type
temperature_fan: 40 temperature_fan: 40
heater_generic: 60
# optional GCode to run when the option is selected # optional GCode to run when the option is selected
gcode: MY_HEATSOAK_MACRO gcode: MY_HEATSOAK_MACRO
``` ```
@@ -114,14 +112,6 @@ for example:
gcode: M107 gcode: M107
``` ```
## Bed Screws
```py
[bed_screws]
# Rotation is useful if the screen is not directly in front of the machine.
# Valid values are 0 90 180 270
rotation: 0
```
## Menu ## Menu
This allows a custom configuration for the menu displayed while the printer is idle. You can use sub-menus to group This allows a custom configuration for the menu displayed while the printer is idle. You can use sub-menus to group
different items and there are several panel options available. It is possible to have a gcode script run on a menu different items and there are several panel options available. It is possible to have a gcode script run on a menu
@@ -149,12 +139,27 @@ Available panels are listed here: [docs/panels.md](Panels.md)
Certain variables are available for conditional testing of the enable statement: Certain variables are available for conditional testing of the enable statement:
```py ```py
printer.bltouch # Available if bltouch section defined in config printer.extruders.count # Number of extruders
printer.temperature_devices.count # Number of temperature related devices that are not extruders
printer.fans.count # Number of fans
printer.power_devices.count # Number of power devices configured in Moonraker
printer.gcode_macros.count # Number of gcode macros printer.gcode_macros.count # Number of gcode macros
printer.output_pins.count # Number of fans
printer.bltouch # Available if bltouch section defined in config
printer.probe # Available if probe section defined in config
printer.bed_mesh # Available if bed_mesh section defined in config
printer.quad_gantry_level # Available if quad_gantry_level section defined in config
printer.z_tilt # Available if z_tilt section defined in config
printer.firmware_retraction # True if defined in config
printer.input_shaper # True if defined in config
printer.bed_screws # True if defined in config
printer.screws_tilt_adjust # True if defined in config
printer.idle_timeout # Idle timeout section printer.idle_timeout # Idle timeout section
printer.pause_resume # Pause resume section of Klipper printer.pause_resume # Pause resume section of Klipper
printer.probe # Available if probe section defined in config
printer.power_devices.count # Number of power devices configured in Moonraker
``` ```
@@ -187,7 +192,8 @@ KlipperScreen will search for a configuration file in the following order:
1. _~/KlipperScreen.conf_ 1. _~/KlipperScreen.conf_
2. _${KlipperScreen_Directory}/KlipperScreen.conf_ 2. _${KlipperScreen_Directory}/KlipperScreen.conf_
3. _~/klipper_config/KlipperScreen.conf_ 3. _~/printer_data/config/KlipperScreen.conf_
4. _~/klipper_config/KlipperScreen.conf_
If you need a custom location for the configuration file, you can add -c or --configfile to the systemd file and specify If you need a custom location for the configuration file, you can add -c or --configfile to the systemd file and specify
the location of your configuration file. the location of your configuration file.
+50 -2
View File
@@ -5,6 +5,7 @@ There are no recommended screens, but the minimum supported resolution is 480x32
#### Hardware known to work #### Hardware known to work
* [BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part) * [BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part)
* [BTT HDMI5/7](https://biqu.equipment/products/bigtreetech-hdmi5-v1-0-hdmi7-v1-0)
* [Raspberry PI 7" Touchscreen](https://www.raspberrypi.org/products/raspberry-pi-touch-display/) * [Raspberry PI 7" Touchscreen](https://www.raspberrypi.org/products/raspberry-pi-touch-display/)
* [Hyperpixel 4](https://shop.pimoroni.com/products/hyperpixel-4) * [Hyperpixel 4](https://shop.pimoroni.com/products/hyperpixel-4)
* [3.5" Elegoo](https://www.elegoo.com/de/products/elegoo-3-5-inch-tft-lcd-screen) * [3.5" Elegoo](https://www.elegoo.com/de/products/elegoo-3-5-inch-tft-lcd-screen)
@@ -13,14 +14,45 @@ There are no recommended screens, but the minimum supported resolution is 480x32
* [VoCore](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35/7) * [VoCore](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35/7)
* [WAVESHARE 4.3 inch DSI LCD](https://www.waveshare.com/4.3inch-dsi-lcd.htm) * [WAVESHARE 4.3 inch DSI LCD](https://www.waveshare.com/4.3inch-dsi-lcd.htm)
* [DFrobot DFR0550](https://wiki.dfrobot.com/5%27%27TFT-Display_with_Touchscreen_V1.0_SKU_DFR0550) * [DFrobot DFR0550](https://wiki.dfrobot.com/5%27%27TFT-Display_with_Touchscreen_V1.0_SKU_DFR0550)
* ![Android phone](Android.md) * [Android phone](Android.md)
* [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35) * [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35)
### Configuration ### Configuration
Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then ![install](Installation.md) KlipperScreen, if you are having troubles refer to the ![troubleshooting page](Troubleshooting.md) for further information. Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then [install](Installation.md) KlipperScreen, if you are having troubles refer to the [troubleshooting page](Troubleshooting.md) for further information.
## Screen rotation
Currently there is no support for rotation at runtime, do not use xrandr to rotate the screen.
Configure the server to start in the desired orientation, there are many ways to achieve this, here is one:
Create /usr/share/X11/xorg.conf.d/90-monitor.conf
```bash
sudo nano /usr/share/X11/xorg.conf.d/90-monitor.conf
```
Paste this section modifying the options to suit your needs:
```
Section "Monitor"
Identifier "DPI-1"
# This identifier would be the same as the name of the connector printed by xrandr.
# it can be "HDMI-0" "DisplayPort-0", "DSI-0", "DVI-0", "DPI-0" etc
Option "Rotate" "left"
# Valid rotation options are normal,inverted,left,right
Option "PreferredMode" "1920x1080"
# May be necesary if you are not getting your prefered resolution.
EndSection
```
Save the file and restart KlipperScreen.
```bash
sudo service KlipperScreen restart
```
## Touchscreen touch rotation ## Touchscreen touch rotation
@@ -69,6 +101,22 @@ To make this permanent, modify the file `/etc/udev/rules.d/51-touchscreen.rules`
```sh ```sh
ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>" ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
``` ```
As an alternative if the above doesn't work:
edit /usr/share/X11/xorg.conf.d/40-libinput.conf
for example:
```sh
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
EndSection
```
More info about input transformation can be found in: More info about input transformation can be found in:
* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation) * [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation)
+4 -6
View File
@@ -6,10 +6,11 @@ Install the screen, following the instructions provided by the manufacturer, Som
It's strongly recommended to test it and ensure your hardware is working with Raspbian, Ubuntu or any distro you like. It's strongly recommended to test it and ensure your hardware is working with Raspbian, Ubuntu or any distro you like.
Once you stablished that the screen is working, then proceed installing KlipperScreen. Once you stablished that the screen is working, then proceed installing KlipperScreen.
## Setup Raspberry Pi ## Setup
This install process is meant for Raspbian non-desktop version aka Raspbian Lite, but it works on other versions. This install process is meant for a non-desktop version of the OS for example Raspbian Lite, but it should work on other versions.
If you want to use it on Raspbian desktop (GUI version), then use `sudo raspi-config` to set boot to console by choosing the following options in order: If you want to use it on a desktop (GUI version), then do `sudo systemctl set-default multi-user.target`
if it's a Raspberry Pi, you can use `sudo raspi-config` to set boot to console by choosing the following options in order:
```sh ```sh
1System Options 1System Options
@@ -17,9 +18,6 @@ If you want to use it on Raspbian desktop (GUI version), then use `sudo raspi-co
└──B1 Console └──B1 Console
``` ```
!!! note
Other distros will be different on how to boot to console.
## Auto install ## Auto install
[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions. [KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
+28
View File
@@ -0,0 +1,28 @@
# Job Status
Also known as "Print Status" or the "printing panel" shows the relevant information of the current print.
![Screenshot](img/panels/job_status.png)
!!! tip
the third row shows the LCD message (`M117`)
This panel has more information than it shows by default, just click/tap the corresponding the status buttons to access the extra information
## Position info
![speed_screenshot](img/panels/job_status_speed.png)
!!! note
Layer is calculated from object height, it may not be accurate if variable layer is used
If that is the case use the Layer Progress method described in the [Quicktips](Quicktips.md#layer-progress)
## Extrusion info
![extrusion_screenshot](img/panels/job_status_extrusion.png)
## Time info
![time_screenshot](img/panels/job_status_time.png)
## Extra temperature items
By default only extruder and bed temperatures will be available but additional items can be defined
using ["titlebar_items" in the config](Configuration.md#printer-options)
+28 -34
View File
@@ -3,36 +3,30 @@
### Main Menu ### Main Menu
![Main Menu](img/panels/main_panel.png) ![Main Menu](img/panels/main_panel.png)
### Job Status ### [Job Status](Job_status.md)
```py ```py
panel: job_status panel: job_status
``` ```
![Job Status](img/panels/job_status.png) ![Job Status](img/panels/job_status.png)
### Bed Level ### [Bed Level](Screws.md)
```py ```py
panel: bed_level panel: bed_level
``` ```
![Bed Level](img/panels/bed_level.png) ![Bed Level](img/panels/bed_level.png)
The bed level panel has the ability to have preset locations from Klipper. Please see documentation on the following
Klipper Sections:
* [bed_screws](https://www.klipper3d.org/Config_Reference.html#bed_screws)
* [screws_tilt_adjust](https://www.klipper3d.org/Config_Reference.html#screws_tilt_adjust)
_Important Note: Due to Klipper using the bltouch/probe offsets in screws_tilt_adjust, if a bltouch/probe is enabled_
_KlipperScreen will add the offset to the defined screw values. This will not occur if bed_screws section is used._
This panel will favor screws_tilt_adjust over the bed_screws section. If screws_tilt_adjust is defined, an extra button
for _Screws Calibrate_ will appear. This button runs the SCREWS_TILT_CALCULATE command and shows the results on the
panel.
### Bed Mesh ### Bed Mesh
```py ```py
panel: bed_mesh panel: bed_mesh
``` ```
![Bed Mesh](img/panels/bed_mesh.png) ![Bed Mesh](img/panels/bed_mesh.png)
### Console
```py
panel: console
```
![Console](img/panels/console.png)
### Extrude ### Extrude
```py ```py
panel: extrude theme:material-dark panel: extrude theme:material-dark
@@ -57,6 +51,18 @@ panel: gcode_macros
``` ```
![Gcode Macros Panel](img/panels/gcode_macros.png) ![Gcode Macros Panel](img/panels/gcode_macros.png)
### Input Shapers
```py
panel: input_shaper
```
![Limits](img/panels/input_shaper.png)
### Limits
```py
panel: limits
```
![Limits](img/panels/limits.png)
### Menu ### Menu
![Menu Panel](img/panels/menu.png) ![Menu Panel](img/panels/menu.png)
@@ -84,6 +90,12 @@ panel: print
``` ```
![Print Panel](img/panels/print.png) ![Print Panel](img/panels/print.png)
### Retraction
```py
panel: retraction
```
![Limits](img/panels/retraction.png)
### Settings ### Settings
```py ```py
panel: settings panel: settings
@@ -96,32 +108,14 @@ panel: system
``` ```
![System Panel](img/panels/system.png) ![System Panel](img/panels/system.png)
### Temperature ### [Temperature](Temperature.md)
```py ```py
panel: temperature panel: temperature
``` ```
![Temperature](img/panels/temperature.png) ![Temperature](img/panels/temperature.png)
### Z Calibrate ### [Z Calibrate](Zcalibrate.md)
```py ```py
panel: zcalibrate panel: zcalibrate
``` ```
![Z Calibrate](img/panels/zcalibrate.png) ![Z Calibrate](img/panels/zcalibrate.png)
### Limits
```py
panel: limits
```
![Limits](img/panels/limits.png)
### Retraction
```py
panel: retraction
```
![Limits](img/panels/retraction.png)
### Input Shapers
```py
panel: input_shaper
```
![Limits](img/panels/input_shaper.png)
+1 -37
View File
@@ -30,44 +30,8 @@ fan1 will show in the interface, but _fan2 will be hidden.
## Thumbnails ## Thumbnails
KlipperScreen can display thumbnails in the file browser and as previews in the print status.
Moved to [Thumbnails](Thumbnails.md)
![Job Status](img/panels/job_status.png)
* [PrusaSlicer](#prusaslicer)
* [SuperSlicer](#superslicer)
* [Cura](#cura)
* [ideaMaker](#ideamaker)
### PrusaSlicer
In “Expert” mode PrusaSlicer has an option in the “Printer Settings” tab to activate previews.
Under General / Firmware.
![PrusaSlicer](img/quicktips/PrusaSlicer-thumbnails.png)
### SuperSlicer
In “Expert” mode SuperSlicer has some very convenient options in the “Printer Settings” tab to activate and customize the previews.
![SuperSlicer](img/quicktips/SuperSlicer-thumbnails.png)
### Cura
The Cura plugin [“Cura2Moonraker”](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin) is required for this.
![Cura](img/quicktips/Cura-thumbnails.png)
### ideaMaker
To enable thumbnails, open the Advanced tab in the printer settings, enable the GCode Thumbnails for Octoprint and Mainsail option and enter your prefered square format image size in the Resolution fields (e.g. 400 X 400). It’s necessary that the thumbnail width and height resolution is equal.
![ideaMaker](img/quicktips/IdeaMaker-thumbnails.png)
## Layer Progress ## Layer Progress
+43
View File
@@ -0,0 +1,43 @@
# Bed level
![Bed Level](img/panels/bed_level.png)
For this panel to appear in the menu `[bed_screws]` or `[screws_tilt_adjust]` need to be defined in Klipper config (printer.cfg)
!!! Important
* `[bed_screws]` uses nozzle positions (nozzle above the screw) [Read Klipper doc entry](https://www.klipper3d.org/Config_Reference.html#bed_screws)
* `[screws_tilt_adjust]` uses probe positions (probe above the screw) [Read Klipper doc entry](https://www.klipper3d.org/Config_Reference.html#screws_tilt_adjust)
The corner buttons in KlipperScreen place the nozzle above the screw to do the ["paper test"](https://www.klipper3d.org/Bed_Level.html?h=paper#the-paper-test).
When `[screws_tilt_adjust]` is defined a couple of things happen:
* A button named "Screws adjust" appears, it runs `SCREWS_TILT_CALCULATE` when is pressed,
and reports the amount to be adjusted into the labels of the corner buttons.
* `[bed_screws]` is now ignored by KlipperScreen. (explained below)
* The corner buttons are now `[screws_tilt_adjust]` coordinates with the probe offset applied. (explained below)
### Why `[bed_screws]` are ignored/not used?
Because if the probe offset is changed or the difference between `[bed_screws]` and `[screws_tilt_adjust]` wasn't calculated correctly,
the "Screws adjust" button stops working.
### Why the probe offset is applied to `[screws_tilt_adjust]`?
Because the corner buttons in KlipperScreen should place the nozzle above the screw to do the ["paper test"](https://www.klipper3d.org/Bed_Level.html?h=paper#the-paper-test). It doesn't affect the function of `SCREWS_TILT_CALCULATE`, which will go to the defined positions.
## Not supported for auto-detection
This message will appear if you are using 3 or 5 screws and didn't define them in KlipperScreen.conf.
See "screw_positions" in the [printer options](https://klipperscreen.readthedocs.io/en/latest/Configuration/#printer-options)
## Limitations
The panel doesn't support more than 8 screws or screws that directly in the center of the bed.
## Is there an alternative?
If you have a reliable probe, define `[bed_mesh]` in Klipper config, remove the springs
and use some thread-locker or locking nuts to fix the bed to the gantry, let the probe do a mesh save it and forget about this.
+23
View File
@@ -0,0 +1,23 @@
# Temperature
This panel is available when there is at least one device with a temperature sensor asociated,
this includes extruders, heaters, sensors and temperature_fans.
There are 3 main modes of operation:
## Preheat
[Define profiles](Configuration.md#preheat-options) to quickly change the target temperature of multiple selected devices.
This is the default mode when not printing.
![Preheat_screenshot](img/panels/temperature.png)
## Delta adjust
Change the target of the selected devices, the amount is selectable.
This is the default mode while printing
![Delta_screenshot](img/panels/temperature_delta.png)
## Direct input with keypad
Allows to set the exact temperature using the keypad.
![Keypad_screenshot](img/panels/temperature_keypad.png)
+59
View File
@@ -0,0 +1,59 @@
# Thumbnails
KlipperScreen can display thumbnails in the file browser and as previews in the print status.
![Job Status](img/panels/job_status.png)
Recommended sizes for thumbnails:
* 300 x 300 - For the larger previews.
* 32 x 32 - For the smaller thumbnails used in lists.
!!! note
Other sizes should work, but keep in mind bigger thumbnails are slower to load and can produce bigger gcode files.
## Select your slicer:
* [PrusaSlicer](#prusaslicer)
* [SuperSlicer](#superslicer)
* [Cura](#cura)
* [ideaMaker](#ideamaker)
### PrusaSlicer (2.3.0+)
In “Expert” mode PrusaSlicer has an option in the “Printer Settings” tab to activate previews.
Under General / Firmware.
![PrusaSlicer](img/quicktips/PrusaSlicer-thumbnails.png)
### SuperSlicer (2.2.54+)
In “Expert” mode SuperSlicer has some very convenient options in the “Printer Settings” tab to activate and customize the previews.
![SuperSlicer](img/quicktips/SuperSlicer-thumbnails.png)
### Cura
#### Option #1 A post processing script (Cura 4.9+)
1. With Cura open, navigate to Extensions, Post Processing, Modify G-Code
2. Click Add a script, and select Create Thumbnail
3. Set both Width and Height to 300
4. Click Add a script, and select Create Thumbnail
5. Set both Width and Height to 32
6. Click Close
#### Option #2 A plugin (Cura 4.7+)
[Cura2Moonraker](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin)
![Cura](img/quicktips/Cura-thumbnails.png)
### ideaMaker (4.2.1+)
1. Open the Advanced tab in the printer settings
2. Enable "GCode Thumbnails for Octoprint and Mainsail"
3. Set both Width and Height to 300
![ideaMaker](img/quicktips/IdeaMaker-thumbnails.png)
+5 -3
View File
@@ -14,6 +14,8 @@ have set your pi up for your preferred language.
* Save the file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.po`. * Save the file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.po`.
* Select `File -> Compile to MO`. Save this file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.mo` * Select `File -> Compile to MO`. Save this file as `ks_includes/locales/{LANGUAGE DESIGNATION}/KlipperScreen.mo`
Once you have followed those steps, as long as your pi is set up for your preferred language, KlipperScreen will Once you have followed those steps, restart KlipperScreen, and select it from the list in the settings.
automatically use the translations provided in the file. KlipperScreen currently does not detect RTL languages, but If you edited and recompiled, you need to restart KlipperScreen to reload the translation.
support for RTL is planned in the near future.
Do not edit the POT file as is automatically generated and your changes will be lost.
[Attach your translation on a GitHub issue or create a PR](Contact.md)
+43 -10
View File
@@ -5,12 +5,22 @@ This page will have common problems and common solutions to those problems.
The first step to troubleshooting any problem is getting the cause of the error. The first step to troubleshooting any problem is getting the cause of the error.
* Check for the file `/tmp/KlipperScreen.log` * Find KlipperScreen.log:
look at the contents by running `cat /tmp/KlipperScreen.log` or grab the file over WinSCP or another sftp program. !!! important
This is the most important file, and should be provided if you ask for support. This log file should be provided if you ask for support.
If that file is non-existent, run `journalctl -xe -u KlipperScreen` Depending on your setup the file could be accesible from the web interface alongside other logs
Mainsail | Fluidd
:-:|:-:
![m_logs](img/troubleshooting/logs_mainsail.png) | ![f_logs](img/troubleshooting/logs_fluidd.png)
if you can't find it in the web interface, use sftp to grab the log (for example Filezilla, WinSCP)
Located at `~/printer_data/logs`or in `/tmp/` if the former doesn't exists.
If KlipperScreen.log doesn't exist, run `systemctl status KlipperScreen`<br>
(or `journalctl -xe -u KlipperScreen`)
Check the file `/var/log/Xorg.0.log` where you can find issues with the X server. Check the file `/var/log/Xorg.0.log` where you can find issues with the X server.
@@ -33,11 +43,6 @@ usermod -a -G tty pi
``` ```
(if your username is not 'pi' change 'pi' to your username) (if your username is not 'pi' change 'pi' to your username)
You may also need:
```sh
sudo apt install xserver-xorg-legacy
```
Restart KlipperScreen: Restart KlipperScreen:
```sh ```sh
sudo service KlipperScreen restart sudo service KlipperScreen restart
@@ -45,7 +50,7 @@ sudo service KlipperScreen restart
If it's still failing as a last resort add `needs_root_rights=yes` to `/etc/X11/Xwrapper.config`: If it's still failing as a last resort add `needs_root_rights=yes` to `/etc/X11/Xwrapper.config`:
```sh ```sh
sudo echo needs_root_rights=yes>>/etc/X11/Xwrapper.config sudo bash -c "echo needs_root_rights=yes>>/etc/X11/Xwrapper.config"
``` ```
restart KS. restart KS.
@@ -111,6 +116,34 @@ 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
This can be caused because of the user is not allowed to control the interface
* Edit `/etc/wpa_supplicant/wpa_supplicant.conf` and add this line if it's not there:
```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
```
* Run `cat /etc/group | grep netdev`
If your username is not listed under that line, you need to add it with the following command:
```sh
usermod -a -G netdev pi
```
(if your username is not 'pi' change 'pi' to your username)
Then reboot the machine:
```
systemctl reboot
```
!!! tip
It's possible to just restart KlipperScreen and networking
## 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
+44
View File
@@ -0,0 +1,44 @@
# Zcalibrate
This panel supports various modes of operation to assist in the calibration of the Z axis of the machine.
It's strongly suggested to read Klipper documentation about [Bed level](https://www.klipper3d.org/Bed_Level.html)
![Screenshot](img/panels/zcalibrate.png)
## Buttons
* "Start" will initiate the only method available, or ask the user if multiple methods are available.
!!! note
KlipperScreen will home if needed and move to the middle of the bed,
but the location can be configured in [KlipperScreen.conf](https://klipperscreen.readthedocs.io/en/latest/Configuration/#printer-options)
* The raise(+) and lower(-) buttons send `TESTZ Z=distance` where distance is selected in the bottom row.
* Accept will send `ACCEPT`
* Abort will send `ABORT`
## Calibration methods
### Endstop (`Z_ENDSTOP_CALIBRATE`)
Available when an physical endstop is defined for `[stepper_z]`
See Klipper documentation: [Calibrating a Z endstop](https://www.klipper3d.org/Manual_Level.html#calibrating-a-z-endstop)
### Probe (`PROBE_CALIBRATE`)
Available when a probe is defined. (BL-Touch is a probe)
See Klipper documentation: [Calibrating probe Z offset](https://www.klipper3d.org/Probe_Calibrate.html#calibrating-probe-z-offset)
### Bed mesh (`BED_MESH_CALIBRATE`)
Available when a probe is not defined and `[bed_mesh]` is defined
this mode lets you create a mesh leveling bed using the paper test in various points.
!!! warning
DO NOT adjust the bed screws while using this mode.
Adjust the screws using the [bed screws](Screws.md) panel before running this tool.
### Delta Automatic/Manual (`DELTA_CALIBRATE`)
Available when the kinematics are defined as delta.
See Klipper documentation: [Delta calibration](https://www.klipper3d.org/Delta_Calibrate.html)
!!! note
KlipperScreen will automatically Home(`G28`) if needed
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+1 -1
View File
@@ -6,7 +6,7 @@ KlipperScreen is a touchscreen GUI that interfaces with [Klipper](https://github
KlipperScreen should run on any touchscreen that you can connect to a host (Raspberry, PC, Tablet), but not screens that connect directly to the printer MCU board. KlipperScreen should run on any touchscreen that you can connect to a host (Raspberry, PC, Tablet), but not screens that connect directly to the printer MCU board.
A physical touchscreen is not strictly required, for example you may install a remote desktop server like tigervnc-scraping-server and connect from a client device, ![check out the hardware page for further information.](Hardware.md) A physical touchscreen is not strictly required, for example you may install a remote desktop server like tigervnc-scraping-server and connect from a client device, [check out the hardware page for further information.](Hardware.md)
### Sample Panels ### Sample Panels
+11 -12
View File
@@ -34,32 +34,31 @@ class KlippyGcodes:
@staticmethod @staticmethod
def set_bed_temp(temp): def set_bed_temp(temp):
return "%s S%s" % (KlippyGcodes.SET_BED_TEMP, str(temp)) return f"{KlippyGcodes.SET_BED_TEMP} S{temp}"
@staticmethod @staticmethod
def set_ext_temp(temp, tool=0): def set_ext_temp(temp, tool=0):
return "%s T%s S%s" % (KlippyGcodes.SET_EXT_TEMP, str(tool), str(temp)) return f"{KlippyGcodes.SET_EXT_TEMP} T{tool} S{temp}"
@staticmethod @staticmethod
def set_heater_temp(heater, temp): def set_heater_temp(heater, temp):
return 'SET_HEATER_TEMPERATURE heater="%s" target=%s' % (heater, str(temp)) return f'SET_HEATER_TEMPERATURE heater="{heater}" target={temp}'
@staticmethod @staticmethod
def set_temp_fan_temp(temp_fan, temp): def set_temp_fan_temp(temp_fan, temp):
return 'SET_TEMPERATURE_FAN_TARGET temperature_fan="%s" target=%s' % (temp_fan, str(temp)) return f'SET_TEMPERATURE_FAN_TARGET temperature_fan="{temp_fan}" target={temp}'
@staticmethod @staticmethod
def set_fan_speed(speed): def set_fan_speed(speed):
speed = str(int(float(int(speed) % 101) / 100 * 255)) return f"{KlippyGcodes.SET_FAN_SPEED} S{speed * 2.55:.0f}"
return "%s S%s" % (KlippyGcodes.SET_FAN_SPEED, speed)
@staticmethod @staticmethod
def set_extrusion_rate(rate): def set_extrusion_rate(rate):
return "%s S%s" % (KlippyGcodes.SET_EXT_FACTOR, rate) return f"{KlippyGcodes.SET_EXT_FACTOR} S{rate}"
@staticmethod @staticmethod
def set_speed_rate(rate): def set_speed_rate(rate):
return "%s S%s" % (KlippyGcodes.SET_SPD_FACTOR, rate) return f"{KlippyGcodes.SET_SPD_FACTOR} S{rate}"
@staticmethod @staticmethod
def testz_move(dist): def testz_move(dist):
@@ -67,16 +66,16 @@ class KlippyGcodes:
@staticmethod @staticmethod
def extrude(dist, speed=500): def extrude(dist, speed=500):
return "%s E%s F%s" % (KlippyGcodes.MOVE, dist, speed) return f"{KlippyGcodes.MOVE} E{dist} F{speed}"
@staticmethod @staticmethod
def bed_mesh_load(profile): def bed_mesh_load(profile):
return "BED_MESH_PROFILE LOAD='%s'" % profile return f"BED_MESH_PROFILE LOAD='{profile}'"
@staticmethod @staticmethod
def bed_mesh_remove(profile): def bed_mesh_remove(profile):
return "BED_MESH_PROFILE REMOVE='%s'" % profile return f"BED_MESH_PROFILE REMOVE='{profile}'"
@staticmethod @staticmethod
def bed_mesh_save(profile): def bed_mesh_save(profile):
return "BED_MESH_PROFILE SAVE='%s'" % profile return f"BED_MESH_PROFILE SAVE='{profile}'"
+71 -118
View File
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import contextlib
import gi import gi
import logging import logging
import os import os
@@ -10,9 +11,6 @@ from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango
class KlippyGtk: class KlippyGtk:
labels = {} labels = {}
width_ratio = 16
height_ratio = 9.375
keyboard_ratio = .5
def __init__(self, screen, width, height, theme, cursor, fontsize_type): def __init__(self, screen, width, height, theme, cursor, fontsize_type):
self.screen = screen self.screen = screen
@@ -20,10 +18,7 @@ class KlippyGtk:
self.height = height self.height = height
self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", theme, "images") self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", theme, "images")
if self.screen.vertical_mode: self.font_ratio = [33, 49] if self.screen.vertical_mode else [43, 29]
self.font_ratio = [33, 49]
else:
self.font_ratio = [43, 29]
self.font_size = int(min( self.font_size = int(min(
self.width / self.font_ratio[0], self.width / self.font_ratio[0],
self.height / self.font_ratio[1] self.height / self.font_ratio[1]
@@ -32,10 +27,10 @@ class KlippyGtk:
self.font_size = round(self.font_size * 0.91) self.font_size = round(self.font_size * 0.91)
elif fontsize_type == "large": elif fontsize_type == "large":
self.font_size = round(self.font_size * 1.09) self.font_size = round(self.font_size * 1.09)
self.header_size = int(round((self.width / self.width_ratio) / 1.33))
self.titlebar_height = self.font_size * 2 self.titlebar_height = self.font_size * 2
self.img_width = int(round(self.width / self.width_ratio)) self.img_scale = self.font_size * 2.5
self.img_height = int(round(self.height / self.height_ratio)) self.img_width = self.font_size * 3
self.img_height = self.font_size * 3
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)
@@ -51,7 +46,7 @@ class KlippyGtk:
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("img width: %s height: %s" % (self.img_width, self.img_height)) logging.debug(f"img width: {self.img_width} height: {self.img_height}")
def get_action_bar_width(self): def get_action_bar_width(self):
return self.action_bar_width return self.action_bar_width
@@ -74,17 +69,12 @@ class KlippyGtk:
def get_titlebar_height(self): def get_titlebar_height(self):
return self.titlebar_height return self.titlebar_height
def get_header_size(self):
return self.header_size
def get_image_width(self):
return self.img_width
def get_image_height(self):
return self.img_height
def get_keyboard_height(self): def get_keyboard_height(self):
return self.get_content_height() * self.keyboard_ratio 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)
@@ -96,9 +86,8 @@ class KlippyGtk:
if self.color_list[device]['state'] > 0: if self.color_list[device]['state'] > 0:
rgb[1] = rgb[1] + self.color_list[device]['hsplit'] * self.color_list[device]['state'] rgb[1] = rgb[1] + self.color_list[device]['hsplit'] * self.color_list[device]['state']
self.color_list[device]['state'] += 1 self.color_list[device]['state'] += 1
color = '{:02X}{:02X}{:02X}'.format(rgb[0], rgb[1], rgb[2])
rgb = [x / 255 for x in rgb] rgb = [x / 255 for x in rgb]
# logging.debug("Assigning color: %s %s %s" % (device, rgb, color)) # logging.debug(f"Assigning color: {device} {rgb}")
else: else:
colors = self.color_list[device]['colors'] colors = self.color_list[device]['colors']
if self.color_list[device]['state'] >= len(colors): if self.color_list[device]['state'] >= len(colors):
@@ -106,59 +95,47 @@ class KlippyGtk:
color = colors[self.color_list[device]['state'] % len(colors)] color = colors[self.color_list[device]['state'] % len(colors)]
rgb = [int(color[i:i + 2], 16) / 255 for i in range(0, 6, 2)] rgb = [int(color[i:i + 2], 16) / 255 for i in range(0, 6, 2)]
self.color_list[device]['state'] += 1 self.color_list[device]['state'] += 1
# logging.debug("Assigning color: %s %s %s" % (device, rgb, color)) # logging.debug(f"Assigning color: {device} {rgb} {color}")
return rgb
return rgb, color
def reset_temp_color(self): def reset_temp_color(self):
for key in self.color_list: for key in self.color_list:
self.color_list[key]['state'] = 0 self.color_list[key]['state'] = 0
def Label(self, label, style=None): @staticmethod
def Label(label, style=None):
la = Gtk.Label(label) la = Gtk.Label(label)
if style is not None: if style is not None:
la.get_style_context().add_class(style) la.get_style_context().add_class(style)
return la return la
def Image(self, image_name, scale=1.0): def Image(self, image_name=None, width=None, height=None):
filename = os.path.join(self.themedir, str(image_name) + ".svg") if image_name is None:
if os.path.exists(filename):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename,
int(round(self.img_width * scale)),
int(round(self.img_height * scale)),
True)
return Gtk.Image.new_from_pixbuf(pixbuf)
else:
logging.error("Unable to find image %s", filename)
return Gtk.Image() return Gtk.Image()
width = width if width is not None else self.img_width
height = height if height is not None else self.img_height
filename = os.path.join(self.themedir, image_name)
for ext in ["svg", "png"]:
with contextlib.suppress(Exception):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(f"{filename}.{ext}", int(width), int(height))
if pixbuf is not None:
return Gtk.Image.new_from_pixbuf(pixbuf)
logging.error(f"Unable to find image {filename}.{ext}")
return Gtk.Image()
def PixbufFromFile(self, filename, width_scale=1, height_scale=1): @staticmethod
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename, def PixbufFromFile(filename, width=-1, height=-1):
int(round(self.img_width * width_scale)), return GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(width), int(height))
int(round(self.img_height * height_scale)),
True)
return pixbuf
def PixbufFromHttp(self, resource, width_scale=1, height_scale=1): def PixbufFromHttp(self, resource, width=-1, height=-1):
response = self.screen.apiclient.get_thumbnail_stream(resource) 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, pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(width), int(height), True)
int(round(self.img_width * width_scale)), stream.close_async(2)
int(round(self.img_height * height_scale)),
True)
return pixbuf return pixbuf
def ProgressBar(self, style=None):
bar = Gtk.ProgressBar()
if style is not None:
ctx = bar.get_style_context()
ctx.add_class(style)
return bar
def Button(self, label=None, style=None): def Button(self, label=None, style=None):
b = Gtk.Button(label=label) b = Gtk.Button(label=label)
b.set_hexpand(True) b.set_hexpand(True)
@@ -171,26 +148,36 @@ class KlippyGtk:
b.connect("clicked", self.screen.reset_screensaver_timeout) b.connect("clicked", self.screen.reset_screensaver_timeout)
return b return b
def ButtonImage(self, image_name=None, label=None, style=None, scale=1.38, def ButtonImage(self, image_name=None, label=None, style=None, scale=1.38, position=Gtk.PositionType.TOP, lines=2):
position=Gtk.PositionType.TOP, word_wrap=True): b = Gtk.Button()
if label is not None:
b = Gtk.Button(label=label) b.set_label(label.replace("\n", " "))
b.set_hexpand(True) b.set_hexpand(True)
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:
b.set_image(self.Image(image_name, scale)) width = height = self.img_scale * scale
b.set_image(self.Image(image_name, width, height))
b.set_image_position(position) b.set_image_position(position)
b.set_always_show_image(True) b.set_always_show_image(True)
if word_wrap is True: if label is not None:
try: try:
# Get the label object # Get the label object
child = b.get_children()[0].get_children()[0].get_children()[1] 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_mode(Pango.WrapMode.WORD_CHAR)
child.set_line_wrap(True) child.set_line_wrap(True)
except Exception: child.set_ellipsize(True)
pass 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)
@@ -211,6 +198,8 @@ class KlippyGtk:
button.get_child().set_line_wrap(True) 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)
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")
@@ -224,30 +213,21 @@ class KlippyGtk:
dialog.show_all() dialog.show_all()
# Change cursor to blank # Change cursor to blank
if self.cursor: if self.cursor:
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.ARROW)) dialog.get_window().set_cursor(
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.ARROW))
else: else:
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.BLANK_CURSOR)) dialog.get_window().set_cursor(
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.BLANK_CURSOR))
self.screen.dialogs.append(dialog)
return dialog return dialog
def ToggleButtonImage(self, image_name, label, style=None, scale=1.38): def remove_dialog(self, widget, response_id, dialog):
logging.info("Removing Dialog")
self.screen.dialogs.remove(dialog)
b = Gtk.ToggleButton(label=label) @staticmethod
b.set_hexpand(True) def HomogeneousGrid(width=None, height=None):
b.set_vexpand(True)
b.set_can_focus(False)
b.set_image(self.Image(image_name, scale))
b.set_image_position(Gtk.PositionType.TOP)
b.set_always_show_image(True)
if style is not None:
ctx = b.get_style_context()
ctx.add_class(style)
b.connect("clicked", self.screen.reset_screensaver_timeout)
return b
def HomogeneousGrid(self, width=None, height=None):
g = Gtk.Grid() g = Gtk.Grid()
g.set_row_homogeneous(True) g.set_row_homogeneous(True)
g.set_column_homogeneous(True) g.set_column_homogeneous(True)
@@ -263,40 +243,13 @@ class KlippyGtk:
b.connect("clicked", self.screen.reset_screensaver_timeout) b.connect("clicked", self.screen.reset_screensaver_timeout)
return b return b
def ScrolledWindow(self): @staticmethod
def ScrolledWindow():
scroll = Gtk.ScrolledWindow() scroll = Gtk.ScrolledWindow()
scroll.set_property("overlay-scrolling", False) scroll.set_property("overlay-scrolling", False)
scroll.set_vexpand(True) scroll.set_vexpand(True)
scroll.add_events(Gdk.EventMask.TOUCH_MASK) scroll.add_events(Gdk.EventMask.BUTTON_PRESS_MASK |
scroll.add_events(Gdk.EventMask.BUTTON_PRESS_MASK) Gdk.EventMask.TOUCH_MASK |
Gdk.EventMask.BUTTON_RELEASE_MASK)
scroll.set_kinetic_scrolling(True)
return scroll return scroll
def formatFileName(self, name):
name = name.split('/')[-1] if "/" in name else name
name = name.split('.gcod')[0] if ".gcode" in name else name
if len(name) > 25:
return name[0:25] + "\n" + name[25:50]
return name
def formatTimeString(self, seconds):
time = int(seconds)
text = ""
if int(time / 86400) != 0:
text += str(int(time / 86400)) + "d "
if int(time / 3600) != 0:
text += str(int(time / 3600) % 24) + "h "
if int(time / 60) != 0:
text += str(int(time / 60) % 60) + "m "
else:
text = str(time % 60) + "s"
return text
def formatTemperatureString(self, temp, target):
if temp is None:
logging.debug("Temp is none")
return
if target is None:
target = 0
if (temp - 2 < target < temp + 2) or round(target, 0) == 0:
return str(round(temp, 1)) + "°C" # °C →"
return str(round(temp)) + " °C\n(" + str(round(target)) + ")"
+13 -7
View File
@@ -9,6 +9,13 @@ class KlippyRest:
self.port = port self.port = port
self.api_key = api_key self.api_key = api_key
@property
def endpoint(self):
protocol = "http"
if int(self.port) == 443:
protocol = "https"
return f"{protocol}://{self.ip}:{self.port}"
def get_server_info(self): def get_server_info(self):
return self.send_request("server/info") return self.send_request("server/info")
@@ -22,7 +29,8 @@ 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 = "http://%s:%s/server/files/gcodes/%s" % (self.ip, self.port, thumbnail) url = f"{self.endpoint}/server/files/gcodes/{thumbnail}"
response = requests.get(url, stream=True) response = requests.get(url, stream=True)
if response.status_code == 200: if response.status_code == 200:
response.raw.decode_content = True response.raw.decode_content = True
@@ -30,23 +38,21 @@ class KlippyRest:
return False return False
def send_request(self, method): def send_request(self, method):
url = "http://%s:%s/%s" % (self.ip, self.port, method) url = f"{self.endpoint}/{method}"
logging.debug("Sending request to %s" % url) 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}
try: try:
r = requests.get(url, headers=headers) r = requests.get(url, headers=headers)
except Exception as e: except Exception as e:
logging.critical(e, exc_info=True) logging.error(e)
return False return False
if r.status_code != 200: if r.status_code != 200:
return False return False
# TODO: Try/except
try: try:
data = json.loads(r.content) data = json.loads(r.content)
except Exception as e: except Exception as e:
logging.critical(e, exc_info=True) logging.error(f"Unable to parse response from moonraker:\n {r.content}")
logging.exception("Unable to parse response from moonraker:\n %s" % r.content)
return False return False
return data return data
+79 -94
View File
@@ -8,7 +8,7 @@ import websocket
import logging import logging
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gdk from gi.repository import GLib
from ks_includes.KlippyGcodes import KlippyGcodes from ks_includes.KlippyGcodes import KlippyGcodes
api_key = "" api_key = ""
@@ -30,49 +30,58 @@ api = {
class KlippyWebsocket(threading.Thread): class KlippyWebsocket(threading.Thread):
_req_id = 0 _req_id = 0
connected = False connected = False
connecting = True
callback_table = {} callback_table = {}
reconnect_timeout = None
reconnect_count = 0 reconnect_count = 0
max_retries = 4
def __init__(self, screen, callback, host, port): def __init__(self, screen, callback, host, port):
threading.Thread.__init__(self) threading.Thread.__init__(self)
self._wst = None
self.ws_url = None
self._screen = screen self._screen = screen
self._callback = callback self._callback = callback
self.klippy = MoonrakerApi(self) self.klippy = MoonrakerApi(self)
self.closing = False self.closing = False
self.ws = None self.ws = None
self._url = "%s:%s" % (host, port) self.host = host
self.port = port
@property
def _url(self):
return f"{self.host}:{self.port}"
@property
def ws_proto(self):
if int(self.port) in {443, 7130}:
return "wss"
return "ws"
def retry(self):
self.reconnect_count = 0
self.connecting = True
self.initial_connect()
def initial_connect(self): def initial_connect(self):
# 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
if self.reconnect_timeout is None:
self.reconnect_timeout = GLib.timeout_add_seconds(3, self.reconnect)
self.connect() self.connect()
if self.connecting:
GLib.timeout_add_seconds(6, self.reconnect)
def connect(self): def connect(self):
_ = self._screen.lang.gettext if self.connected:
return
def ws_on_close(ws, a=None, b=None): self.reconnect_count += 1
self.on_close(ws)
def ws_on_error(ws, msg):
self.on_error(ws, msg)
def ws_on_message(ws, msg):
self.on_message(ws, msg)
def ws_on_open(ws):
self.on_open(ws)
try: try:
state = self._screen.apiclient.get_server_info() state = self._screen.apiclient.get_server_info()
if state is False: if state is False:
if self.reconnect_count > 3: if self.reconnect_count > 2:
self._screen.panels['splash_screen'].update_text( self._screen.printer_initializing(
_("Cannot connect to Moonraker") + _("Cannot connect to Moonraker")
"\n\n%s\n\n" % self._url + + f'\n\n{self._url}\n\n'
_("Retry #%s") % self.reconnect_count) + _("Retrying") + f' #{self.reconnect_count}'
)
return False return False
token = self._screen.apiclient.get_oneshot_token() token = self._screen.apiclient.get_oneshot_token()
except Exception as e: except Exception as e:
@@ -80,10 +89,11 @@ class KlippyWebsocket(threading.Thread):
logging.debug("Unable to get oneshot token") logging.debug("Unable to get oneshot token")
return False return False
self.ws_url = "ws://%s/websocket?token=%s" % (self._url, token) self.ws_url = f"{self.ws_proto}://{self._url}/websocket?token={token}"
self.ws = websocket.WebSocketApp( self.ws = websocket.WebSocketApp(
self.ws_url, on_close=ws_on_close, on_error=ws_on_error, on_message=ws_on_message, on_open=ws_on_open) self.ws_url,
on_close=self.on_close, on_error=self.on_error, on_message=self.on_message, on_open=self.on_open
)
self._wst = threading.Thread(target=self.ws.run_forever, daemon=True) self._wst = threading.Thread(target=self.ws.run_forever, daemon=True)
try: try:
logging.debug("Starting websocket thread") logging.debug("Starting websocket thread")
@@ -94,39 +104,32 @@ class KlippyWebsocket(threading.Thread):
def close(self): def close(self):
self.closing = True self.closing = True
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 is_connected(self):
return self.connected
def on_message(self, ws, message): def on_message(self, ws, message):
response = json.loads(message) response = json.loads(message)
if "id" in response: if "id" in response and response['id'] in self.callback_table:
if response['id'] in self.callback_table: args = (response,
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self.callback_table[response['id']][0],
response,
self.callback_table[response['id']][1], self.callback_table[response['id']][1],
self.callback_table[response['id']][2], self.callback_table[response['id']][2],
*self.callback_table[response['id']][3] *self.callback_table[response['id']][3])
) GLib.idle_add(self.callback_table[response['id']][0], *args)
self.callback_table.pop(response['id']) self.callback_table.pop(response['id'])
return return
if "method" in response and "on_message" in self._callback: if "method" in response and "on_message" in self._callback:
Gdk.threads_add_idle( args = response['method'], response['params'][0] if "params" in response else {}
GLib.PRIORITY_HIGH_IDLE, GLib.idle_add(self._callback['on_message'], *args)
self._callback['on_message'],
response['method'],
response['params'][0] if "params" in response else {}
)
return return
def send_method(self, method, params={}, callback=None, *args): def send_method(self, method, params=None, callback=None, *args):
if self.is_connected() is False: if not self.connected:
return False return False
if params is None:
params = {}
self._req_id += 1 self._req_id += 1
if callback is not None: if callback is not None:
@@ -143,58 +146,41 @@ class KlippyWebsocket(threading.Thread):
def on_open(self, ws): def on_open(self, ws):
logging.info("Moonraker Websocket Open") logging.info("Moonraker Websocket Open")
logging.info("Self.connected = %s" % self.is_connected())
self.connected = True self.connected = True
self.reconnect_count = 0 self.reconnect_count = 0
if self.reconnect_timeout is not None:
GLib.source_remove(self.reconnect_timeout)
self.reconnect_timeout = None
if "on_connect" in self._callback: if "on_connect" in self._callback:
Gdk.threads_add_idle( GLib.idle_add(self._callback['on_connect'])
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_connect']
)
def on_close(self, ws): def on_close(self, ws, status, message):
if self.is_connected() is False: if message is not None:
logging.info(f"{status} {message}")
if not self.connected:
logging.debug("Connection already closed") logging.debug("Connection already closed")
if self.reconnect_timeout is not None:
GLib.source_remove(self.reconnect_timeout)
self.reconnect_timeout = None
return return
if self.closing is True: if "on_close" in self._callback:
logging.debug("Closing websocket") GLib.idle_add(self._callback['on_close'], "Lost Connection to Moonraker")
self.ws.keep_running = False
self.close()
self.closing = False
return
logging.info("Moonraker Websocket Closed") logging.info("Moonraker Websocket Closed")
self.connected = False self.connected = False
if self.reconnect_timeout is None:
self.reconnect_timeout = GLib.timeout_add_seconds(3, self.reconnect)
if "on_close" in self._callback:
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_close'],
"Lost Connection to Moonraker",
True
)
def reconnect(self): def reconnect(self):
if self.is_connected(): if self.connected:
logging.debug("Reconnected") return False
if self.reconnect_count > self.max_retries:
logging.debug("Stopping reconnections")
self.connecting = False
self._screen.printer_initializing(
_("Cannot connect to Moonraker")
+ f'\n\n{self._url}')
return False return False
logging.debug("Attempting to reconnect") logging.debug("Attempting to reconnect")
self.reconnect_count += 1
self.connect() self.connect()
return True return True
def on_error(self, ws, error): @staticmethod
logging.debug("Websocket error: %s" % error) def on_error(ws, error):
logging.debug(f"Websocket error: {error}")
class MoonrakerApi: class MoonrakerApi:
@@ -208,7 +194,7 @@ class MoonrakerApi:
) )
def gcode_script(self, script, callback=None, *args): def gcode_script(self, script, callback=None, *args):
logging.debug("Sending printer.gcode.script: %s", script) logging.debug(f"Sending printer.gcode.script: {script}")
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
{"script": script}, {"script": script},
@@ -243,14 +229,14 @@ class MoonrakerApi:
) )
def object_subscription(self, updates): def object_subscription(self, updates):
logging.debug("Sending printer.objects.subscribe: %s", str(updates)) logging.debug("Sending printer.objects.subscribe")
return self._ws.send_method( return self._ws.send_method(
"printer.objects.subscribe", "printer.objects.subscribe",
updates updates
) )
def power_device_off(self, device, callback=None, *args): def power_device_off(self, device, callback=None, *args):
logging.debug("Sending machine.device_power.off: %s" % device) logging.debug(f"Sending machine.device_power.off: {device}")
return self._ws.send_method( return self._ws.send_method(
"machine.device_power.off", "machine.device_power.off",
{device: False}, {device: False},
@@ -259,7 +245,7 @@ class MoonrakerApi:
) )
def power_device_on(self, device, callback=None, *args): def power_device_on(self, device, callback=None, *args):
logging.debug("Sending machine.device_power.on %s" % device) logging.debug("Sending machine.device_power.on {device}")
return self._ws.send_method( return self._ws.send_method(
"machine.device_power.on", "machine.device_power.on",
{device: False}, {device: False},
@@ -307,7 +293,7 @@ class MoonrakerApi:
def temperature_set(self, heater, target, callback=None, *args): def temperature_set(self, heater, target, callback=None, *args):
if heater == "heater_bed": if heater == "heater_bed":
logging.debug("Sending printer.gcode.script: %s", KlippyGcodes.set_bed_temp(target)) logging.debug(f"Sending printer.gcode.script: {KlippyGcodes.set_bed_temp(target)}")
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
{ {
@@ -318,8 +304,7 @@ class MoonrakerApi:
) )
else: else:
logging.debug( logging.debug(
"Sending printer.gcode.script: %s", f'Sending printer.gcode.script: {KlippyGcodes.set_ext_temp(target, heater.replace("tool", ""))}')
KlippyGcodes.set_ext_temp(target, heater.replace("tool", "")))
# TODO: Add max/min limits # TODO: Add max/min limits
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
@@ -331,7 +316,7 @@ class MoonrakerApi:
) )
def set_bed_temp(self, target, callback=None, *args): def set_bed_temp(self, target, callback=None, *args):
logging.debug("Sending set_bed_temp: %s", 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(
"printer.gcode.script", "printer.gcode.script",
{ {
@@ -342,7 +327,7 @@ class MoonrakerApi:
) )
def set_heater_temp(self, heater, target, callback=None, *args): def set_heater_temp(self, heater, target, callback=None, *args):
logging.debug("Sending heater %s to temp: %s", heater, target) logging.debug(f"Sending heater {heater} to temp: {target}")
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
{ {
@@ -353,7 +338,7 @@ class MoonrakerApi:
) )
def set_temp_fan_temp(self, temp_fan, target, callback=None, *args): def set_temp_fan_temp(self, temp_fan, target, callback=None, *args):
logging.debug("Sending temperature fan %s to temp: %s", temp_fan, target) logging.debug(f"Sending temperature fan {temp_fan} to temp: {target}")
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
{ {
@@ -364,7 +349,7 @@ class MoonrakerApi:
) )
def set_tool_temp(self, tool, target, callback=None, *args): def set_tool_temp(self, tool, target, callback=None, *args):
logging.debug("Sending set_tool_temp: %s", KlippyGcodes.set_ext_temp(target, tool)) logging.debug(f"Sending set_tool_temp: {KlippyGcodes.set_ext_temp(target, tool)}")
return self._ws.send_method( return self._ws.send_method(
"printer.gcode.script", "printer.gcode.script",
{ {
+249 -149
View File
@@ -12,12 +12,12 @@ from io import StringIO
from os import path from os import path
SCREEN_BLANKING_OPTIONS = [ SCREEN_BLANKING_OPTIONS = [
"300", # 5 Minutes 300, # 5 Minutes
"900", # 15 Minutes 900, # 15 Minutes
"1800", # 30 Minutes 1800, # 30 Minutes
"3600", # 1 Hour 3600, # 1 Hour
"7200", # 2 Hours 7200, # 2 Hours
"14400", # 4 Hours 14400, # 4 Hours
] ]
klipperscreendir = pathlib.Path(__file__).parent.resolve().parent klipperscreendir = pathlib.Path(__file__).parent.resolve().parent
@@ -34,11 +34,15 @@ class KlipperScreenConfig:
do_not_edit_prefix = "#~#" do_not_edit_prefix = "#~#"
def __init__(self, configfile, screen=None): def __init__(self, configfile, screen=None):
self.lang_list = None
self.errors = []
self.default_config_path = os.path.join(klipperscreendir, "ks_includes", "defaults.conf") self.default_config_path = os.path.join(klipperscreendir, "ks_includes", "defaults.conf")
self.config = configparser.ConfigParser() self.config = configparser.ConfigParser()
self.config_path = self.get_config_file_location(configfile) self.config_path = self.get_config_file_location(configfile)
logging.debug("Config path location: %s" % self.config_path) logging.debug(f"Config path location: {self.config_path}")
self.defined_config = None self.defined_config = None
self.lang = None
self.langs = {}
try: try:
self.config.read(self.default_config_path) self.config.read(self.default_config_path)
@@ -57,32 +61,40 @@ class KlipperScreenConfig:
self.config.read_string(user_def) self.config.read_string(user_def)
if saved_def is not None: if saved_def is not None:
self.config.read_string(saved_def) self.config.read_string(saved_def)
logging.info("====== Saved Def ======\n%s\n=======================" % saved_def) logging.info(f"====== Saved Def ======\n{saved_def}\n=======================")
# This is the final config # This is the final config
# self.log_config(self.config) # self.log_config(self.config)
except KeyError: if self.validate_config():
raise ConfigError(f"Error reading config: {self.config_path}") logging.info('Configuration validated succesfuly')
except Exception: else:
logging.exception("Unknown error with config") logging.error('Invalid configuration detected !!!')
logging.info('Loading default config')
self.config = configparser.ConfigParser()
self.config.read(self.default_config_path)
except KeyError as Kerror:
msg = f"Error reading config: {self.config_path}\n{Kerror}"
logging.exception(msg)
self.errors.append(msg)
raise ConfigError(msg) from Kerror
except ValueError as Verror:
msg = f"Invalid Value in the config:\n{Verror}"
logging.exception(msg)
self.errors.append(msg)
except Exception as e:
msg = f"Unknown error with the config:\n{e}"
logging.exception(msg)
self.errors.append(msg)
printers = sorted([i for i in self.config.sections() if i.startswith("printer ")]) printers = sorted([i for i in self.config.sections() if i.startswith("printer ")])
self.printers = [] if len(printers) == 0:
for printer in printers: printers.append("Printer Printer")
self.printers.append({ self.printers = [
printer[8:]: { {printer[8:]: {
"moonraker_host": self.config.get(printer, "moonraker_host", fallback="127.0.0.1"), "moonraker_host": self.config.get(printer, "moonraker_host", fallback="127.0.0.1"),
"moonraker_port": self.config.get(printer, "moonraker_port", fallback="7125"), "moonraker_port": self.config.get(printer, "moonraker_port", fallback="7125"),
"moonraker_api_key": self.config.get(printer, "moonraker_api_key", fallback=False) "moonraker_api_key": self.config.get(printer, "moonraker_api_key", fallback="").replace('"', '')
} }} for printer in printers
}) ]
if len(printers) <= 0:
self.printers.append({
"Printer": {
"moonraker_host": self.config.get("main", "moonraker_host", fallback="127.0.0.1"),
"moonraker_port": self.config.get("main", "moonraker_port", fallback="7125"),
"moonraker_api_key": self.config.get("main", "moonraker_api_key", fallback="")
}
})
conf_printers_debug = copy.deepcopy(self.printers) conf_printers_debug = copy.deepcopy(self.printers)
for printer in conf_printers_debug: for printer in conf_printers_debug:
@@ -90,23 +102,119 @@ class KlipperScreenConfig:
item = conf_printers_debug[conf_printers_debug.index(printer)] item = conf_printers_debug[conf_printers_debug.index(printer)]
if item[name]['moonraker_api_key'] != "": if item[name]['moonraker_api_key'] != "":
item[name]['moonraker_api_key'] = "redacted" item[name]['moonraker_api_key'] = "redacted"
logging.debug("Configured printers: %s" % json.dumps(conf_printers_debug, indent=2)) logging.debug(f"Configured printers: {json.dumps(conf_printers_debug, indent=2)}")
self.create_translations()
self._create_configurable_options(screen)
def create_translations(self):
lang_path = os.path.join(klipperscreendir, "ks_includes", "locales")
self.lang_list = [d for d in os.listdir(lang_path) if not os.path.isfile(os.path.join(lang_path, d))]
self.lang_list.sort()
for lng in self.lang_list:
self.langs[lng] = gettext.translation('KlipperScreen', localedir=lang_path, languages=[lng], fallback=True)
lang = self.get_main_config().get("language", None) lang = self.get_main_config().get("language", None)
lang = [lang] if lang is not None and lang != "default" else None logging.debug(f"Selected lang: {lang} OS lang: {os.getenv('LANG')}")
logging.info("Detected language: %s" % lang) self.install_language(lang)
self.lang = gettext.translation('KlipperScreen', localedir='ks_includes/locales', languages=lang,
fallback=True) def install_language(self, lang):
if lang is None or lang == "system_lang":
for language in self.lang_list:
if os.getenv('LANG').lower().startswith(language):
logging.debug("Using system lang")
lang = language
if lang not in self.lang_list:
logging.error(f"lang: {lang} not found")
logging.info(f"Available lang list {self.lang_list}")
lang = "en"
logging.info(f"Using lang {lang}")
self.lang = self.langs[lang]
self.lang.install(names=['gettext', 'ngettext']) self.lang.install(names=['gettext', 'ngettext'])
self._create_configurable_options(screen) def validate_config(self):
valid = True
for section in self.config:
if section == 'DEFAULT' or section.startswith('include '):
# Do not validate 'DEFAULT' or 'include*' sections
continue
bools = strs = numbers = ()
if section == 'main':
bools = (
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
'show_heater_power'
)
strs = (
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking', 'font_size',
'print_estimate_method', 'screen_blanking'
)
numbers = (
'job_complete_timeout', 'job_error_timeout', 'move_speed_xy', 'move_speed_z',
'print_estimate_compensation', 'width', 'height',
)
elif section.startswith('printer '):
bools = (
'invert_x', 'invert_y', 'invert_z',
)
strs = (
'moonraker_api_key', 'moonraker_host', 'titlebar_name_type',
'screw_positions', 'power_devices', 'titlebar_items', 'z_babystep_values',
'extrude_distances', "extrude_speeds",
)
numbers = (
'moonraker_port', 'move_speed_xy', 'move_speed_z',
'calibrate_x_position', 'calibrate_y_position',
)
elif section.startswith('preheat '):
strs = ('gcode', '')
numbers = [f'{option}' for option in self.config[section] if option != 'gcode']
elif section.startswith('menu '):
strs = ('name', 'icon', 'panel', 'method', 'params', 'enable', 'confirm')
elif section == 'bed_screws':
# This section may be deprecated in favor of moving this options under the printer section
numbers = ('rotation', '')
strs = ('screw_positions', '')
elif section.startswith('graph') or section.startswith('displayed_macros'):
bools = [f'{option}' for option in self.config[section]]
elif section.startswith('z_calibrate_position'):
# This section may be deprecated in favor of moving this options under the printer section
numbers = ('calibrate_x_position', 'calibrate_y_position')
else:
self.errors.append(f'Section [{section}] not recognized')
for key in self.config[section]:
if key not in bools and key not in strs and key not in numbers:
msg = f'Option "{key}" not recognized for section "[{section}]"'
self.errors.append(msg)
# This most probably is not a big issue, continue to load the config
elif key in numbers and not self.is_float(self.config[section][key]) \
or key in bools and self.config[section][key] not in ["False", "false", "True", "true"]:
msg = (
f'Unable to parse "{key}" from [{section}]\n'
f'Expected a {"number" if key in numbers else "boolean"} but got: {self.config[section][key]}'
)
self.errors.append(msg)
valid = False
return valid
@staticmethod
def is_float(element):
try:
float(element)
return True
except ValueError:
return False
def get_errors(self):
return "".join(f'{error}\n\n' for error in self.errors)
def _create_configurable_options(self, screen): def _create_configurable_options(self, screen):
self.configurable_options = [ self.configurable_options = [
{"language": { {"language": {
"section": "main", "name": _("Language"), "type": "dropdown", "value": "system_lang", "section": "main", "name": _("Language"), "type": "dropdown", "value": "system_lang",
"callback": screen.restart_warning, "options": [ "callback": screen.change_language, "options": [
{"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}}, {"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}},
{"theme": { {"theme": {
"section": "main", "name": _("Icon Theme"), "type": "dropdown", "section": "main", "name": _("Icon Theme"), "type": "dropdown",
@@ -122,7 +230,7 @@ class KlipperScreenConfig:
{"screen_blanking": { {"screen_blanking": {
"section": "main", "name": _("Screen Power Off Time"), "type": "dropdown", "section": "main", "name": _("Screen Power Off Time"), "type": "dropdown",
"value": "3600", "callback": screen.set_screenblanking_timeout, "options": [ "value": "3600", "callback": screen.set_screenblanking_timeout, "options": [
{"name": _("Off"), "value": "off"}] {"name": _("Never"), "value": "off"}]
}}, }},
{"24htime": {"section": "main", "name": _("24 Hour Time"), "type": "binary", "value": "True"}}, {"24htime": {"section": "main", "name": _("24 Hour Time"), "type": "binary", "value": "True"}},
{"side_macro_shortcut": { {"side_macro_shortcut": {
@@ -137,13 +245,16 @@ class KlipperScreenConfig:
{"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",
"value": "False", "callback": screen.restart_warning}}, "value": "False", "callback": screen.reload_panels}},
{"use_dpms": {"section": "main", "name": _("Screen DPMS"), "type": "binary", {"use_dpms": {"section": "main", "name": _("Screen DPMS"), "type": "binary",
"value": "True", "callback": screen.set_dpms}}, "value": "True", "callback": screen.set_dpms}},
{"print_estimate_compensation": { {"print_estimate_compensation": {
"section": "main", "name": _("Slicer Time correction (%)"), "type": "scale", "value": "100", "section": "main", "name": _("Slicer Time correction (%)"), "type": "scale", "value": "100",
"range": [50, 150], "step": 1}}, "range": [50, 150], "step": 1}},
{"autoclose_popups": {"section": "main", "name": _("Auto-close notifications"), "type": "binary",
"value": "True"}},
{"show_heater_power": {"section": "main", "name": _("Show Heater Power"), "type": "binary",
"value": "False", "callback": screen.reload_panels}},
# {"": {"section": "main", "name": _(""), "type": ""}} # {"": {"section": "main", "name": _(""), "type": ""}}
] ]
@@ -159,12 +270,8 @@ class KlipperScreenConfig:
self.configurable_options.extend(panel_options) self.configurable_options.extend(panel_options)
lang_path = os.path.join(klipperscreendir, "ks_includes", "locales")
langs = [d for d in os.listdir(lang_path) if not os.path.isfile(os.path.join(lang_path, d))]
langs.sort()
lang_opt = self.configurable_options[0]['language']['options'] lang_opt = self.configurable_options[0]['language']['options']
for lang in self.lang_list:
for lang in langs:
lang_opt.append({"name": lang, "value": lang}) lang_opt.append({"name": lang, "value": lang})
t_path = os.path.join(klipperscreendir, 'styles') t_path = os.path.join(klipperscreendir, 'styles')
@@ -178,14 +285,14 @@ class KlipperScreenConfig:
index = self.configurable_options.index( index = self.configurable_options.index(
[i for i in self.configurable_options if list(i)[0] == "screen_blanking"][0]) [i for i in self.configurable_options if list(i)[0] == "screen_blanking"][0])
for num in SCREEN_BLANKING_OPTIONS: for num in SCREEN_BLANKING_OPTIONS:
hour = int(int(num) / 3600) hour = num // 3600
if hour > 0: if hour > 0:
name = str(hour) + " " + ngettext("hour", "hours", hour) name = f'{hour} ' + ngettext("hour", "hours", hour)
else: else:
name = str(int(int(num) / 60)) + " " + _("minutes") name = f'{num / 60:.0f} ' + _("minutes")
self.configurable_options[index]['screen_blanking']['options'].append({ self.configurable_options[index]['screen_blanking']['options'].append({
"name": name, "name": name,
"value": num "value": f"{num}"
}) })
for item in self.configurable_options: for item in self.configurable_options:
@@ -200,9 +307,7 @@ class KlipperScreenConfig:
exclude_list = ['preheat'] exclude_list = ['preheat']
if not self.defined_config.getboolean('main', "use_default_menu", fallback=True): if not self.defined_config.getboolean('main', "use_default_menu", fallback=True):
logging.info("Using custom menu, removing default menu entries.") logging.info("Using custom menu, removing default menu entries.")
exclude_list.append('menu __main') exclude_list.extend(('menu __main', 'menu __print', 'menu __splashscreen'))
exclude_list.append('menu __print')
exclude_list.append('menu __splashscreen')
for i in exclude_list: for i in exclude_list:
for j in config.sections(): for j in config.sections():
if j.startswith(i): if j.startswith(i):
@@ -210,28 +315,27 @@ class KlipperScreenConfig:
if k.startswith(i): if k.startswith(i):
del self.config[k] del self.config[k]
def _include_config(self, dir, path): def _include_config(self, directory, filepath):
full_path = path if path[0] == "/" else "%s/%s" % (dir, path) full_path = filepath if filepath[0] == "/" else f"{directory}/{filepath}"
parse_files = [] parse_files = []
if "*" in full_path: if "*" in full_path:
parent_dir = "/".join(full_path.split("/")[:-1]) parent_dir = "/".join(full_path.split("/")[:-1])
file = full_path.split("/")[-1] file = full_path.split("/")[-1]
if not os.path.exists(parent_dir): if not os.path.exists(parent_dir):
logging.info("Config Error: Directory %s does not exist" % parent_dir) logging.info(f"Config Error: Directory {parent_dir} does not exist")
return return
files = os.listdir(parent_dir) files = os.listdir(parent_dir)
regex = "^%s$" % file.replace('*', '.*') regex = f"^{file.replace('*', '.*')}$"
for file in files: parse_files.extend(os.path.join(parent_dir, file) for file in files if re.match(regex, file))
if re.match(regex, file):
parse_files.append(os.path.join(parent_dir, file))
else: else:
if not os.path.exists(os.path.join(full_path)): if not os.path.exists(os.path.join(full_path)):
logging.info("Config Error: %s does not exist" % full_path) logging.info(f"Config Error: {full_path} does not exist")
return return
parse_files.append(full_path) parse_files.append(full_path)
logging.info("Parsing files: %s" % parse_files) logging.info(f"Parsing files: {parse_files}")
for file in parse_files: for file in parse_files:
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read(file) config.read(file)
@@ -244,10 +348,10 @@ class KlipperScreenConfig:
def separate_saved_config(self, config_path): def separate_saved_config(self, config_path):
user_def = [] user_def = []
saved_def = None saved_def = []
found_saved = False found_saved = False
if not path.exists(config_path): if not path.exists(config_path):
return [None, None] return ["", None]
with open(config_path) as file: with open(config_path) as file:
for line in file: for line in file:
line = line.replace('\n', '') line = line.replace('\n', '')
@@ -257,27 +361,41 @@ class KlipperScreenConfig:
continue continue
if found_saved is False: if found_saved is False:
user_def.append(line.replace('\n', '')) user_def.append(line.replace('\n', ''))
else: elif line.startswith(self.do_not_edit_prefix):
if line.startswith(self.do_not_edit_prefix): saved_def.append(line[(len(self.do_not_edit_prefix) + 1):])
saved_def.append(line[(len(self.do_not_edit_prefix) + 1):])
return ["\n".join(user_def), None if saved_def is None else "\n".join(saved_def)] return ["\n".join(user_def), None if saved_def is None else "\n".join(saved_def)]
def get_config_file_location(self, file): def get_config_file_location(self, file):
logging.info("Passed config file: %s" % file) # Passed config (-c) by default is ~/KlipperScreen.conf
if not path.exists(file): if path.exists(file):
file = os.path.join(klipperscreendir, self.configfile_name) return file
if not path.exists(file):
file = self.configfile_name.lower()
if not path.exists(file):
klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config")
file = os.path.join(klipper_config, self.configfile_name)
if not path.exists(file):
file = os.path.join(klipper_config, self.configfile_name.lower())
if not path.exists(file):
file = self.default_config_path
logging.info("Found configuration file at: %s" % file) file = os.path.join(klipperscreendir, self.configfile_name)
return file if path.exists(file):
return file
file = os.path.join(klipperscreendir, self.configfile_name.lower())
if path.exists(file):
return file
klipper_config = os.path.join(os.path.expanduser("~/"), "printer_data", "config")
file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file):
return file
# OLD config folder
klipper_config = os.path.join(os.path.expanduser("~/"), "klipper_config")
file = os.path.join(klipper_config, self.configfile_name)
if path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if path.exists(file):
return file
# fallback
return self.default_config_path
def get_config(self): def get_config(self):
return self.config return self.config
@@ -293,8 +411,8 @@ class KlipperScreenConfig:
def get_menu_items(self, menu="__main", subsection=""): def get_menu_items(self, menu="__main", subsection=""):
if subsection != "": if subsection != "":
subsection = subsection + " " subsection = f"{subsection} "
index = "menu %s %s" % (menu, subsection) index = f"menu {menu} {subsection}"
items = [i[len(index):] for i in self.config.sections() if i.startswith(index)] items = [i[len(index):] for i in self.config.sections() if i.startswith(index)]
menu_items = [] menu_items = []
for item in items: for item in items:
@@ -305,39 +423,29 @@ class KlipperScreenConfig:
return menu_items return menu_items
def get_menu_name(self, menu="__main", subsection=""): def get_menu_name(self, menu="__main", subsection=""):
name = ("menu %s %s" % (menu, subsection)) if subsection != "" else ("menu %s" % menu) name = f"menu {menu} {subsection}" if subsection != "" else f"menu {menu}"
if name not in self.config: return False if name not in self.config else self.config[name].get('name')
return False
return self.config[name].get('name')
def get_preheat_options(self): def get_preheat_options(self):
index = "preheat " index = "preheat "
items = [i[len(index):] for i in self.config.sections() if i.startswith(index)] items = [i[len(index):] for i in self.config.sections() if i.startswith(index)]
return {item: self._build_preheat_item(index + item) for item in items}
preheat_options = {} def _build_preheat_item(self, name):
for item in items: if name not in self.config:
preheat_options[item] = self._build_preheat_item(index + item) return False
cfg = self.config[name]
return preheat_options return {opt: cfg.get("gcode", None) if opt == "gcode" else cfg.getfloat(opt, None) for opt in cfg}
def get_printer_config(self, name): def get_printer_config(self, name):
if not name.startswith("printer "): if not name.startswith("printer "):
name = "printer %s" % name name = f"printer {name}"
if name not in self.config: return None if name not in self.config else self.config[name]
return None
return self.config[name]
def get_printer_power_name(self):
return self.config['settings'].get("printer_power_name", "printer")
def get_printers(self): def get_printers(self):
return self.printers return self.printers
def get_user_saved_config(self):
if self.config_path != self.default_config_path:
print("Get")
def save_user_config_options(self): def save_user_config_options(self):
save_config = configparser.ConfigParser() save_config = configparser.ConfigParser()
for item in self.configurable_options: for item in self.configurable_options:
@@ -351,21 +459,22 @@ class KlipperScreenConfig:
save_config.add_section(opt['section']) save_config.add_section(opt['section'])
save_config.set(opt['section'], name, str(curval)) save_config.set(opt['section'], name, str(curval))
macro_sections = [i for i in self.config.sections() if i.startswith("displayed_macros")] extra_sections = [i for i in self.config.sections() if i.startswith("displayed_macros")]
for macro_sec in macro_sections: extra_sections.extend([i for i in self.config.sections() if i.startswith("graph")])
for item in self.config.options(macro_sec): for section in extra_sections:
value = self.config[macro_sec].getboolean(item, fallback=True) for item in self.config.options(section):
value = self.config[section].getboolean(item, fallback=True)
if value is False or (self.defined_config is not None and if value is False or (self.defined_config is not None and
macro_sec in self.defined_config.sections() and section in self.defined_config.sections() and
self.defined_config[macro_sec].getboolean(item, fallback=True) is False and self.defined_config[section].getboolean(item, fallback=True) is False and
self.defined_config[macro_sec].getboolean(item, fallback=True) != value): self.defined_config[section].getboolean(item, fallback=True) != value):
if macro_sec not in save_config.sections(): if section not in save_config.sections():
save_config.add_section(macro_sec) save_config.add_section(section)
save_config.set(macro_sec, item, str(value)) save_config.set(section, item, str(value))
save_output = self._build_config_string(save_config).split("\n") save_output = self._build_config_string(save_config).split("\n")
for i in range(len(save_output)): for i in range(len(save_output)):
save_output[i] = "%s %s" % (self.do_not_edit_prefix, save_output[i]) save_output[i] = f"{self.do_not_edit_prefix} {save_output[i]}"
if self.config_path == self.default_config_path: if self.config_path == self.default_config_path:
user_def = "" user_def = ""
@@ -373,27 +482,30 @@ class KlipperScreenConfig:
else: else:
user_def, saved_def = self.separate_saved_config(self.config_path) user_def, saved_def = self.separate_saved_config(self.config_path)
extra_lb = "\n" if saved_def is not None else "" contents = (f"{user_def}\n"
contents = "%s\n%s%s\n%s\n%s\n%s\n" % ( f"{self.do_not_edit_line}\n"
user_def, self.do_not_edit_line, extra_lb, self.do_not_edit_prefix, "\n".join(save_output), f"{self.do_not_edit_prefix}\n"
self.do_not_edit_prefix) + '\n'.join(save_output) + f"\n"
f"{self.do_not_edit_prefix}\n")
if self.config_path != self.default_config_path: if self.config_path != self.default_config_path:
path = self.config_path filepath = self.config_path
else: else:
path = os.path.expanduser("~/") filepath = os.path.expanduser("~/")
klipper_config = os.path.join(path, "klipper_config") klipper_config = os.path.join(filepath, "klipper_config")
if os.path.exists(klipper_config): if os.path.exists(klipper_config):
path = os.path.join(klipper_config, "KlipperScreen.conf") filepath = os.path.join(klipper_config, "KlipperScreen.conf")
klipper_config = os.path.join(filepath, "printer_data", "config")
if os.path.exists(klipper_config):
filepath = os.path.join(klipper_config, "KlipperScreen.conf")
else: else:
path = os.path.join(path, "KlipperScreen.conf") filepath = os.path.join(filepath, "KlipperScreen.conf")
try: try:
file = open(path, 'w') with open(filepath, 'w') as file:
file.write(contents) file.write(contents)
file.close() except Exception as e:
except Exception: logging.error(f"Error writing configuration file in {filepath}:\n{e}")
logging.error("Error writing configuration file in %s" % path)
def set(self, section, name, value): def set(self, section, name, value):
self.config.set(section, name, value) self.config.set(section, name, value)
@@ -411,7 +523,8 @@ class KlipperScreenConfig:
] ]
logging.info("\n".join(lines)) logging.info("\n".join(lines))
def _build_config_string(self, config): @staticmethod
def _build_config_string(config):
sfile = StringIO() sfile = StringIO()
config.write(sfile) config.write(sfile)
sfile.seek(0) sfile.seek(0)
@@ -423,30 +536,17 @@ class KlipperScreenConfig:
cfg = self.config[name] cfg = self.config[name]
item = { item = {
"name": cfg.get("name"), "name": cfg.get("name"),
"icon": cfg.get("icon"), "icon": cfg.get("icon", None),
"panel": cfg.get("panel", False), "panel": cfg.get("panel", None),
"method": cfg.get("method", False), "method": cfg.get("method", None),
"confirm": cfg.get("confirm", False), "confirm": cfg.get("confirm", None),
"enable": cfg.get("enable", True) "enable": cfg.get("enable", "True")
} }
try: try:
item["params"] = json.loads(cfg.get("params", "{}")) item["params"] = json.loads(cfg.get("params", "{}"))
except Exception: except Exception as e:
logging.debug("Unable to parse parameters for [%s]" % name) logging.exception(f"Unable to parse parameters for [{name}]:\n{e}")
item["params"] = {} item["params"] = {}
return {name[(len(menu) + 6):]: item} return {name[(len(menu) + 6):]: item}
def _build_preheat_item(self, name):
if name not in self.config:
return False
cfg = self.config[name]
item = {
"extruder": cfg.getint("extruder", None),
"bed": cfg.getint("bed", None),
"heater_generic": cfg.getint("heater_generic", None),
"temperature_fan": cfg.getint("temperature_fan", None),
"gcode": cfg.get("gcode", None)
}
return item
+10 -3
View File
@@ -27,7 +27,7 @@ icon: home
name: {{ gettext('Temperature') }} name: {{ gettext('Temperature') }}
icon: heat-up icon: heat-up
panel: temperature panel: temperature
enable: {{ printer.temperature_devices.count > 0 }} enable: {{ (printer.temperature_devices.count > 0) or (printer.extruders.count > 0)}}
[menu __main actions] [menu __main actions]
name: {{ gettext('Actions') }} name: {{ gettext('Actions') }}
@@ -110,6 +110,12 @@ icon: custom-script
panel: gcode_macros panel: gcode_macros
enable: {{ printer.gcode_macros.count > 0 }} enable: {{ printer.gcode_macros.count > 0 }}
[menu __main actions pins]
name: {{ gettext('Pins') }}
icon: fine-tune
panel: pins
enable: {{ printer.output_pins.count > 0 }}
[menu __main actions power] [menu __main actions power]
name: {{ gettext('Power') }} name: {{ gettext('Power') }}
icon: shutdown icon: shutdown
@@ -131,10 +137,11 @@ panel: console
name: {{ gettext('Bed Level') }} name: {{ gettext('Bed Level') }}
icon: bed-level icon: bed-level
panel: bed_level panel: bed_level
enable: {{ printer.bed_screws or printer.screws_tilt_adjust}}
[menu __main config bedmesh] [menu __main config bedmesh]
name: {{ gettext('Bed Mesh') }} name: {{ gettext('Bed Mesh') }}
icon: bed-level icon: bed-mesh
panel: bed_mesh panel: bed_mesh
enable: {{ printer.bed_mesh is defined }} enable: {{ printer.bed_mesh is defined }}
@@ -192,7 +199,7 @@ name: {{ gettext('Print Control') }}
name: {{ gettext('Temperature') }} name: {{ gettext('Temperature') }}
icon: heat-up icon: heat-up
panel: temperature panel: temperature
enable: {{ printer.temperature_devices.count > 0 }} enable: {{ (printer.temperature_devices.count > 0) or (printer.extruders.count > 0)}}
[menu __print fan] [menu __print fan]
name: {{ gettext('Fan') }} name: {{ gettext('Fan') }}
+34 -33
View File
@@ -16,20 +16,18 @@ class KlippyFiles:
self.gcodes_path = None self.gcodes_path = None
def initialize(self): def initialize(self):
self.gcodes_path = None
if "virtual_sdcard" in self._screen.printer.get_config_section_list(): if "virtual_sdcard" in self._screen.printer.get_config_section_list():
vsd = self._screen.printer.get_config_section("virtual_sdcard") vsd = self._screen.printer.get_config_section("virtual_sdcard")
if "path" in vsd: if "path" in vsd:
self.gcodes_path = os.path.expanduser(vsd['path']) self.gcodes_path = os.path.expanduser(vsd['path'])
logging.info("Gcodes path: %s" % self.gcodes_path) logging.info(f"Gcodes path: {self.gcodes_path}")
def reset(self): def reset(self):
self.run_callbacks() self._screen = None
self.callbacks = None self.callbacks = None
self.files = None self.files = None
self.filelist = None self.filelist = None
self.gcodes_path = None self.gcodes_path = None
self._screen = None
def _callback(self, result, method, params): def _callback(self, result, method, params):
if method == "server.files.list": if method == "server.files.list":
@@ -44,7 +42,7 @@ class KlippyFiles:
newfiles.append(file) newfiles.append(file)
self.add_file(item, False) self.add_file(item, False)
if len(newfiles) > 0 or len(deletedfiles) > 0: if newfiles or len(deletedfiles) > 0:
self.run_callbacks(newfiles, deletedfiles) self.run_callbacks(newfiles, deletedfiles)
if len(deletedfiles) > 0: if len(deletedfiles) > 0:
@@ -52,27 +50,27 @@ class KlippyFiles:
self.remove_file(file) self.remove_file(file)
elif method == "server.files.directory": elif method == "server.files.directory":
if "result" in result: if "result" in result:
dir = params['path'][7:] if params['path'].startswith('gcodes/') else params['path'] directory = params['path'][7:] if params['path'].startswith('gcodes/') else params['path']
if dir[-1] == '/': if directory[-1] == '/':
dir = dir[:-1] directory = directory[:-1]
newfiles = [] newfiles = []
for file in result['result']['files']: for file in result['result']['files']:
fullpath = "%s/%s" % (dir, file['filename']) fullpath = f"{directory}/{file['filename']}"
if fullpath not in self.filelist: if fullpath not in self.filelist:
newfiles.append(fullpath) newfiles.append(fullpath)
if len(newfiles) > 0: if newfiles:
self.run_callbacks(newfiles) self.run_callbacks(newfiles)
elif method == "server.files.metadata": elif method == "server.files.metadata":
if "error" in result.keys(): if "error" in result.keys():
logging.debug("Error in getting metadata for %s. Retrying in 6 seconds" % (params['filename'])) logging.debug(f"Error in getting metadata for {params['filename']}. Retrying in 6 seconds")
return return
for x in result['result']: for x in result['result']:
self.files[params['filename']][x] = result['result'][x] self.files[params['filename']][x] = result['result'][x]
if "thumbnails" in self.files[params['filename']]: if "thumbnails" in self.files[params['filename']]:
self.files[params['filename']]['thumbnails'].sort(key=lambda x: x['size'], reverse=True) self.files[params['filename']]['thumbnails'].sort(key=lambda y: y['size'], reverse=True)
for thumbnail in self.files[params['filename']]['thumbnails']: for thumbnail in self.files[params['filename']]['thumbnails']:
thumbnail['local'] = False thumbnail['local'] = False
@@ -90,14 +88,15 @@ class KlippyFiles:
def add_file(self, item, notify=True): def add_file(self, item, notify=True):
if 'filename' not in item and 'path' not in item: if 'filename' not in item and 'path' not in item:
logging.info("Error adding item, unknown filename or path: %s" % item) logging.info(f"Error adding item, unknown filename or path: {item}")
return return
filename = item['path'] if "path" in item else item['filename'] filename = item['path'] if "path" in item else item['filename']
if filename in self.filelist: if filename in self.filelist:
logging.info("File already exists: %s" % filename) logging.info(f"File already exists: {filename}")
self.request_metadata(filename) self.request_metadata(filename)
GLib.timeout_add_seconds(1, self.run_callbacks, mods=[filename]) args = None, None, [filename]
GLib.idle_add(self.run_callbacks, *args)
return return
self.filelist.append(filename) self.filelist.append(filename)
@@ -112,15 +111,15 @@ class KlippyFiles:
def add_file_callback(self, callback): def add_file_callback(self, callback):
try: try:
self.callbacks.append(callback) self.callbacks.append(callback)
except Exception: except Exception as e:
logging.debug("Callback not found: %s" % callback) logging.debug(f"Callback not found: {callback}:\n{e}")
def process_update(self, data): def process_update(self, data):
if 'item' in data and data['item']['root'] != 'gcodes': if 'item' in data and data['item']['root'] != 'gcodes':
return return
if data['action'] == "create_dir": if data['action'] == "create_dir":
self._screen._ws.klippy.get_file_dir("gcodes/%s" % data['item']['path'], self._callback) self._screen._ws.klippy.get_file_dir(f"gcodes/{data['item']['path']}", self._callback)
elif data['action'] == "create_file": elif data['action'] == "create_file":
self.add_file(data['item']) self.add_file(data['item'])
elif data['action'] == "delete_file": elif data['action'] == "delete_file":
@@ -137,20 +136,19 @@ class KlippyFiles:
self.callbacks.pop(self.callbacks.index(callback)) self.callbacks.pop(self.callbacks.index(callback))
def file_exists(self, filename): def file_exists(self, filename):
return True if filename in self.filelist else False return filename in self.filelist
def file_metadata_exists(self, filename): def file_metadata_exists(self, filename):
if not self.file_exists(filename): if self.file_exists(filename):
return False return "slicer" in self.files[filename]
if "slicer" in self.files[filename]:
return True
return False return False
def get_thumbnail_location(self, filename, small=False): def get_thumbnail_location(self, filename, small=False):
thumb = self.files[filename]['thumbnails'][0] if small and len(self.files[filename]['thumbnails']) > 1 \
if small and len(self.files[filename]['thumbnails']) > 1: and self.files[filename]['thumbnails'][0]['width'] > self.files[filename]['thumbnails'][1]['width']:
if self.files[filename]['thumbnails'][0]['width'] > self.files[filename]['thumbnails'][1]['width']: thumb = self.files[filename]['thumbnails'][1]
thumb = self.files[filename]['thumbnails'][1] else:
thumb = self.files[filename]['thumbnails'][0]
if thumb['local'] is False: if thumb['local'] is False:
return ['http', thumb['path']] return ['http', thumb['path']]
return ['file', thumb['path']] return ['file', thumb['path']]
@@ -178,15 +176,18 @@ class KlippyFiles:
if notify is True: if notify is True:
self.run_callbacks(deletedfiles=[filename]) self.run_callbacks(deletedfiles=[filename])
def ret_file_data(self, filename): def run_callbacks(self, newfiles=None, deletedfiles=None, mods=None):
print("Getting file info for %s" % filename) if mods is None:
self._screen._ws.klippy.get_file_metadata(filename, self._callback) mods = []
if deletedfiles is None:
def run_callbacks(self, newfiles=[], deletedfiles=[], mods=[]): deletedfiles = []
if newfiles is None:
newfiles = []
if len(self.callbacks) <= 0: if len(self.callbacks) <= 0:
return False return False
for cb in self.callbacks: for cb in self.callbacks:
GLib.idle_add(cb, newfiles, deletedfiles, mods) args = newfiles, deletedfiles, mods
GLib.idle_add(cb, *args)
return False return False
def get_file_list(self): def get_file_list(self):
+23 -21
View File
@@ -17,7 +17,6 @@ try:
ctypes.cdll.LoadLibrary('libXext.so.6') ctypes.cdll.LoadLibrary('libXext.so.6')
libXext = ctypes.CDLL('libXext.so.6') libXext = ctypes.CDLL('libXext.so.6')
class DPMS_State: class DPMS_State:
Fail = -1 Fail = -1
On = 0 On = 0
@@ -25,7 +24,6 @@ try:
Suspend = 2 Suspend = 2
Off = 3 Off = 3
def get_DPMS_state(display_name_in_byte_string=b':0'): def get_DPMS_state(display_name_in_byte_string=b':0'):
state = DPMS_State.Fail state = DPMS_State.Fail
if not isinstance(display_name_in_byte_string, bytes): if not isinstance(display_name_in_byte_string, bytes):
@@ -48,10 +46,9 @@ try:
libXext.XCloseDisplay(display) libXext.XCloseDisplay(display)
return state return state
dpms_loaded = True dpms_loaded = True
except Exception: except Exception as msg:
pass logging.error(f"Couldn't load DPMS: {msg}")
def get_network_interfaces(): def get_network_interfaces():
@@ -78,7 +75,7 @@ def get_wireless_interfaces():
for line in result: for line in result:
match = re.search('^(\\S+)\\s+.*$', line) match = re.search('^(\\S+)\\s+.*$', line)
if match: if match:
interfaces.append(match.group(1)) interfaces.append(match[1])
return interfaces return interfaces
@@ -126,8 +123,8 @@ def patch_threading_excepthook():
threading.Thread.__init__ = new_init threading.Thread.__init__ = new_init
# Timed rotating file handler based on Klipper and Moonraker's implementation # Rotating file handler based on Klipper and Moonraker's implementation
class KlipperScreenLoggingHandler(logging.handlers.TimedRotatingFileHandler): class KlipperScreenLoggingHandler(logging.handlers.RotatingFileHandler):
def __init__(self, software_version, filename, **kwargs): def __init__(self, software_version, filename, **kwargs):
super(KlipperScreenLoggingHandler, self).__init__(filename, **kwargs) super(KlipperScreenLoggingHandler, self).__init__(filename, **kwargs)
self.rollover_info = { self.rollover_info = {
@@ -160,23 +157,28 @@ def setup_logging(log_file, software_version):
stdout_fmt = logging.Formatter( stdout_fmt = logging.Formatter(
'%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s') '%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
stdout_hdlr.setFormatter(stdout_fmt) stdout_hdlr.setFormatter(stdout_fmt)
fh = listener = None
fh = None try:
if log_file: fh = KlipperScreenLoggingHandler(software_version, log_file, maxBytes=4194304, backupCount=1)
fh = KlipperScreenLoggingHandler(software_version, log_file, when='midnight', backupCount=2) formatter = logging.Formatter('%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
formatter = logging.Formatter(
'%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
fh.setFormatter(formatter) fh.setFormatter(formatter)
listener = logging.handlers.QueueListener( listener = logging.handlers.QueueListener(queue, fh, stdout_hdlr)
queue, fh, stdout_hdlr) except Exception as e:
else: print(
listener = logging.handlers.QueueListener( f"Unable to create log file at '{os.path.normpath(log_file)}'.\n"
queue, stdout_hdlr) f"Make sure that the folder '{os.path.dirname(log_file)}' exists\n"
f"and KlipperScreen has Read/Write access to the folder.\n"
f"{e}\n"
)
if listener is None:
listener = logging.handlers.QueueListener(queue, stdout_hdlr)
listener.start() listener.start()
def logging_exception_handler(type, value, tb, thread_identifier=None): def logging_exception_handler(ex_type, value, tb, thread_identifier=None):
logging.exception( logging.exception(
"Uncaught exception %s: %s\nTraceback: %s" % (type, value, "\n".join(traceback.format_tb(tb)))) f'Uncaught exception {ex_type}: {value}\n'
f'Traceback: {traceback.format_tb(tb)}'
)
sys.excepthook = logging_exception_handler sys.excepthook = logging_exception_handler
logging.captureWarnings(True) logging.captureWarnings(True)
+66 -37
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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-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"
@@ -49,7 +49,7 @@ msgstr ""
msgid "Add Printer" msgid "Add Printer"
msgstr "" msgstr ""
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "" msgstr ""
msgid "Apply" msgid "Apply"
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "" msgstr ""
@@ -84,6 +87,9 @@ msgstr ""
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "" msgstr ""
@@ -93,7 +99,7 @@ msgstr ""
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "" msgstr ""
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "" msgstr ""
msgid "Calibrate" msgid "Calibrate"
@@ -105,6 +111,9 @@ msgstr ""
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "" msgstr ""
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -129,12 +138,10 @@ msgstr ""
msgid "Channel" msgid "Channel"
msgstr "" msgstr ""
msgid "" msgid "Check ADXL Wiring"
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr "" msgstr ""
msgid "Check ADXL Wiring" msgid "Checking for updates, please wait..."
msgstr "" msgstr ""
msgid "Clear" msgid "Clear"
@@ -174,7 +181,7 @@ msgstr ""
msgid "Decrease" msgid "Decrease"
msgstr "" msgstr ""
msgid "Delete" msgid "Delete File?"
msgstr "" msgstr ""
msgid "Deselect" msgid "Deselect"
@@ -202,6 +209,9 @@ msgstr ""
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "" msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "" msgstr ""
@@ -244,9 +254,7 @@ msgstr ""
msgid "Finish" msgid "Finish"
msgstr "" msgstr ""
msgid "" msgid "Firmware Restart"
"Firmware\n"
"Restart"
msgstr "" msgstr ""
msgid "Flow:" msgid "Flow:"
@@ -258,9 +266,7 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "" msgstr ""
msgid "" msgid "Full Update"
"Full\n"
"Update"
msgstr "" msgstr ""
msgid "Go Back" msgid "Go Back"
@@ -281,9 +287,6 @@ msgstr ""
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr ""
msgid "Home All" msgid "Home All"
msgstr "" msgstr ""
@@ -302,6 +305,9 @@ msgstr ""
msgid "Homing" msgid "Homing"
msgstr "" msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "" msgstr ""
@@ -335,9 +341,7 @@ msgstr ""
msgid "Invert Z" msgid "Invert Z"
msgstr "" msgstr ""
msgid "" msgid "Klipper Restart"
"Klipper\n"
"Restart"
msgstr "" msgstr ""
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
@@ -412,6 +416,9 @@ msgstr ""
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
@@ -430,13 +437,18 @@ msgstr ""
msgid "Network" msgid "Network"
msgstr "" msgstr ""
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid "Nothing selected" msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr "" msgstr ""
msgid "Off" msgid "Nothing selected"
msgstr "" msgstr ""
#, python-format #, python-format
@@ -451,6 +463,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "" msgstr ""
@@ -463,6 +478,9 @@ msgstr ""
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "" msgstr ""
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "" msgstr ""
@@ -484,18 +502,21 @@ msgstr ""
msgid "Print Time" msgid "Print Time"
msgstr "" msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "" msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "" msgstr ""
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "" msgstr ""
@@ -514,6 +535,9 @@ msgstr ""
msgid "Reference" msgid "Reference"
msgstr "" msgstr ""
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "" msgstr ""
@@ -532,10 +556,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "" msgstr ""
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@@ -583,6 +613,12 @@ msgstr ""
msgid "Show" msgid "Show"
msgstr "" msgstr ""
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "" msgstr ""
@@ -598,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "" msgstr ""
msgid "Sort by: "
msgstr ""
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -634,14 +667,10 @@ msgstr ""
msgid "System" msgid "System"
msgstr "" msgstr ""
msgid "" msgid "System Restart"
"System\n"
"Restart"
msgstr "" msgstr ""
msgid "" msgid "System Shutdown"
"System\n"
"Shutdown"
msgstr "" msgstr ""
msgid "Temp (°C)" msgid "Temp (°C)"
@@ -660,6 +689,9 @@ msgstr ""
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "" msgstr ""
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "" msgstr ""
@@ -681,9 +713,6 @@ msgstr ""
msgid "Uploaded" msgid "Uploaded"
msgstr "" msgstr ""
msgid "View Mesh"
msgstr ""
msgid "X+" msgid "X+"
msgstr "" msgstr ""
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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: SRBJ\n" "Last-Translator: SRBJ\n"
"Language-Team: \n" "Language-Team: \n"
@@ -44,8 +44,8 @@ msgstr "Muligheder"
msgid "Add Printer" msgid "Add Printer"
msgstr "Tilføj printer" msgstr "Tilføj printer"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Tilføj \"bed-mesh\" profil" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Er du sikker på, at du vil køre nødstop?" msgstr "Er du sikker på, at du vil køre nødstop?"
@@ -79,6 +82,9 @@ msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Automatisk kalibrering" msgstr "Automatisk kalibrering"
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -88,8 +94,8 @@ msgstr "Bed-Level"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Bed-mesh" msgstr "Bed-mesh"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch fundet anvendt offset" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibrér" msgstr "Kalibrér"
@@ -100,6 +106,9 @@ msgstr "Kalibreret"
msgid "Calibrated, save configuration to make it permanent" 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"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Kalibrerer..." msgstr "Kalibrerer..."
@@ -124,16 +133,12 @@ msgstr "Kan ikke oprette forbindelse til Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Kanal" msgstr "Kanal"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Tjek /tmp/KlipperScreen.log for mere information.\n"
"Indsend venligst et \"Issue\" på GitHub for hjælp."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -171,8 +176,8 @@ msgstr "Dato"
msgid "Decrease" msgid "Decrease"
msgstr "Formindsk" msgstr "Formindsk"
msgid "Delete" msgid "Delete File?"
msgstr "Slet" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Fravælg" msgstr "Fravælg"
@@ -199,6 +204,9 @@ msgstr "Fejl"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Metode til beregning af tid" msgstr "Metode til beregning af tid"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Ekstrudér" msgstr "Ekstrudér"
@@ -241,12 +249,8 @@ msgstr "Finjustering"
msgid "Finish" msgid "Finish"
msgstr "Færdig" msgstr "Færdig"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Genstart"
"Restart"
msgstr ""
"Firmware\n"
"Genstart"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -257,12 +261,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Skriftstørrelse" msgstr "Skriftstørrelse"
msgid "" msgid "Full Update"
"Full\n" msgstr "Fuld Opdatering"
"Update"
msgstr ""
"Fuld\n"
"Opdatering"
msgid "Go Back" msgid "Go Back"
msgstr "Gå tilbage" msgstr "Gå tilbage"
@@ -282,9 +282,6 @@ msgstr "Skjul sensorer i Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Home"
msgid "Home All" msgid "Home All"
msgstr "Home alle" msgstr "Home alle"
@@ -303,6 +300,9 @@ msgstr "Home Z"
msgid "Homing" msgid "Homing"
msgstr "Homing" msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Værtsnavn" msgstr "Værtsnavn"
@@ -336,12 +336,8 @@ msgstr "Invertér Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Invertér Z" msgstr "Invertér Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Genstart"
"Restart"
msgstr ""
"Klipper\n"
"Genstart"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper er frokoblet" msgstr "Klipper er frokoblet"
@@ -415,6 +411,9 @@ msgstr "Mellem"
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Ændret" msgstr "Ændret"
@@ -433,15 +432,20 @@ msgstr "Navn"
msgid "Network" msgid "Network"
msgstr "Netværk" msgstr "Netværk"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Ny" msgstr "Ny"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Intet valgt" msgstr "Intet valgt"
msgid "Off"
msgstr "Sluk"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Forældet med %d" msgstr "Forældet med %d"
@@ -454,6 +458,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Pakken vil blive opdateret" msgstr[0] "Pakken vil blive opdateret"
msgstr[1] "Pakker vil blive opdateret" msgstr[1] "Pakker vil blive opdateret"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Adgangskode gemt" msgstr "Adgangskode gemt"
@@ -466,6 +473,9 @@ msgstr "På pause"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Vil du udføre en fuld opgradering?" msgstr "Vil du udføre en fuld opgradering?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Genkompilér og flash mikrocontrolleren." msgstr "Genkompilér og flash mikrocontrolleren."
@@ -487,18 +497,21 @@ msgstr "Print styring"
msgid "Print Time" msgid "Print Time"
msgstr "Printtid" msgstr "Printtid"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Printer forbindelser" msgstr "Printer forbindelser"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Printer" msgstr "Printer"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe fundet anvendt offset"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilnavn:" msgstr "Profilnavn:"
@@ -517,6 +530,9 @@ msgstr "Nulstil"
msgid "Reference" msgid "Reference"
msgstr "Reference" msgstr "Reference"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Genstart" msgstr "Genstart"
@@ -535,10 +551,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Prøv igen #%s" msgstr "Prøv igen #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Gem" msgstr "Gem"
@@ -586,6 +608,12 @@ msgstr "Indstillinger"
msgid "Show" msgid "Show"
msgstr "At vise" msgstr "At vise"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Størrelse" msgstr "Størrelse"
@@ -601,9 +629,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Lille" msgstr "Lille"
msgid "Sort by: "
msgstr "Sortér efter: "
msgid "Sort:" msgid "Sort:"
msgstr "Sortere: " msgstr "Sortere: "
@@ -637,19 +662,11 @@ msgstr "Opdaterer"
msgid "System" msgid "System"
msgstr "System" msgstr "System"
msgid "" msgid "System Restart"
"System\n" msgstr "Genstart system"
"Restart"
msgstr ""
"Genstart\n"
"system"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Luk system ned"
"Shutdown"
msgstr ""
"Luk\n"
"system ned"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -667,6 +684,9 @@ msgstr "Total:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Ukendt varmelegeme" msgstr "Ukendt varmelegeme"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Tilbagetræk" msgstr "Tilbagetræk"
@@ -688,9 +708,6 @@ msgstr "Opdatering"
msgid "Uploaded" msgid "Uploaded"
msgstr "Uploadet" msgstr "Uploadet"
msgid "View Mesh"
msgstr "Vis mesh"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -755,6 +772,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Slet"
#~ msgid "Home"
#~ msgstr "Home"
#~ msgid "Off"
#~ msgstr "Sluk"
#~ msgid "View Mesh"
#~ msgstr "Vis mesh"
#~ msgid "Sort by: "
#~ msgstr "Sortér efter: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch fundet anvendt offset"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Tjek /tmp/KlipperScreen.log for mere information.\n"
#~ "Indsend venligst et \"Issue\" på GitHub for hjælp."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe fundet anvendt offset"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Ekstruder" #~ msgstr "Ekstruder"
@@ -770,9 +815,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Ukendt varmelegeme "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Afbryd forbindelse" #~ msgstr "Afbryd forbindelse"
@@ -7,7 +7,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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 10:43-0300\n" "PO-Revision-Date: 2022-03-31 10:43-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -49,8 +49,8 @@ msgstr "Aktionen"
msgid "Add Printer" msgid "Add Printer"
msgstr "Drucker hinzufügen" msgstr "Drucker hinzufügen"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Mesh-Level Profil hinzufügen" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
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?"
@@ -84,6 +87,9 @@ msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Automatisch kalibrieren" msgstr "Automatisch kalibrieren"
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -93,8 +99,8 @@ msgstr "Druckbett leveln"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Druckbett Mesh-Level" msgstr "Druckbett Mesh-Level"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch hat angewendeten Offset gefunden" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Höheneinstellung" msgstr "Höheneinstellung"
@@ -105,6 +111,9 @@ 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 speichern, um sie dauerhaft zu machen"
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Kalibrieren..." msgstr "Kalibrieren..."
@@ -129,16 +138,12 @@ msgstr "Es kann keine Verbindung zu Moonraker hergestellt werden"
msgid "Channel" msgid "Channel"
msgstr "Kanal" msgstr "Kanal"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Prüfe /tmp/KlipperScreen.log für weitere Informationen.\n"
"Bitte eröffne einen Fehlerbericht auf https://git.io/JLNn4 für Hilfe."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -176,8 +181,8 @@ msgstr "Datum"
msgid "Decrease" msgid "Decrease"
msgstr "Verringern" msgstr "Verringern"
msgid "Delete" msgid "Delete File?"
msgstr "Löschen" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Abwählen" msgstr "Abwählen"
@@ -204,6 +209,9 @@ msgstr "Fehler"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Druckzeit" msgstr "Druckzeit"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Filament fördern" msgstr "Filament fördern"
@@ -246,12 +254,8 @@ msgstr "Feintuning"
msgid "Finish" msgid "Finish"
msgstr "Ziel" msgstr "Ziel"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Neu starten"
"Restart"
msgstr ""
"Firmware\n"
"Neu starten"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -262,12 +266,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Schriftgröße" msgstr "Schriftgröße"
msgid "" msgid "Full Update"
"Full\n" msgstr "Voll Aktualisieren"
"Update"
msgstr ""
"Voll\n"
"Aktualisieren"
msgid "Go Back" msgid "Go Back"
msgstr "Zurück" msgstr "Zurück"
@@ -287,37 +287,27 @@ msgstr "Sensoren in Temp ausblenden."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Grundposition"
msgid "Home All" msgid "Home All"
msgstr "" msgstr "Alle Achsen zurücksetzen"
"Alle Achsen\n"
"zurücksetzen"
msgid "Home X" msgid "Home X"
msgstr "" msgstr "Achse X zurücksetzen"
"Achse X\n"
"zurücksetzen"
msgid "Home XY" msgid "Home XY"
msgstr "" msgstr "Achse XY zurücksetzen"
"Achse XY\n"
"zurücksetzen"
msgid "Home Y" msgid "Home Y"
msgstr "" msgstr "Achse Y zurücksetzen"
"Achse Y\n"
"zurücksetzen"
msgid "Home Z" msgid "Home Z"
msgstr "" msgstr "Achse Z zurücksetzen"
"Achse Z\n"
"zurücksetzen"
msgid "Homing" msgid "Homing"
msgstr "Grundposition" msgstr "Grundposition"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Hostname"
@@ -351,12 +341,8 @@ msgstr "Achse Y invertieren"
msgid "Invert Z" msgid "Invert Z"
msgstr "Achse Z invertieren" msgstr "Achse Z invertieren"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Neu starten"
"Restart"
msgstr ""
"Klipper\n"
"Neu starten"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper nicht verbunden" msgstr "Klipper nicht verbunden"
@@ -430,6 +416,9 @@ msgstr "Mittel"
msgid "Menu" msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Modifiziert" msgstr "Modifiziert"
@@ -448,15 +437,20 @@ msgstr "Name"
msgid "Network" msgid "Network"
msgstr "Netzwerk" msgstr "Netzwerk"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Neu" msgstr "Neu"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nichts ausgewählt" msgstr "Nichts ausgewählt"
msgid "Off"
msgstr "Aus"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Veraltet von %d" msgstr "Veraltet von %d"
@@ -469,6 +463,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Paket wird aktualisiert" msgstr[0] "Paket wird aktualisiert"
msgstr[1] "Pakete werden aktualisiert" msgstr[1] "Pakete werden aktualisiert"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Passwort gespeichert" msgstr "Passwort gespeichert"
@@ -481,6 +478,9 @@ msgstr "Pausiert"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Vollständiges Upgrade durchführen?" msgstr "Vollständiges Upgrade durchführen?"
msgid "Pins"
msgstr ""
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."
@@ -502,18 +502,21 @@ msgstr "Druck Steuerung"
msgid "Print Time" msgid "Print Time"
msgstr "Druckzeit" msgstr "Druckzeit"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Drucker Verbindungen" msgstr "Drucker Verbindungen"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Drucken" msgstr "Drucken"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe hat angewendeten Offset gefunden"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilname:" msgstr "Profilname:"
@@ -532,6 +535,9 @@ msgstr "Rücksetzen Soft"
msgid "Reference" msgid "Reference"
msgstr "Referenz" msgstr "Referenz"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Neustart" msgstr "Neustart"
@@ -550,10 +556,16 @@ msgstr "Rückzugslänge"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Rückzugsgeschwindigkeit" msgstr "Rückzugsgeschwindigkeit"
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Wiederholen #%s" msgstr "Wiederholen #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
@@ -601,6 +613,12 @@ msgstr "Einstellungen"
msgid "Show" msgid "Show"
msgstr "Zeigen" msgstr "Zeigen"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Größe" msgstr "Größe"
@@ -616,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Klein" msgstr "Klein"
msgid "Sort by: "
msgstr "Sortierung: "
msgid "Sort:" msgid "Sort:"
msgstr "Sortieren: " msgstr "Sortieren: "
@@ -652,19 +667,11 @@ msgstr "Starte Update für"
msgid "System" msgid "System"
msgstr "System" msgstr "System"
msgid "" msgid "System Restart"
"System\n" msgstr "Drucker Neustarten"
"Restart"
msgstr ""
"Drucker\n"
"Neustarten"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Drucker Ausschalten"
"Shutdown"
msgstr ""
"Drucker\n"
"Ausschalten"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -682,6 +689,9 @@ msgstr "Gesamt:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Unbekannte Heizung" msgstr "Unbekannte Heizung"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Entladen" msgstr "Entladen"
@@ -705,9 +715,6 @@ msgstr "Aktualisierung"
msgid "Uploaded" msgid "Uploaded"
msgstr "Hochgeladen" msgstr "Hochgeladen"
msgid "View Mesh"
msgstr "Mesh anzeigen"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -772,6 +779,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Löschen"
#~ msgid "Home"
#~ msgstr "Grundposition"
#~ msgid "Off"
#~ msgstr "Aus"
#~ msgid "View Mesh"
#~ msgstr "Mesh anzeigen"
#~ msgid "Sort by: "
#~ msgstr "Sortierung: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch hat angewendeten Offset gefunden"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Prüfe /tmp/KlipperScreen.log für weitere Informationen.\n"
#~ "Bitte eröffne einen Fehlerbericht auf https://git.io/JLNn4 für Hilfe."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe hat angewendeten Offset gefunden"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Druckkopf" #~ msgstr "Druckkopf"
@@ -787,9 +822,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Unbekannte Heizung "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Nicht verbunden" #~ msgstr "Nicht verbunden"
@@ -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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -44,7 +44,7 @@ msgstr ""
msgid "Add Printer" msgid "Add Printer"
msgstr "" msgstr ""
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "" msgstr ""
msgid "Apply" msgid "Apply"
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "" msgstr ""
@@ -79,6 +82,9 @@ msgstr ""
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "" msgstr ""
@@ -88,7 +94,7 @@ msgstr ""
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "" msgstr ""
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "" msgstr ""
msgid "Calibrate" msgid "Calibrate"
@@ -100,6 +106,9 @@ msgstr ""
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "" msgstr ""
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -124,12 +133,10 @@ msgstr ""
msgid "Channel" msgid "Channel"
msgstr "" msgstr ""
msgid "" msgid "Check ADXL Wiring"
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr "" msgstr ""
msgid "Check ADXL Wiring" msgid "Checking for updates, please wait..."
msgstr "" msgstr ""
msgid "Clear" msgid "Clear"
@@ -169,7 +176,7 @@ msgstr ""
msgid "Decrease" msgid "Decrease"
msgstr "" msgstr ""
msgid "Delete" msgid "Delete File?"
msgstr "" msgstr ""
msgid "Deselect" msgid "Deselect"
@@ -197,6 +204,9 @@ msgstr ""
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "" msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "" msgstr ""
@@ -239,9 +249,7 @@ msgstr ""
msgid "Finish" msgid "Finish"
msgstr "" msgstr ""
msgid "" msgid "Firmware Restart"
"Firmware\n"
"Restart"
msgstr "" msgstr ""
msgid "Flow:" msgid "Flow:"
@@ -253,9 +261,7 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "" msgstr ""
msgid "" msgid "Full Update"
"Full\n"
"Update"
msgstr "" msgstr ""
msgid "Go Back" msgid "Go Back"
@@ -276,9 +282,6 @@ msgstr ""
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr ""
msgid "Home All" msgid "Home All"
msgstr "" msgstr ""
@@ -297,6 +300,9 @@ msgstr ""
msgid "Homing" msgid "Homing"
msgstr "" msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "" msgstr ""
@@ -330,9 +336,7 @@ msgstr ""
msgid "Invert Z" msgid "Invert Z"
msgstr "" msgstr ""
msgid "" msgid "Klipper Restart"
"Klipper\n"
"Restart"
msgstr "" msgstr ""
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
@@ -407,6 +411,9 @@ msgstr ""
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
@@ -425,13 +432,18 @@ msgstr ""
msgid "Network" msgid "Network"
msgstr "" msgstr ""
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid "Nothing selected" msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr "" msgstr ""
msgid "Off" msgid "Nothing selected"
msgstr "" msgstr ""
#, python-format #, python-format
@@ -446,6 +458,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "" msgstr ""
@@ -458,6 +473,9 @@ msgstr ""
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "" msgstr ""
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "" msgstr ""
@@ -479,18 +497,21 @@ msgstr ""
msgid "Print Time" msgid "Print Time"
msgstr "" msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "" msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "" msgstr ""
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "" msgstr ""
@@ -509,6 +530,9 @@ msgstr ""
msgid "Reference" msgid "Reference"
msgstr "" msgstr ""
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "" msgstr ""
@@ -527,10 +551,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "" msgstr ""
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@@ -578,6 +608,12 @@ msgstr ""
msgid "Show" msgid "Show"
msgstr "" msgstr ""
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "" msgstr ""
@@ -593,9 +629,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "" msgstr ""
msgid "Sort by: "
msgstr ""
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -629,14 +662,10 @@ msgstr ""
msgid "System" msgid "System"
msgstr "" msgstr ""
msgid "" msgid "System Restart"
"System\n"
"Restart"
msgstr "" msgstr ""
msgid "" msgid "System Shutdown"
"System\n"
"Shutdown"
msgstr "" msgstr ""
msgid "Temp (°C)" msgid "Temp (°C)"
@@ -655,6 +684,9 @@ msgstr ""
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "" msgstr ""
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "" msgstr ""
@@ -676,9 +708,6 @@ msgstr ""
msgid "Uploaded" msgid "Uploaded"
msgstr "" msgstr ""
msgid "View Mesh"
msgstr ""
msgid "X+" msgid "X+"
msgstr "" 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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-06-02 13:54-0300\n" "PO-Revision-Date: 2022-11-12 11:20-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.0.1\n" "X-Generator: Poedit 3.1.1\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -49,8 +49,8 @@ msgstr "Acciones"
msgid "Add Printer" msgid "Add Printer"
msgstr "Agregar impresora" msgstr "Agregar impresora"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Agregar pefil de malla de cama" msgstr "Agregar perfil"
msgid "Apply" msgid "Apply"
msgstr "Aplicar" msgstr "Aplicar"
@@ -63,20 +63,23 @@ msgstr "Aplicar %.2f desfase al final de carrera?"
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "Aplicar %s%.2f desfase al sensor?" msgstr "Aplicar %s%.2f desfase al sensor?"
msgid "Are you sure do you want to exclude the object?"
msgstr "¿Está seguro de excluir este objeto?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "¿Parada de emergencia?" msgstr "¿Parada de emergencia?"
msgid "Are you sure you wish to cancel this print?" msgid "Are you sure you wish to cancel this print?"
msgstr "Está seguro que desea cancelar esta impresión?" msgstr "¿Está seguro que desea cancelar esta impresión?"
msgid "Are you sure you wish to disable motors?" msgid "Are you sure you wish to disable motors?"
msgstr "¿Está seguro que desea desactivar los motores?" msgstr "¿Está seguro que desea desactivar los motores?"
msgid "Are you sure you wish to reboot the system?" msgid "Are you sure you wish to reboot the system?"
msgstr "Está seguro que desea reiniciar el sistema?" msgstr "¿Está seguro que desea reiniciar el sistema?"
msgid "Are you sure you wish to shutdown the system?" msgid "Are you sure you wish to shutdown the system?"
msgstr "Está seguro que desea apagar el sistema?" msgstr "¿Está seguro que desea apagar el sistema?"
msgid "Auto" msgid "Auto"
msgstr "Auto" msgstr "Auto"
@@ -84,6 +87,9 @@ msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Auto-Calibrar" msgstr "Auto-Calibrar"
msgid "Auto-close notifications"
msgstr "Auto-cerrar notificaciones"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -93,8 +99,8 @@ msgstr "Nivelar cama"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Malla de cama" msgstr "Malla de cama"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Encontrado Bltouch aplicado desfase" msgstr "Configuración de tornillos:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Calibrar" msgstr "Calibrar"
@@ -105,6 +111,9 @@ msgstr "Calibrado"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Calibrado, guarde su configuración para hacerlo permanente" msgstr "Calibrado, guarde su configuración para hacerlo permanente"
msgid "Calibrating"
msgstr "Calibrando"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Calibrando..." msgstr "Calibrando..."
@@ -129,16 +138,12 @@ msgstr "No se puede conectar a Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Canal" msgstr "Canal"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Revise /tmp/KlipperScreen.log para mas información.\n"
"Por favor crear un 'issue' en GitHub para ser ayudado."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "Verificar cableado del ADXL" msgstr "Verificar cableado del ADXL"
msgid "Checking for updates, please wait..."
msgstr "Buscando actualizaciones, espere por favor..."
msgid "Clear" msgid "Clear"
msgstr "Limpiar" msgstr "Limpiar"
@@ -176,8 +181,8 @@ msgstr "Fecha"
msgid "Decrease" msgid "Decrease"
msgstr "Disminuir" msgstr "Disminuir"
msgid "Delete" msgid "Delete File?"
msgstr "Borrar" msgstr "¿Borrar archivo?"
msgid "Deselect" msgid "Deselect"
msgstr "Deseleccionar" msgstr "Deseleccionar"
@@ -196,7 +201,7 @@ msgid "Do you want to recover %s?"
msgstr "Desea recuperar %s?" msgstr "Desea recuperar %s?"
msgid "Elapsed:" msgid "Elapsed:"
msgstr "Tiempo:" msgstr "Transcurrido:"
msgid "Error" msgid "Error"
msgstr "Error" msgstr "Error"
@@ -204,6 +209,9 @@ msgstr "Error"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Método para estimar tiempo" msgstr "Método para estimar tiempo"
msgid "Exclude Object"
msgstr "Excluir Objeto"
msgid "Extrude" msgid "Extrude"
msgstr "Extruir" msgstr "Extruir"
@@ -246,12 +254,8 @@ msgstr "Ajuste Fino"
msgid "Finish" msgid "Finish"
msgstr "Cerrar" msgstr "Cerrar"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Reiniciar Firmware"
"Restart"
msgstr ""
"Reiniciar\n"
"Firmware"
msgid "Flow:" msgid "Flow:"
msgstr "Flujo:" msgstr "Flujo:"
@@ -262,12 +266,8 @@ msgstr "Flujo:"
msgid "Font Size" msgid "Font Size"
msgstr "Tamaño del texto" msgstr "Tamaño del texto"
msgid "" msgid "Full Update"
"Full\n" msgstr "Actualizar Todo"
"Update"
msgstr ""
"Actualizar\n"
"Todo"
msgid "Go Back" msgid "Go Back"
msgstr "Volver" msgstr "Volver"
@@ -287,9 +287,6 @@ msgstr "Ocultar sensores en Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "Ocultar temp." msgstr "Ocultar temp."
msgid "Home"
msgstr "Inicio"
msgid "Home All" msgid "Home All"
msgstr "Origen XYZ" msgstr "Origen XYZ"
@@ -308,6 +305,9 @@ msgstr "Origen Z"
msgid "Homing" msgid "Homing"
msgstr "Origen" msgstr "Origen"
msgid "Host"
msgstr "Anfitrión"
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Hostname"
@@ -324,7 +324,7 @@ msgid "Initializing printer..."
msgstr "Iniciando Impresora..." msgstr "Iniciando Impresora..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Corrección de Resonancias"
msgid "Interface" msgid "Interface"
msgstr "Interfaz" msgstr "Interfaz"
@@ -341,12 +341,8 @@ msgstr "Invertir Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Invertir Z" msgstr "Invertir Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Reiniciar Klipper"
"Restart"
msgstr ""
"Reiniciar\n"
"Klipper"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper se desconectó" msgstr "Klipper se desconectó"
@@ -394,10 +390,10 @@ msgid "Main Menu"
msgstr "Menú" msgstr "Menú"
msgid "Max" msgid "Max"
msgstr "" msgstr "Max"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Aceleración Max." msgstr "Aceleración Máxima"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Max. Aceleración a Desaceleración" msgstr "Max. Aceleración a Desaceleración"
@@ -420,6 +416,9 @@ msgstr "Medio"
msgid "Menu" msgid "Menu"
msgstr "Menú" msgstr "Menú"
msgid "Mesh calibrate"
msgstr "Calibrar Malla"
msgid "Modified" msgid "Modified"
msgstr "Modificado" msgstr "Modificado"
@@ -438,15 +437,22 @@ msgstr "Nombre"
msgid "Network" msgid "Network"
msgstr "Red" msgstr "Red"
msgid "Never"
msgstr "Nunca"
msgid "New" msgid "New"
msgstr "Nuevo" msgstr "Nuevo"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"No soportado para la detección automatica, necesita configurarlo en "
"klipperscreen.conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nada seleccionado" msgstr "Nada seleccionado"
msgid "Off"
msgstr "Apagar"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Desactualizado por %d" msgstr "Desactualizado por %d"
@@ -459,6 +465,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Paquete será actualizado" msgstr[0] "Paquete será actualizado"
msgstr[1] "Paquetes serán actualizados" msgstr[1] "Paquetes serán actualizados"
msgid "Part Fan"
msgstr "Ventilador de parte"
msgid "Password saved" msgid "Password saved"
msgstr "Contraseña guardada" msgstr "Contraseña guardada"
@@ -471,6 +480,9 @@ msgstr "Pausado"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "¿Actualizar Todo?" msgstr "¿Actualizar Todo?"
msgid "Pins"
msgstr "Pines"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Por favor recompile y flashee el micro-controlador." msgstr "Por favor recompile y flashee el micro-controlador."
@@ -492,18 +504,21 @@ msgstr "Control de impresión"
msgid "Print Time" msgid "Print Time"
msgstr "Tiempo de impresión" msgstr "Tiempo de impresión"
msgid "Printer"
msgstr "Impresora"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Conexiones a impresoras" msgstr "Conexiones a impresoras"
msgid "Printer Select"
msgstr "Seleccionar Impresora"
msgid "Printing" msgid "Printing"
msgstr "Imprimiendo" msgstr "Imprimiendo"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "Desfase del sensor" msgstr "Desfase del sensor"
msgid "Probe found applied offset"
msgstr "Encontrado Probe aplicado desfase"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nombre del perfil:" msgstr "Nombre del perfil:"
@@ -522,6 +537,9 @@ msgstr "Recuperar Soft"
msgid "Reference" msgid "Reference"
msgstr "Referencia" msgstr "Referencia"
msgid "Refresh"
msgstr "Actualizar"
msgid "Restart" msgid "Restart"
msgstr "Reiniciar" msgstr "Reiniciar"
@@ -540,10 +558,16 @@ msgstr "Largo de Retracción"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Velocidad de Retracción" msgstr "Velocidad de Retracción"
msgid "Retry"
msgstr "Reintentar"
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Intento #%s" msgstr "Intento #%s"
msgid "Retrying"
msgstr "Reintentando"
msgid "Save" msgid "Save"
msgstr "Guardar" msgstr "Guardar"
@@ -591,6 +615,12 @@ msgstr "Opciones"
msgid "Show" msgid "Show"
msgstr "Mostrar" msgstr "Mostrar"
msgid "Show Heater Power"
msgstr "Mostrar potencia del calentador"
msgid "Shutdown"
msgstr "Apagar"
msgid "Size" msgid "Size"
msgstr "Tamaño" msgstr "Tamaño"
@@ -606,9 +636,6 @@ msgstr "Slicer:"
msgid "Small" msgid "Small"
msgstr "Pequeño" msgstr "Pequeño"
msgid "Sort by: "
msgstr "Ordenar por: "
msgid "Sort:" msgid "Sort:"
msgstr "Ordenar:" msgstr "Ordenar:"
@@ -642,19 +669,11 @@ msgstr "Iniciando actualización de"
msgid "System" msgid "System"
msgstr "Sistema" msgstr "Sistema"
msgid "" msgid "System Restart"
"System\n" msgstr "Reiniciar Sistema"
"Restart"
msgstr ""
"Reiniciar\n"
"Sistema"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Apagar Sistema"
"Shutdown"
msgstr ""
"Apagar\n"
"Sistema"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -672,6 +691,9 @@ msgstr "Total:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Calentador Desconocido" msgstr "Calentador Desconocido"
msgid "Unknown screw position"
msgstr "Posición de tornillo desconocida"
msgid "Unload" msgid "Unload"
msgstr "Descargar" msgstr "Descargar"
@@ -693,9 +715,6 @@ msgstr "Actualizando"
msgid "Uploaded" msgid "Uploaded"
msgstr "Subido" msgstr "Subido"
msgid "View Mesh"
msgstr "Ver Malla"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -760,6 +779,37 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Borrar"
#~ msgid "Home"
#~ msgstr "Inicio"
#~ msgid "Off"
#~ msgstr "Apagar"
#~ msgid "View Mesh"
#~ msgstr "Ver Malla"
#~ msgid "Machine"
#~ msgstr "Máquina"
#~ msgid "Sort by: "
#~ msgstr "Ordenar por: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Encontrado Bltouch aplicado desfase"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Revise /tmp/KlipperScreen.log para mas información.\n"
#~ "Por favor crear un 'issue' en GitHub para ser ayudado."
#~ msgid "Probe found applied offset"
#~ msgstr "Encontrado Probe aplicado desfase"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Herrmienta" #~ msgstr "Herrmienta"
@@ -775,9 +825,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Calentador Desconocido "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Desconectar" #~ msgstr "Desconectar"
@@ -7,7 +7,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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 10:50-0300\n" "PO-Revision-Date: 2022-03-31 10:50-0300\n"
"Last-Translator: O. Robardet\n" "Last-Translator: O. Robardet\n"
"Language-Team: \n" "Language-Team: \n"
@@ -49,8 +49,8 @@ msgstr "Actions"
msgid "Add Printer" msgid "Add Printer"
msgstr "Ajouter une imprimante" msgstr "Ajouter une imprimante"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Ajouter un profil de maillage" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
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?"
@@ -84,6 +87,9 @@ msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Calibrage automatique" msgstr "Calibrage automatique"
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -93,8 +99,8 @@ msgstr "Nivelage du plateau"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Maillage du plateau" msgstr "Maillage du plateau"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch a trouvé le décalage appliqué" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Étalonner" msgstr "Étalonner"
@@ -105,6 +111,9 @@ msgstr "Calibré"
msgid "Calibrated, save configuration to make it permanent" 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"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Calibrage..." msgstr "Calibrage..."
@@ -129,16 +138,12 @@ msgstr "Impossible de se connecter à Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Canal" msgstr "Canal"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Vérifiez /tmp/KlipperScreen.log pour plus d'informations.\n"
"SVP envoyez une requête sur GitHub pour obtenir de l'aide."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -176,8 +181,8 @@ msgstr "Date"
msgid "Decrease" msgid "Decrease"
msgstr "Diminuer" msgstr "Diminuer"
msgid "Delete" msgid "Delete File?"
msgstr "Effacer" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Désélectionner" msgstr "Désélectionner"
@@ -204,6 +209,9 @@ msgstr "Erreur"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Méthode d'estimation du temps" msgstr "Méthode d'estimation du temps"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Extruder" msgstr "Extruder"
@@ -246,12 +254,8 @@ msgstr "Réglages fins"
msgid "Finish" msgid "Finish"
msgstr "Fin" msgstr "Fin"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Micrologiciel Redémarrage"
"Restart"
msgstr ""
"Micrologiciel\n"
"Redémarrage"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -262,12 +266,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Taille de police" msgstr "Taille de police"
msgid "" msgid "Full Update"
"Full\n" msgstr "Plein Mettre à jour"
"Update"
msgstr ""
"Plein\n"
"Mettre à jour"
msgid "Go Back" msgid "Go Back"
msgstr "Retourner" msgstr "Retourner"
@@ -287,9 +287,6 @@ msgstr "Masquer les capteurs dans Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Accueil"
msgid "Home All" msgid "Home All"
msgstr "Origine XYZ" msgstr "Origine XYZ"
@@ -308,6 +305,9 @@ msgstr "Origine Z"
msgid "Homing" msgid "Homing"
msgstr "Origine" msgstr "Origine"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Hostname"
@@ -341,12 +341,8 @@ msgstr "Inverser Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Inverser Z" msgstr "Inverser Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Redémarrage"
"Restart"
msgstr ""
"Klipper\n"
"Redémarrage"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper s'est déconnecté" msgstr "Klipper s'est déconnecté"
@@ -420,6 +416,9 @@ msgstr "Moyen"
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Modifié" msgstr "Modifié"
@@ -438,15 +437,20 @@ msgstr "Nom"
msgid "Network" msgid "Network"
msgstr "Réseau" msgstr "Réseau"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Nouveau" msgstr "Nouveau"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Rien de sélectionné" msgstr "Rien de sélectionné"
msgid "Off"
msgstr "Éteindre"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Obsolète de %d" msgstr "Obsolète de %d"
@@ -459,6 +463,9 @@ 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] "Forfaits seront mis à jour"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Mot de passe enregistré" msgstr "Mot de passe enregistré"
@@ -471,6 +478,9 @@ msgstr "En pause"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Effectuer une mise à jour complète ?" msgstr "Effectuer une mise à jour complète ?"
msgid "Pins"
msgstr ""
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."
@@ -492,18 +502,21 @@ msgstr "Contrôle de l'impression"
msgid "Print Time" msgid "Print Time"
msgstr "Temps d'impression" msgstr "Temps d'impression"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Connexions aux imprimantes" msgstr "Connexions aux imprimantes"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Impression" msgstr "Impression"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe a trouvé le décalage appliqué"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nom de profil:" msgstr "Nom de profil:"
@@ -522,6 +535,9 @@ msgstr "Récupérer \"--soft\""
msgid "Reference" msgid "Reference"
msgstr "Référence" msgstr "Référence"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Redémarrer" msgstr "Redémarrer"
@@ -540,10 +556,16 @@ msgstr "Longueur de rétraction"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Vitesse de rétraction" msgstr "Vitesse de rétraction"
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Réessayez #%s" msgstr "Réessayez #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"
@@ -591,6 +613,12 @@ msgstr "Paramètres"
msgid "Show" msgid "Show"
msgstr "Montrer" msgstr "Montrer"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Dimension" msgstr "Dimension"
@@ -606,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Petit" msgstr "Petit"
msgid "Sort by: "
msgstr "Trier par: "
msgid "Sort:" msgid "Sort:"
msgstr "Trier:" msgstr "Trier:"
@@ -642,16 +667,10 @@ msgstr "Démarrage de la mise à jour pour"
msgid "System" msgid "System"
msgstr "Système" msgstr "Système"
msgid "" msgid "System Restart"
"System\n" msgstr "Redémarrer le système"
"Restart"
msgstr ""
"Redémarrer\n"
"le système"
msgid "" msgid "System Shutdown"
"System\n"
"Shutdown"
msgstr "Arrêt du Système" msgstr "Arrêt du Système"
msgid "Temp (°C)" msgid "Temp (°C)"
@@ -670,6 +689,9 @@ msgstr "Total:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Chauffage inconnu" msgstr "Chauffage inconnu"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Décharger" msgstr "Décharger"
@@ -691,9 +713,6 @@ msgstr "Mise à jour"
msgid "Uploaded" msgid "Uploaded"
msgstr "Téléchargé" msgstr "Téléchargé"
msgid "View Mesh"
msgstr "Voir le maillage"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -758,6 +777,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Effacer"
#~ msgid "Home"
#~ msgstr "Accueil"
#~ msgid "Off"
#~ msgstr "Éteindre"
#~ msgid "View Mesh"
#~ msgstr "Voir le maillage"
#~ msgid "Sort by: "
#~ msgstr "Trier par: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch a trouvé le décalage appliqué"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Vérifiez /tmp/KlipperScreen.log pour plus d'informations.\n"
#~ "SVP envoyez une requête sur GitHub pour obtenir de l'aide."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe a trouvé le décalage appliqué"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Outil" #~ msgstr "Outil"
@@ -773,9 +820,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Chauffage inconnu "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Déconnecter" #~ msgstr "Déconnecter"
@@ -7,9 +7,9 @@ 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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 10:54-0300\n" "PO-Revision-Date: 2022-03-31 10:54-0300\n"
"Last-Translator: Emanuel Sharvit <manu7irl@gmail.com>\n" "Last-Translator: Tal Rahav <talrhv1@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: he_IL\n" "Language: he_IL\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -25,7 +25,7 @@ msgid "%s will be updated to version"
msgstr "%s יעודכן לגרסה" msgstr "%s יעודכן לגרסה"
msgid "(default)" msgid "(default)"
msgstr "(בְּרִירַת מֶחדָל)" msgstr "(ברירת מחדל)"
msgid "24 Hour Time" msgid "24 Hour Time"
msgstr "זמן 24 שעות" msgstr "זמן 24 שעות"
@@ -34,13 +34,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FIRMWARE_RESTART עשוי לפתור את הבעיה." msgstr "FIRMWARE_RESTART עשוי לפתור את הבעיה."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL אינו מוגדר"
msgid "Abort" msgid "Abort"
msgstr "בטל" msgstr "בטל"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "האצה"
msgid "Accept" msgid "Accept"
msgstr "אשר" msgstr "אשר"
@@ -51,23 +51,25 @@ msgstr "פעולות"
msgid "Add Printer" msgid "Add Printer"
msgstr "הוסף מדפסת" msgstr "הוסף מדפסת"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "הוסף פרופיל רשת למיטה" msgstr "הוסף פרופיל"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "החל"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "הוסף %.2f לתחנת קצה?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "הוסף %.2f לפרוב (בודק)?"
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 "האם אתה בטוח שאתה רוצה לבצע עצירת חירום?"
"האם אתה בטוח שברצונך להדפיסהאם אתה בטוח שברצונך להפעיל את עצירת החירום?"
msgid "Are you sure you wish to cancel this print?" msgid "Are you sure you wish to cancel this print?"
msgstr "האם אתה בטוח שברצונך לבטל את ההדפסה?" msgstr "האם אתה בטוח שברצונך לבטל את ההדפסה?"
@@ -79,13 +81,16 @@ msgid "Are you sure you wish to reboot the system?"
msgstr "האם אתה בטוח שברצונך לאתחל את המערכת?" msgstr "האם אתה בטוח שברצונך לאתחל את המערכת?"
msgid "Are you sure you wish to shutdown the system?" msgid "Are you sure you wish to shutdown the system?"
msgstr "האם אתה בטוח שברצונך לסגור את המערכת?" msgstr "האם אתה בטוח שברצונך לכבות את המערכת?"
msgid "Auto" msgid "Auto"
msgstr "אוטומטי" msgstr "אוטומטי"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr "כיול אוטומטי"
msgid "Auto-close notifications"
msgstr "סגירת התראות אוטומטית"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "גלילה אוטומטית" msgstr "גלילה אוטומטית"
@@ -96,20 +101,23 @@ msgstr "פילוס מיטה"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "מיפוי מיטה" msgstr "מיפוי מיטה"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch נמצא היסט מוחל" msgstr "הגדרת בורג מיטה"
msgid "Calibrate" msgid "Calibrate"
msgstr "לְדַרֵג" msgstr "לכייל"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "מכויל"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "מכויל, שמור את התצורה כדי שהיא תהיה קבועה" msgstr "מכויל, שמור את התצורה כדי שהיא תהיה קבועה"
msgid "Calibrating"
msgstr "מכייל"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr "מכייל..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "לא ניתן להגדיר מעל המקסימום:" msgstr "לא ניתן להגדיר מעל המקסימום:"
@@ -130,26 +138,22 @@ msgid "Cannot connect to Moonraker"
msgstr "לא ניתן להתחבר ל-Moonraker" msgstr "לא ניתן להתחבר ל-Moonraker"
msgid "Channel" msgid "Channel"
msgstr "עָרוּץ" msgstr "ערוץ"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"בדוק KlipperScreen.log, בתיקית tmp ליותר פרטים.\n"
"אנא שלח דוח תקלה ב- GITHUB, לעזרה."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "בדוק את החיווט של ה ADXL"
msgid "Checking for updates, please wait..."
msgstr "בודק עדכונים, אנא המתן"
msgid "Clear" msgid "Clear"
msgstr "" msgstr "נקה"
msgid "Close" msgid "Close"
msgstr "סגור" msgstr "סגור"
msgid "Complete" msgid "Complete"
msgstr "לְהַשְׁלִים" msgstr "הסתיים"
msgid "Configuration" msgid "Configuration"
msgstr "קונפיגורציה" msgstr "קונפיגורציה"
@@ -158,29 +162,29 @@ msgid "Confirm Emergency Stop"
msgstr "אשר עצירת חירום" msgstr "אשר עצירת חירום"
msgid "Connected" msgid "Connected"
msgstr "מְחוּבָּר" msgstr "מחובר"
#, python-format #, python-format
msgid "Connecting to %s" msgid "Connecting to %s"
msgstr "מתחבר ל- %s" msgstr "מתחבר ל- %s"
msgid "Console" msgid "Console"
msgstr "לְנַחֵם" msgstr "קונסול"
msgid "Continue" msgid "Continue"
msgstr "לְהַמשִׁיך" msgstr "המשך"
msgid "Cooldown" msgid "Cooldown"
msgstr "תירגע" msgstr "הפעל קירור"
msgid "Date" msgid "Date"
msgstr "תַאֲרִיך" msgstr "תאריך"
msgid "Decrease" msgid "Decrease"
msgstr "לְהַקְטִין" msgstr "הורד"
msgid "Delete" msgid "Delete File?"
msgstr "לִמְחוֹק" msgstr "מחק קובץ"
msgid "Deselect" msgid "Deselect"
msgstr "בטל את הבחירה" msgstr "בטל את הבחירה"
@@ -202,13 +206,16 @@ msgid "Elapsed:"
msgstr "זמן שעבר:" msgstr "זמן שעבר:"
msgid "Error" msgid "Error"
msgstr "שְׁגִיאָה" msgstr "שגיאה"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "שיטת זמן משוערת" msgstr "שיטת זמן משוערת"
msgid "Exclude Object"
msgstr "ביטול אובייקט"
msgid "Extrude" msgid "Extrude"
msgstr "אקסטרוזיה" msgstr "הוצא חומר"
msgid "Extrusion +" msgid "Extrusion +"
msgstr "שיחול +" msgstr "שיחול +"
@@ -223,25 +230,25 @@ msgid "Fan"
msgstr "מאוורר" msgstr "מאוורר"
msgid "Filament Used" msgid "Filament Used"
msgstr "נימה בשימוש" msgstr "חומר ששומש"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "חומר כולל"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "חומר ששומש:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "חומר גלם"
msgid "File" msgid "File"
msgstr "קוֹבֶץ" msgstr "קובץ"
msgid "File:" msgid "File:"
msgstr "" msgstr ""
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "מחפש ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "כוונון עדין" msgstr "כוונון עדין"
@@ -249,49 +256,38 @@ msgstr "כוונון עדין"
msgid "Finish" msgid "Finish"
msgstr "סיים" msgstr "סיים"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "אתחול קושחה"
"Restart"
msgstr ""
"קושחה\n"
"איתחול"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "זרם"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "קצב זרימה"
msgid "Font Size" msgid "Font Size"
msgstr "גודל טקסט" msgstr "גודל טקסט"
msgid "" msgid "Full Update"
"Full\n" msgstr "עדכון מלא"
"Update"
msgstr ""
"מלא\n"
"עדכון"
msgid "Go Back" msgid "Go Back"
msgstr "חזרה" msgstr "חזרה"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "גובה"
msgid "Hidden" msgid "Hidden"
msgstr "מוּסתָר" msgstr "מוסתר"
msgid "Hide" msgid "Hide"
msgstr "להתחבא" msgstr "הסתר"
msgid "Hide sensors in Temp." msgid "Hide sensors in Temp."
msgstr "הסתר חיישנים בטמפ'." msgstr "הסתר חיישנים בטמפ'."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "הסתר טמפרטורה"
msgid "Home"
msgstr "איפוס"
msgid "Home All" msgid "Home All"
msgstr "איפוס XYZ" msgstr "איפוס XYZ"
@@ -311,11 +307,14 @@ msgstr "איפוס Z"
msgid "Homing" msgid "Homing"
msgstr "איפוס צירים" msgstr "איפוס צירים"
msgid "Host"
msgstr "שרת"
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "שם שרת"
msgid "Icon Theme" msgid "Icon Theme"
msgstr "נושא אייקון" msgstr "ערכת נושא"
msgid "Increase" msgid "Increase"
msgstr "הגדל" msgstr "הגדל"
@@ -327,10 +326,10 @@ msgid "Initializing printer..."
msgstr "מאתחל מדפסת..." msgstr "מאתחל מדפסת..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "מעצב גימור"
msgid "Interface" msgid "Interface"
msgstr "מִמְשָׁק" msgstr "ממשק"
msgid "Invalid" msgid "Invalid"
msgstr "לא חוקי" msgstr "לא חוקי"
@@ -344,12 +343,8 @@ msgstr "הפוך את Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "הפוך את Z" msgstr "הפוך את Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "אתחול קליפר"
"Restart"
msgstr ""
"קליפר\n"
"איתחול"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "קליפר התנתק" msgstr "קליפר התנתק"
@@ -358,10 +353,10 @@ msgid "Klipper has encountered an error."
msgstr "קילפר נתקל בבעיה." msgstr "קילפר נתקל בבעיה."
msgid "Klipper has shutdown" msgid "Klipper has shutdown"
msgstr "קליפר נכבה" msgstr "קליפר כבה"
msgid "Klipper is attempting to start" msgid "Klipper is attempting to start"
msgstr "קליפר מנסה לרוץ" msgstr "קליפר מנסה לעלות"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "קליפר יבצע אתחול" msgstr "קליפר יבצע אתחול"
@@ -370,10 +365,10 @@ msgid "Language"
msgstr "שפה" msgstr "שפה"
msgid "Large" msgid "Large"
msgstr "גָדוֹל" msgstr "גדול"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "שכבה"
msgid "Left:" msgid "Left:"
msgstr "זמן שנותר:" msgstr "זמן שנותר:"
@@ -382,7 +377,7 @@ msgid "Limits"
msgstr "גבולות" msgstr "גבולות"
msgid "Load" msgid "Load"
msgstr "לִטעוֹן" msgstr "טעינה"
msgid "Lower Nozzle" msgid "Lower Nozzle"
msgstr "הנמך דיזה" msgstr "הנמך דיזה"
@@ -397,10 +392,10 @@ msgid "Main Menu"
msgstr "תפריט ראשי" msgstr "תפריט ראשי"
msgid "Max" msgid "Max"
msgstr "" msgstr "מקסימום"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "מקסימום תאוצה"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "האצה מרבית להאטה" msgstr "האצה מרבית להאטה"
@@ -409,19 +404,22 @@ msgid "Max Velocity"
msgstr "מהירות מרבית" msgstr "מהירות מרבית"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "מדוד את שניהם"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "מדוד X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "מדוד Y"
msgid "Medium" msgid "Medium"
msgstr "ממוצע" msgstr "בינוני"
msgid "Menu" msgid "Menu"
msgstr "תַפרִיט" msgstr "תפריט"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "שונה" msgstr "שונה"
@@ -436,20 +434,25 @@ msgid "Move Distance (mm)"
msgstr "מרחק הזזה (מ''מ)" msgstr "מרחק הזזה (מ''מ)"
msgid "Name" msgid "Name"
msgstr "שֵׁם" msgstr "שם"
msgid "Network" msgid "Network"
msgstr "רשת" msgstr "רשת"
msgid "New" msgid "Never"
msgstr "" msgstr ""
msgid "New"
msgstr "חדש"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr "איתור אוטומטי אינו נתמך, זה צריך להיות מוגדר ב klipperscreen"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "שום דבר לא נבחר" msgstr "שום דבר לא נבחר"
msgid "Off"
msgstr "כבוי"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "מיושן על ידי %d" msgstr "מיושן על ידי %d"
@@ -464,6 +467,9 @@ msgstr[1] "חבילות יעודכנו"
msgstr[2] "חבילות יעודכנו" msgstr[2] "חבילות יעודכנו"
msgstr[3] "חבילות יעודכנו" msgstr[3] "חבילות יעודכנו"
msgid "Part Fan"
msgstr "מאוורר חומר"
msgid "Password saved" msgid "Password saved"
msgstr "הסיסמה נשמרה" msgstr "הסיסמה נשמרה"
@@ -476,8 +482,11 @@ msgstr "מושהה"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "לבצע שדרוג מלא?" msgstr "לבצע שדרוג מלא?"
msgid "Pins"
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 "הפעלה"
@@ -486,10 +495,10 @@ msgid "Power On Printer"
msgstr "הפעל מדפסת" msgstr "הפעל מדפסת"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "פרשר אדוונס"
msgid "Print" msgid "Print"
msgstr "הדפס" msgstr "הדפסה"
msgid "Print Control" msgid "Print Control"
msgstr "שליטה בהדפסה" msgstr "שליטה בהדפסה"
@@ -497,36 +506,42 @@ msgstr "שליטה בהדפסה"
msgid "Print Time" msgid "Print Time"
msgstr "זמן הדפסה" msgstr "זמן הדפסה"
msgid "Printer"
msgstr "מדפסת"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "חיבורי מדפסת" msgstr "חיבורי מדפסת"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "מדפיס" msgstr "מדפיס"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "פרוב אוף-סט"
msgid "Probe found applied offset"
msgstr "Probe נמצא היסט מוחל"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "שם פרופיל:" msgstr "שם פרופיל:"
msgid "Quad Gantry Level" msgid "Quad Gantry Level"
msgstr "רמת מרפסת גנטרי" msgstr "יישור הגנטרי הריבועי"
msgid "Raise Nozzle" msgid "Raise Nozzle"
msgstr "הגבה" msgstr "הגבה דיזה"
msgid "Recover Hard" msgid "Recover Hard"
msgstr "לְהַחלִים Hard" msgstr "שחזור מלא"
msgid "Recover Soft" msgid "Recover Soft"
msgstr "לְהַחלִים Soft" msgstr "שחזור עדין"
msgid "Reference" msgid "Reference"
msgstr "התייחסות" msgstr "התייחסות"
msgid "Refresh"
msgstr "רענון"
msgid "Restart" msgid "Restart"
msgstr "אתחל" msgstr "אתחל"
@@ -537,36 +552,42 @@ msgid "Retract"
msgstr "שיחול לאחור" msgstr "שיחול לאחור"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "משיכה"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "מרחק משיכה"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "מהירות משיכה"
msgid "Retry"
msgstr "" msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "נסה שוב #%s" msgstr "נסה שוב #%s"
msgid "Retrying"
msgstr "מנסה שוב"
msgid "Save" msgid "Save"
msgstr "להציל" msgstr "לשמור"
msgid "Save Config" msgid "Save Config"
msgstr "שמור קונפיג" msgstr "שמור קונפיג"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "שמור Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "שמור קונפיגרציה?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "נשמר"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "שמור אופ-סט %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "DPMS מסך" msgstr "DPMS מסך"
@@ -581,7 +602,7 @@ msgid "Select"
msgstr "בחר" msgstr "בחר"
msgid "Send" msgid "Send"
msgstr "לִשְׁלוֹחַ" msgstr "שליחה"
#, python-format #, python-format
msgid "Sending Power ON signal to: %s" msgid "Sending Power ON signal to: %s"
@@ -594,13 +615,19 @@ msgid "Settings"
msgstr "הגדרות" msgstr "הגדרות"
msgid "Show" msgid "Show"
msgstr "הופעה" msgstr "הצג"
msgid "Show Heater Power"
msgstr "הצג זרם מיטה"
msgid "Shutdown"
msgstr "כיבוי"
msgid "Size" msgid "Size"
msgstr "גודל" msgstr "גודל"
msgid "Slicer" msgid "Slicer"
msgstr "Slicer" msgstr "סלייסר"
msgid "Slicer Time correction (%)" msgid "Slicer Time correction (%)"
msgstr "תיקון זמן פריסה (%)" msgstr "תיקון זמן פריסה (%)"
@@ -609,13 +636,10 @@ msgid "Slicer:"
msgstr "" msgstr ""
msgid "Small" msgid "Small"
msgstr "קָטָן" msgstr "קטן"
msgid "Sort by: "
msgstr "מיין לפי: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr "מיין"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "מהירות (מ\"מ/שניות)" msgstr "מהירות (מ\"מ/שניות)"
@@ -627,13 +651,13 @@ msgid "Speed -"
msgstr "מהירות -" msgstr "מהירות -"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "מהירות"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "מהירות פינה מרובעת" msgstr "מהירות פינה מרובעת"
msgid "Start" msgid "Start"
msgstr "הַתחָלָה" msgstr "התחל"
msgid "Starting WiFi Association" msgid "Starting WiFi Association"
msgstr "מתחיל איגוד WiFi" msgstr "מתחיל איגוד WiFi"
@@ -647,19 +671,11 @@ msgstr "מתחיל עדכון עבור"
msgid "System" msgid "System"
msgstr "מערכת" msgstr "מערכת"
msgid "" msgid "System Restart"
"System\n" msgstr "אתחול מערכת"
"Restart"
msgstr ""
"מערכת\n"
"אתחול"
msgid "" msgid "System Shutdown"
"System\n" msgstr "כיבוי מערכת"
"Shutdown"
msgstr ""
"מערכת\n"
"לכבות"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "טמפ' (°C)" msgstr "טמפ' (°C)"
@@ -677,8 +693,11 @@ msgstr "סך הכל:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "מחמם לא ידוע" msgstr "מחמם לא ידוע"
msgid "Unknown screw position"
msgstr "מיקום בורג לא ידוע"
msgid "Unload" msgid "Unload"
msgstr "לִפְרוֹק" msgstr "העלה"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr ""
@@ -693,14 +712,11 @@ msgid "Update"
msgstr "עדכון" msgstr "עדכון"
msgid "Updating" msgid "Updating"
msgstr "עִדכּוּן" msgstr "מעדכן"
msgid "Uploaded" msgid "Uploaded"
msgstr "הועלה" msgstr "הועלה"
msgid "View Mesh"
msgstr "צפה ברשת"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -711,7 +727,7 @@ msgid "XY Move Speed (mm/s)"
msgstr "מהירות תנועה XY (מ\"מ/שנייה)" msgstr "מהירות תנועה XY (מ\"מ/שנייה)"
msgid "XY Speed (mm/s)" msgid "XY Speed (mm/s)"
msgstr "" msgstr "מהירות XY (mm/s)"
msgid "Y+" msgid "Y+"
msgstr "Y+" msgstr "Y+"
@@ -726,13 +742,13 @@ msgid "Z Move Speed (mm/s)"
msgstr "מהירות תנועה Z (מ\"מ/שניות)" msgstr "מהירות תנועה Z (מ\"מ/שניות)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "מהירות Z (mm/s)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "הטיה Z" msgstr "הטיה Z"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr "Z אוף-סט"
msgid "Z+" msgid "Z+"
msgstr "Z+" msgstr "Z+"
@@ -769,6 +785,43 @@ msgstr "מ\"מ/ש"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "מחק"
#~ msgid "Home"
#~ msgstr "איפוס"
#~ msgid "Off"
#~ msgstr "כבוי"
#~ msgid "View Mesh"
#~ msgstr "צפה ברשת"
#~ msgid "Machine"
#~ msgstr "מכונה"
#~ msgid "Manual Calibration"
#~ msgstr "כיול ידני"
#~ msgid "Auto Calibration"
#~ msgstr "כיול אוטומטי"
#~ msgid "Sort by: "
#~ msgstr "מיין לפי: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch נמצא היסט מוחל"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "בדוק KlipperScreen.log, בתיקית tmp ליותר פרטים.\n"
#~ "אנא שלח דוח תקלה ב- GITHUB, לעזרה."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe נמצא היסט מוחל"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "כלי" #~ msgstr "כלי"
@@ -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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: AntoszHUN\n" "Last-Translator: AntoszHUN\n"
"Language-Team: \n" "Language-Team: \n"
@@ -27,13 +27,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "A FIRMWARE_RESTART javíthatja a problémát." msgstr "A FIRMWARE_RESTART javíthatja a problémát."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL nincs konfigurálva"
msgid "Abort" msgid "Abort"
msgstr "Megszakít" msgstr "Megszakít"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "Gyorsulás:"
msgid "Accept" msgid "Accept"
msgstr "Elfogad" msgstr "Elfogad"
@@ -44,40 +44,46 @@ msgstr "Műveletek"
msgid "Add Printer" msgid "Add Printer"
msgstr "Nyomtató hozzáadása" msgstr "Nyomtató hozzáadása"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Ágyháló profil hozzáadása" msgstr "Profil hozzáadása"
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Alkalmaz"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "Alkalmazod %.2f eltolást az Endstopra?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr "Alkalmazod %s%.2f eltolást a szondára?"
msgid "Are you sure do you want to exclude the object?"
msgstr "Biztosan kizárod az objektumot?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Biztosan Vészleállítást végez?" msgstr "Biztosan Vészleállítást szeretnél?"
msgid "Are you sure you wish to cancel this print?" msgid "Are you sure you wish to cancel this print?"
msgstr "Biztosan megszakítja ezt a nyomtatást?" msgstr "Biztosan megszakítod ezt a nyomtatást?"
msgid "Are you sure you wish to disable motors?" msgid "Are you sure you wish to disable motors?"
msgstr "Biztos benne, hogy le szeretné tiltani a motorokat?" msgstr "Biztosan le szeretnéd tiltani a motorokat?"
msgid "Are you sure you wish to reboot the system?" msgid "Are you sure you wish to reboot the system?"
msgstr "Biztos benne, hogy újra akarja indítani a rendszert?" msgstr "Biztos, hogy újra akarod indítani a rendszert?"
msgid "Are you sure you wish to shutdown the system?" msgid "Are you sure you wish to shutdown the system?"
msgstr "Biztos, hogy le szeretné állítani a rendszert?" msgstr "Biztos, hogy le szeretnéd állítani a rendszert?"
msgid "Auto" msgid "Auto"
msgstr "Auto" msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr "Automatikus kalibrálás"
msgid "Auto-close notifications"
msgstr "Értesítések automatikus bezárása"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Automatikus görgetés" msgstr "Automatikus görgetés"
@@ -88,20 +94,23 @@ msgstr "Ágyszint"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Ágyháló" msgstr "Ágyháló"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "A Bltouch alkalmazott eltolást talált" msgstr "Az ágycsavar konfigurációja:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibrálás" msgstr "Kalibrálás"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "Kalibrálva"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibrálva! Mentse el a konfigurációt, hogy az állandó legyen" msgstr "Kalibrálva! Mentsd el a konfigurációt, hogy az állandó legyen"
msgid "Calibrating"
msgstr "Kalibrálás"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" 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é:"
@@ -124,18 +133,14 @@ msgstr "Nem lehet csatlakozni a Moonrakerhez"
msgid "Channel" msgid "Channel"
msgstr "Csatorna" msgstr "Csatorna"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Nézd a /tmp/KlipperScreen.log további információért.\n"
"Segítségért küldj be egy hibajegyet a GitHubon."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr "Ellenőrizd az ADXL kábelezést"
msgid "Checking for updates, please wait..."
msgstr "Frissítések keresése, kérjük, várj..."
msgid "Clear" msgid "Clear"
msgstr "" msgstr "Tiszta"
msgid "Close" msgid "Close"
msgstr "Bezárás" msgstr "Bezárás"
@@ -147,7 +152,7 @@ msgid "Configuration"
msgstr "Konfiguráció" msgstr "Konfiguráció"
msgid "Confirm Emergency Stop" msgid "Confirm Emergency Stop"
msgstr "Erősítse meg a vészleállítást" msgstr "Vészleállítás megerősítése"
msgid "Connected" msgid "Connected"
msgstr "Csatlakoztatva" msgstr "Csatlakoztatva"
@@ -171,8 +176,8 @@ msgstr "Dátum"
msgid "Decrease" msgid "Decrease"
msgstr "Csökkent" msgstr "Csökkent"
msgid "Delete" msgid "Delete File?"
msgstr "Töröl" msgstr "Fájl törlése?"
msgid "Deselect" msgid "Deselect"
msgstr "Kijelölés törlése" msgstr "Kijelölés törlése"
@@ -188,7 +193,7 @@ msgstr "Távolság (mm)"
#, python-format #, python-format
msgid "Do you want to recover %s?" msgid "Do you want to recover %s?"
msgstr "Vissza akarja állítani %s-t?" msgstr "Vissza akarod állítani %s-t?"
msgid "Elapsed:" msgid "Elapsed:"
msgstr "Eltelt:" msgstr "Eltelt:"
@@ -199,6 +204,9 @@ msgstr "Hiba"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Becsült idő módszer" msgstr "Becsült idő módszer"
msgid "Exclude Object"
msgstr "Objektum kizárása"
msgid "Extrude" msgid "Extrude"
msgstr "Száladagolás" msgstr "Száladagolás"
@@ -218,22 +226,22 @@ msgid "Filament Used"
msgstr "Használt nyomtatószál" msgstr "Használt nyomtatószál"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "Összes nyomtatószál:"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "Használt nyomtatószál:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "Nyomtatószál:"
msgid "File" msgid "File"
msgstr "Fájl" msgstr "Fájl"
msgid "File:" msgid "File:"
msgstr "" msgstr "Fájl:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "ADXL keresése"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Finomhangolás" msgstr "Finomhangolás"
@@ -241,34 +249,26 @@ msgstr "Finomhangolás"
msgid "Finish" msgid "Finish"
msgstr "Befejezve" msgstr "Befejezve"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Újraindítása"
"Restart"
msgstr ""
"Firmware\n"
"Újraindítása"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Folyam:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Áramlás:"
msgid "Font Size" msgid "Font Size"
msgstr "Betűméret" msgstr "Betűméret"
msgid "" msgid "Full Update"
"Full\n" msgstr "Teljes Frissítés"
"Update"
msgstr ""
"Teljes\n"
"Frissítés"
msgid "Go Back" msgid "Go Back"
msgstr "Visszalépés" msgstr "Visszalépés"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Magasság:"
msgid "Hidden" msgid "Hidden"
msgstr "Rejtett" msgstr "Rejtett"
@@ -277,13 +277,10 @@ msgid "Hide"
msgstr "Elrejt" msgstr "Elrejt"
msgid "Hide sensors in Temp." msgid "Hide sensors in Temp."
msgstr "Szenzorok elrejtése Hőfok." msgstr "Hőfok szenzorok elrejtése."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Hőfok elrejtése"
msgid "Home"
msgstr "Kezdőpontok"
msgid "Home All" msgid "Home All"
msgstr "X-Y-Z kezdőpont" msgstr "X-Y-Z kezdőpont"
@@ -303,6 +300,9 @@ msgstr "Z kezdőpont"
msgid "Homing" msgid "Homing"
msgstr "Kezdőpont" msgstr "Kezdőpont"
msgid "Host"
msgstr "Gazdagép"
msgid "Hostname" msgid "Hostname"
msgstr "Gazdanév" msgstr "Gazdanév"
@@ -319,7 +319,7 @@ msgid "Initializing printer..."
msgstr "Nyomtató inicializálása..." msgstr "Nyomtató inicializálása..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Bemeneti alakító"
msgid "Interface" msgid "Interface"
msgstr "Felület" msgstr "Felület"
@@ -336,12 +336,8 @@ msgstr "Fordított Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Fordított Z" msgstr "Fordított Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Újraindítása"
"Restart"
msgstr ""
"Klipper\n"
"Újraindítása"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper szétkapcsolt" msgstr "Klipper szétkapcsolt"
@@ -365,7 +361,7 @@ msgid "Large"
msgstr "Nagy" msgstr "Nagy"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Réteg:"
msgid "Left:" msgid "Left:"
msgstr "Bal:" msgstr "Bal:"
@@ -389,10 +385,10 @@ msgid "Main Menu"
msgstr "Főmenü" msgstr "Főmenü"
msgid "Max" msgid "Max"
msgstr "" msgstr "Max"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "Max gyorsulás"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Lassulás max gyorsulása" msgstr "Lassulás max gyorsulása"
@@ -401,13 +397,13 @@ msgid "Max Velocity"
msgstr "Max sebesség" msgstr "Max sebesség"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Mindkettő mérése"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "X mérése"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Y mérése"
msgid "Medium" msgid "Medium"
msgstr "Közepes" msgstr "Közepes"
@@ -415,6 +411,9 @@ msgstr "Közepes"
msgid "Menu" msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Módosított" msgstr "Módosított"
@@ -433,15 +432,22 @@ msgstr "Név"
msgid "Network" msgid "Network"
msgstr "Hálózat" msgstr "Hálózat"
msgid "New" msgid "Never"
msgstr "" msgstr ""
msgid "New"
msgstr "Új"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"Az automatikus felismerés nem támogatott, a klipperscreenben kell beállítani."
"conf"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nincs kiválasztva" msgstr "Nincs kiválasztva"
msgid "Off"
msgstr "Ki"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "%d által elavult" msgstr "%d által elavult"
@@ -454,6 +460,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "A csomag frissítésre kerül" msgstr[0] "A csomag frissítésre kerül"
msgstr[1] "Csomag frissül" msgstr[1] "Csomag frissül"
msgid "Part Fan"
msgstr "Tárgyhűtő"
msgid "Password saved" msgid "Password saved"
msgstr "Jelszó mentve" msgstr "Jelszó mentve"
@@ -464,10 +473,13 @@ msgid "Paused"
msgstr "Szüneteltetve" msgstr "Szüneteltetve"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Teljes frissítést hajt végre?" msgstr "Teljes frissítést hajtasz végre?"
msgid "Pins"
msgstr "Kimenetek"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Fordítsa újra és frissítse a mikrovezérlőt." msgstr "Fordítsd újra és frissítsd a mikrovezérlőt."
msgid "Power" msgid "Power"
msgstr "Bekapcsolás" msgstr "Bekapcsolás"
@@ -476,7 +488,7 @@ msgid "Power On Printer"
msgstr "Nyomtató bekapcsolása" msgstr "Nyomtató bekapcsolása"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Nyomás előtolás:"
msgid "Print" msgid "Print"
msgstr "Nyomtatás" msgstr "Nyomtatás"
@@ -487,17 +499,20 @@ msgstr "Nyomtatásvezérlés"
msgid "Print Time" msgid "Print Time"
msgstr "Nyomtatási idő" msgstr "Nyomtatási idő"
msgid "Printer"
msgstr "Nyomtató"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Nyomtató csatlakozások" msgstr "Nyomtató csatlakozások"
msgid "Printer Select"
msgstr "Nyomtató kiválasztása"
msgid "Printing" msgid "Printing"
msgstr "Nyomtatás" msgstr "Nyomtatás"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Szonda eltolás"
msgid "Probe found applied offset"
msgstr "A szonda alkalmazott eltolást talált"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profil név:" msgstr "Profil név:"
@@ -517,6 +532,9 @@ msgstr "Program visszaállítása"
msgid "Reference" msgid "Reference"
msgstr "Referencia" msgstr "Referencia"
msgid "Refresh"
msgstr "Frissítés"
msgid "Restart" msgid "Restart"
msgstr "Újraindítás" msgstr "Újraindítás"
@@ -527,18 +545,24 @@ msgid "Retract"
msgstr "Visszahúz" msgstr "Visszahúz"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "Visszahúzás"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "Visszahúzási hossz"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Visszahúzási sebesség"
msgid "Retry"
msgstr "" msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Újra #%s" msgstr "Újra #%s"
msgid "Retrying"
msgstr "Újrapróbálkozás"
msgid "Save" msgid "Save"
msgstr "Mentés" msgstr "Mentés"
@@ -546,17 +570,17 @@ msgid "Save Config"
msgstr "Konfiguráció mentése" msgstr "Konfiguráció mentése"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "Z mentése"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "Mented a konfigurációt?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "Mentve"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Eltolás mentve: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Képernyő DPMS" msgstr "Képernyő DPMS"
@@ -586,6 +610,12 @@ msgstr "Beállítások"
msgid "Show" msgid "Show"
msgstr "Mutat" msgstr "Mutat"
msgid "Show Heater Power"
msgstr "A fűtésteljesítmény megjelenítése"
msgid "Shutdown"
msgstr "Leállítás"
msgid "Size" msgid "Size"
msgstr "Méret" msgstr "Méret"
@@ -596,16 +626,13 @@ msgid "Slicer Time correction (%)"
msgstr "Szeletelő idő javítása (%)" msgstr "Szeletelő idő javítása (%)"
msgid "Slicer:" msgid "Slicer:"
msgstr "" msgstr "Szeletelő:"
msgid "Small" msgid "Small"
msgstr "Kicsi" msgstr "Kicsi"
msgid "Sort by: "
msgstr "Sorrend: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr "Fajta:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Sebesség (mm/s)" msgstr "Sebesség (mm/s)"
@@ -617,7 +644,7 @@ msgid "Speed -"
msgstr "Sebesség -" msgstr "Sebesség -"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "Sebesség:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Sebesség a sarkokban" msgstr "Sebesség a sarkokban"
@@ -637,19 +664,11 @@ msgstr "Frissítés indítása"
msgid "System" msgid "System"
msgstr "Rendszer" msgstr "Rendszer"
msgid "" msgid "System Restart"
"System\n" msgstr "Rendszer Újraindítása"
"Restart"
msgstr ""
"Rendszer\n"
"Újraindítása"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Rendszer Leállitás"
"Shutdown"
msgstr ""
"Rendszer\n"
"Leállitás"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Hőmérséklet (°C)" msgstr "Hőmérséklet (°C)"
@@ -667,14 +686,17 @@ msgstr "Teljes:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Ismeretlen melegítő" msgstr "Ismeretlen melegítő"
msgid "Unknown screw position"
msgstr "Ismeretlen csavarhelyzet"
msgid "Unload" msgid "Unload"
msgstr "Kiadás" msgstr "Kiadás"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr "Extra hossz visszahúzása"
msgid "Unretract Speed" msgid "Unretract Speed"
msgstr "" msgstr "Visszahúzási sebesség"
msgid "Up To Date" msgid "Up To Date"
msgstr "Naprakész" msgstr "Naprakész"
@@ -688,9 +710,6 @@ msgstr "Frissítés"
msgid "Uploaded" msgid "Uploaded"
msgstr "Feltöltve" msgstr "Feltöltve"
msgid "View Mesh"
msgstr "Háló nézet"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -701,7 +720,7 @@ 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 "" msgstr "XY Sebesség (mm/s)"
msgid "Y+" msgid "Y+"
msgstr "Y+" msgstr "Y+"
@@ -716,13 +735,13 @@ msgid "Z Move Speed (mm/s)"
msgstr "Z Mozgási seb. (mm/s)" msgstr "Z Mozgási seb. (mm/s)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "Z Sebesség (mm/s)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "Z Dőlés" msgstr "Z Dőlés"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr "Z eltolás:"
msgid "Z+" msgid "Z+"
msgstr "Z+" msgstr "Z+"
@@ -732,8 +751,8 @@ msgstr "Z-"
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "változás" msgstr[0] "ajánlás"
msgstr[1] "változás" msgstr[1] "ajánlások"
msgid "dBm" msgid "dBm"
msgstr "dBm" msgstr "dBm"
@@ -741,7 +760,7 @@ msgstr "dBm"
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "óra" msgstr[0] "óra"
msgstr[1] "óra" msgstr[1] "órák"
msgid "minutes" msgid "minutes"
msgstr "perc" msgstr "perc"
@@ -755,46 +774,33 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Tool" #~ msgid "Delete"
#~ msgstr "Eszköz" #~ msgstr "Töröl"
#~ msgid "Displayed Macros" #~ msgid "Home"
#~ msgstr "Megjelenített makrók" #~ msgstr "Kezdőpontok"
#~ msgid "Z Position" #~ msgid "Off"
#~ msgstr "Z Pozíció" #~ msgstr "Ki"
#~ msgid "IPv4" #~ msgid "View Mesh"
#~ msgstr "IPv4" #~ msgstr "Háló nézet"
#~ msgid "IPv6" #~ msgid "Machine"
#~ msgstr "IPv6" #~ msgstr "Gép"
#~ msgid "Unknown Heater " #~ msgid "Sort by: "
#~ msgstr "Ismeretlen melegítő " #~ msgstr "Sorrend: "
#~ msgid "Disconnect" #~ msgid "Bltouch found applied offset"
#~ msgstr "Leválasztás" #~ msgstr "A Bltouch alkalmazott eltolást talált"
#~ msgid "Duration Only"
#~ msgstr "Csak időtartam"
#~ msgid "Klipper Version"
#~ msgstr "Klipper verzió"
#~ msgid "" #~ msgid ""
#~ "Klipper has encountered an error with the micro-controller.\n" #~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please recompile and flash." #~ "Please submit an issue on GitHub for help."
#~ msgstr "" #~ msgstr ""
#~ "A Klipper hibát észlelt a mikrovezérlővel kapcsolatban.\n" #~ "Nézd a /tmp/KlipperScreen.log további információért.\n"
#~ "Fordítsa újra és töltse fel." #~ "Segítségért küldj be egy hibajegyet a GitHubon."
#~ msgid "" #~ msgid "Probe found applied offset"
#~ "Klipper has encountered an error.\n" #~ msgstr "A szonda alkalmazott eltolást talált"
#~ "Issue a FIRMWARE_RESTART to attempt fixing the issue."
#~ msgstr ""
#~ "A Klipper hibát észlelt.\n"
#~ "A probléma megoldásához küldjön ki egy FIRMWARE_RESTART-ot."
#~ msgid "KlipperScreen Version"
#~ msgstr "KlipperScreen verzió"
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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: pappicio\n" "Last-Translator: pappicio\n"
"Language-Team: \n" "Language-Team: \n"
@@ -44,8 +44,8 @@ msgstr "Azioni"
msgid "Add Printer" msgid "Add Printer"
msgstr "Aggiungi Stampante" msgstr "Aggiungi Stampante"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Aggiungi Profilo Mesh" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -58,6 +58,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
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?"
@@ -79,6 +82,9 @@ msgstr "Auto"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -88,8 +94,8 @@ msgstr "Livello del letto"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Rete letto" msgstr "Rete letto"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch ha trovato l'offset applicato" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Calibra" msgstr "Calibra"
@@ -100,6 +106,9 @@ msgstr ""
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"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -124,16 +133,12 @@ msgstr "Impossibile connettersi a Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Canale" msgstr "Canale"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Verifica /tmp/KlipperScreen.log per info.\n"
"Aggiungi un problema sul GitHub."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -171,8 +176,8 @@ msgstr "Data"
msgid "Decrease" msgid "Decrease"
msgstr "Diminuisci" msgstr "Diminuisci"
msgid "Delete" msgid "Delete File?"
msgstr "Elimina" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Deseleziona" msgstr "Deseleziona"
@@ -199,6 +204,9 @@ msgstr "Errore"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Metodo Tempo stimato" msgstr "Metodo Tempo stimato"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Estrudi" msgstr "Estrudi"
@@ -241,12 +249,8 @@ msgstr "Messa a Punto"
msgid "Finish" msgid "Finish"
msgstr "Finito" msgstr "Finito"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Riavvio"
"Restart"
msgstr ""
"Firmware\n"
"Riavvio"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -257,12 +261,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Dimensione del testo" msgstr "Dimensione del testo"
msgid "" msgid "Full Update"
"Full\n" msgstr "Completo Aggiornare"
"Update"
msgstr ""
"Completo\n"
"Aggiornare"
msgid "Go Back" msgid "Go Back"
msgstr "Indietro" msgstr "Indietro"
@@ -282,9 +282,6 @@ msgstr "Nascondi sensori in Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Inizio"
msgid "Home All" msgid "Home All"
msgstr "Home XYZ" msgstr "Home XYZ"
@@ -303,6 +300,9 @@ msgstr "Home Z"
msgid "Homing" msgid "Homing"
msgstr "Homing" msgstr "Homing"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Hostname" msgstr "Hostname"
@@ -336,12 +336,8 @@ msgstr "Inverti Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Inverti Z" msgstr "Inverti Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Riavvio"
"Restart"
msgstr ""
"Klipper\n"
"Riavvio"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper è disconnesso" msgstr "Klipper è disconnesso"
@@ -415,6 +411,9 @@ msgstr "Medio"
msgid "Menu" msgid "Menu"
msgstr "Menù" msgstr "Menù"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Modificato" msgstr "Modificato"
@@ -433,15 +432,20 @@ msgstr "Nome"
msgid "Network" msgid "Network"
msgstr "Rete" msgstr "Rete"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Niente selezionato" msgstr "Niente selezionato"
msgid "Off"
msgstr "Off"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Obsoleto di %d" msgstr "Obsoleto di %d"
@@ -454,6 +458,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Pacchetto verrà aggiornato" msgstr[0] "Pacchetto verrà aggiornato"
msgstr[1] "I pacchetti verranno aggiornati" msgstr[1] "I pacchetti verranno aggiornati"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Password salvata" msgstr "Password salvata"
@@ -466,6 +473,9 @@ msgstr "In Pausa"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Eseguire un aggiornamento completo?" msgstr "Eseguire un aggiornamento completo?"
msgid "Pins"
msgstr ""
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."
@@ -487,18 +497,21 @@ msgstr "Controllo Stampa"
msgid "Print Time" msgid "Print Time"
msgstr "Tempo di Stampa" msgstr "Tempo di Stampa"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Connessioni Stampante" msgstr "Connessioni Stampante"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "In Stampa" msgstr "In Stampa"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe ha trovato l'offset applicato"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nome Profilo:" msgstr "Nome Profilo:"
@@ -517,6 +530,9 @@ msgstr "Recuperare Soft"
msgid "Reference" msgid "Reference"
msgstr "Riferimento" msgstr "Riferimento"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Riavvia" msgstr "Riavvia"
@@ -535,10 +551,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Riprova #%s" msgstr "Riprova #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Salva" msgstr "Salva"
@@ -586,6 +608,12 @@ msgstr "Impostazioni"
msgid "Show" msgid "Show"
msgstr "Mostrare" msgstr "Mostrare"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Grandezza" msgstr "Grandezza"
@@ -601,9 +629,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Piccola" msgstr "Piccola"
msgid "Sort by: "
msgstr "Ordine: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -637,19 +662,11 @@ msgstr "Avvio aggiornamento per"
msgid "System" msgid "System"
msgstr "Sistema" msgstr "Sistema"
msgid "" msgid "System Restart"
"System\n" msgstr "Riavvia Sistema"
"Restart"
msgstr ""
"Riavvia\n"
"Sistema"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Spegni Sistema"
"Shutdown"
msgstr ""
"Spegni\n"
"Sistema"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -667,6 +684,9 @@ msgstr "Totale:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Riscaldatore sconosciuto" msgstr "Riscaldatore sconosciuto"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Scaricare" msgstr "Scaricare"
@@ -688,9 +708,6 @@ msgstr "In aggiornamento"
msgid "Uploaded" msgid "Uploaded"
msgstr "Caricato" msgstr "Caricato"
msgid "View Mesh"
msgstr "Visual. Mesh"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -755,6 +772,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Elimina"
#~ msgid "Home"
#~ msgstr "Inizio"
#~ msgid "Off"
#~ msgstr "Off"
#~ msgid "View Mesh"
#~ msgstr "Visual. Mesh"
#~ msgid "Sort by: "
#~ msgstr "Ordine: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch ha trovato l'offset applicato"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Verifica /tmp/KlipperScreen.log per info.\n"
#~ "Aggiungi un problema sul GitHub."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe ha trovato l'offset applicato"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Strumenti" #~ msgstr "Strumenti"
@@ -770,9 +815,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Riscaldatore sconosciuto "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Sconnetti" #~ msgstr "Sconnetti"
+3 -3
View File
@@ -131,8 +131,8 @@
</key> </key>
</row> </row>
<row> <row>
<key obey-caps='true'> <key obey-caps='true' fill="true">
<default display="image:shift.png" action="modifier:shift" /> <default display="Shift" action="modifier:shift" />
</key> </key>
<key obey-caps='true'> <key obey-caps='true'>
<default display="z" /> <default display="z" />
@@ -177,7 +177,7 @@
<mod2 display="]" /> <mod2 display="]" />
</key> </key>
<key obey-caps='true'> <key obey-caps='true'>
<default display="image:arrow.png" action="backspace" /> <default display="&lt;x" action="backspace" />
</key> </key>
</row> </row>
<row> <row>
@@ -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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-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"
@@ -44,8 +44,8 @@ msgstr "툴 헤드 제어"
msgid "Add Printer" msgid "Add Printer"
msgstr "프린터 추가" msgstr "프린터 추가"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "베드 메시 프로파일 추가" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "확인" msgstr "확인"
@@ -58,6 +58,9 @@ msgstr "엔드스탑 높이 기준을 %.2f 높이의 옵셋으로 설정 하시
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "프로브 높이 기준을 %s%.2f 높이의 옵셋으로 설정 하시겠습니까?" 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?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "비상정지 시킬까요?" msgstr "비상정지 시킬까요?"
@@ -79,6 +82,9 @@ msgstr "오토"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "자동 교정" msgstr "자동 교정"
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "오토 스크롤" msgstr "오토 스크롤"
@@ -88,8 +94,8 @@ msgstr "베드 레베"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "배드 메시" msgstr "배드 메시"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch가 적용된 오프셋" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "교정" msgstr "교정"
@@ -100,6 +106,9 @@ msgstr "교정됨"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "교정됨, 설정을 저장합니다" msgstr "교정됨, 설정을 저장합니다"
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "교정 중.." msgstr "교정 중.."
@@ -124,16 +133,12 @@ msgstr "문래커에 연결할 수 없음"
msgid "Channel" msgid "Channel"
msgstr "채널" msgstr "채널"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"자세한 내용은 /tmp/KlipperScreen.log를 참조하십시오.\n"
"GitHub에 현재 발생한 이슈를 제출하여 도움을 요청해 주세요"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "가속도계 배선을 확인해 주세요" msgstr "가속도계 배선을 확인해 주세요"
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "초기화" msgstr "초기화"
@@ -171,8 +176,8 @@ msgstr "날짜"
msgid "Decrease" msgid "Decrease"
msgstr "낮추기" msgstr "낮추기"
msgid "Delete" msgid "Delete File?"
msgstr "삭제" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "선택 해제" msgstr "선택 해제"
@@ -199,6 +204,9 @@ msgstr "오류"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "예상시간 옵션" msgstr "예상시간 옵션"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "압출 " msgstr "압출 "
@@ -241,12 +249,8 @@ msgstr "미세 조정"
msgid "Finish" msgid "Finish"
msgstr "완료됨" msgstr "완료됨"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "펌웨어 재시작"
"Restart"
msgstr ""
"펌웨어\n"
"재시작"
msgid "Flow:" msgid "Flow:"
msgstr "유량:" msgstr "유량:"
@@ -257,12 +261,8 @@ msgstr "유량:"
msgid "Font Size" msgid "Font Size"
msgstr "글꼴 크기" msgstr "글꼴 크기"
msgid "" msgid "Full Update"
"Full\n" msgstr "전체 업데이트"
"Update"
msgstr ""
"전체\n"
"업데이트"
msgid "Go Back" msgid "Go Back"
msgstr "뒤로" msgstr "뒤로"
@@ -282,9 +282,6 @@ msgstr "온도 섹션에서 센서 항목 숨김."
msgid "Hide temp." msgid "Hide temp."
msgstr "온도 숨김" msgstr "온도 숨김"
msgid "Home"
msgstr "홈"
msgid "Home All" msgid "Home All"
msgstr "전체 홈" msgstr "전체 홈"
@@ -303,6 +300,9 @@ msgstr "Z축 홈"
msgid "Homing" msgid "Homing"
msgstr "툴 헤드 위치 초기화" msgstr "툴 헤드 위치 초기화"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "호스트 이름" msgstr "호스트 이름"
@@ -336,12 +336,8 @@ msgstr "Y축 반전"
msgid "Invert Z" msgid "Invert Z"
msgstr "Z축 반전" msgstr "Z축 반전"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "클리퍼 재시작"
"Restart"
msgstr ""
"클리퍼\n"
"재시작"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "클리퍼와 연결이 끊어졌습니다" msgstr "클리퍼와 연결이 끊어졌습니다"
@@ -415,6 +411,9 @@ msgstr "중간"
msgid "Menu" msgid "Menu"
msgstr "메뉴" msgstr "메뉴"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "수정됨" msgstr "수정됨"
@@ -433,15 +432,20 @@ msgstr "이름"
msgid "Network" msgid "Network"
msgstr "네트워크" msgstr "네트워크"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "신규" msgstr "신규"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "아무것도 선택하지 않ㅇ" msgstr "아무것도 선택하지 않ㅇ"
msgid "Off"
msgstr "끄기"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "%d 보다 오래됨" msgstr "%d 보다 오래됨"
@@ -453,6 +457,9 @@ msgid "Package will be updated"
msgid_plural "Packages will be updated" msgid_plural "Packages will be updated"
msgstr[0] "패키지가 업데이트 됩니다" msgstr[0] "패키지가 업데이트 됩니다"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "비밀번호 저장됨" msgstr "비밀번호 저장됨"
@@ -465,6 +472,9 @@ msgstr "일시정지됨"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "전체 업그레이드를 실행합니까?" msgstr "전체 업그레이드를 실행합니까?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "MCU 펌웨어를 다시 컴파일 한 다음 플래싱 해주세요" msgstr "MCU 펌웨어를 다시 컴파일 한 다음 플래싱 해주세요"
@@ -486,18 +496,21 @@ msgstr "출력 제어"
msgid "Print Time" msgid "Print Time"
msgstr "출력 시간" msgstr "출력 시간"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "프린터 연결" msgstr "프린터 연결"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "출력중" msgstr "출력중"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "프로브 오프셋" msgstr "프로브 오프셋"
msgid "Probe found applied offset"
msgstr "프로브가 오프셋을 찾았습니다"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "프로파일 이름:" msgstr "프로파일 이름:"
@@ -516,6 +529,9 @@ msgstr "일반 복구 모드"
msgid "Reference" msgid "Reference"
msgstr "참조" msgstr "참조"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "재시작" msgstr "재시작"
@@ -534,10 +550,16 @@ msgstr "퇴추 길이"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "퇴출 속도" msgstr "퇴출 속도"
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "재시도 #%s" msgstr "재시도 #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "저장" msgstr "저장"
@@ -585,6 +607,12 @@ msgstr "설정"
msgid "Show" msgid "Show"
msgstr "보기" msgstr "보기"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "크기" msgstr "크기"
@@ -600,9 +628,6 @@ msgstr "슬라이서:"
msgid "Small" msgid "Small"
msgstr "작은" msgstr "작은"
msgid "Sort by: "
msgstr "분류 기준: "
msgid "Sort:" msgid "Sort:"
msgstr "종류:" msgstr "종류:"
@@ -636,19 +661,11 @@ msgstr "업데이트 시작 중"
msgid "System" msgid "System"
msgstr "시스템" msgstr "시스템"
msgid "" msgid "System Restart"
"System\n" msgstr "시스템 재시작"
"Restart"
msgstr ""
"시스템\n"
"재시작"
msgid "" msgid "System Shutdown"
"System\n" msgstr "시스템 종료"
"Shutdown"
msgstr ""
"시스템\n"
"종료"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "온도 (°C)" msgstr "온도 (°C)"
@@ -666,6 +683,9 @@ msgstr "총:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "알 수 없는 히터" msgstr "알 수 없는 히터"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "필라 꺼내기" msgstr "필라 꺼내기"
@@ -687,9 +707,6 @@ msgstr "업데이트 중.."
msgid "Uploaded" msgid "Uploaded"
msgstr "업로드됨" msgstr "업로드됨"
msgid "View Mesh"
msgstr "메쉬 프로파일 보기"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -752,6 +769,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "삭제"
#~ msgid "Home"
#~ msgstr "홈"
#~ msgid "Off"
#~ msgstr "끄기"
#~ msgid "View Mesh"
#~ msgstr "메쉬 프로파일 보기"
#~ msgid "Sort by: "
#~ msgstr "분류 기준: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch가 적용된 오프셋"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "자세한 내용은 /tmp/KlipperScreen.log를 참조하십시오.\n"
#~ "GitHub에 현재 발생한 이슈를 제출하여 도움을 요청해 주세요"
#~ msgid "Probe found applied offset"
#~ msgstr "프로브가 오프셋을 찾았습니다"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "툴" #~ msgstr "툴"
@@ -7,7 +7,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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 11:06-0300\n" "PO-Revision-Date: 2022-03-31 11:06-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -50,8 +50,8 @@ msgstr "Akcje"
msgid "Add Printer" msgid "Add Printer"
msgstr "Dodaj drukarkę" msgstr "Dodaj drukarkę"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Dodaj profil siatki stołu" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -64,6 +64,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
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ć?"
@@ -85,6 +88,9 @@ msgstr "Automatyczny"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scroll" msgstr "Auto-scroll"
@@ -94,8 +100,8 @@ msgstr "Poziom stołu"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Poziom siatki stołu" msgstr "Poziom siatki stołu"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch znalazł zastosowane przesunięcie" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibracja" msgstr "Kalibracja"
@@ -106,6 +112,9 @@ msgstr ""
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"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -130,16 +139,12 @@ msgstr "Nie można połączyć się z Moonrakerem"
msgid "Channel" msgid "Channel"
msgstr "Kanał" msgstr "Kanał"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Sprawdź /tmp/KlipperScreen.log aby uzyskać więcej informacji.\n"
"Proszę zgłosić usterkę na GitHub by uzyskać pomoc."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -177,8 +182,8 @@ msgstr "Data"
msgid "Decrease" msgid "Decrease"
msgstr "Obniż" msgstr "Obniż"
msgid "Delete" msgid "Delete File?"
msgstr "Skasuj" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Odznacz" msgstr "Odznacz"
@@ -205,6 +210,9 @@ msgstr "Błąd"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Sposób Oszacowania Czasu" msgstr "Sposób Oszacowania Czasu"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Extruduj" msgstr "Extruduj"
@@ -247,9 +255,7 @@ msgstr "Regulacja Precyzyjna"
msgid "Finish" msgid "Finish"
msgstr "Zakończ" msgstr "Zakończ"
msgid "" msgid "Firmware Restart"
"Firmware\n"
"Restart"
msgstr "" msgstr ""
msgid "Flow:" msgid "Flow:"
@@ -261,12 +267,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Rozmiar trzcionki" msgstr "Rozmiar trzcionki"
msgid "" msgid "Full Update"
"Full\n" msgstr "Pełny Aktualizacja"
"Update"
msgstr ""
"Pełny\n"
"Aktualizacja"
msgid "Go Back" msgid "Go Back"
msgstr "Powróć" msgstr "Powróć"
@@ -286,9 +288,6 @@ msgstr "Ukryj czujniki w Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Baza"
msgid "Home All" msgid "Home All"
msgstr "Baza Wszystkich" msgstr "Baza Wszystkich"
@@ -307,6 +306,9 @@ msgstr "Baza Z"
msgid "Homing" msgid "Homing"
msgstr "Bazowanie" msgstr "Bazowanie"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Nazwa hosta" msgstr "Nazwa hosta"
@@ -340,9 +342,7 @@ msgstr "Odwróć Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Odwróć Z" msgstr "Odwróć Z"
msgid "" msgid "Klipper Restart"
"Klipper\n"
"Restart"
msgstr "" msgstr ""
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
@@ -417,6 +417,9 @@ msgstr "Średni"
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Zmodyfikowane" msgstr "Zmodyfikowane"
@@ -435,15 +438,20 @@ msgstr "Nazwa"
msgid "Network" msgid "Network"
msgstr "Sieć" msgstr "Sieć"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Nic nie wybrano" msgstr "Nic nie wybrano"
msgid "Off"
msgstr "Wyłącz"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Nieaktualne przez %d" msgstr "Nieaktualne przez %d"
@@ -457,6 +465,9 @@ msgstr[0] "Pakiet zostanie zaktualizowany"
msgstr[1] "Pakiety zostaną zaktualizowane" msgstr[1] "Pakiety zostaną zaktualizowane"
msgstr[2] "Pakiety zostaną zaktualizowane" msgstr[2] "Pakiety zostaną zaktualizowane"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Hasło zostało zapisane" msgstr "Hasło zostało zapisane"
@@ -469,6 +480,9 @@ msgstr "Zapauzowane"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Przeprowadzić pełną aktualizację?" msgstr "Przeprowadzić pełną aktualizację?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Proszę przekompilować i sflashować mikrokontroler." msgstr "Proszę przekompilować i sflashować mikrokontroler."
@@ -490,18 +504,21 @@ msgstr "Kontrola Druku"
msgid "Print Time" msgid "Print Time"
msgstr "Czas Druku" msgstr "Czas Druku"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Połączenia Drukarki" msgstr "Połączenia Drukarki"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Drukujemy" msgstr "Drukujemy"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe znalazł zastosowane przesunięcie"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Nazwa Profilu:" msgstr "Nazwa Profilu:"
@@ -520,6 +537,9 @@ msgstr "Odzyskaj Miękko"
msgid "Reference" msgid "Reference"
msgstr "Sprawdzenie" msgstr "Sprawdzenie"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Restartuj" msgstr "Restartuj"
@@ -538,10 +558,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Spróbuj ponownie #%s" msgstr "Spróbuj ponownie #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Zapisz" msgstr "Zapisz"
@@ -589,6 +615,12 @@ msgstr "Ustawienia"
msgid "Show" msgid "Show"
msgstr "Pokaż" msgstr "Pokaż"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Rozmiar" msgstr "Rozmiar"
@@ -604,9 +636,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Mały" msgstr "Mały"
msgid "Sort by: "
msgstr "Sortuj wg: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -640,19 +669,11 @@ msgstr "Zacznij uaktualnienie dla"
msgid "System" msgid "System"
msgstr "System" msgstr "System"
msgid "" msgid "System Restart"
"System\n" msgstr "Restart Systemu"
"Restart"
msgstr ""
"Restart\n"
"Systemu"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Wyłączanie systemu"
"Shutdown"
msgstr ""
"Wyłączanie\n"
" systemu"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temp (°C)" msgstr "Temp (°C)"
@@ -670,6 +691,9 @@ msgstr "Całkowity:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Nieznany Podgrzewacz" msgstr "Nieznany Podgrzewacz"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Wyładuj" msgstr "Wyładuj"
@@ -691,9 +715,6 @@ msgstr "Aktualizacja"
msgid "Uploaded" msgid "Uploaded"
msgstr "Przesłane" msgstr "Przesłane"
msgid "View Mesh"
msgstr "Wyświetl siatkę"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -760,6 +781,34 @@ msgstr "mm/s²"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Skasuj"
#~ msgid "Home"
#~ msgstr "Baza"
#~ msgid "Off"
#~ msgstr "Wyłącz"
#~ msgid "View Mesh"
#~ msgstr "Wyświetl siatkę"
#~ msgid "Sort by: "
#~ msgstr "Sortuj wg: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch znalazł zastosowane przesunięcie"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Sprawdź /tmp/KlipperScreen.log aby uzyskać więcej informacji.\n"
#~ "Proszę zgłosić usterkę na GitHub by uzyskać pomoc."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe znalazł zastosowane przesunięcie"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Narzędzie" #~ msgstr "Narzędzie"
@@ -775,9 +824,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Nieznany Podgrzewacz "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Rozłącz" #~ msgstr "Rozłącz"
@@ -6,7 +6,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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-06-03 20:25-0500\n" "PO-Revision-Date: 2022-06-03 20:25-0500\n"
"Last-Translator: Jakob Kais <schpuntik@freenet.de>\n" "Last-Translator: Jakob Kais <schpuntik@freenet.de>\n"
"Language-Team: \n" "Language-Team: \n"
@@ -33,13 +33,13 @@ msgid "A FIRMWARE_RESTART may fix the issue."
msgstr "FIRMWARE_RESTART может решить проблему." msgstr "FIRMWARE_RESTART может решить проблему."
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "ADXL не настроен"
msgid "Abort" msgid "Abort"
msgstr "Отменить" msgstr "Отменить"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "Ускорение:"
msgid "Accept" msgid "Accept"
msgstr "Применить" msgstr "Применить"
@@ -50,18 +50,21 @@ msgstr "Действия"
msgid "Add Printer" msgid "Add Printer"
msgstr "Добавить принтер" msgstr "Добавить принтер"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Добавить профиль сетки стола" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr "Применить"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "Применить смещение %.2f к Endstop?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "Применить смещение %s%.2f к зонду?"
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?"
@@ -83,6 +86,9 @@ msgid "Auto"
msgstr "Авто" msgstr "Авто"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Автоматическая калибровка"
msgid "Auto-close notifications"
msgstr "" msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
@@ -94,20 +100,23 @@ msgstr "Уровень стола"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Сетка стола" msgstr "Сетка стола"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch обнаружил примененное смещение" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Калибровка" msgstr "Калибровка"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "Откалиброванный"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Откалибровано, сохраните конфигурацию, чтобы сделать ее постоянной" msgstr "Откалибровано, сохраните конфигурацию, чтобы сделать ее постоянной"
msgid "Calibrating"
msgstr "Калибровка"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr "Калибровка..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Невозможно установить выше максимума:" msgstr "Невозможно установить выше максимума:"
@@ -130,18 +139,14 @@ msgstr "Не могу подключиться к Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Канал" msgstr "Канал"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Проверьте /tmp/KlipperScreen.log для дополнитольной информации.\n"
"Создайте issues на GitHub что-бы получить помощь."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "Проверьте проводку ADXL"
msgid "Checking for updates, please wait..."
msgstr "" msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr "Очистить"
msgid "Close" msgid "Close"
msgstr "Закрыть" msgstr "Закрыть"
@@ -177,8 +182,8 @@ msgstr "Дата"
msgid "Decrease" msgid "Decrease"
msgstr "Уменьшить" msgstr "Уменьшить"
msgid "Delete" msgid "Delete File?"
msgstr "Удалить" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Отменить выбор" msgstr "Отменить выбор"
@@ -205,6 +210,9 @@ msgstr "Ошибка"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Расчётное время" msgstr "Расчётное время"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Заправить" msgstr "Заправить"
@@ -224,22 +232,22 @@ msgid "Filament Used"
msgstr "Использование филамента" msgstr "Использование филамента"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "Итого филамента:"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "Использование филамента:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "Филамент:"
msgid "File" msgid "File"
msgstr "Файл" msgstr "Файл"
msgid "File:" msgid "File:"
msgstr "" msgstr "Файл:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "Поиск ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Точная настройка" msgstr "Точная настройка"
@@ -247,34 +255,26 @@ msgstr "Точная настройка"
msgid "Finish" msgid "Finish"
msgstr "Конец" msgstr "Конец"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Прошивка Рестарт"
"Restart"
msgstr ""
"Прошивка\n"
"Рестарт"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "Поток:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "Расход:"
msgid "Font Size" msgid "Font Size"
msgstr "Размер шрифта" msgstr "Размер шрифта"
msgid "" msgid "Full Update"
"Full\n" msgstr "Полный Обновлять"
"Update"
msgstr ""
"Полный\n"
"Обновлять"
msgid "Go Back" msgid "Go Back"
msgstr "Назад" msgstr "Назад"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "Высота:"
msgid "Hidden" msgid "Hidden"
msgstr "Скрытый" msgstr "Скрытый"
@@ -286,10 +286,7 @@ msgid "Hide sensors in Temp."
msgstr "Скрыть датчики в Temp." msgstr "Скрыть датчики в Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "Скрыть температуру."
msgid "Home"
msgstr "Парковка"
msgid "Home All" msgid "Home All"
msgstr "Парковать все" msgstr "Парковать все"
@@ -309,6 +306,9 @@ msgstr "Парковать Z"
msgid "Homing" msgid "Homing"
msgstr "Парковка" msgstr "Парковка"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Имя хоста" msgstr "Имя хоста"
@@ -325,7 +325,7 @@ msgid "Initializing printer..."
msgstr "Принтер стартует..." msgstr "Принтер стартует..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Входной шейпер"
msgid "Interface" msgid "Interface"
msgstr "Интерфейс" msgstr "Интерфейс"
@@ -342,12 +342,8 @@ msgstr "Инверсия Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Инверсия Z" msgstr "Инверсия Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Рестарт"
"Restart"
msgstr ""
"Klipper\n"
"Рестарт"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Нет связи с Klipper" msgstr "Нет связи с Klipper"
@@ -371,7 +367,7 @@ msgid "Large"
msgstr "Большой" msgstr "Большой"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "Слой:"
msgid "Left:" msgid "Left:"
msgstr "Осталось:" msgstr "Осталось:"
@@ -398,7 +394,7 @@ msgid "Max"
msgstr "" msgstr ""
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "Максимальное ускорение"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "Ускорения торможения" msgstr "Ускорения торможения"
@@ -407,13 +403,13 @@ msgid "Max Velocity"
msgstr "Скорость" msgstr "Скорость"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr "Измерьте и то, и другое"
msgid "Measure X" msgid "Measure X"
msgstr "" msgstr "Измерьте X"
msgid "Measure Y" msgid "Measure Y"
msgstr "" msgstr "Измерьте Y"
msgid "Medium" msgid "Medium"
msgstr "Среднее" msgstr "Среднее"
@@ -421,6 +417,9 @@ msgstr "Среднее"
msgid "Menu" msgid "Menu"
msgstr "Меню" msgstr "Меню"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Изменено" msgstr "Изменено"
@@ -439,15 +438,20 @@ msgstr "Имя"
msgid "Network" msgid "Network"
msgstr "Сеть" msgstr "Сеть"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Новый"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr "" msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Ничего не выбрано" msgstr "Ничего не выбрано"
msgid "Off"
msgstr "Выкл"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Устарело на %d" msgstr "Устарело на %d"
@@ -461,6 +465,9 @@ msgstr[0] "Пакет будет обновлен"
msgstr[1] "Пакеты будут обновляться" msgstr[1] "Пакеты будут обновляться"
msgstr[2] "Пакеты будут обновляться" msgstr[2] "Пакеты будут обновляться"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Пароль сохранен" msgstr "Пароль сохранен"
@@ -473,6 +480,9 @@ msgstr "Приостановлено"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Выполнить полное обновление?" msgstr "Выполнить полное обновление?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Пожалуйста, перекомпилируйте и прошейте микроконтроллер." msgstr "Пожалуйста, перекомпилируйте и прошейте микроконтроллер."
@@ -483,7 +493,7 @@ msgid "Power On Printer"
msgstr "Включить принтер" msgstr "Включить принтер"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "Повышение давления:"
msgid "Print" msgid "Print"
msgstr "Печать" msgstr "Печать"
@@ -494,17 +504,20 @@ msgstr "Управление печатью"
msgid "Print Time" msgid "Print Time"
msgstr "Время печати" msgstr "Время печати"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Подключение принтера" msgstr "Подключение принтера"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Печатается" msgstr "Печатается"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr "Смещение зонда"
msgid "Probe found applied offset"
msgstr "Probe обнаружил примененное смещение"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Имя профиля:" msgstr "Имя профиля:"
@@ -524,6 +537,9 @@ msgstr "Восстановить Soft"
msgid "Reference" msgid "Reference"
msgstr "Ссылка" msgstr "Ссылка"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Перезагрузка" msgstr "Перезагрузка"
@@ -534,18 +550,24 @@ msgid "Retract"
msgstr "Втянуть" msgstr "Втянуть"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "Ретракт"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "Длина ретракта"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Скорость ретракта"
msgid "Retry"
msgstr "" msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Повторить #%s" msgstr "Повторить #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Сохранить" msgstr "Сохранить"
@@ -553,17 +575,17 @@ msgid "Save Config"
msgstr "Сохр. Конфиг" msgstr "Сохр. Конфиг"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "Сохранить Z"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "Сохранить конфигурацию?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "Сохранено"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "Сохраненный офсет: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "Экран DPMS" msgstr "Экран DPMS"
@@ -593,6 +615,12 @@ msgstr "Настройки"
msgid "Show" msgid "Show"
msgstr "Показывать" msgstr "Показывать"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Размер" msgstr "Размер"
@@ -608,11 +636,8 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Маленький" msgstr "Маленький"
msgid "Sort by: "
msgstr "Орден: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr "Сортировать:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "Скорость (мм/с)" msgstr "Скорость (мм/с)"
@@ -644,16 +669,10 @@ msgstr "Запуск обновления для"
msgid "System" msgid "System"
msgstr "Система" msgstr "Система"
msgid "" msgid "System Restart"
"System\n" msgstr "Рестарт Системы"
"Restart"
msgstr ""
"Рестарт\n"
"Системы"
msgid "" msgid "System Shutdown"
"System\n"
"Shutdown"
msgstr "Выключить" msgstr "Выключить"
msgid "Temp (°C)" msgid "Temp (°C)"
@@ -672,6 +691,9 @@ msgstr "Всего:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Неизвестный обогреватель" msgstr "Неизвестный обогреватель"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "Загружено" msgstr "Загружено"
@@ -693,9 +715,6 @@ msgstr "Обновление"
msgid "Uploaded" msgid "Uploaded"
msgstr "Дата" msgstr "Дата"
msgid "View Mesh"
msgstr "Смотреть сетку"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -762,6 +781,34 @@ msgstr "мм/с"
msgid "mm/s²" msgid "mm/s²"
msgstr "мм/с²" msgstr "мм/с²"
#~ msgid "Delete"
#~ msgstr "Удалить"
#~ msgid "Home"
#~ msgstr "Парковка"
#~ msgid "Off"
#~ msgstr "Выкл"
#~ msgid "View Mesh"
#~ msgstr "Смотреть сетку"
#~ msgid "Sort by: "
#~ msgstr "Орден: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch обнаружил примененное смещение"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Проверьте /tmp/KlipperScreen.log для дополнитольной информации.\n"
#~ "Создайте issues на GitHub что-бы получить помощь."
#~ msgid "Probe found applied offset"
#~ msgstr "Probe обнаружил примененное смещение"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Инструмент" #~ msgstr "Инструмент"
@@ -777,9 +824,6 @@ msgstr "мм/с²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "Неизвестный обогреватель "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "Отключить" #~ msgstr "Отключить"
@@ -7,7 +7,7 @@ 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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-04-15 17:25+0200\n" "PO-Revision-Date: 2022-04-15 17:25+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -49,8 +49,8 @@ msgstr "Åtgärder"
msgid "Add Printer" msgid "Add Printer"
msgstr "Lägg till skrivare" msgstr "Lägg till skrivare"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Lägg till mesh profil" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Är du säker på att du vill köra Nödstopp?" msgstr "Är du säker på att du vill köra Nödstopp?"
@@ -84,6 +87,9 @@ msgstr "Automatisk"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Auto-scrolla" msgstr "Auto-scrolla"
@@ -93,8 +99,8 @@ msgstr ""
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "" msgstr ""
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch hittade tillämpad offset" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibrera" msgstr "Kalibrera"
@@ -105,6 +111,9 @@ msgstr ""
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibrerad, spara konfiguration för att göra den permanent" msgstr "Kalibrerad, spara konfiguration för att göra den permanent"
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -129,16 +138,12 @@ msgstr "Kan inte ansluta till Moonraker"
msgid "Channel" msgid "Channel"
msgstr "" msgstr ""
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Kontrollera /tmp/KlipperScreen.log för mer information.\n"
"Skicka in ett problem på GitHub för hjälp."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -176,8 +181,8 @@ msgstr "Datum"
msgid "Decrease" msgid "Decrease"
msgstr "Minska" msgstr "Minska"
msgid "Delete" msgid "Delete File?"
msgstr "Radera" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "Avmarkera" msgstr "Avmarkera"
@@ -204,6 +209,9 @@ msgstr "Fel"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "" msgstr ""
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "Extrudera" msgstr "Extrudera"
@@ -246,12 +254,8 @@ msgstr "Finjustering"
msgid "Finish" msgid "Finish"
msgstr "Slutför" msgstr "Slutför"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Omstart"
"Restart"
msgstr ""
"Firmware\n"
"Omstart"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -262,12 +266,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "Textstorlek" msgstr "Textstorlek"
msgid "" msgid "Full Update"
"Full\n" msgstr "Fullständig Uppdatering"
"Update"
msgstr ""
"Fullständig\n"
"Uppdatering"
msgid "Go Back" msgid "Go Back"
msgstr "Gå tillbaka" msgstr "Gå tillbaka"
@@ -287,9 +287,6 @@ msgstr "Dölj sensorer i Temp."
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "Hem"
msgid "Home All" msgid "Home All"
msgstr "Hem Alla" msgstr "Hem Alla"
@@ -308,6 +305,9 @@ msgstr "Hem Z"
msgid "Homing" msgid "Homing"
msgstr "" msgstr ""
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "Värdnamn" msgstr "Värdnamn"
@@ -341,12 +341,8 @@ msgstr "Invertera Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Invertera Z" msgstr "Invertera Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Omstart"
"Restart"
msgstr ""
"Klipper\n"
"Omstart"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "" msgstr ""
@@ -420,6 +416,9 @@ msgstr "Medium"
msgid "Menu" msgid "Menu"
msgstr "Meny" msgstr "Meny"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Ändrad" msgstr "Ändrad"
@@ -438,15 +437,20 @@ msgstr "Namn"
msgid "Network" msgid "Network"
msgstr "Nätverk" msgstr "Nätverk"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Inget valt" msgstr "Inget valt"
msgid "Off"
msgstr "Avstängd"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "" msgstr ""
@@ -459,6 +463,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Paketet kommer att uppdateras" msgstr[0] "Paketet kommer att uppdateras"
msgstr[1] "Paketen kommer att uppdateras" msgstr[1] "Paketen kommer att uppdateras"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "Lösenordet har sparats" msgstr "Lösenordet har sparats"
@@ -471,6 +478,9 @@ msgstr "Pausad"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Utför en fullständig uppgradering?" msgstr "Utför en fullständig uppgradering?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Vänligen kompilera om och flasha mikrokontrollern." msgstr "Vänligen kompilera om och flasha mikrokontrollern."
@@ -492,18 +502,21 @@ msgstr "Utskriftskontroll"
msgid "Print Time" msgid "Print Time"
msgstr "" msgstr ""
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "" msgstr ""
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Skriver ut" msgstr "Skriver ut"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr ""
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profilens namn:" msgstr "Profilens namn:"
@@ -522,6 +535,9 @@ msgstr ""
msgid "Reference" msgid "Reference"
msgstr "Referens" msgstr "Referens"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "Starta om" msgstr "Starta om"
@@ -540,10 +556,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "" msgstr ""
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "Spara" msgstr "Spara"
@@ -591,6 +613,12 @@ msgstr "Inställningar"
msgid "Show" msgid "Show"
msgstr "Visa" msgstr "Visa"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Storlek" msgstr "Storlek"
@@ -606,9 +634,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "Liten" msgstr "Liten"
msgid "Sort by: "
msgstr "Sortera efter: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -642,19 +667,11 @@ msgstr ""
msgid "System" msgid "System"
msgstr "System" msgstr "System"
msgid "" msgid "System Restart"
"System\n" msgstr "System Omstart"
"Restart"
msgstr ""
"System\n"
"Omstart"
msgid "" msgid "System Shutdown"
"System\n" msgstr "System Avstängning"
"Shutdown"
msgstr ""
"System\n"
"Avstängning"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Temperatur (°C)" msgstr "Temperatur (°C)"
@@ -672,6 +689,9 @@ msgstr ""
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Okänt värmeelement" msgstr "Okänt värmeelement"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "" msgstr ""
@@ -693,9 +713,6 @@ msgstr "Uppdaterar"
msgid "Uploaded" msgid "Uploaded"
msgstr "Uppladdad" msgstr "Uppladdad"
msgid "View Mesh"
msgstr ""
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -760,6 +777,28 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Radera"
#~ msgid "Home"
#~ msgstr "Hem"
#~ msgid "Off"
#~ msgstr "Avstängd"
#~ msgid "Sort by: "
#~ msgstr "Sortera efter: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch hittade tillämpad offset"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Kontrollera /tmp/KlipperScreen.log för mer information.\n"
#~ "Skicka in ett problem på GitHub för hjälp."
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Verktyg" #~ msgstr "Verktyg"
@@ -7,8 +7,8 @@ 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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-06-05 21:11+0300\n" "PO-Revision-Date: 2022-10-30 16:54+0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: tr_TR\n" "Language: tr_TR\n"
@@ -49,8 +49,8 @@ msgstr "Eylemler"
msgid "Add Printer" msgid "Add Printer"
msgstr "Yazıcı Ekle" msgstr "Yazıcı Ekle"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Tabla Örgüsü profili ekle" msgstr "Profil ekle"
msgid "Apply" msgid "Apply"
msgstr "Uygula" msgstr "Uygula"
@@ -63,6 +63,9 @@ msgstr "Sonlandırıcı için %.2f ofset uygula?"
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "Prob için %s%.2f ofset uygula?" msgstr "Prob için %s%.2f ofset uygula?"
msgid "Are you sure do you want to exclude the object?"
msgstr "Nesneyi hariç tutmak istediğinizden emin misiniz?"
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Acil Durdurma'yı çalıştırmak istediğinizden emin misiniz?" msgstr "Acil Durdurma'yı çalıştırmak istediğinizden emin misiniz?"
@@ -84,6 +87,9 @@ msgstr "Otomatik"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Otomatik-Kalibrasyon" msgstr "Otomatik-Kalibrasyon"
msgid "Auto-close notifications"
msgstr "Bildirimleri otomatik kapat"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Otomatik kaydırma" msgstr "Otomatik kaydırma"
@@ -93,8 +99,8 @@ msgstr "Tabla Ayarı"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Tabla Örgüsü" msgstr "Tabla Örgüsü"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch uygulanmış ofseti buldu" msgstr "Tabla vida yapılandırması:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Kalibre et" msgstr "Kalibre et"
@@ -105,6 +111,9 @@ msgstr "Kalibre Edildi"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Kalibre edildi, kalıcı hale getirmek için yapılandırmayı kaydedin" msgstr "Kalibre edildi, kalıcı hale getirmek için yapılandırmayı kaydedin"
msgid "Calibrating"
msgstr "Kalibre Ediliyor"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Kalibre Ediliyor..." msgstr "Kalibre Ediliyor..."
@@ -129,16 +138,12 @@ msgstr "Moonraker'a bağlanılamıyor"
msgid "Channel" msgid "Channel"
msgstr "Kanal" msgstr "Kanal"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Daha fazla bilgi için /tmp/KlipperScreen.log'a bakın.\n"
"Lütfen yardım için GitHub'da bir sorun gönderin."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "ADXL Bağlantılarını Kontrol Et" msgstr "ADXL Bağlantılarını Kontrol Et"
msgid "Checking for updates, please wait..."
msgstr "Güncellemeler kontrol ediliyor, lütfen bekleyin..."
msgid "Clear" msgid "Clear"
msgstr "Temizle" msgstr "Temizle"
@@ -176,8 +181,8 @@ msgstr "Tarih"
msgid "Decrease" msgid "Decrease"
msgstr "Azalt" msgstr "Azalt"
msgid "Delete" msgid "Delete File?"
msgstr "Sil" msgstr "Dosyayı Sil?"
msgid "Deselect" msgid "Deselect"
msgstr "Seçimi kaldır" msgstr "Seçimi kaldır"
@@ -204,6 +209,9 @@ msgstr "Hata"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Tahmini Zaman Metodu" msgstr "Tahmini Zaman Metodu"
msgid "Exclude Object"
msgstr "Nesneyi Hariç Tut"
msgid "Extrude" msgid "Extrude"
msgstr "Ekstrüzyon" msgstr "Ekstrüzyon"
@@ -246,12 +254,8 @@ msgstr "İnce Ayar"
msgid "Finish" msgid "Finish"
msgstr "Bitir" msgstr "Bitir"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware Yeniden Başlat"
"Restart"
msgstr ""
"Firmware\n"
"Yeniden Başlat"
msgid "Flow:" msgid "Flow:"
msgstr "Akış:" msgstr "Akış:"
@@ -262,12 +266,8 @@ msgstr "Akış oranı:"
msgid "Font Size" msgid "Font Size"
msgstr "Yazı boyutu" msgstr "Yazı boyutu"
msgid "" msgid "Full Update"
"Full\n" msgstr "Tam Güncelleme"
"Update"
msgstr ""
"Tam\n"
"Güncelleme"
msgid "Go Back" msgid "Go Back"
msgstr "Geri git" msgstr "Geri git"
@@ -287,9 +287,6 @@ msgstr "Sıcaklıktaki sensörleri gizleyin."
msgid "Hide temp." msgid "Hide temp."
msgstr "Sıcaklığı gizle." msgstr "Sıcaklığı gizle."
msgid "Home"
msgstr "Ana Ekran"
msgid "Home All" msgid "Home All"
msgstr "Eksenleri Sıfırla" msgstr "Eksenleri Sıfırla"
@@ -308,6 +305,9 @@ msgstr "Z Sıfırla"
msgid "Homing" msgid "Homing"
msgstr "Eksen Sıfırlama" msgstr "Eksen Sıfırlama"
msgid "Host"
msgstr "Sunucu"
msgid "Hostname" msgid "Hostname"
msgstr "Ana bilgisayar adı" msgstr "Ana bilgisayar adı"
@@ -341,12 +341,8 @@ msgstr "Y Ters çevir"
msgid "Invert Z" msgid "Invert Z"
msgstr "Z Ters çevir" msgstr "Z Ters çevir"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper Yeniden başlat"
"Restart"
msgstr ""
"Klipper\n"
"Yeniden başlat"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper bağlantısı kesildi" msgstr "Klipper bağlantısı kesildi"
@@ -394,7 +390,7 @@ msgid "Main Menu"
msgstr "Ana Menü" msgstr "Ana Menü"
msgid "Max" msgid "Max"
msgstr "" msgstr "Maks"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Maksimum Hızlanma" msgstr "Maksimum Hızlanma"
@@ -420,6 +416,9 @@ msgstr "Orta"
msgid "Menu" msgid "Menu"
msgstr "Menü" msgstr "Menü"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Değiştirilmiş" msgstr "Değiştirilmiş"
@@ -438,15 +437,22 @@ msgstr "İsim"
msgid "Network" msgid "Network"
msgstr "Ağ" msgstr "Ağ"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Yeni" msgstr "Yeni"
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"Otomatik algılama desteklenmiyor, klipperscreen.conf dosyasından "
"yapılandırmanız gerekli"
msgid "Nothing selected" msgid "Nothing selected"
msgstr "Hiçbir şey seçilmedi" msgstr "Hiçbir şey seçilmedi"
msgid "Off"
msgstr "Kapa"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "Güncelliğini yitiren %d" msgstr "Güncelliğini yitiren %d"
@@ -459,6 +465,9 @@ msgid_plural "Packages will be updated"
msgstr[0] "Paket yükseltilecek" msgstr[0] "Paket yükseltilecek"
msgstr[1] "Paketler yükseltilecek" msgstr[1] "Paketler yükseltilecek"
msgid "Part Fan"
msgstr "Parça Fan"
msgid "Password saved" msgid "Password saved"
msgstr "Şifre kaydedildi" msgstr "Şifre kaydedildi"
@@ -471,6 +480,9 @@ msgstr "Duraklatıldı"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Tam yükseltme yap?" msgstr "Tam yükseltme yap?"
msgid "Pins"
msgstr "Pinler"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Lütfen mikro denetleyiciyi yeniden derleyin ve flaşlayın." msgstr "Lütfen mikro denetleyiciyi yeniden derleyin ve flaşlayın."
@@ -492,18 +504,21 @@ msgstr "Yazdırma Kontrolü"
msgid "Print Time" msgid "Print Time"
msgstr "Yazdırma Süresi" msgstr "Yazdırma Süresi"
msgid "Printer"
msgstr "Yazıcı"
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Yazıcı Bağlantıları" msgstr "Yazıcı Bağlantıları"
msgid "Printer Select"
msgstr "Yazıcı Seçimi"
msgid "Printing" msgid "Printing"
msgstr "Yazdırılıyor" msgstr "Yazdırılıyor"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "Prob ofseti" msgstr "Prob ofseti"
msgid "Probe found applied offset"
msgstr "Prob uygulanmış ofset bulundu"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Profil ismi:" msgstr "Profil ismi:"
@@ -522,6 +537,9 @@ msgstr "Yumuşak Kurtar"
msgid "Reference" msgid "Reference"
msgstr "Referans" msgstr "Referans"
msgid "Refresh"
msgstr "Yenile"
msgid "Restart" msgid "Restart"
msgstr "Yeniden Başlat" msgstr "Yeniden Başlat"
@@ -540,10 +558,16 @@ msgstr "Geri Çekme Uzunluğu"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Geri Çekme Hızı" msgstr "Geri Çekme Hızı"
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Yeniden Dene #%s" msgstr "Yeniden Dene #%s"
msgid "Retrying"
msgstr "Yeniden Deneniyor"
msgid "Save" msgid "Save"
msgstr "Kaydet" msgstr "Kaydet"
@@ -591,6 +615,12 @@ msgstr "Ayarlar"
msgid "Show" msgid "Show"
msgstr "Göster" msgstr "Göster"
msgid "Show Heater Power"
msgstr "Isıtıcı Gücünü Göster"
msgid "Shutdown"
msgstr "Kapat"
msgid "Size" msgid "Size"
msgstr "Boyut" msgstr "Boyut"
@@ -606,9 +636,6 @@ msgstr "Dilimleyici:"
msgid "Small" msgid "Small"
msgstr "Küçük" msgstr "Küçük"
msgid "Sort by: "
msgstr "Sırala: "
msgid "Sort:" msgid "Sort:"
msgstr "Sırala:" msgstr "Sırala:"
@@ -642,19 +669,11 @@ msgstr "Güncelleme başlatılıyor"
msgid "System" msgid "System"
msgstr "Sistem" msgstr "Sistem"
msgid "" msgid "System Restart"
"System\n" msgstr "Sistem Yeniden Başlat"
"Restart"
msgstr ""
"Sistem\n"
"Yeniden Başlat"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Sistem Kapat"
"Shutdown"
msgstr ""
"Sistem\n"
"Kapat"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Sıcaklık (°C)" msgstr "Sıcaklık (°C)"
@@ -672,6 +691,9 @@ msgstr "Toplam:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Bilinmeyen Isıtıcı" msgstr "Bilinmeyen Isıtıcı"
msgid "Unknown screw position"
msgstr "Bilinmeyen vida konumu"
msgid "Unload" msgid "Unload"
msgstr "Boşalt" msgstr "Boşalt"
@@ -693,9 +715,6 @@ msgstr "Yükleniyor"
msgid "Uploaded" msgid "Uploaded"
msgstr "Yüklendi" msgstr "Yüklendi"
msgid "View Mesh"
msgstr "Örgüyü Görüntüle"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -760,6 +779,37 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "Sil"
#~ msgid "Home"
#~ msgstr "Ana Ekran"
#~ msgid "Off"
#~ msgstr "Kapa"
#~ msgid "View Mesh"
#~ msgstr "Örgüyü Görüntüle"
#~ msgid "Machine"
#~ msgstr "Makine"
#~ msgid "Sort by: "
#~ msgstr "Sırala: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch uygulanmış ofseti buldu"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "Daha fazla bilgi için /tmp/KlipperScreen.log'a bakın.\n"
#~ "Lütfen yardım için GitHub'da bir sorun gönderin."
#~ msgid "Probe found applied offset"
#~ msgstr "Prob uygulanmış ofset bulundu"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "Araç" #~ msgstr "Araç"
@@ -5,11 +5,11 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2022-06-02 14:53-0300\n" "Project-Id-Version: 2022-09-04 14:53-0300\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-06-03 10:02+0300\n" "PO-Revision-Date: 2022-09-16 21:40+0300\n"
"Last-Translator: \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"
@@ -17,8 +17,7 @@ msgstr ""
"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%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" "n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"X-Generator: Poedit 3.0.1\n" "X-Generator: Poedit 3.1\n"
"X-Poedit-SourceCharset: UTF-8\n"
#, python-format #, python-format
msgid "%s will be updated to version" msgid "%s will be updated to version"
@@ -46,13 +45,13 @@ msgid "Accept"
msgstr "Прийняти" msgstr "Прийняти"
msgid "Actions" msgid "Actions"
msgstr "Керування" msgstr "Дії"
msgid "Add Printer" msgid "Add Printer"
msgstr "Додати принтер" msgstr "Додати принтер"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "Додати сітку столу" msgstr "Додати профіль"
msgid "Apply" msgid "Apply"
msgstr "Застосувати" msgstr "Застосувати"
@@ -65,11 +64,14 @@ msgstr "Застосувати зміщення %.2f до кінцевика?"
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "Застосувати зміщення %s%.2f до зонда?" 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?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "Ви впевнені, що хочете запустити аварійну зупинку?" msgstr "Ви впевнені, що хочете зробити аварійну зупинку?"
msgid "Are you sure you wish to cancel this print?" msgid "Are you sure you wish to cancel this print?"
msgstr "Ви впевнені, що хочете скасувати цей друк?" msgstr "Ви впевнені, що хочете скасувати друк?"
msgid "Are you sure you wish to disable motors?" msgid "Are you sure you wish to disable motors?"
msgstr "Ви дійсно бажаєте вимкнути двигуни?" msgstr "Ви дійсно бажаєте вимкнути двигуни?"
@@ -86,6 +88,9 @@ msgstr "Автоматично"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "Автоматичне калібрування" msgstr "Автоматичне калібрування"
msgid "Auto-close notifications"
msgstr "Автоматичне закриття сповіщень"
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "Автоматична прокрутка" msgstr "Автоматична прокрутка"
@@ -95,8 +100,8 @@ msgstr "Вирівнювання столу"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "Сітка столу" msgstr "Сітка столу"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Зонд знайшов застосоване зміщення" msgstr "Конфігурація гвинтів ліжка:"
msgid "Calibrate" msgid "Calibrate"
msgstr "Калібрування" msgstr "Калібрування"
@@ -107,14 +112,17 @@ msgstr "Відкалібрований"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "Відкалібровано, збережіть конфігурацію, щоб зробити її постійною" msgstr "Відкалібровано, збережіть конфігурацію, щоб зробити її постійною"
msgid "Calibrating"
msgstr "Калібрування"
msgid "Calibrating..." msgid "Calibrating..."
msgstr "Калібрування..." msgstr "Калібрування..."
msgid "Can't set above the maximum:" msgid "Can't set above the maximum:"
msgstr "Не встановити вище макс.:" msgstr "Не можна встановити вище максимум:"
msgid "Cancel" msgid "Cancel"
msgstr "СКАСУВАТИ" msgstr "Скасувати"
msgid "Cancel Print" msgid "Cancel Print"
msgstr "Скасувати друк" msgstr "Скасувати друк"
@@ -131,16 +139,12 @@ msgstr "Не можливо підключитися до Moonraker"
msgid "Channel" msgid "Channel"
msgstr "Канал" msgstr "Канал"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"Перевірте /tmp/KlipperScreen.log для отримання додаткової інформації.\n"
"Будь ласка, надішліть проблему на GitHub, щоб отримати допомогу."
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "Перевірте підключення ADXL" msgstr "Перевірте підключення ADXL"
msgid "Checking for updates, please wait..."
msgstr "Перевірка оновлень, зачекайте..."
msgid "Clear" msgid "Clear"
msgstr "Очистити" msgstr "Очистити"
@@ -154,7 +158,7 @@ msgid "Configuration"
msgstr "Конфігурація" msgstr "Конфігурація"
msgid "Confirm Emergency Stop" msgid "Confirm Emergency Stop"
msgstr "Підтверджувати АВАРІЙНУ ЗУПИНКУ" msgstr "Підтвердьте АВАРІЙНУ ЗУПИНКУ"
msgid "Connected" msgid "Connected"
msgstr "Підключено" msgstr "Підключено"
@@ -178,11 +182,11 @@ msgstr "Дата"
msgid "Decrease" msgid "Decrease"
msgstr "Зменшити" msgstr "Зменшити"
msgid "Delete" msgid "Delete File?"
msgstr "Видалити" msgstr "Видалити файл?"
msgid "Deselect" msgid "Deselect"
msgstr "Відміна" msgstr "Скасувати вибір"
msgid "Disable Motors" msgid "Disable Motors"
msgstr "Вимкнути мотори" msgstr "Вимкнути мотори"
@@ -206,23 +210,28 @@ msgstr "Помилка"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "Метод розрахунку часу" msgstr "Метод розрахунку часу"
msgid "Exclude Object"
msgstr "Виключити об’єкт"
msgid "Extrude" msgid "Extrude"
msgstr "Видавити" msgstr ""
"Заміна\n"
"пластику"
msgid "Extrusion +" msgid "Extrusion +"
msgstr "Екструзія+" msgstr "Видавити +"
msgid "Extrusion -" msgid "Extrusion -"
msgstr "Екструзія -" msgstr "Втягнути -"
msgid "Failed, adjust position first" msgid "Failed, adjust position first"
msgstr "Помилка, спочатку хоумінг" msgstr "Не вдалося, спочатку відрегулюйте положення"
msgid "Fan" msgid "Fan"
msgstr "Вентилятор" msgstr "Вентилятор"
msgid "Filament Used" msgid "Filament Used"
msgstr "Філамент" msgstr "Використання Прутка"
msgid "Filament total:" msgid "Filament total:"
msgstr "Загальна кількість прутка:" msgstr "Загальна кількість прутка:"
@@ -243,17 +252,13 @@ msgid "Finding ADXL"
msgstr "Знаходження ADXL" msgstr "Знаходження ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "Підправити" msgstr "Точне налаштування"
msgid "Finish" msgid "Finish"
msgstr "Фініш" msgstr "Фініш"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Перезавантаження прошивки"
"Restart"
msgstr ""
"Перезапуск\n"
"Прошивки"
msgid "Flow:" msgid "Flow:"
msgstr "Потік:" msgstr "Потік:"
@@ -264,9 +269,7 @@ msgstr "Швидкість потоку:"
msgid "Font Size" msgid "Font Size"
msgstr "Розмір шрифту" msgstr "Розмір шрифту"
msgid "" msgid "Full Update"
"Full\n"
"Update"
msgstr "" msgstr ""
"Повне\n" "Повне\n"
"Оновлення" "Оновлення"
@@ -289,9 +292,6 @@ msgstr "Сховати датчик t°."
msgid "Hide temp." msgid "Hide temp."
msgstr "Приховати темп." msgstr "Приховати темп."
msgid "Home"
msgstr "Домашня сторінка"
msgid "Home All" msgid "Home All"
msgstr "Дім Всі" msgstr "Дім Всі"
@@ -310,8 +310,11 @@ msgstr "Дім Z"
msgid "Homing" msgid "Homing"
msgstr "До дому" msgstr "До дому"
msgid "Host"
msgstr "Хост"
msgid "Hostname" msgid "Hostname"
msgstr "Назва хоста" msgstr "Ім'я хоста"
msgid "Icon Theme" msgid "Icon Theme"
msgstr "Тема оформлення" msgstr "Тема оформлення"
@@ -326,7 +329,7 @@ msgid "Initializing printer..."
msgstr "Ініціалізація принтера..." msgstr "Ініціалізація принтера..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "Input Shaper"
msgid "Interface" msgid "Interface"
msgstr "Інтерфейс" msgstr "Інтерфейс"
@@ -343,15 +346,13 @@ msgstr "Інвертувати Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "Інвертувати Z" msgstr "Інвертувати Z"
msgid "" msgid "Klipper Restart"
"Klipper\n"
"Restart"
msgstr "" msgstr ""
"Перезапуск\n" "Перезапуск\n"
"Кліппера" "Klipper"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper відключився" msgstr "Klipper загубив зв'язок"
msgid "Klipper has encountered an error." msgid "Klipper has encountered an error."
msgstr "У Klipper сталася помилка." msgstr "У Klipper сталася помилка."
@@ -384,7 +385,7 @@ msgid "Load"
msgstr "Завантажити" msgstr "Завантажити"
msgid "Lower Nozzle" msgid "Lower Nozzle"
msgstr "Низ сопла" msgstr "Опустити сопло"
msgid "Macro shortcut on sidebar" msgid "Macro shortcut on sidebar"
msgstr "Ярлик макросу на бічній панелі" msgstr "Ярлик макросу на бічній панелі"
@@ -393,10 +394,10 @@ msgid "Macros"
msgstr "Макрос" msgstr "Макрос"
msgid "Main Menu" msgid "Main Menu"
msgstr "Main Menu" msgstr "Головне Меню"
msgid "Max" msgid "Max"
msgstr "" msgstr "Макс"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "Макс. прискорення" msgstr "Макс. прискорення"
@@ -422,6 +423,9 @@ msgstr "Середній"
msgid "Menu" msgid "Menu"
msgstr "Меню" msgstr "Меню"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Змінено" msgstr "Змінено"
@@ -429,7 +433,7 @@ msgid "Moonraker: connected"
msgstr "Підключено до Moonraker" msgstr "Підключено до Moonraker"
msgid "Move" msgid "Move"
msgstr "Рухатися" msgstr "Переміщення"
msgid "Move Distance (mm)" msgid "Move Distance (mm)"
msgstr "Переміщення (мм)" msgstr "Переміщення (мм)"
@@ -440,14 +444,21 @@ msgstr "Ім'я"
msgid "Network" msgid "Network"
msgstr "Сітка" msgstr "Сітка"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "Новий" msgstr "Новий"
msgid "Nothing selected" msgid ""
msgstr "Не вибрано" "Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
"Автоматичне визначення не підтримується, його потрібно налаштувати у "
"klipperscreen.conf"
msgid "Off" msgid "Nothing selected"
msgstr "Вимк" msgstr "Не обрано"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
@@ -459,14 +470,17 @@ msgstr "PSK для"
msgid "Package will be updated" msgid "Package will be updated"
msgid_plural "Packages will be updated" msgid_plural "Packages will be updated"
msgstr[0] "Пакет буде оновлено" msgstr[0] "Пакет буде оновлено"
msgstr[1] "Пакет оновлено" msgstr[1] "Пакети будуть оновлені"
msgstr[2] "Пакет оновлено" msgstr[2] "Пакети будуть оновлені"
msgid "Part Fan"
msgstr "Охолодження моделі"
msgid "Password saved" msgid "Password saved"
msgstr "Пароль збережено" msgstr "Пароль збережено"
msgid "Pause" msgid "Pause"
msgstr "ПАУЗА" msgstr "Пауза"
msgid "Paused" msgid "Paused"
msgstr "ПАУЗА" msgstr "ПАУЗА"
@@ -474,6 +488,11 @@ msgstr "ПАУЗА"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "Виконати повне оновлення?" msgstr "Виконати повне оновлення?"
msgid "Pins"
msgstr ""
"Керування\n"
"контактами"
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "Будь ласка, перекомпілюйте та перепрошійте мікроконтролер." msgstr "Будь ласка, перекомпілюйте та перепрошійте мікроконтролер."
@@ -495,18 +514,21 @@ msgstr "Контроль друку"
msgid "Print Time" msgid "Print Time"
msgstr "Час друку" msgstr "Час друку"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "Підключення принтера" msgstr "Підключення принтера"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "Друк" msgstr "Друк"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "Зміщення зонда" msgstr "Зміщення зонда"
msgid "Probe found applied offset"
msgstr "Зонд знайшов застосоване зміщення"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "Ім'я профілю:" msgstr "Ім'я профілю:"
@@ -525,6 +547,9 @@ msgstr "Відновити легко"
msgid "Reference" msgid "Reference"
msgstr "Довідка" msgstr "Довідка"
msgid "Refresh"
msgstr "Оновити"
msgid "Restart" msgid "Restart"
msgstr "Перезапуск" msgstr "Перезапуск"
@@ -535,7 +560,9 @@ msgid "Retract"
msgstr "Ретракт" msgstr "Ретракт"
msgid "Retraction" msgid "Retraction"
msgstr "Втягнення" msgstr ""
"Параметри\n"
"ретракту"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "Довжина втягування" msgstr "Довжина втягування"
@@ -543,10 +570,16 @@ msgstr "Довжина втягування"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "Швидкість втягування" msgstr "Швидкість втягування"
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "Повторіть #%s" msgstr "Повторіть #%s"
msgid "Retrying"
msgstr "Повторна спроба"
msgid "Save" msgid "Save"
msgstr "Зберегти" msgstr "Зберегти"
@@ -594,6 +627,12 @@ msgstr "Налаштування"
msgid "Show" msgid "Show"
msgstr "Показати" msgstr "Показати"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "Розмір" msgstr "Розмір"
@@ -609,9 +648,6 @@ msgstr "Слайсер:"
msgid "Small" msgid "Small"
msgstr "Малий" msgstr "Малий"
msgid "Sort by: "
msgstr "Сортувати за: "
msgid "Sort:" msgid "Sort:"
msgstr "Сортувати:" msgstr "Сортувати:"
@@ -628,7 +664,7 @@ msgid "Speed:"
msgstr "Швидкість:" msgstr "Швидкість:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "Квадратна кутова швидкість" msgstr "Квадратно кутова швидкість"
msgid "Start" msgid "Start"
msgstr "СТАРТ" msgstr "СТАРТ"
@@ -645,19 +681,11 @@ msgstr "Початок оновлення для"
msgid "System" msgid "System"
msgstr "Системна" msgstr "Системна"
msgid "" msgid "System Restart"
"System\n" msgstr "Перезавантаження системи"
"Restart"
msgstr ""
"Рестарт\n"
"Малини"
msgid "" msgid "System Shutdown"
"System\n" msgstr "Завершення роботи системи"
"Shutdown"
msgstr ""
"Вимкнути\n"
"Малину"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "Teмп (°C)" msgstr "Teмп (°C)"
@@ -675,6 +703,9 @@ msgstr "Всього:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "Невідомий нагрівач" msgstr "Невідомий нагрівач"
msgid "Unknown screw position"
msgstr "Невідоме положення гвинта"
msgid "Unload" msgid "Unload"
msgstr "Вийняти" msgstr "Вийняти"
@@ -696,9 +727,6 @@ msgstr "Оновлення"
msgid "Uploaded" msgid "Uploaded"
msgstr "Завантажено" msgstr "Завантажено"
msgid "View Mesh"
msgstr "Показати сітку"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -750,7 +778,7 @@ msgstr "dBm"
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "година" msgstr[0] "година"
msgstr[1] "години" msgstr[1] "годин"
msgstr[2] "години" msgstr[2] "години"
msgid "minutes" msgid "minutes"
@@ -765,5 +793,31 @@ msgstr "мм/с"
msgid "mm/s²" msgid "mm/s²"
msgstr "мм/с²" msgstr "мм/с²"
#~ msgid "Tool" #~ msgid "Delete"
#~ msgstr "Інструмент" #~ msgstr "Видалити"
#~ msgid "Home"
#~ msgstr "Домашня сторінка"
#~ msgid "Off"
#~ msgstr "Вимк"
#~ msgid "View Mesh"
#~ msgstr "Показати сітку"
#~ msgid "Machine"
#~ msgstr "Машина"
#~ msgid "Sort by: "
#~ msgstr "Сортувати за: "
#~ msgid "Auto Calibration"
#~ msgstr "Автоматичне калібрування"
#~ msgid "Manual Calibration"
#~ msgstr "Ручне калібрування"
#~ msgid "NOTE: Edit your printer.cfg to save manual calibration changes."
#~ msgstr ""
#~ "ПРИМІТКА. Відредагуйте файл printer.cfg, щоб зберегти зміни калібрування "
#~ "вручну."
@@ -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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 11:21-0300\n" "PO-Revision-Date: 2022-07-16 23:03+0800\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: zh_CN\n" "Language: zh_CN\n"
@@ -16,51 +16,54 @@ 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.0\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 "(默认)"
msgid "24 Hour Time" 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 "\"FIRMWARE_RESTART\" 可能会解决这个问题。"
msgid "ADXL Not Configured" msgid "ADXL Not Configured"
msgstr "" msgstr "未配置ADXL"
msgid "Abort" msgid "Abort"
msgstr "终止" msgstr "取消"
msgid "Acceleration:" msgid "Acceleration:"
msgstr "" msgstr "加速度:"
msgid "Accept" msgid "Accept"
msgstr "接受" msgstr "应用"
msgid "Actions" msgid "Actions"
msgstr "工具" msgstr "控制"
msgid "Add Printer" msgid "Add Printer"
msgstr "添加打印机" msgstr "添加打印机"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "添加热床网格" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr "应用"
#, python-format #, python-format
msgid "Apply %.2f offset to Endstop?" msgid "Apply %.2f offset to Endstop?"
msgstr "" msgstr "对Endstop应用%.2f的偏移量?"
#, python-format #, python-format
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "将%s%.2f的偏移量应用于探针?"
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?"
@@ -70,18 +73,21 @@ msgid "Are you sure you wish to cancel this print?"
msgstr "您确定要取消打印吗?" msgstr "您确定要取消打印吗?"
msgid "Are you sure you wish to disable motors?" msgid "Are you sure you wish to disable motors?"
msgstr "您确定要禁用电机吗?" msgstr "您确定要关闭电机吗?"
msgid "Are you sure you wish to reboot the system?" msgid "Are you sure you wish to reboot the system?"
msgstr "您确定要重启系统吗?" msgstr "您确定要重启系统吗?"
msgid "Are you sure you wish to shutdown the system?" msgid "Are you sure you wish to shutdown the system?"
msgstr "您确定要关闭系统吗?" msgstr "您确定要关闭系统吗?"
msgid "Auto" msgid "Auto"
msgstr "汽车" msgstr "自动"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "自动校准"
msgid "Auto-close notifications"
msgstr "" msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
@@ -93,21 +99,24 @@ msgstr "热床调平"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "热床网格" msgstr "热床网格"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch 发现应用的偏移量" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "校准" msgstr "校准"
msgid "Calibrated" msgid "Calibrated"
msgstr "" msgstr "已校准"
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "已校准,保存配置后生效" 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 "设置值超出最大值:"
@@ -124,23 +133,19 @@ msgid "Cancelling"
msgstr "正在取消" msgstr "正在取消"
msgid "Cannot connect to Moonraker" msgid "Cannot connect to Moonraker"
msgstr "无法连接到 Moonraker" msgstr "无法连接到Moonraker"
msgid "Channel" msgid "Channel"
msgstr "更新通道" msgstr "更新通道"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"检查/tmp/KlipperScreen.log以获取更多信息。\n"
"请在GitHub上提交问题以寻求帮助。"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "检查ADXL的接线"
msgid "Checking for updates, please wait..."
msgstr "" msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr "清楚"
msgid "Close" msgid "Close"
msgstr "关闭" msgstr "关闭"
@@ -149,7 +154,7 @@ msgid "Complete"
msgstr "完成" msgstr "完成"
msgid "Configuration" msgid "Configuration"
msgstr "配置" msgstr "设置"
msgid "Confirm Emergency Stop" msgid "Confirm Emergency Stop"
msgstr "确认紧急停止" msgstr "确认紧急停止"
@@ -168,35 +173,35 @@ msgid "Continue"
msgstr "继续" msgstr "继续"
msgid "Cooldown" msgid "Cooldown"
msgstr "降温" msgstr "冷却"
msgid "Date" msgid "Date"
msgstr "上传日期" msgstr "日期"
msgid "Decrease" msgid "Decrease"
msgstr "减少" msgstr "减少"
msgid "Delete" msgid "Delete File?"
msgstr "删除" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "取消选择" msgstr "取消选择"
msgid "Disable Motors" msgid "Disable Motors"
msgstr "禁用步进电机" msgstr "关闭电机"
msgid "Disable XY" msgid "Disable XY"
msgstr "关闭 XY 电机" msgstr "关闭 XY 轴电机"
msgid "Distance (mm)" msgid "Distance (mm)"
msgstr "挤出距离(mm)" 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 "已用时间:"
msgid "Error" msgid "Error"
msgstr "错误" msgstr "错误"
@@ -204,8 +209,11 @@ msgstr "错误"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "估算剩余时间方式" msgstr "估算剩余时间方式"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "挤出" msgstr "挤出机"
msgid "Extrusion +" msgid "Extrusion +"
msgstr "挤出流量 +" msgstr "挤出流量 +"
@@ -223,22 +231,22 @@ msgid "Filament Used"
msgstr "已用耗材" msgstr "已用耗材"
msgid "Filament total:" msgid "Filament total:"
msgstr "" msgstr "使用耗材总数:"
msgid "Filament used:" msgid "Filament used:"
msgstr "" msgstr "使用耗材:"
msgid "Filament:" msgid "Filament:"
msgstr "" msgstr "耗材:"
msgid "File" msgid "File"
msgstr "文件" msgstr "文件"
msgid "File:" msgid "File:"
msgstr "" msgstr "文件:"
msgid "Finding ADXL" msgid "Finding ADXL"
msgstr "" msgstr "寻找ADXL"
msgid "Fine Tuning" msgid "Fine Tuning"
msgstr "微调" msgstr "微调"
@@ -246,68 +254,60 @@ msgstr "微调"
msgid "Finish" msgid "Finish"
msgstr "结束" msgstr "结束"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "重启 Firmware"
"Restart"
msgstr ""
"重启\n"
"Firmware"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr "流量:"
msgid "Flowrate:" msgid "Flowrate:"
msgstr "" msgstr "流量:"
msgid "Font Size" msgid "Font Size"
msgstr "字体大小" msgstr "字体大小"
msgid "" msgid "Full Update"
"Full\n" msgstr "全部 更新"
"Update"
msgstr ""
"满的\n"
"更新"
msgid "Go Back" msgid "Go Back"
msgstr "返回" msgstr "返回"
msgid "Height:" msgid "Height:"
msgstr "" msgstr "高度:"
msgid "Hidden" msgid "Hidden"
msgstr "隐" msgstr "隐藏的"
msgid "Hide" msgid "Hide"
msgstr "隐藏" msgstr "隐藏"
msgid "Hide sensors in Temp." msgid "Hide sensors in Temp."
msgstr "在温度中隐藏传感器。" msgstr "隐藏温度传感器。"
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr "隐藏温度。"
msgid "Home"
msgstr "归零"
msgid "Home All" msgid "Home All"
msgstr "全部归零" msgstr "全部归零"
msgid "Home X" msgid "Home X"
msgstr "归零 X" msgstr "X轴归零"
msgid "Home XY" msgid "Home XY"
msgstr "归零 XY" msgstr "XY轴归零"
msgid "Home Y" msgid "Home Y"
msgstr "归零 Y" msgstr "Y轴归零"
msgid "Home Z" msgid "Home Z"
msgstr "归零 Z" msgstr "Z轴归零"
msgid "Homing" msgid "Homing"
msgstr "归零" msgstr "归零"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "主机名" msgstr "主机名"
@@ -318,13 +318,13 @@ msgid "Increase"
msgstr "增加" msgstr "增加"
msgid "Initializing" msgid "Initializing"
msgstr "初始化中" msgstr "初始化"
msgid "Initializing printer..." msgid "Initializing printer..."
msgstr "初始化打印机中..." msgstr "初始化打印机中..."
msgid "Input Shaper" msgid "Input Shaper"
msgstr "" msgstr "共振补偿"
msgid "Interface" msgid "Interface"
msgstr "接口" msgstr "接口"
@@ -333,20 +333,16 @@ msgid "Invalid"
msgstr "无效" msgstr "无效"
msgid "Invert X" msgid "Invert X"
msgstr "反转 X" msgstr "反转X轴"
msgid "Invert Y" msgid "Invert Y"
msgstr "反转 Y" msgstr "反转Y轴"
msgid "Invert Z" msgid "Invert Z"
msgstr "反转 Z" msgstr "反转Z轴"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "重启 Klipper"
"Restart"
msgstr ""
"重启\n"
"Klipper"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper 已断开连接" msgstr "Klipper 已断开连接"
@@ -358,19 +354,19 @@ msgid "Klipper has shutdown"
msgstr "Klipper 已关闭" msgstr "Klipper 已关闭"
msgid "Klipper is attempting to start" msgid "Klipper is attempting to start"
msgstr "Klipper 正在尝试启动" msgstr "Klipper正在启动"
msgid "Klipper will reboot" msgid "Klipper will reboot"
msgstr "并重新启动Klipper" msgstr "Klipper将重新启动"
msgid "Language" msgid "Language"
msgstr "界面语言" msgstr "语言"
msgid "Large" msgid "Large"
msgstr "大" msgstr "大"
msgid "Layer:" msgid "Layer:"
msgstr "" msgstr "层:"
msgid "Left:" msgid "Left:"
msgstr "剩余时间:" msgstr "剩余时间:"
@@ -394,16 +390,16 @@ msgid "Main Menu"
msgstr "主菜单" msgstr "主菜单"
msgid "Max" msgid "Max"
msgstr "" msgstr "最大"
msgid "Max Acceleration" msgid "Max Acceleration"
msgstr "" msgstr "最大加速度"
msgid "Max Acceleration to Deceleration" msgid "Max Acceleration to Deceleration"
msgstr "加速到减速度" msgstr "最大加速至减速"
msgid "Max Velocity" msgid "Max Velocity"
msgstr "速度" msgstr "最大速度"
msgid "Measure Both" msgid "Measure Both"
msgstr "" msgstr ""
@@ -420,8 +416,11 @@ msgstr "中"
msgid "Menu" msgid "Menu"
msgstr "菜单" msgstr "菜单"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "修改" msgstr "修改时间"
msgid "Moonraker: connected" msgid "Moonraker: connected"
msgstr "Moonraker:已连接" msgstr "Moonraker:已连接"
@@ -438,15 +437,20 @@ msgstr "文件名称"
msgid "Network" msgid "Network"
msgstr "网络" msgstr "网络"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "未选择任何内容" msgstr "未选择任何内容"
msgid "Off"
msgstr "关闭"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "已过时 %d" msgstr "已过时 %d"
@@ -458,6 +462,9 @@ msgid "Package will be updated"
msgid_plural "Packages will be updated" msgid_plural "Packages will be updated"
msgstr[0] "包将被更新" msgstr[0] "包将被更新"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "密码已保存" msgstr "密码已保存"
@@ -468,19 +475,22 @@ msgid "Paused"
msgstr "已暂停" msgstr "已暂停"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "执行全面升级?" msgstr "是否全部升级?"
msgid "Pins"
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 "电源"
msgid "Power On Printer" msgid "Power On Printer"
msgstr "启动打印机" msgstr "启动打印机"
msgid "Pressure Advance:" msgid "Pressure Advance:"
msgstr "" msgstr "压力推进:"
msgid "Print" msgid "Print"
msgstr "打印" msgstr "打印"
@@ -491,17 +501,20 @@ msgstr "打印控制"
msgid "Print Time" msgid "Print Time"
msgstr "打印用时" msgstr "打印用时"
msgid "Printer Connections" msgid "Printer"
msgstr "打印机列表"
msgid "Printing"
msgstr "印刷"
msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset" msgid "Printer Connections"
msgstr "Probe 发现应用的偏移量" msgstr "龙门架调平"
msgid "Printer Select"
msgstr ""
msgid "Printing"
msgstr "打印中"
msgid "Probe Offset"
msgstr "探头偏移"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "配置文件名称:" msgstr "配置文件名称:"
@@ -521,28 +534,37 @@ msgstr "重置(Soft)"
msgid "Reference" msgid "Reference"
msgstr "参考" msgstr "参考"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "重启Klipper" msgstr "重启Klipper"
msgid "Resume" msgid "Resume"
msgstr "恢复" msgstr "继续"
msgid "Retract" msgid "Retract"
msgstr "回抽" msgstr "退回"
msgid "Retraction" msgid "Retraction"
msgstr "" msgstr "回抽"
msgid "Retraction Length" msgid "Retraction Length"
msgstr "" msgstr "回抽长度"
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "回抽速度"
msgid "Retry"
msgstr "" msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "重试 #%s" msgstr "重试 #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "保存" msgstr "保存"
@@ -550,26 +572,26 @@ msgid "Save Config"
msgstr "保存配置" msgstr "保存配置"
msgid "Save Z" msgid "Save Z"
msgstr "" msgstr "保存Z轴"
msgid "Save configuration?" msgid "Save configuration?"
msgstr "" msgstr "是否保存设置?"
msgid "Saved" msgid "Saved"
msgstr "" msgstr "保存"
#, python-format #, python-format
msgid "Saved offset: %s" msgid "Saved offset: %s"
msgstr "" msgstr "保存偏移: %s"
msgid "Screen DPMS" msgid "Screen DPMS"
msgstr "屏幕DPMS" msgstr "屏幕DPMS"
msgid "Screen Power Off Time" msgid "Screen Power Off Time"
msgstr "关闭屏幕" msgstr "关闭屏幕时间"
msgid "Screws Adjust" msgid "Screws Adjust"
msgstr "平台螺丝调整" msgstr "调平"
msgid "Select" msgid "Select"
msgstr "选择" msgstr "选择"
@@ -579,7 +601,7 @@ msgstr "发送"
#, python-format #, python-format
msgid "Sending Power ON signal to: %s" msgid "Sending Power ON signal to: %s"
msgstr "正在发送通电信号到:%s" msgstr "打开: %s"
msgid "Set Temp" msgid "Set Temp"
msgstr "设定温度" msgstr "设定温度"
@@ -590,29 +612,32 @@ msgstr "设置"
msgid "Show" msgid "Show"
msgstr "显示" msgstr "显示"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "文件大小" msgstr "大小"
msgid "Slicer" 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 by: "
msgstr "排序: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr "排序:"
msgid "Speed (mm/s)" msgid "Speed (mm/s)"
msgstr "速度(mm/s)" msgstr "速度(mm/s)"
msgid "Speed +" msgid "Speed +"
msgstr "速度 +" msgstr "速度 +"
@@ -621,7 +646,7 @@ msgid "Speed -"
msgstr "速度 -" msgstr "速度 -"
msgid "Speed:" msgid "Speed:"
msgstr "" msgstr "速度:"
msgid "Square Corner Velocity" msgid "Square Corner Velocity"
msgstr "转角速度" msgstr "转角速度"
@@ -630,7 +655,7 @@ msgid "Start"
msgstr "开始" msgstr "开始"
msgid "Starting WiFi Association" msgid "Starting WiFi Association"
msgstr "启动 WiFi 关联" msgstr "启动wifi连接"
msgid "Starting recovery for" msgid "Starting recovery for"
msgstr "开始恢复" msgstr "开始恢复"
@@ -641,34 +666,33 @@ msgstr "开始更新"
msgid "System" msgid "System"
msgstr "系统" msgstr "系统"
msgid "" msgid "System Restart"
"System\n" msgstr "重启 系统"
"Restart"
msgstr "重启系统"
msgid "" msgid "System Shutdown"
"System\n" msgstr "关闭 系统"
"Shutdown"
msgstr "关闭系统"
msgid "Temp (°C)" msgid "Temp (°C)"
msgstr "温度 (°C)" msgstr "温度 (°C)"
msgid "Temperature" msgid "Temperature"
msgstr "设置温度" msgstr "温度控制"
#, python-format #, python-format
msgid "To apply %s KlipperScreen needs to be restarted" msgid "To apply %s KlipperScreen needs to be restarted"
msgstr "要应用 %s 主题,需要重新启动 KlipperScreen" msgstr "要应用%s请重新启动KlipperScreen"
msgid "Total:" msgid "Total:"
msgstr "全部的:" msgstr "总:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "未知加热器" msgstr "未知加热器"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "退出耗材" msgstr "卸载"
msgid "Unretract Extra Length" msgid "Unretract Extra Length"
msgstr "" msgstr ""
@@ -677,65 +701,62 @@ msgid "Unretract Speed"
msgstr "" msgstr ""
msgid "Up To Date" msgid "Up To Date"
msgstr "最新" msgstr "最新的"
msgid "Update" msgid "Update"
msgstr "更新" msgstr "更新"
msgid "Updating" msgid "Updating"
msgstr "" msgstr "更新中"
msgid "Uploaded" msgid "Uploaded"
msgstr "上传时间" msgstr "上传时间"
msgid "View Mesh"
msgstr "查看热床网格"
msgid "X+" msgid "X+"
msgstr "X+" msgstr ""
msgid "X-" msgid "X-"
msgstr "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 "" msgstr "XY轴速度(mm/s)"
msgid "Y+" msgid "Y+"
msgstr "Y+" msgstr ""
msgid "Y-" msgid "Y-"
msgstr "Y-" msgstr ""
msgid "Z Calibrate" msgid "Z Calibrate"
msgstr "Z 校准" msgstr "Z轴校准"
msgid "Z Move Speed (mm/s)" msgid "Z Move Speed (mm/s)"
msgstr "Z 移动速度 (mm/s)" msgstr "Z轴移动速度(mm/s)"
msgid "Z Speed (mm/s)" msgid "Z Speed (mm/s)"
msgstr "" msgstr "Z轴速度(mm/s)"
msgid "Z Tilt" msgid "Z Tilt"
msgstr "Z 倾斜校准" msgstr "Z 倾斜校准"
msgid "Z offset:" msgid "Z offset:"
msgstr "" msgstr "Z轴偏移:"
msgid "Z+" msgid "Z+"
msgstr "Z+" msgstr ""
msgid "Z-" msgid "Z-"
msgstr "Z-" msgstr ""
msgid "commit" msgid "commit"
msgid_plural "commits" msgid_plural "commits"
msgstr[0] "改变" msgstr[0] "更改"
msgid "dBm" msgid "dBm"
msgstr "dBm" msgstr ""
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
@@ -745,13 +766,41 @@ msgid "minutes"
msgstr "分钟" msgstr "分钟"
msgid "mm" msgid "mm"
msgstr "mm" msgstr ""
msgid "mm/s" msgid "mm/s"
msgstr "mm/s" msgstr ""
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr ""
#~ msgid "Delete"
#~ msgstr "删除"
#~ msgid "Home"
#~ msgstr "首页"
#~ msgid "Off"
#~ msgstr "关闭"
#~ msgid "View Mesh"
#~ msgstr "查看热床网格"
#~ msgid "Sort by: "
#~ msgstr "排序: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch 发现应用的偏移量"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "检查/tmp/KlipperScreen.log以获取更多信息。\n"
#~ "请在GitHub上提交问题以寻求帮助。"
#~ msgid "Probe found applied offset"
#~ msgstr "找到探头偏移"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "工具" #~ msgstr "工具"
@@ -768,9 +817,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6 地址" #~ msgstr "IPv6 地址"
#~ msgid "Unknown Heater "
#~ msgstr "未知加热器 "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "断开" #~ msgstr "断开"
@@ -792,13 +838,13 @@ msgstr "mm/s²"
#~ "Issue a FIRMWARE_RESTART to attempt fixing the issue." #~ "Issue a FIRMWARE_RESTART to attempt fixing the issue."
#~ msgstr "" #~ msgstr ""
#~ "Klipper 遇到错误。\n" #~ "Klipper 遇到错误。\n"
#~ "使用 重启Firmware 命令尝试解决此问题。" #~ "使用”FIRMWARE_RESTART“命令尝试解决此问题。"
#~ msgid "KlipperScreen Version" #~ msgid "KlipperScreen Version"
#~ msgstr "KlipperScreen 版本" #~ msgstr "KlipperScreen 版本"
#~ msgid "Show Only Heaters in Temp." #~ msgid "Show Only Heaters in Temp."
#~ msgstr "仅显示使用中的加热器" #~ msgstr "仅显示使用中的加热器."
#~ msgid "Target" #~ msgid "Target"
#~ msgstr "目标" #~ msgstr "目标"
@@ -837,7 +883,7 @@ msgstr "mm/s²"
#~ msgstr "?" #~ msgstr "?"
#~ msgid "Cancel Change" #~ msgid "Cancel Change"
#~ msgstr "取消改动" #~ msgstr "取消更改"
#~ msgid "Control" #~ msgid "Control"
#~ msgstr "控制" #~ msgstr "控制"
@@ -849,4 +895,4 @@ msgstr "mm/s²"
#~ msgstr "网络信息" #~ msgstr "网络信息"
#~ msgid "Screen Blanking Time" #~ msgid "Screen Blanking Time"
#~ msgstr "关闭屏幕" #~ msgstr "关闭屏幕时间"
@@ -7,7 +7,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-07-02 13:43-0300\n" "POT-Creation-Date: 2022-11-12 11:20-0300\n"
"PO-Revision-Date: 2022-03-31 11:25-0300\n" "PO-Revision-Date: 2022-03-31 11:25-0300\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@@ -49,8 +49,8 @@ msgstr "動作"
msgid "Add Printer" msgid "Add Printer"
msgstr "新增列印機" msgstr "新增列印機"
msgid "Add bed mesh profile" msgid "Add profile"
msgstr "新增網床輪廓" msgstr ""
msgid "Apply" msgid "Apply"
msgstr "" msgstr ""
@@ -63,6 +63,9 @@ msgstr ""
msgid "Apply %s%.2f offset to Probe?" msgid "Apply %s%.2f offset to Probe?"
msgstr "" msgstr ""
msgid "Are you sure do you want to exclude the object?"
msgstr ""
msgid "Are you sure you want to run Emergency Stop?" msgid "Are you sure you want to run Emergency Stop?"
msgstr "您確定要運行緊急停止嗎?" msgstr "您確定要運行緊急停止嗎?"
@@ -84,6 +87,9 @@ msgstr "汽車"
msgid "Auto-calibrate" msgid "Auto-calibrate"
msgstr "" msgstr ""
msgid "Auto-close notifications"
msgstr ""
msgid "Auto-scroll" msgid "Auto-scroll"
msgstr "自動滾屏" msgstr "自動滾屏"
@@ -93,8 +99,8 @@ msgstr "熱床調平"
msgid "Bed Mesh" msgid "Bed Mesh"
msgstr "網格床" msgstr "網格床"
msgid "Bltouch found applied offset" msgid "Bed screw configuration:"
msgstr "Bltouch 發現應用的偏移量" msgstr ""
msgid "Calibrate" msgid "Calibrate"
msgstr "校正" msgstr "校正"
@@ -105,6 +111,9 @@ msgstr ""
msgid "Calibrated, save configuration to make it permanent" msgid "Calibrated, save configuration to make it permanent"
msgstr "校準,保存配置以使其永久化" msgstr "校準,保存配置以使其永久化"
msgid "Calibrating"
msgstr ""
msgid "Calibrating..." msgid "Calibrating..."
msgstr "" msgstr ""
@@ -129,16 +138,12 @@ msgstr "無法連接到 Moonraker"
msgid "Channel" msgid "Channel"
msgstr "通道" msgstr "通道"
msgid ""
"Check /tmp/KlipperScreen.log for more information.\n"
"Please submit an issue on GitHub for help."
msgstr ""
"檢查/tmp/KlipperScreen.log 日誌檔以了解更多訊息。\n"
"請在GitHub上提交問題以尋求幫助。"
msgid "Check ADXL Wiring" msgid "Check ADXL Wiring"
msgstr "" msgstr ""
msgid "Checking for updates, please wait..."
msgstr ""
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@@ -176,8 +181,8 @@ msgstr "日期"
msgid "Decrease" msgid "Decrease"
msgstr "減少" msgstr "減少"
msgid "Delete" msgid "Delete File?"
msgstr "刪除" msgstr ""
msgid "Deselect" msgid "Deselect"
msgstr "取消選擇" msgstr "取消選擇"
@@ -204,6 +209,9 @@ msgstr "錯誤"
msgid "Estimated Time Method" msgid "Estimated Time Method"
msgstr "預估時間方法" msgstr "預估時間方法"
msgid "Exclude Object"
msgstr ""
msgid "Extrude" msgid "Extrude"
msgstr "擠出機" msgstr "擠出機"
@@ -246,12 +254,8 @@ msgstr "微調"
msgid "Finish" msgid "Finish"
msgstr "完成" msgstr "完成"
msgid "" msgid "Firmware Restart"
"Firmware\n" msgstr "Firmware 重新啟動"
"Restart"
msgstr ""
"Firmware\n"
"重新啟動"
msgid "Flow:" msgid "Flow:"
msgstr "" msgstr ""
@@ -262,12 +266,8 @@ msgstr ""
msgid "Font Size" msgid "Font Size"
msgstr "字體大小" msgstr "字體大小"
msgid "" msgid "Full Update"
"Full\n" msgstr "滿的 更新"
"Update"
msgstr ""
"滿的\n"
"更新"
msgid "Go Back" msgid "Go Back"
msgstr "返回" msgstr "返回"
@@ -287,9 +287,6 @@ msgstr "在溫度中隱藏傳感器。"
msgid "Hide temp." msgid "Hide temp."
msgstr "" msgstr ""
msgid "Home"
msgstr "首頁"
msgid "Home All" msgid "Home All"
msgstr "歸零全部" msgstr "歸零全部"
@@ -308,6 +305,9 @@ msgstr "歸零 Z"
msgid "Homing" msgid "Homing"
msgstr "歸零" msgstr "歸零"
msgid "Host"
msgstr ""
msgid "Hostname" msgid "Hostname"
msgstr "主機名稱" msgstr "主機名稱"
@@ -341,12 +341,8 @@ msgstr "反轉 Y"
msgid "Invert Z" msgid "Invert Z"
msgstr "反轉 Z" msgstr "反轉 Z"
msgid "" msgid "Klipper Restart"
"Klipper\n" msgstr "Klipper 重新啟動"
"Restart"
msgstr ""
"Klipper\n"
"重新啟動"
msgid "Klipper has disconnected" msgid "Klipper has disconnected"
msgstr "Klipper 已斷開連結" msgstr "Klipper 已斷開連結"
@@ -420,6 +416,9 @@ msgstr "中"
msgid "Menu" msgid "Menu"
msgstr "選單" msgstr "選單"
msgid "Mesh calibrate"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "修改" msgstr "修改"
@@ -438,15 +437,20 @@ msgstr "名稱"
msgid "Network" msgid "Network"
msgstr "網路" msgstr "網路"
msgid "Never"
msgstr ""
msgid "New" msgid "New"
msgstr "" msgstr ""
msgid ""
"Not supported for auto-detection, it needs to be configured in klipperscreen."
"conf"
msgstr ""
msgid "Nothing selected" msgid "Nothing selected"
msgstr "未選擇任何內容" msgstr "未選擇任何內容"
msgid "Off"
msgstr "關閉"
#, python-format #, python-format
msgid "Outdated by %d" msgid "Outdated by %d"
msgstr "已過時 %d" msgstr "已過時 %d"
@@ -458,6 +462,9 @@ msgid "Package will be updated"
msgid_plural "Packages will be updated" msgid_plural "Packages will be updated"
msgstr[0] "包將被更新" msgstr[0] "包將被更新"
msgid "Part Fan"
msgstr ""
msgid "Password saved" msgid "Password saved"
msgstr "密碼已保存" msgstr "密碼已保存"
@@ -470,6 +477,9 @@ msgstr "已暫停"
msgid "Perform a full upgrade?" msgid "Perform a full upgrade?"
msgstr "執行全面升級?" msgstr "執行全面升級?"
msgid "Pins"
msgstr ""
msgid "Please recompile and flash the micro-controller." msgid "Please recompile and flash the micro-controller."
msgstr "請重新編譯並刷寫微控制器。" msgstr "請重新編譯並刷寫微控制器。"
@@ -491,18 +501,21 @@ msgstr "列印控制"
msgid "Print Time" msgid "Print Time"
msgstr "列印時間" msgstr "列印時間"
msgid "Printer"
msgstr ""
msgid "Printer Connections" msgid "Printer Connections"
msgstr "連接列印機" msgstr "連接列印機"
msgid "Printer Select"
msgstr ""
msgid "Printing" msgid "Printing"
msgstr "列印中" msgstr "列印中"
msgid "Probe Offset" msgid "Probe Offset"
msgstr "" msgstr ""
msgid "Probe found applied offset"
msgstr "Probe 發現應用的偏移量"
msgid "Profile Name:" msgid "Profile Name:"
msgstr "配置檔案名稱:" msgstr "配置檔案名稱:"
@@ -521,6 +534,9 @@ msgstr "恢復 Soft"
msgid "Reference" msgid "Reference"
msgstr "參考" msgstr "參考"
msgid "Refresh"
msgstr ""
msgid "Restart" msgid "Restart"
msgstr "重新啟動" msgstr "重新啟動"
@@ -539,10 +555,16 @@ msgstr ""
msgid "Retraction Speed" msgid "Retraction Speed"
msgstr "" msgstr ""
msgid "Retry"
msgstr ""
#, python-format #, python-format
msgid "Retry #%s" msgid "Retry #%s"
msgstr "重試 #%s" msgstr "重試 #%s"
msgid "Retrying"
msgstr ""
msgid "Save" msgid "Save"
msgstr "儲存" msgstr "儲存"
@@ -590,6 +612,12 @@ msgstr "設定"
msgid "Show" msgid "Show"
msgstr "展示" msgstr "展示"
msgid "Show Heater Power"
msgstr ""
msgid "Shutdown"
msgstr ""
msgid "Size" msgid "Size"
msgstr "大小" msgstr "大小"
@@ -605,9 +633,6 @@ msgstr ""
msgid "Small" msgid "Small"
msgstr "小的" msgstr "小的"
msgid "Sort by: "
msgstr "排序: "
msgid "Sort:" msgid "Sort:"
msgstr "" msgstr ""
@@ -641,14 +666,10 @@ msgstr "開始更新"
msgid "System" msgid "System"
msgstr "系統" msgstr "系統"
msgid "" msgid "System Restart"
"System\n"
"Restart"
msgstr "系統重新啟動" msgstr "系統重新啟動"
msgid "" msgid "System Shutdown"
"System\n"
"Shutdown"
msgstr "關閉系統" msgstr "關閉系統"
msgid "Temp (°C)" msgid "Temp (°C)"
@@ -667,6 +688,9 @@ msgstr "全部的:"
msgid "Unknown Heater" msgid "Unknown Heater"
msgstr "未知加熱器" msgstr "未知加熱器"
msgid "Unknown screw position"
msgstr ""
msgid "Unload" msgid "Unload"
msgstr "卸載" msgstr "卸載"
@@ -688,9 +712,6 @@ msgstr "更新"
msgid "Uploaded" msgid "Uploaded"
msgstr "上傳時間" msgstr "上傳時間"
msgid "View Mesh"
msgstr "檢視網格"
msgid "X+" msgid "X+"
msgstr "X+" msgstr "X+"
@@ -753,6 +774,34 @@ msgstr "mm/s"
msgid "mm/s²" msgid "mm/s²"
msgstr "mm/s²" msgstr "mm/s²"
#~ msgid "Delete"
#~ msgstr "刪除"
#~ msgid "Home"
#~ msgstr "首頁"
#~ msgid "Off"
#~ msgstr "關閉"
#~ msgid "View Mesh"
#~ msgstr "檢視網格"
#~ msgid "Sort by: "
#~ msgstr "排序: "
#~ msgid "Bltouch found applied offset"
#~ msgstr "Bltouch 發現應用的偏移量"
#~ msgid ""
#~ "Check /tmp/KlipperScreen.log for more information.\n"
#~ "Please submit an issue on GitHub for help."
#~ msgstr ""
#~ "檢查/tmp/KlipperScreen.log 日誌檔以了解更多訊息。\n"
#~ "請在GitHub上提交問題以尋求幫助。"
#~ msgid "Probe found applied offset"
#~ msgstr "Probe 發現應用的偏移量"
#~ msgid "Tool" #~ msgid "Tool"
#~ msgstr "工具" #~ msgstr "工具"
@@ -768,9 +817,6 @@ msgstr "mm/s²"
#~ msgid "IPv6" #~ msgid "IPv6"
#~ msgstr "IPv6" #~ msgstr "IPv6"
#~ msgid "Unknown Heater "
#~ msgstr "未知加熱器 "
#~ msgid "Disconnect" #~ msgid "Disconnect"
#~ msgstr "斷開" #~ msgstr "斷開"
+107 -194
View File
@@ -6,66 +6,53 @@ from gi.repository import Gdk, GLib
class Printer: class Printer:
data = {} def __init__(self, state_cb):
devices = {} self.config = None
power_devices = {} self.data = None
state_callbacks = {
"disconnected": None,
"error": None,
"paused": None,
"printing": None,
"ready": None,
"startup": None,
"shutdown": None
}
tools = []
extrudercount = 0
tempdevcount = 0
fancount = 0
def __init__(self, printer_info, data, state_execute_cb):
self.state = "disconnected" self.state = "disconnected"
self.state_cb = state_execute_cb self.state_cb = state_cb
self.state_callbacks = None
self.devices = {}
self.power_devices = {} self.power_devices = {}
self.store_timeout = False self.tools = []
self.extrudercount = 0
self.tempdevcount = 0
self.fancount = 0
self.output_pin_count = 0
self.store_timeout = None
self.tempstore = {}
def reset(self): def reset(self):
self.config = None
self.data = None
self.state = None self.state = None
self.state_cb = None self.state_cb = None
self.data = None self.state_callbacks = None
self.devices = None self.devices = None
self.power_devices = None self.power_devices = None
self.state_callbacks = None
self.tools = None self.tools = None
self.extrudercount = None self.extrudercount = None
self.tempdevcount = None self.tempdevcount = None
self.fancount = None self.fancount = None
GLib.source_remove(self.store_timeout) self.output_pin_count = None
self.store_timeout = None self.store_timeout = None
self.config = None
self.klipper = None
self.tempstore = None self.tempstore = None
def reinit(self, printer_info, data): def reinit(self, printer_info, data):
logging.debug("Moonraker object status: %s" % data)
self.config = data['configfile']['config'] self.config = data['configfile']['config']
self.data = data
self.devices = {}
self.tools = []
self.extrudercount = 0 self.extrudercount = 0
self.tempdevcount = 0 self.tempdevcount = 0
self.fancount = 0 self.fancount = 0
self.tools = [] self.output_pin_count = 0
self.devices = {}
self.data = data
self.klipper = {}
self.tempstore = {} self.tempstore = {}
if self.store_timeout is False: 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.klipper = {
"version": printer_info['software_version']
}
for x in self.config.keys(): for x in self.config.keys():
if x[0:8] == "extruder": if x[:8] == "extruder":
self.tools.append(x) self.tools.append(x)
self.tools = sorted(self.tools) self.tools = sorted(self.tools)
self.extrudercount += 1 self.extrudercount += 1
@@ -75,48 +62,37 @@ class Printer:
"temperature": 0, "temperature": 0,
"target": 0 "target": 0
} }
if x == 'heater_bed' or x.startswith('heater_generic ') or x.startswith('temperature_sensor ') \ if x == 'heater_bed' \
or x.startswith('heater_generic ') \
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,
"target": 0 "target": 0
} }
self.tempdevcount += 1 # Support for hiding devices by name
if x == 'fan' or x.startswith('controller_fan ') or x.startswith('heater_fan ') \ name = x.split()[1] if len(x.split()) > 1 else x
if not name.startswith("_"):
self.tempdevcount += 1
if x == 'fan' \
or x.startswith('controller_fan ') \
or x.startswith('heater_fan ') \
or x.startswith('fan_generic '): or x.startswith('fan_generic '):
self.fancount += 1 # Support for hiding devices by name
if x.startswith('bed_mesh '): name = x.split()[1] if len(x.split()) > 1 else x
r = self.config[x] if not name.startswith("_"):
r['x_count'] = int(r['x_count']) self.fancount += 1
r['y_count'] = int(r['y_count']) if x.startswith('output_pin ') and not x.split()[1].startswith("_"):
r['max_x'] = float(r['max_x']) self.output_pin_count += 1
r['min_x'] = float(r['min_x'])
r['max_y'] = float(r['max_y'])
r['min_y'] = float(r['min_y'])
r['points'] = [[float(j.strip()) for j in i.split(",")] for i in r['points'].strip().split("\n")]
self.process_update(data) self.process_update(data)
logging.info("Klipper version: %s", self.klipper['version']) logging.info(f"Klipper version: {printer_info['software_version']}")
logging.info("# Extruders: %s", str(self.extrudercount)) logging.info(f"# Extruders: {self.extrudercount}")
logging.info("# Temperature devices: %s", str(self.tempdevcount)) logging.info(f"# Temperature devices: {self.tempdevcount}")
logging.info("# Fans: %s", str(self.fancount)) logging.info(f"# Fans: {self.fancount}")
logging.info(f"# Output pins: {self.output_pin_count}")
def process_update(self, data): def process_update(self, data):
keys = [
'bed_mesh',
'display_status',
'fan',
'gcode_move',
'idle_timeout',
'pause_resume',
'print_stats',
'toolhead',
'virtual_sdcard',
'webhooks',
'fimware_retraction',
'motion_report'
]
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]:
@@ -129,93 +105,70 @@ 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 "idle_timeout" in data or "print_stats" in data or "pause_resume" in data: if "webhooks" in data or "print_stats" in data:
self.evaluate_state() self.process_status_update()
def get_updates(self):
updates = self.data.copy()
updates.update(self.devices)
return updates
def evaluate_state(self): def evaluate_state(self):
wh_state = self.data['webhooks']['state'].lower() # possible values: startup, ready, shutdown, error # webhooks states: startup, ready, shutdown, error
# print_stats: standby, printing, paused, error, complete
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'):
return "paused"
if self.data['print_stats']['state'] == 'printing':
return "printing"
return self.data['webhooks']['state']
if wh_state == "ready": def process_status_update(self):
new_state = "ready" state = self.evaluate_state()
if self.data['pause_resume']['is_paused']: if state != self.state:
new_state = "paused" self.change_state(state)
elif self.data['print_stats']:
print_state = self.data['print_stats']['state'].lower() # complete, error, paused, printing, standby
if print_state == "paused":
new_state = "paused"
if self.data['idle_timeout']:
idle_state = self.data['idle_timeout']['state'].lower() # idle, printing, ready
if idle_state == "printing":
if print_state == "complete":
new_state = "ready"
elif print_state != "printing": # Not printing a file, toolhead moving
new_state = "busy"
else:
new_state = "printing"
if new_state != "busy":
self.change_state(new_state)
else:
self.change_state(wh_state)
def process_power_update(self, data): def process_power_update(self, data):
if data['device'] in self.power_devices: if data['device'] in self.power_devices:
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 == self.state or state not in list(self.state_callbacks): if state not in list(self.state_callbacks): # disconnected, startup, ready, shutdown, error, paused, printing
return return
if state != self.state:
logging.debug("Changing state from '%s' to '%s'" % (self.state, state)) logging.debug(f"Changing state from '{self.state}' to '{state}'")
prev_state = self.state self.state = state
self.state = state
if self.state_callbacks[state] is not None: if self.state_callbacks[state] is not None:
logging.debug("Adding callback for state: %s" % state) logging.debug(f"Adding callback for state: {state}")
Gdk.threads_add_idle( GLib.idle_add(self.state_cb, self.state_callbacks[state])
GLib.PRIORITY_HIGH_IDLE,
self.state_cb,
self.state_callbacks[state],
prev_state
)
def configure_power_devices(self, data): def configure_power_devices(self, data):
self.power_devices = {} self.power_devices = {}
logging.debug("Processing power devices: %s" % data) logging.debug(f"Processing power devices: {data}")
for x in data['devices']: for x in data['devices']:
self.power_devices[x['device']] = { self.power_devices[x['device']] = {
"status": "on" if x['status'] == "on" else "off" "status": "on" if x['status'] == "on" else "off"
} }
logging.debug("Power devices: %s" % self.power_devices) logging.debug(f"Power devices: {self.power_devices}")
def get_config_section_list(self, search=""): def get_config_section_list(self, search=""):
if not hasattr(self, "config"): if self.config is not None:
return [] return [i for i in list(self.config) if i.startswith(search)] if hasattr(self, "config") else []
return [i for i in list(self.config) if i.startswith(search)] return []
def get_config_section(self, section): def get_config_section(self, section):
if section in self.config: return self.config[section] if section in self.config else False
return self.config[section]
return False
def get_data(self):
return self.data
def get_fans(self): def get_fans(self):
fans = [] fans = []
if self.config_section_exists("fan"): if self.config_section_exists("fan"):
fans.append("fan") fans.append("fan")
fan_types = ["controller_fan", "fan_generic", "heater_fan"] fan_types = ["controller_fan", "fan_generic", "heater_fan"]
for type in fan_types: for fan_type in fan_types:
for f in self.get_config_section_list("%s " % type): fans.extend(iter(self.get_config_section_list(f"{fan_type} ")))
fans.append(f)
return fans return fans
def get_output_pins(self):
output_pins = []
output_pins.extend(iter(self.get_config_section_list("output_pin ")))
return output_pins
def get_gcode_macros(self): def get_gcode_macros(self):
return self.get_config_section_list("gcode_macro ") return self.get_config_section_list("gcode_macro ")
@@ -223,48 +176,27 @@ class Printer:
heaters = [] heaters = []
if self.has_heated_bed(): if self.has_heated_bed():
heaters.append("heater_bed") heaters.append("heater_bed")
for h in self.get_config_section_list("heater_generic "): heaters.extend(iter(self.get_config_section_list("heater_generic ")))
heaters.append(h) heaters.extend(iter(self.get_config_section_list("temperature_sensor ")))
for h in self.get_config_section_list("temperature_sensor "): heaters.extend(iter(self.get_config_section_list("temperature_fan ")))
heaters.append(h)
for h in self.get_config_section_list("temperature_fan "):
heaters.append(h)
return heaters return heaters
def get_filament_sensors(self): def get_filament_sensors(self):
sensors = [] sensors = list(self.get_config_section_list("filament_switch_sensor "))
for s in self.get_config_section_list("filament_switch_sensor "): sensors.extend(iter(self.get_config_section_list("filament_motion_sensor ")))
sensors.append(s)
for s in self.get_config_section_list("filament_motion_sensor "):
sensors.append(s)
return sensors return sensors
def get_printer_status_data(self): def get_printer_status_data(self):
data = { data = {
"printer": { "printer": {
"extruders": { "extruders": {"count": self.extrudercount},
"count": self.extrudercount "temperature_devices": {"count": self.tempdevcount},
}, "fans": {"count": self.fancount},
"temperature_devices": { "output_pins": {"count": self.output_pin_count},
"count": self.tempdevcount "gcode_macros": {"count": len(self.get_gcode_macros())},
},
"fans": {
"count": self.fancount
},
"bltouch": self.config_section_exists("bltouch"),
"gcode_macros": {
"count": len(self.get_gcode_macros())
},
"idle_timeout": self.get_stat("idle_timeout").copy(), "idle_timeout": self.get_stat("idle_timeout").copy(),
"pause_resume": { "pause_resume": {"is_paused": self.state == "paused"},
"is_paused": True if self.state == "paused" else False "power_devices": {"count": len(self.get_power_devices())},
},
"power_devices": {
"count": len(self.get_power_devices())
},
"probe": self.config_section_exists("probe"),
"firmware_retraction": self.config_section_exists("firmware_retraction"),
"input_shaper": self.config_section_exists("input_shaper")
} }
} }
@@ -273,10 +205,11 @@ class Printer:
if self.config_section_exists(section): if self.config_section_exists(section):
data["printer"][section] = self.get_config_section(section).copy() data["printer"][section] = self.get_config_section(section).copy()
return data sections = ["firmware_retraction", "input_shaper", "bed_screws", "screws_tilt_adjust"]
for section in sections:
data["printer"][section] = self.config_section_exists(section)
def get_klipper_version(self): return data
return self.klipper['version']
def get_power_devices(self): def get_power_devices(self):
return list(self.power_devices) return list(self.power_devices)
@@ -287,28 +220,12 @@ class Printer:
return self.power_devices[device]['status'] return self.power_devices[device]['status']
def get_stat(self, stat, substat=None): def get_stat(self, stat, substat=None):
if stat not in self.data: if self.data is None or stat not in self.data:
return {} return {}
if substat is not None: if substat is not None:
if substat in self.data[stat]: return self.data[stat][substat] if substat in self.data[stat] else {}
return self.data[stat][substat]
return {}
return self.data[stat] return self.data[stat]
def get_state(self):
return self.state
def set_dev_temps(self, dev, temp, target=None):
if dev in self.devices:
self.devices[dev]['temperature'] = temp
if target is not None:
self.devices[dev]['target'] = target
def get_dev_stats(self, dev):
if dev in self.devices:
return self.devices[dev]
return None
def get_dev_stat(self, dev, stat): def get_dev_stat(self, dev, stat):
if dev in self.devices and stat in self.devices[dev]: if dev in self.devices and stat in self.devices[dev]:
return self.devices[dev][stat] return self.devices[dev][stat]
@@ -316,7 +233,7 @@ class Printer:
def get_fan_speed(self, fan="fan", speed=None): def get_fan_speed(self, fan="fan", speed=None):
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("Error getting %s config", fan) logging.debug(f"Error getting {fan} config")
return speed if speed is not None else 0 return speed if speed is not None else 0
if speed is None and "speed" in self.data[fan]: if speed is None and "speed" in self.data[fan]:
speed = self.data[fan]["speed"] speed = self.data[fan]["speed"]
@@ -330,18 +247,19 @@ class Printer:
speed = 0 speed = 0
return speed return speed
def get_extruder_count(self): def get_pin_value(self, pin):
return self.extrudercount if pin in self.data:
return self.data[pin]["value"]
elif pin in self.config and 'value' in self.config[pin]:
return self.config[pin]["value"]
return 0
def get_temp_store_devices(self): def get_temp_store_devices(self):
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 get_temp_store_device_has_target(self, device):
if device in self.tempstore: return device in self.tempstore and "targets" in self.tempstore[device]
if "targets" in self.tempstore[device]:
return True
return False
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:
@@ -378,17 +296,10 @@ class Printer:
self.tempstore[dev]["targets"] = result[dev]["targets"] self.tempstore[dev]["targets"] = result[dev]["targets"]
if "temperatures" in result[dev]: if "temperatures" in result[dev]:
self.tempstore[dev]["temperatures"] = result[dev]["temperatures"] self.tempstore[dev]["temperatures"] = result[dev]["temperatures"]
logging.info("Temp store: %s" % list(self.tempstore)) logging.info(f"Temp store: {list(self.tempstore)}")
def config_section_exists(self, section): def config_section_exists(self, section):
if section in self.get_config_section_list(): return section in self.get_config_section_list()
return True
return False
def set_callbacks(self, callbacks):
for name, cb in callbacks.items():
if name in list(self.state_callbacks):
self.state_callbacks[name] = cb
def set_dev_stat(self, dev, stat, value): def set_dev_stat(self, dev, stat, value):
if dev not in self.devices: if dev not in self.devices:
@@ -397,6 +308,8 @@ class Printer:
self.devices[dev][stat] = value self.devices[dev][stat] = value
def _update_temp_store(self): def _update_temp_store(self):
if self.tempstore is None:
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: if len(self.tempstore[device][x]) >= 1200:
+67 -60
View File
@@ -4,16 +4,14 @@ import logging
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
from ks_includes.KlippyGcodes import KlippyGcodes
class ScreenPanel: class ScreenPanel:
def __init__(self, screen, title, back=True, action_bar=True, printer_name=True): def __init__(self, screen, title, back=True):
self.menu = None
self._screen = screen self._screen = screen
self._config = screen._config self._config = screen._config
self._files = screen.files self._files = screen.files
self.lang = self._screen.lang
self._printer = screen.printer self._printer = screen.printer
self.labels = {} self.labels = {}
self._gtk = screen.gtk self._gtk = screen.gtk
@@ -21,6 +19,7 @@ class ScreenPanel:
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 = Gtk.Layout()
self.layout.set_size(self._screen.width, self._screen.height) self.layout.set_size(self._screen.width, self._screen.height)
@@ -30,41 +29,26 @@ class ScreenPanel:
self.content.set_hexpand(True) self.content.set_hexpand(True)
self.content.set_vexpand(True) self.content.set_vexpand(True)
def initialize(self, panel_name): self._show_heater_power = self._config.get_main_config().getboolean('show_heater_power', False)
# Create gtk items here
return
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'):
self._screen._confirm_send_action(widget, _("Are you sure you want to run Emergency Stop?"), self._screen._confirm_send_action(widget, _("Are you sure you want to run Emergency Stop?"),
"printer.emergency_stop") "printer.emergency_stop")
else: else:
self._screen._ws.klippy.emergency_stop() self._screen._ws.klippy.emergency_stop()
def format_target(self, temp):
if temp <= 0:
return ""
else:
return "(%s)" % str(int(temp))
def format_temp(self, temp, places=1):
if places == 0:
n = int(temp)
else:
n = round(temp, places)
return "%s<small>°C</small>" % str(n)
def get(self): def get(self):
return self.layout return self.layout
def get_content(self): def get_content(self):
return self.content return self.content
def get_file_image(self, filename, width=1, height=1, small=False): def get_file_image(self, filename, width=None, height=None, small=False):
if not self._files.has_thumbnail(filename): 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
@@ -77,26 +61,8 @@ class ScreenPanel:
def get_title(self): def get_title(self):
return self.title return self.title
def home(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
def homexy(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME_XY)
def z_tilt(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.Z_TILT)
def quad_gantry_level(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.QUAD_GANTRY_LEVEL)
def menu_item_clicked(self, widget, panel, item): def menu_item_clicked(self, widget, panel, item):
print("### Creating panel " + item['panel'] + " : %s %s" % (panel, item)) self._screen.show_panel(f'{self._screen._cur_panels[-1]}_{panel}', item['panel'], item['name'], 1, False)
if "items" in item:
self._screen.show_panel(self._screen._cur_panels[-1] + '_' + panel, item['panel'], item['name'],
1, False, items=item['items'])
return
self._screen.show_panel(self._screen._cur_panels[-1] + '_' + panel, item['panel'], item['name'],
1, False)
def menu_return(self, widget, home=False): def menu_return(self, widget, home=False):
if home is False: if home is False:
@@ -110,30 +76,19 @@ class ScreenPanel:
def show_all(self): def show_all(self):
self._screen.show_all() self._screen.show_all()
def update_image_text(self, label, text):
if label in self.labels and 'l' in self.labels[label]:
self.labels[label]['l'].set_text(text)
def update_temp(self, dev, temp, target, name=None):
if dev in self.labels and temp is not None:
if name is None:
self.labels[dev].set_label(self._gtk.formatTemperatureString(temp, target))
else:
self.labels[dev].set_label("%s\n%s" % (name, self._gtk.formatTemperatureString(temp, target)))
def load_menu(self, widget, name): def load_menu(self, widget, name):
if ("%s_menu" % name) not in self.labels: if f"{name}_menu" not in self.labels:
return return
for child in self.content.get_children(): for child in self.content.get_children():
self.content.remove(child) self.content.remove(child)
self.menu.append('%s_menu' % name) 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()
def unload_menu(self, widget=None): def unload_menu(self, widget=None):
logging.debug("self.menu: %s" % 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
@@ -148,24 +103,76 @@ class ScreenPanel:
if tree_iter is not None: if tree_iter is not None:
model = combo.get_model() model = combo.get_model()
value = model[tree_iter][1] value = model[tree_iter][1]
logging.debug("[%s] %s changed to %s" % (section, option, value)) logging.debug(f"[{section}] {option} changed to {value}")
self._config.set(section, option, value) self._config.set(section, option, value)
self._config.save_user_config_options() self._config.save_user_config_options()
if callback is not None: if callback is not None:
callback(value) callback(value)
def scale_moved(self, widget, event, section, option): def scale_moved(self, widget, event, section, option):
logging.debug("[%s] %s changed to %s" % (section, option, widget.get_value())) logging.debug(f"[{section}] {option} changed to {widget.get_value()}")
if section not in self._config.get_config().sections(): if section not in self._config.get_config().sections():
self._config.get_config().add_section(section) self._config.get_config().add_section(section)
self._config.set(section, option, str(int(widget.get_value()))) self._config.set(section, option, str(int(widget.get_value())))
self._config.save_user_config_options() self._config.save_user_config_options()
def switch_config_option(self, switch, gparam, section, option, callback=None): def switch_config_option(self, switch, gparam, section, option, callback=None):
logging.debug("[%s] %s toggled %s" % (section, option, switch.get_active())) logging.debug(f"[{section}] {option} toggled {switch.get_active()}")
if section not in self._config.get_config().sections(): if section not in self._config.get_config().sections():
self._config.get_config().add_section(section) self._config.get_config().add_section(section)
self._config.set(section, option, "True" if switch.get_active() else "False") self._config.set(section, option, "True" if switch.get_active() else "False")
self._config.save_user_config_options() self._config.save_user_config_options()
if callback is not None: if callback is not None:
callback(switch.get_active()) callback(switch.get_active())
@staticmethod
def format_time(seconds):
if seconds is None or seconds <= 0:
return "-"
seconds = int(seconds)
days = seconds // 86400
seconds %= 86400
hours = seconds // 3600
seconds %= 3600
minutes = seconds // 60
seconds %= 60
return f"{f'{days:2.0f}d ' if days > 0 else ''}" \
f"{f'{hours:2.0f}h ' if hours > 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 ''}"
@staticmethod
def format_size(size):
size = float(size)
suffixes = ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
for i, suffix in enumerate(suffixes, start=2):
unit = 1024 ** i
if size < unit:
return f"{(1024 * size / unit):.1f} {suffix}"
def update_temp(self, dev, temp, target, power, lines=1):
if temp is None:
return
show_target = bool(target)
if dev in self.devices and not self.devices[dev]["can_target"]:
show_target = False
show_power = show_target and self._show_heater_power and power is not None
new_label_text = f"{int(temp):3}"
if show_target:
new_label_text += f"/{int(target)}"
if dev not in self.devices:
new_label_text += "°"
if show_power:
if lines == 2:
# The label should wrap, but it doesn't work
# this is a workaround
new_label_text += "\n "
new_label_text += f" {int(power*100):3}%"
if dev in self.labels:
self.labels[dev].set_label(new_label_text)
elif dev in self.devices:
self.devices[dev]["temp"].get_child().set_label(new_label_text)
+65
View File
@@ -0,0 +1,65 @@
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
class BedMap(Gtk.DrawingArea):
def __init__(self, font_size, bm):
super().__init__()
self.set_hexpand(True)
self.set_vexpand(True)
self.connect('draw', self.draw_graph)
self.font_size = font_size
self.font_spacing = round(self.font_size * 1.5)
self.bm = list(reversed(bm)) if bm is not None else None
def update_bm(self, bm):
self.bm = list(reversed(bm)) if bm is not None else None
def draw_graph(self, da, ctx):
width = da.get_allocated_width()
height = da.get_allocated_height()
# Styling
ctx.set_line_width(1)
ctx.set_font_size(self.font_size)
if self.bm is None:
ctx.move_to(self.font_spacing, height / 2)
ctx.set_source_rgb(0.5, 0.5, 0.5)
ctx.show_text(_("No mesh has been loaded"))
ctx.stroke()
return
rows = len(self.bm)
columns = len(self.bm[0])
for i, row in enumerate(self.bm):
ty = height / rows * i
by = ty + height / rows
for j, column in enumerate(row):
lx = width / columns * j
rx = lx + width / columns
# Colors
ctx.set_source_rgb(*self.colorbar(column))
ctx.move_to(lx, ty)
ctx.line_to(lx, by)
ctx.line_to(rx, by)
ctx.line_to(rx, ty)
ctx.close_path()
ctx.fill()
ctx.stroke()
# Numbers
ctx.set_source_rgb(0, 0, 0)
ctx.move_to((lx + rx) / 2 - self.font_size, (ty + by + self.font_size) / 2)
ctx.show_text(f"{column:.2f}")
ctx.stroke()
@staticmethod
def colorbar(value):
rmax = 0.25
color = min(1, max(0, 1 - 1 / rmax * abs(value)))
if value > 0:
return [1, color, color]
if value < 0:
return [color, color, 1]
return [1, 1, 1]
+37 -38
View File
@@ -23,37 +23,39 @@ class HeaterGraph(Gtk.DrawingArea):
self.connect('button_press_event', self.event_cb) self.connect('button_press_event', self.event_cb)
self.font_size = round(font_size * 0.75) self.font_size = round(font_size * 0.75)
def add_object(self, name, type, rgb=[0, 0, 0], dashed=False, fill=False): def add_object(self, name, ev_type, rgb=None, dashed=False, fill=False):
if rgb is None:
rgb = [0, 0, 0]
if name not in self.store: if name not in self.store:
self.store.update({name: {"show": True}}) self.store.update({name: {"show": True}})
self.store[name].update({type: { self.store[name].update({ev_type: {
"dashed": dashed, "dashed": dashed,
"fill": fill, "fill": fill,
"rgb": rgb "rgb": rgb
}}) }})
self.max_length = max(self.max_length, len(self.printer.get_temp_store(name, type))) self.max_length = max(self.max_length, len(self.printer.get_temp_store(name, ev_type)))
def event_cb(self, da, ev): @staticmethod
def event_cb(da, ev):
if ev.type == Gdk.EventType.BUTTON_PRESS: if ev.type == Gdk.EventType.BUTTON_PRESS:
x = ev.x x = ev.x
y = ev.y y = ev.y
logging.info("Graph area: %s %s" % (x, y)) logging.info(f"Graph area: {x} {y}")
def get_max_length(self): def get_max_length(self):
n = [] return min(len(self.printer.get_temp_store(name, "temperatures"))
for name in self.store: for name in self.store if "temperatures" in self.store[name])
if "temperatures" not in self.store[name]:
continue
n.append(len(self.printer.get_temp_store(name, "temperatures")))
return min(n)
def get_max_num(self, data_points=0): def get_max_num(self, data_points=0):
mnum = [] mnum = [0]
for x in self.store: for device in self.store:
for t in self.store[x]: if self.store[device]['show']:
if t == "show": temp = self.printer.get_temp_store(device, "temperatures", data_points)
continue if temp:
mnum.append(max(self.printer.get_temp_store(x, t, data_points))) mnum.append(max(temp))
target = self.printer.get_temp_store(device, "targets", data_points)
if target:
mnum.append(max(target))
return max(mnum) return max(mnum)
def draw_graph(self, da, ctx): def draw_graph(self, da, ctx):
@@ -97,14 +99,15 @@ class HeaterGraph(Gtk.DrawingArea):
for name in self.store: for name in self.store:
if not self.store[name]['show']: if not self.store[name]['show']:
continue continue
for type in self.store[name]: for dev_type in self.store[name]:
d = self.printer.get_temp_store(name, type, data_points) d = self.printer.get_temp_store(name, dev_type, data_points)
if d is False: if d is False:
continue continue
self.graph_data(ctx, d, gsize, d_height_scale, d_width, self.store[name][type]["rgb"], self.graph_data(ctx, d, gsize, d_height_scale, d_width, self.store[name][dev_type]["rgb"],
self.store[name][type]["dashed"], self.store[name][type]["fill"]) self.store[name][dev_type]["dashed"], self.store[name][dev_type]["fill"])
def graph_data(self, ctx, data, gsize, hscale, swidth, rgb, dashed=False, fill=False): @staticmethod
def graph_data(ctx, data, gsize, hscale, swidth, rgb, dashed=False, fill=False):
i = 0 i = 0
ctx.set_source_rgba(rgb[0], rgb[1], rgb[2], 1) ctx.set_source_rgba(rgb[0], rgb[1], rgb[2], 1)
ctx.move_to(gsize[0][0] + 1, gsize[0][1] - 1) ctx.move_to(gsize[0][0] + 1, gsize[0][1] - 1)
@@ -115,7 +118,7 @@ class HeaterGraph(Gtk.DrawingArea):
d_len = len(data) - 1 d_len = len(data) - 1
for d in data: for d in data:
p_x = i * swidth + gsize[0][0] if i != d_len else gsize[1][0] - 1 p_x = i * swidth + gsize[0][0] if i != d_len else gsize[1][0] - 1
p_y = gsize[1][1] - 1 - (d * hscale) p_y = max(gsize[0][1], min(gsize[1][1], gsize[1][1] - 1 - (d * hscale)))
if i == 0: if i == 0:
ctx.move_to(gsize[0][0] + 1, p_y) ctx.move_to(gsize[0][0] + 1, p_y)
i += 1 i += 1
@@ -135,6 +138,7 @@ class HeaterGraph(Gtk.DrawingArea):
def graph_lines(self, ctx, gsize, max_num): def graph_lines(self, ctx, gsize, max_num):
nscale = 10 nscale = 10
max_num = min(max_num, 999)
while (max_num / nscale) > 5: while (max_num / nscale) > 5:
nscale += 10 nscale += 10
# nscale = math.floor((max_num / 10) / 4) * 10 # nscale = math.floor((max_num / 10) / 4) * 10
@@ -173,25 +177,20 @@ class HeaterGraph(Gtk.DrawingArea):
ctx.set_source_rgb(.5, .5, .5) ctx.set_source_rgb(.5, .5, .5)
ctx.move_to(x - round(self.font_size * 1.5), gsize[1][1] + round(self.font_size * 1.5)) ctx.move_to(x - round(self.font_size * 1.5), gsize[1][1] + round(self.font_size * 1.5))
hour = now.hour h = now.hour
min = now.minute - (now.minute % 2) - i * 2 m = now.minute - (now.minute % 2) - i * 2
if min < 0: if m < 0:
hour -= 1 h -= 1
min = 60 + min m += 60
if hour < 0: if h < 0:
hour += 24 h += 24
ctx.set_font_size(self.font_size) ctx.set_font_size(self.font_size)
ctx.show_text("%02d:%02d" % (hour, min)) ctx.show_text(f"{h:2}:{m:02}")
ctx.stroke() ctx.stroke()
if self.max_length < 600: i += 1 if self.max_length < 600 else 2
i += 1
else:
i += 2
def is_showing(self, device): def is_showing(self, device):
if device not in self.store: return False if device not in self.store else self.store[device]['show']
return False
return self.store[device]['show']
def set_showing(self, device, show=True): def set_showing(self, device, show=True):
if device not in self.store: if device not in self.store:
+157
View File
@@ -0,0 +1,157 @@
import logging
import os
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib
class Keyboard(Gtk.Box):
langs = ["de", "en", "es"]
def __init__(self, screen, close_cb, entry=None):
super().__init__(orientation=Gtk.Orientation.VERTICAL)
self.close_cb = close_cb
self.keyboard = Gtk.Grid()
self.keyboard.set_direction(Gtk.TextDirection.LTR)
self.timeout = self.clear_timeout = None
self.entry = entry
language = self.detect_language(screen._config.get_main_config().get("language", None))
logging.info(f"Keyboard {language}")
if language == "de":
self.keys = [
[
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "⌫"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"],
["ABC", "y", "x", "c", "v", "b", "n", "m", ",", ".", "?123"],
],
[
["Q", "W", "E", "R", "T", "Z", "U", "I", "O", "P", "Ü", "⌫"],
["A", "S", "D", "F", "G", "H", "J", "K", "L", "Ö", "Ä"],
["?123", "Y", "X", "C", "V", "B", "N", "M", ",", ".", "abc"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", "⌫"],
["=", "-", "+", "*", "/", "\\", ":", ";", "'", "\"", "ẞ"],
["abc", "(", ")", "#", "$", "!", "?", "@", "_", ",", "ABC"],
]
]
else:
self.keys = [
[
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "⌫"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "'"],
["ABC", "z", "x", "c", "v", "b", "n", "m", ",", ".", "?123"],
],
[
["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "⌫"],
["A", "S", "D", "F", "G", "H", "J", "K", "L", "'"],
["?123", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "abc"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "⌫"],
["=", "-", "+", "*", "/", "\\", ":", ";", "'", "\""],
["abc", "(", ")", "#", "$", "!", "?", "@", "_", ",", "ABC"],
]
]
if language == "es":
self.keys[0][1].remove("'")
self.keys[0][1].append("ñ")
self.keys[1][1].remove("'")
self.keys[1][1].append("Ñ")
for pallet in self.keys:
pallet.append(["✕", " ", "✔"])
self.buttons = self.keys.copy()
for p, pallet in enumerate(self.keys):
for r, row in enumerate(pallet):
for k, key in enumerate(row):
if key == "⌫":
self.buttons[p][r][k] = screen.gtk.ButtonImage("backspace", scale=.6)
elif key == "✕":
self.buttons[p][r][k] = screen.gtk.ButtonImage("cancel", scale=.6)
elif key == "✔":
self.buttons[p][r][k] = screen.gtk.ButtonImage("complete", scale=.6)
else:
self.buttons[p][r][k] = screen.gtk.Button(key)
self.buttons[p][r][k].set_hexpand(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-release-event', self.release)
self.buttons[p][r][k].get_style_context().add_class("keyboard_pad")
self.pallet_nr = 0
self.set_pallet(self.pallet_nr)
self.add(self.keyboard)
def detect_language(self, language):
if language is None or language == "system_lang":
for language in self.langs:
if os.getenv('LANG').lower().startswith(language):
return language
for _ in self.langs:
if language.startswith(_):
return _
return "en"
def set_pallet(self, p):
for _ in range(len(self.keys[self.pallet_nr]) + 1):
self.keyboard.remove_row(0)
self.pallet_nr = p
for r, row in enumerate(self.keys[p][:-1]):
for k, key in enumerate(row):
x = k * 2 + 1 if r == 1 else k * 2
self.keyboard.attach(self.buttons[p][r][k], x, r, 2, 1)
self.keyboard.attach(self.buttons[p][3][0], 0, 4, 3, 1) # ✕
self.keyboard.attach(self.buttons[p][3][1], 3, 4, 16, 1) # Space
self.keyboard.attach(self.buttons[p][3][2], 19, 4, 3, 1) # ✔
self.show_all()
def repeat(self, widget, event, key):
# Button-press
self.update_entry(widget, key)
if self.timeout is None and key == "⌫":
# Hold for repeat, hold longer to clear the field
self.clear_timeout = GLib.timeout_add_seconds(3, self.clear, widget)
# This can be used to repeat all the keys,
# but I don't find it useful on the console
self.timeout = GLib.timeout_add(400, self.repeat, widget, None, key)
return True
def release(self, widget, event):
# Button-release
if self.timeout is not None:
GLib.source_remove(self.timeout)
self.timeout = None
if self.clear_timeout is not None:
GLib.source_remove(self.clear_timeout)
self.clear_timeout = None
def clear(self, widget=None):
self.entry.set_text("")
if self.clear_timeout is not None:
GLib.source_remove(self.clear_timeout)
self.clear_timeout = None
def update_entry(self, widget, key):
if key == "⌫":
Gtk.Entry.do_backspace(self.entry)
elif key == "✔":
self.close_cb()
return
elif key == "✕":
self.clear()
self.close_cb()
return
elif key == "abc":
self.set_pallet(0)
elif key == "ABC":
self.set_pallet(1)
elif key == "?123":
self.set_pallet(2)
else:
Gtk.Entry.do_insert_at_cursor(self.entry, key)
+11 -12
View File
@@ -8,7 +8,6 @@ class Keypad(Gtk.Box):
def __init__(self, screen, change_temp, close_function): def __init__(self, screen, change_temp, close_function):
super().__init__(orientation=Gtk.Orientation.VERTICAL) super().__init__(orientation=Gtk.Orientation.VERTICAL)
_ = screen.lang.gettext
self.labels = {} self.labels = {}
self.change_temp = change_temp self.change_temp = change_temp
self.screen = screen self.screen = screen
@@ -33,23 +32,23 @@ class Keypad(Gtk.Box):
['E', 'numpad_bright'] ['E', 'numpad_bright']
] ]
for i in range(len(keys)): for i in range(len(keys)):
id = '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[id] = self._gtk.ButtonImage("backspace", None, None, 1) self.labels[k_id] = self._gtk.ButtonImage("backspace", scale=1)
elif keys[i][0] == "E": elif keys[i][0] == "E":
self.labels[id] = self._gtk.ButtonImage("complete", None, None, 1) self.labels[k_id] = self._gtk.ButtonImage("complete", scale=1)
else: else:
self.labels[id] = Gtk.Button(keys[i][0]) self.labels[k_id] = Gtk.Button(keys[i][0])
self.labels[id].connect('clicked', self.update_entry, keys[i][0]) self.labels[k_id].connect('clicked', self.update_entry, keys[i][0])
self.labels[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[id], i % 3, i/3, 1, 1) numpad.attach(self.labels[k_id], i % 3, i / 3, 1, 1)
self.labels["keypad"] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.labels["keypad"] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.labels['entry'] = Gtk.Entry() self.labels['entry'] = Gtk.Entry()
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, False) b = self._gtk.ButtonImage('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'])
@@ -66,7 +65,7 @@ class Keypad(Gtk.Box):
if digit == 'B': if digit == 'B':
if len(text) < 1: if len(text) < 1:
return return
self.labels['entry'].set_text(text[0:-1]) self.labels['entry'].set_text(text[:-1])
elif digit == 'E': elif digit == 'E':
try: try:
temp = int(text) temp = int(text)
@@ -74,7 +73,7 @@ class Keypad(Gtk.Box):
temp = 0 temp = 0
self.change_temp(temp) self.change_temp(temp)
self.labels['entry'].set_text("") self.labels['entry'].set_text("")
elif len(text) >= 3:
return
else: else:
if len(text) >= 3:
return
self.labels['entry'].set_text(text + digit) self.labels['entry'].set_text(text + digit)
+150
View File
@@ -0,0 +1,150 @@
import logging
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, Gtk
class ObjectMap(Gtk.DrawingArea):
def __init__(self, screen, printer, font_size):
super().__init__()
self._screen = screen
self.set_hexpand(True)
self.set_vexpand(True)
# self.get_style_context().add_class('objectmap')
self.printer = printer
self.max_length = 0
self.connect('draw', self.draw_graph)
self.add_events(Gdk.EventMask.TOUCH_MASK)
self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK)
self.connect('button_press_event', self.event_cb)
self.font_size = round(font_size * 0.75)
self.font_spacing = round(self.font_size * 1.5)
self.margin_left = round(self.font_size * 2.75)
self.margin_right = 15
self.margin_top = 10
self.margin_bottom = self.font_size * 2
self.objects = self.printer.get_stat("exclude_object", "objects")
self.current_object = self.printer.get_stat("current_object", "current_object")
self.excluded_objects = self.printer.get_stat("exclude_object", "excluded_objects")
self.min_x = self.min_y = 99999999
self.max_x = self.max_y = 0
def x_graph_to_bed(self, width, gx):
return (((gx - self.margin_left) * (self.max_x - self.min_x))
/ (width - self.margin_left - self.margin_right)) + self.min_x
def y_graph_to_bed(self, height, gy):
return ((1 - ((gy - self.margin_top) / (height - self.margin_top - self.margin_bottom)))
* (self.max_y - self.min_y)) + self.min_y
def event_cb(self, da, ev):
# Convert coordinates from screen-graph to bed
x = self.x_graph_to_bed(da.get_allocated_width(), ev.x)
y = self.y_graph_to_bed(da.get_allocated_height(), ev.y)
logging.info(f"Touched GRAPH {ev.x:.0f},{ev.y:.0f} BED: {x:.0f},{y:.0f}")
for obj in self.objects:
obj_min_x = obj_max_x = obj["polygon"][0][0]
obj_min_y = obj_max_y = obj["polygon"][0][1]
for point in obj["polygon"]:
obj_min_x = min(obj_min_x, point[0])
obj_min_y = min(obj_min_y, point[1])
obj_max_x = max(obj_max_x, point[0])
obj_max_y = max(obj_max_y, point[1])
if obj_min_x < x < obj_max_x and obj_min_y < y < obj_max_y:
logging.info(f"TOUCHED object it's: {obj['name']}")
if obj['name'] not in self.excluded_objects:
self.exclude_object(obj['name'])
break
def exclude_object(self, name):
script = {"script": f"EXCLUDE_OBJECT NAME={name}"}
self._screen._confirm_send_action(
None,
_("Are you sure do you want to exclude the object?") + f"\n\n{name}",
"printer.gcode.script",
script
)
def draw_graph(self, da, ctx):
right = da.get_allocated_width() - self.margin_right
bottom = da.get_allocated_height() - self.margin_bottom
self.objects = self.printer.get_stat("exclude_object", "objects")
for obj in self.objects:
for point in obj["polygon"]:
# Find min coords
self.min_x = min(self.min_x, point[0])
self.min_y = min(self.min_y, point[1])
# Find max coords
self.max_x = max(self.max_x, point[0])
self.max_y = max(self.max_y, point[1])
# Styling
ctx.set_source_rgb(.5, .5, .5) # Grey
ctx.set_line_width(1)
ctx.set_font_size(self.font_size)
# Borders
ctx.move_to(self.margin_left, self.margin_top)
# logging.info(f"l:{self.margin_left:.0f} t:{self.margin_top:.0f} r:{right:.0f} b:{bottom:.0f}")
ctx.line_to(right, self.margin_top)
ctx.line_to(right, bottom)
ctx.line_to(self.margin_left, bottom)
ctx.line_to(self.margin_left, self.margin_top)
ctx.stroke()
# Axis labels
ctx.move_to(0, bottom + self.font_spacing)
ctx.show_text(f"{self.min_x:.0f},{self.min_y:.0f}")
ctx.stroke()
ctx.move_to(right - self.font_spacing * 2, bottom + self.font_spacing)
ctx.show_text(f"{self.max_x:.0f},{self.min_y:.0f}")
ctx.stroke()
ctx.move_to(0, self.font_spacing / 2)
ctx.show_text(f"{self.min_x:.0f},{self.max_y:.0f}")
ctx.stroke()
# middle markers
midx = (right - self.margin_left) / 2 + self.margin_left
ctx.set_dash([1, 1])
ctx.move_to(midx, self.margin_top)
ctx.line_to(midx, bottom)
ctx.stroke()
midy = (self.margin_top - bottom) / 2 + bottom
ctx.move_to(self.margin_left, midy)
ctx.line_to(right, midy)
ctx.stroke()
ctx.set_dash([1, 0])
# Draw objects
for obj in self.objects:
# change the color depending on the status
if obj['name'] == self.printer.get_stat("exclude_object", "current_object"):
ctx.set_source_rgb(1, 0, 0) # Red
elif obj['name'] in self.printer.get_stat("exclude_object", "excluded_objects"):
ctx.set_source_rgb(0, 0, 0) # Black
else:
ctx.set_source_rgb(.5, .5, .5) # Grey
for i, point in enumerate(obj["polygon"]):
# Convert coordinates from bed to screen-graph
x = self.x_bed_to_graph(da.get_allocated_width(), point[0])
y = self.y_bed_to_graph(da.get_allocated_height(), point[1])
if i == 0:
ctx.move_to(x, y)
continue
ctx.line_to(x, y)
# logging.info(f"obj graph: {x=:.0f},{y=:.0f} bed: {point[0]:.0f},{point[1]:.0f}")
ctx.close_path()
ctx.fill()
ctx.stroke()
def x_bed_to_graph(self, width, bx):
return (((bx - self.min_x) * (width - self.margin_left - self.margin_right))
/ (self.max_x - self.min_x)) + self.margin_left
def y_bed_to_graph(self, height, by):
return ((1 - ((by - self.min_y) / (self.max_y - self.min_y)))
* (height - self.margin_top - self.margin_bottom)) + self.margin_top
+64 -81
View File
@@ -11,7 +11,7 @@ from queue import Queue
import gi import gi
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import GLib, Gdk from gi.repository import GLib
class WifiManager: class WifiManager:
@@ -44,17 +44,17 @@ class WifiManager:
self.timeout = None self.timeout = None
self.scan_time = 0 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):
os.remove(KS_SOCKET_FILE) os.remove(ks_socket_file)
try: try:
self.soc = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.soc = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
self.soc.bind(KS_SOCKET_FILE) self.soc.bind(ks_socket_file)
self.soc.connect("/var/run/wpa_supplicant/%s" % interface) self.soc.connect(f"/var/run/wpa_supplicant/{interface}")
except Exception as e: except Exception as e:
logging.critical(e, exc_info=True) logging.critical(e, exc_info=True)
logging.error("Error connecting to wifi socket: %s" % interface) logging.error(f"Error connecting to wifi socket: {interface}")
return return
self.wpa_thread = WpaSocket(self, self.queue, self.callback) self.wpa_thread = WpaSocket(self, self.queue, self.callback)
@@ -71,73 +71,71 @@ class WifiManager:
self._callbacks[name].append(callback) self._callbacks[name].append(callback)
def add_network(self, ssid, psk): def add_network(self, ssid, psk):
for id in list(self.supplicant_networks): for netid in list(self.supplicant_networks):
if self.supplicant_networks[id]['ssid'] == ssid: if self.supplicant_networks[netid]['ssid'] == ssid:
# Modify network # Modify network
return return
# TODO: Add wpa_cli error checking # TODO: Add wpa_cli error checking
network_id = self.wpa_cli("ADD_NETWORK") network_id = self.wpa_cli("ADD_NETWORK")
commands = [ commands = [
'ENABLE_NETWORK %s' % network_id, f'ENABLE_NETWORK {network_id}',
'SET_NETWORK %s ssid "%s"' % (network_id, ssid.replace('"', '\"')), 'SET_NETWORK %s ssid "%s"' % (network_id, ssid.replace('"', '\"')),
'SET_NETWORK %s psk "%s"' % (network_id, psk.replace('"', '\"')) 'SET_NETWORK %s psk "%s"' % (network_id, psk.replace('"', '\"'))
] ]
self.wpa_cli_batch(commands) self.wpa_cli_batch(commands)
self.read_wpa_supplicant() self.read_wpa_supplicant()
id = None netid = None
for i in list(self.supplicant_networks): for i in list(self.supplicant_networks):
if self.supplicant_networks[i]['ssid'] == ssid: if self.supplicant_networks[i]['ssid'] == ssid:
id = i netid = i
break break
if id is None: if netid is None:
logging.info("Error adding network") logging.info("Error adding network")
return False return False
self.save_wpa_conf() self.save_wpa_conf()
return True return True
def callback(self, type, msg): def callback(self, cb_type, msg):
if type in self._callbacks: if cb_type in self._callbacks:
for cb in self._callbacks[type]: for cb in self._callbacks[cb_type]:
Gdk.threads_add_idle( GLib.idle_add(cb, msg)
GLib.PRIORITY_DEFAULT_IDLE,
cb,
msg)
def connect(self, ssid): def connect(self, ssid):
id = None netid = None
for netid, net in self.supplicant_networks.items(): for nid, net in self.supplicant_networks.items():
if net['ssid'] == ssid: if net['ssid'] == ssid:
id = netid netid = nid
break break
if id is None: if netid is None:
logging.info("Wifi network is not defined in wpa_supplicant") logging.info("Wifi network is not defined in wpa_supplicant")
return False return False
logging.info("Attempting to connect to wifi: %s" % id) logging.info(f"Attempting to connect to wifi: {netid}")
self.connecting_info = ["Attempting to connect to %s" % ssid] self.connecting_info = [f"Attempting to connect to {ssid}"]
self.wpa_cli("SELECT_NETWORK %s" % id) self.wpa_cli(f"SELECT_NETWORK {id}")
self.save_wpa_conf() self.save_wpa_conf()
def delete_network(self, ssid): def delete_network(self, ssid):
id = None netid = None
for i in list(self.supplicant_networks): for i in list(self.supplicant_networks):
if self.supplicant_networks[i]['ssid'] == ssid: if self.supplicant_networks[i]['ssid'] == ssid:
id = i netid = i
break break
if id is None: if netid is None:
logging.debug("Unable to find network in wpa_supplicant") logging.debug("Unable to find network in wpa_supplicant")
return return
self.wpa_cli("REMOVE_NETWORK %s" % id) self.wpa_cli(f"REMOVE_NETWORK {netid}")
for id in list(self.supplicant_networks): for netid in list(self.supplicant_networks):
if self.supplicant_networks[id]['ssid'] == ssid: if self.supplicant_networks[netid]['ssid'] == ssid:
del self.supplicant_networks[id] del self.supplicant_networks[netid]
break break
self.save_wpa_conf() self.save_wpa_conf()
@@ -145,45 +143,37 @@ class WifiManager:
def get_connected_ssid(self): def get_connected_ssid(self):
return self.connected_ssid return self.connected_ssid
def get_current_wifi(self, interface="wlan0"): def get_current_wifi(self):
con_ssid = os.popen("sudo iwgetid -r").read().strip() con_ssid = os.popen("sudo iwgetid -r").read().strip()
con_bssid = os.popen("sudo iwgetid -r -a").read().strip() con_bssid = os.popen("sudo iwgetid -r -a").read().strip()
# wpa_cli status output is unstable use it as backup only # wpa_cli status output is unstable use it as backup only
status = self.wpa_cli("STATUS").split('\n') status = self.wpa_cli("STATUS").split('\n')
vars = {} variables = {}
for line in status: for line in status:
arr = line.split('=') arr = line.split('=')
vars[arr[0]] = "=".join(arr[1:]) variables[arr[0]] = "=".join(arr[1:])
prev_ssid = self.connected_ssid prev_ssid = self.connected_ssid
if con_ssid != "": if con_ssid != "":
self.connected = True self.connected = True
self.connected_ssid = con_ssid self.connected_ssid = con_ssid
for ssid, val in self.networks.items(): for ssid, val in self.networks.items():
if ssid == con_ssid: self.networks[ssid]['connected'] = ssid == con_ssid
self.networks[ssid]['connected'] = True
else:
self.networks[ssid]['connected'] = False
if prev_ssid != self.connected_ssid: if prev_ssid != self.connected_ssid:
for cb in self._callbacks['connected']: for cb in self._callbacks['connected']:
Gdk.threads_add_idle( args = self.connected_ssid, prev_ssid
GLib.PRIORITY_DEFAULT_IDLE, GLib.idle_add(cb, *args)
cb, self.connected_ssid, prev_ssid)
return [con_ssid, con_bssid] return [con_ssid, con_bssid]
elif "ssid" in vars and "bssid" in vars: elif "ssid" in variables and "bssid" in variables:
self.connected = True self.connected = True
self.connected_ssid = vars['ssid'] self.connected_ssid = variables['ssid']
for ssid, val in self.networks.items(): for ssid, val in self.networks.items():
if ssid == vars['ssid']: self.networks[ssid]['connected'] = ssid == variables['ssid']
self.networks[ssid]['connected'] = True
else:
self.networks[ssid]['connected'] = False
if prev_ssid != self.connected_ssid: if prev_ssid != self.connected_ssid:
for cb in self._callbacks['connected']: for cb in self._callbacks['connected']:
Gdk.threads_add_idle( args = self.connected_ssid, prev_ssid
GLib.PRIORITY_DEFAULT_IDLE, GLib.idle_add(cb, *args)
cb, self.connected_ssid, prev_ssid) return [variables['ssid'], variables['bssid']]
return [vars['ssid'], vars['bssid']]
else: else:
logging.info("Resetting connected_ssid") logging.info("Resetting connected_ssid")
self.connected = False self.connected = False
@@ -192,9 +182,8 @@ class WifiManager:
self.networks[ssid]['connected'] = False self.networks[ssid]['connected'] = False
if prev_ssid != self.connected_ssid: if prev_ssid != self.connected_ssid:
for cb in self._callbacks['connected']: for cb in self._callbacks['connected']:
Gdk.threads_add_idle( args = self.connected_ssid, prev_ssid
GLib.PRIORITY_DEFAULT_IDLE, GLib.idle_add(cb, *args)
cb, self.connected_ssid, prev_ssid)
return None return None
def get_current_wifi_idle_add(self): def get_current_wifi_idle_add(self):
@@ -247,7 +236,7 @@ class WifiManager:
logging.info("Saving WPA config") logging.info("Saving WPA config")
self.wpa_cli("SAVE_CONFIG") self.wpa_cli("SAVE_CONFIG")
def scan_results(self, interface='wlan0'): def scan_results(self):
new_networks = [] new_networks = []
deleted_networks = list(self.networks) deleted_networks = list(self.networks)
@@ -259,14 +248,14 @@ class WifiManager:
match = re.match("^([a-f0-9:]+)\\s+([0-9]+)\\s+([\\-0-9]+)\\s+(\\S+)\\s+(.+)?", res) match = re.match("^([a-f0-9:]+)\\s+([0-9]+)\\s+([\\-0-9]+)\\s+(\\S+)\\s+(.+)?", res)
if match: if match:
net = { net = {
"mac": match.group(1), "mac": match[1],
"channel": WifiChannels.lookup(match.group(2))[1], "channel": WifiChannels.lookup(match[2])[1],
"connected": False, "connected": False,
"configured": False, "configured": False,
"frequency": match.group(2), "frequency": match[2],
"flags": match.group(4), "flags": match[4],
"signal_level_dBm": match.group(3), "signal_level_dBm": match[3],
"ssid": match.group(5) "ssid": match[5]
} }
if "WPA2" in net['flags']: if "WPA2" in net['flags']:
@@ -292,19 +281,17 @@ class WifiManager:
deleted_networks.remove(net) deleted_networks.remove(net)
else: else:
new_networks.append(net) new_networks.append(net)
if len(new_networks) > 0 or len(deleted_networks) > 0: if new_networks or deleted_networks:
for cb in self._callbacks['scan_results']: for cb in self._callbacks['scan_results']:
Gdk.threads_add_idle( args = new_networks, deleted_networks
GLib.PRIORITY_DEFAULT_IDLE, GLib.idle_add(cb, *args)
cb, new_networks, deleted_networks)
def wpa_cli(self, command, wait=True): def wpa_cli(self, command, wait=True):
if wait is False: if wait is False:
self.wpa_thread.skip_command() self.wpa_thread.skip_command()
self.soc.send(command.encode()) self.soc.send(command.encode())
if wait is True: if wait is True:
resp = self.queue.get() return self.queue.get()
return resp
def wpa_cli_batch(self, commands): def wpa_cli_batch(self, commands):
for cmd in commands: for cmd in commands:
@@ -322,7 +309,6 @@ class WpaSocket(Thread):
self.wm = wm self.wm = wm
def run(self): def run(self):
event = threading.Event()
logging.debug("Setting up wifi event loop") logging.debug("Setting up wifi event loop")
while self._stop_loop is False: while self._stop_loop is False:
try: try:
@@ -333,27 +319,24 @@ class WpaSocket(Thread):
continue continue
if msg.startswith("<"): if msg.startswith("<"):
if "CTRL-EVENT-SCAN-RESULTS" in msg: if "CTRL-EVENT-SCAN-RESULTS" in msg:
Gdk.threads_add_idle(GLib.PRIORITY_DEFAULT_IDLE, self.wm.scan_results) GLib.idle_add(self.wm.scan_results)
elif "CTRL-EVENT-DISCONNECTED" in msg: elif "CTRL-EVENT-DISCONNECTED" in msg:
self.callback("connecting_status", msg) self.callback("connecting_status", msg)
match = re.match('<3>CTRL-EVENT-DISCONNECTED bssid=(\\S+) reason=3 locally_generated=1', msg) match = re.match('<3>CTRL-EVENT-DISCONNECTED bssid=(\\S+) reason=3 locally_generated=1', msg)
if match: if match:
for net in self.wm.networks: for net in self.wm.networks:
if self.wm.networks[net]['mac'] == match.group(1): if self.wm.networks[net]['mac'] == match[1]:
self.wm.networks[net]['connected'] = False self.wm.networks[net]['connected'] = False
break break
elif "Trying to associate" in msg: elif "Trying to associate" in msg or "CTRL-EVENT-REGDOM-CHANGE" in msg:
self.callback("connecting_status", msg)
elif "CTRL-EVENT-REGDOM-CHANGE" in msg:
self.callback("connecting_status", msg) self.callback("connecting_status", msg)
elif "CTRL-EVENT-CONNECTED" in msg: elif "CTRL-EVENT-CONNECTED" in msg:
Gdk.threads_add_idle(GLib.PRIORITY_DEFAULT_IDLE, self.wm.get_current_wifi_idle_add) GLib.idle_add(self.wm.get_current_wifi_idle_add)
self.callback("connecting_status", msg) self.callback("connecting_status", msg)
elif self.skip_commands > 0:
self.skip_commands = self.skip_commands - 1
else: else:
if self.skip_commands > 0: self.queue.put(msg)
self.skip_commands = self.skip_commands - 1
else:
self.queue.put(msg)
logging.info("Wifi event loop ended") logging.info("Wifi event loop ended")
def skip_command(self): def skip_command(self):
+9 -2
View File
@@ -14,11 +14,18 @@ nav:
- Quicktips.md - Quicktips.md
- Macros: macros.md - Macros: macros.md
- Android.md - Android.md
- Thumbnails.md
- Troubleshooting.md - Troubleshooting.md
- Panels:
- Bed Level/Screws: Screws.md
- Job_status/Printing: Job_status.md
- Temperature: Temperature.md
- Z Calibrate: Zcalibrate.md
- Screenshots: Panels.md
- Theming.md - Theming.md
- Translations.md - Translations.md
- Breaking Changes: Changelog.md - Breaking Changes: Changelog.md
- Screenshots: Panels.md
- Contact.md - Contact.md
theme: theme:
name: material name: material
@@ -26,8 +33,8 @@ theme:
features: features:
- content.code.annotate - content.code.annotate
- content.tooltips - content.tooltips
- navigation.expand
- navigation.indexes - navigation.indexes
- navigation.sections
- navigation.top - navigation.top
- navigation.tracking - navigation.tracking
- search.highlight - search.highlight
+130 -117
View File
@@ -1,46 +1,50 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime import contextlib
import gi import gi
import logging import logging
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
from datetime import datetime
from math import log
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
class BasePanel(ScreenPanel): class BasePanel(ScreenPanel):
def __init__(self, screen, title, back=True, action_bar=True, printer_name=True): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back, action_bar, printer_name) super().__init__(screen, title, back)
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)
self.time_update = None self.time_update = None
self.titlebar_items = []
self.titlebar_name_type = None self.titlebar_name_type = None
self.buttons_showing = { self.buttons_showing = {
'back': not(back), 'back': not back,
'macros_shortcut': False, 'macros_shortcut': False,
'printer_select': False 'printer_select': False,
'estop': False,
} }
self.current_extruder = None
# Action bar buttons # Action bar buttons
self.control['back'] = self._gtk.ButtonImage('back', None, None, 1) self.control['back'] = self._gtk.ButtonImage('back', scale=1)
self.control['back'].connect("clicked", self.back) self.control['back'].connect("clicked", self.back)
self.control['home'] = self._gtk.ButtonImage('main', None, None, 1) self.control['home'] = self._gtk.ButtonImage('main', scale=1)
self.control['home'].connect("clicked", self.menu_return, True) self.control['home'].connect("clicked", self.menu_return, True)
if len(self._config.get_printers()) > 1: if len(self._config.get_printers()) > 1:
self.control['printer_select'] = self._gtk.ButtonImage('shuffle', None, None, 1) self.control['printer_select'] = self._gtk.ButtonImage('shuffle', scale=1)
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', None, None, 1) self.control['macros_shortcut'] = self._gtk.ButtonImage('custom-script', scale=1)
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', None, None, 1) self.control['estop'] = self._gtk.ButtonImage('emergency', scale=1)
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
@@ -63,7 +67,7 @@ class BasePanel(ScreenPanel):
self.action_bar.add(self.control['home']) self.action_bar.add(self.control['home'])
if len(self._config.get_printers()) > 1: if len(self._config.get_printers()) > 1:
self.action_bar.add(self.control['printer_select']) self.action_bar.add(self.control['printer_select'])
self.action_bar.add(self.control['macros_shortcut']) self.show_macro_shortcut(self._config.get_main_config().getboolean('side_macro_shortcut', True))
self.action_bar.add(self.control['estop']) self.action_bar.add(self.control['estop'])
# Titlebar # Titlebar
@@ -80,7 +84,7 @@ class BasePanel(ScreenPanel):
self.control['time'] = Gtk.Label("00:00 AM") self.control['time'] = Gtk.Label("00:00 AM")
self.control['time_box'] = Gtk.Box() self.control['time_box'] = Gtk.Box()
self.control['time_box'].set_halign(Gtk.Align.END) self.control['time_box'].set_halign(Gtk.Align.END)
self.control['time_box'].pack_end(self.control['time'], True, True, 5) self.control['time_box'].pack_end(self.control['time'], True, True, 10)
self.titlebar = Gtk.Box(spacing=5) self.titlebar = Gtk.Box(spacing=5)
self.titlebar.set_size_request(0, self._gtk.get_titlebar_height()) self.titlebar.set_size_request(0, self._gtk.get_titlebar_height())
@@ -108,98 +112,82 @@ class BasePanel(ScreenPanel):
# Layout is and content are on screen_panel # Layout is and content are on screen_panel
self.layout.add(self.main_grid) self.layout.add(self.main_grid)
def initialize(self, panel_name):
self.update_time() self.update_time()
return
def show_heaters(self, show=True): def show_heaters(self, show=True):
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) try:
self.titlebar_name_type = printer_cfg.get("titlebar_name_type", None) for child in self.control['temp_box'].get_children():
logging.info("Titlebar name type: %s", self.titlebar_name_type) self.control['temp_box'].remove(child)
if not show or self._screen.printer.get_temp_store_devices() is None:
return
for child in self.control['temp_box'].get_children(): img_size = self._gtk.img_scale * .5
self.control['temp_box'].remove(child) for device in self._screen.printer.get_temp_store_devices():
self.labels[device] = Gtk.Label(label="100º")
self.labels[device].set_ellipsize(Pango.EllipsizeMode.START)
if not show or self._screen.printer.get_temp_store_devices() is None: self.labels[f'{device}_box'] = Gtk.Box()
return icon = self.get_icon(device, img_size)
if icon is not None:
self.labels[f'{device}_box'].pack_start(icon, False, False, 3)
self.labels[f'{device}_box'].pack_start(self.labels[device], False, False, 0)
for device in self._screen.printer.get_temp_store_devices(): # Limit the number of items according to resolution
if device.startswith("extruder"): nlimit = int(round(log(self._screen.width, 10) * 5 - 10.5))
if self._screen.printer.extrudercount > 1:
if device == "extruder":
icon = self._gtk.Image("extruder-0", .5)
else:
icon = self._gtk.Image("extruder-%s" % device[8:], .5)
else:
icon = self._gtk.Image("extruder", .5)
elif device.startswith("heater_bed"):
icon = self._gtk.Image("bed", .5)
# Extra items
elif self.titlebar_name_type is not None:
# The item has a name, do not use an icon
icon = None
elif device.startswith("temperature_fan"):
icon = self._gtk.Image("fan", .5)
elif device.startswith("heater_generic"):
icon = self._gtk.Image("heater", .5)
else:
icon = self._gtk.Image("heat-up", .5)
self.labels[device] = Gtk.Label(label="100º") n = 0
self.labels[device].set_ellipsize(Pango.EllipsizeMode.START) if self._screen.printer.get_tools():
self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder")
if self.current_extruder and f"{self.current_extruder}_box" in self.labels:
self.control['temp_box'].add(self.labels[f"{self.current_extruder}_box"])
n += 1
self.labels[device + '_box'] = Gtk.Box() if self._screen.printer.has_heated_bed():
if icon is not None: self.control['temp_box'].add(self.labels['heater_bed_box'])
self.labels[device + '_box'].pack_start(icon, False, False, 3)
self.labels[device + '_box'].pack_start(self.labels[device], False, False, 0)
# Limit the number of items according to resolution
if self._screen.width <= 480:
nlimit = 3
elif self._screen.width <= 800:
nlimit = 4
else:
nlimit = 5
n = 0
if self._screen.printer.get_tools():
self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder")
self.control['temp_box'].add(self.labels["%s_box" % self.current_extruder])
n += 1
if self._screen.printer.has_heated_bed():
self.control['temp_box'].add(self.labels['heater_bed_box'])
n += 1
# Options in the config have priority
if printer_cfg is not None:
titlebar_items = printer_cfg.get("titlebar_items", "")
if titlebar_items is not None:
titlebar_items = [str(i.strip()) for i in titlebar_items.split(',')]
logging.info("Titlebar items: %s", titlebar_items)
for device in self._screen.printer.get_temp_store_devices():
# Users can fill the bar if they want
if n >= nlimit + 1:
break
if not (device.startswith("extruder") or device.startswith("heater_bed")):
name = device.split(" ")[1:][0]
else:
name = device
for item in titlebar_items:
if name == item:
self.control['temp_box'].add(self.labels["%s_box" % device])
n += 1
break
# If there is enough space fill with heater_generic
for device in self._screen.printer.get_temp_store_devices():
if n >= nlimit:
break
if device.startswith("heater_generic"):
self.control['temp_box'].add(self.labels["%s_box" % device])
n += 1 n += 1
self.control['temp_box'].show_all()
# Options in the config have priority
for device in self._screen.printer.get_temp_store_devices():
# Users can fill the bar if they want
if n >= nlimit + 1:
break
name = device.split()[1] if len(device.split()) > 1 else device
for item in self.titlebar_items:
if name == item:
self.control['temp_box'].add(self.labels[f"{device}_box"])
n += 1
break
# If there is enough space fill with heater_generic
for device in self._screen.printer.get_temp_store_devices():
if n >= nlimit:
break
if device.startswith("heater_generic"):
self.control['temp_box'].add(self.labels[f"{device}_box"])
n += 1
self.control['temp_box'].show_all()
except Exception as e:
logging.debug(f"Couldn't create heaters box: {e}")
def get_icon(self, device, img_size):
if device.startswith("extruder"):
if self._screen.printer.extrudercount > 1:
if device == "extruder":
device = "extruder0"
return self._gtk.Image(f"extruder-{device[8:]}", img_size, img_size)
return self._gtk.Image("extruder", img_size, img_size)
elif device.startswith("heater_bed"):
return self._gtk.Image("bed", img_size, img_size)
# Extra items
elif self.titlebar_name_type is not None:
# The item has a name, do not use an icon
return None
elif device.startswith("temperature_fan"):
return self._gtk.Image("fan", img_size, img_size)
elif device.startswith("heater_generic"):
return self._gtk.Image("heater", img_size, img_size)
else:
return self._gtk.Image("heat-up", img_size, img_size)
def activate(self): def activate(self):
if self.time_update is None: if self.time_update is None:
@@ -216,10 +204,9 @@ class BasePanel(ScreenPanel):
self._screen.remove_keyboard() self._screen.remove_keyboard()
if hasattr(self.current_panel, "back"): if hasattr(self.current_panel, "back") \
if not self.current_panel.back(): and not self.current_panel.back() \
self._screen._menu_go_back() or not hasattr(self.current_panel, "back"):
else:
self._screen._menu_go_back() self._screen._menu_go_back()
def process_update(self, action, data): def process_update(self, action, data):
@@ -234,17 +221,19 @@ class BasePanel(ScreenPanel):
name = "" name = ""
if not (device.startswith("extruder") or device.startswith("heater_bed")): if not (device.startswith("extruder") or device.startswith("heater_bed")):
if self.titlebar_name_type == "full": if self.titlebar_name_type == "full":
name = device.split(" ")[1:][0].capitalize().replace("_", " ") + ": " name = device.split()[1] if len(device.split()) > 1 else device
name = f'{name.capitalize().replace("_", " ")}: '
elif self.titlebar_name_type == "short": elif self.titlebar_name_type == "short":
name = device.split(" ")[1:][0][:1].upper() + ": " name = device.split()[1] if len(device.split()) > 1 else device
self.labels[device].set_label("%s%d°" % (name, round(temp))) name = f"{name[:1].upper()}: "
self.labels[device].set_label(f"{name}{int(temp)}°")
if "toolhead" in data and "extruder" in data["toolhead"]: with contextlib.suppress(KeyError):
if data["toolhead"]["extruder"] != self.current_extruder: if data["toolhead"]["extruder"] != self.current_extruder:
self.control['temp_box'].remove(self.labels["%s_box" % self.current_extruder]) self.control['temp_box'].remove(self.labels[f"{self.current_extruder}_box"])
self.current_extruder = data["toolhead"]["extruder"] self.current_extruder = data["toolhead"]["extruder"]
self.control['temp_box'].pack_start(self.labels["%s_box" % self.current_extruder], True, True, 3) self.control['temp_box'].pack_start(self.labels[f"{self.current_extruder}_box"], True, True, 3)
self.control['temp_box'].reorder_child(self.labels["%s_box" % self.current_extruder], 0) self.control['temp_box'].reorder_child(self.labels[f"{self.current_extruder}_box"], 0)
self.control['temp_box'].show_all() self.control['temp_box'].show_all()
def remove(self, widget): def remove(self, widget):
@@ -267,11 +256,11 @@ class BasePanel(ScreenPanel):
self.action_bar.reorder_child(self.control['macros_shortcut'], 2) self.action_bar.reorder_child(self.control['macros_shortcut'], 2)
else: else:
self.action_bar.reorder_child(self.control['macros_shortcut'], 3) self.action_bar.reorder_child(self.control['macros_shortcut'], 3)
self.control['macros_shortcut'].show()
self.buttons_showing['macros_shortcut'] = True self.buttons_showing['macros_shortcut'] = True
elif show is False and self.buttons_showing['macros_shortcut'] is True: elif show is False and self.buttons_showing['macros_shortcut'] is True:
self.action_bar.remove(self.control['macros_shortcut']) self.action_bar.remove(self.control['macros_shortcut'])
self.buttons_showing['macros_shortcut'] = False self.buttons_showing['macros_shortcut'] = False
self._screen.show_all()
def show_printer_select(self, show=True): def show_printer_select(self, show=True):
if len(self._config.get_printers()) <= 1: if len(self._config.get_printers()) <= 1:
@@ -280,28 +269,52 @@ class BasePanel(ScreenPanel):
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)
self.buttons_showing['printer_select'] = True self.buttons_showing['printer_select'] = True
self.control['printer_select'].show()
elif show is False and self.buttons_showing['printer_select']: elif show is False and self.buttons_showing['printer_select']:
self.action_bar.remove(self.control['printer_select']) self.action_bar.remove(self.control['printer_select'])
self.buttons_showing['printer_select'] = False self.buttons_showing['printer_select'] = False
self._screen.show_all()
def set_title(self, title): def set_title(self, title):
if not title:
self.titlelbl.set_label(f"{self._screen.connecting_to_printer}")
return
try: try:
env = Environment(extensions=["jinja2.ext.i18n"]) env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self.lang) env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(title) j2_temp = env.from_string(title)
title = j2_temp.render() title = j2_temp.render()
except Exception: except Exception as e:
logging.debug("Error parsing jinja for title: %s" % title) logging.debug(f"Error parsing jinja for title: {title}\n{e}")
self.titlelbl.set_label("%s | %s" % (self._screen.connecting_to_printer, title)) self.titlelbl.set_label(f"{self._screen.connecting_to_printer} | {title}")
def update_time(self): def update_time(self):
now = datetime.datetime.now() now = datetime.now()
confopt = self._config.get_main_config().getboolean("24htime", True) confopt = self._config.get_main_config().getboolean("24htime", True)
if now.minute != self.time_min or self.time_format != confopt: if now.minute != self.time_min or self.time_format != confopt:
if confopt: if confopt:
self.control['time'].set_text(now.strftime("%H:%M")) self.control['time'].set_text(f'{now:%H:%M }')
else: else:
self.control['time'].set_text(now.strftime("%I:%M %p")) self.control['time'].set_text(f'{now:%I:%M %p}')
self.time_min = now.minute
self.time_format = confopt
return True return True
def show_estop(self, show=True):
if show and self.buttons_showing['estop'] is False:
self.control['estop'].set_sensitive(True)
self.buttons_showing['estop'] = True
elif show is False and self.buttons_showing['estop']:
self.control['estop'].set_sensitive(False)
self.buttons_showing['estop'] = False
def set_ks_printer_cfg(self, printer):
self.ks_printer_cfg = self._config.get_printer_config(printer)
if self.ks_printer_cfg is not None:
self.titlebar_name_type = self.ks_printer_cfg.get("titlebar_name_type", None)
titlebar_items = self.ks_printer_cfg.get("titlebar_items", None)
if titlebar_items is not None:
self.titlebar_items = [str(i.strip()) for i in titlebar_items.split(',')]
logging.info(f"Titlebar name type: {self.titlebar_name_type} items: {self.titlebar_items}")
else:
self.titlebar_items = []
+171 -155
View File
@@ -3,7 +3,7 @@ import logging
import re import re
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk, Pango
from ks_includes.KlippyGcodes import KlippyGcodes from ks_includes.KlippyGcodes import KlippyGcodes
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
@@ -14,87 +14,60 @@ def create_panel(*args):
class BedLevelPanel(ScreenPanel): class BedLevelPanel(ScreenPanel):
x_offset = 0
y_offset = 0
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.response_count = 0
self.screw_dict = {}
self.screws = []
self.y_cnt = 0
self.x_cnt = 0
self.x_offset = 0
self.y_offset = 0
self.labels['dm'] = self._gtk.ButtonImage("motor-off", _("Disable XY"), "color3")
self.labels['dm'].connect("clicked", self.disable_motors)
screw_positions = []
rotation = None
self.panel_name = panel_name
self.screws = None
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.attach(self.labels['dm'], 0, 0, 1, 1)
screws = []
config_section_name = None
if "screws_tilt_adjust" in self._screen.printer.get_config_section_list(): if "screws_tilt_adjust" in self._screen.printer.get_config_section_list():
config_section_name = "screws_tilt_adjust" self.labels['screws'] = self._gtk.ButtonImage("refresh", _("Screws Adjust"), "color4")
elif "bed_screws" in self._screen.printer.get_config_section_list(): self.labels['screws'].connect("clicked", self.screws_tilt_calculate)
config_section_name = "bed_screws" grid.attach(self.labels['screws'], 0, 1, 1, 1)
if config_section_name is not None: self.screws = self._get_screws("screws_tilt_adjust")
config_section = self._screen.printer.get_config_section(config_section_name) logging.info(f"screws_tilt_adjust: {self.screws}")
for item in config_section:
logging.debug("Screws section: %s" % config_section[item])
result = re.match(r"([\-0-9\.]+)\s*,\s*([\-0-9\.]+)", config_section[item])
if result:
screws.append([
round(float(result.group(1)), 2),
round(float(result.group(2)), 2)
])
screws = sorted(screws, key=lambda x: (float(x[1]), float(x[0])))
supported = [4, 6, 8]
nscrews = len(screws)
if nscrews not in supported:
logging.debug("%d bed_screws not supported: calculating 4 locations", nscrews)
xconf = self._screen.printer.get_config_section("stepper_x")
yconf = self._screen.printer.get_config_section("stepper_y")
x = int(int(xconf['position_max']) / 4)
y = int(int(yconf['position_max']) / 4)
self.screws = [
[x, y],
[x * 3, y],
[x, y * 3],
[x * 3, y * 3],
]
else:
self.screws = screws
if (("bltouch" in self._screen.printer.get_config_section_list() or
"probe" in self._screen.printer.get_config_section_list()) and
config_section_name == "screws_tilt_adjust"):
if "bltouch" in self._screen.printer.get_config_section_list(): if "bltouch" in self._screen.printer.get_config_section_list():
bltouch = self._screen.printer.get_config_section("bltouch") self._get_offsets("bltouch")
if "x_offset" in bltouch:
self.x_offset = float(bltouch['x_offset'])
if "y_offset" in bltouch:
self.y_offset = float(bltouch['y_offset'])
logging.debug("Bltouch found substracted offset X: %.0f Y: %.0f", self.x_offset, self.y_offset)
self._screen.show_popup_message(_("Bltouch found applied offset"), level=1)
elif "probe" in self._screen.printer.get_config_section_list(): elif "probe" in self._screen.printer.get_config_section_list():
probe = self._screen.printer.get_config_section("probe") self._get_offsets("probe")
if "x_offset" in probe: # bed_screws uses NOZZLE positions
self.x_offset = float(probe['x_offset']) # screws_tilt_adjust uses PROBE positions and to be offseted for the buttons to work equal to bed_screws
if "y_offset" in probe: new_screws = [
self.y_offset = float(probe['y_offset']) [round(screw[0] + self.x_offset, 1), round(screw[1] + self.y_offset, 1)]
logging.debug("Probe found substracting offset X: %.0f Y: %.0f", self.x_offset, self.y_offset) for screw in self.screws
self._screen.show_popup_message(_("Probe found applied offset"), level=1) ]
new_screws = []
for screw in self.screws:
new_screws.append([
self.apply_offset(screw[0], self.x_offset),
self.apply_offset(screw[1], self.y_offset)
])
self.screws = new_screws self.screws = new_screws
logging.info(f"screws with offset: {self.screws}")
elif "bed_screws" in self._screen.printer.get_config_section_list():
self.screws = self._get_screws("bed_screws")
logging.info(f"bed_screws: {self.screws}")
# get dimensions # get dimensions
self.x_cnt = len(list(dict.fromkeys([int(x[0]) for x in self.screws]))) x_positions = {x[0] for x in self.screws}
self.y_cnt = len(list(dict.fromkeys([int(x[1]) for x in self.screws]))) y_positions = {y[1] for y in self.screws}
logging.info(f"X: {x_positions}\nY: {y_positions}")
self.x_cnt = len(x_positions)
self.y_cnt = len(y_positions)
min_x = min(dict(self.screws).keys()) min_x = min(x_positions)
max_x = max(dict(self.screws).keys()) max_x = max(x_positions)
min_y = min(dict(self.screws[::-1]).values()) min_y = min(y_positions)
max_y = max(dict(self.screws).values()) max_y = max(y_positions)
fl = [min_x, min_y] fl = [min_x, min_y]
bl = [min_x, max_y] bl = [min_x, max_y]
@@ -114,37 +87,86 @@ class BedLevelPanel(ScreenPanel):
else: else:
lm = rm = None lm = rm = None
logging.debug("Using %d-screw locations [x,y] [%dx%d]", len(self.screws), self.x_cnt, self.y_cnt) logging.debug(f"Using {len(self.screws)}-screw locations [x,y] [{self.x_cnt}x{self.y_cnt}]")
self.labels['bl'] = self._gtk.ButtonImage("bed-level-t-l", None, None, 2.5) self.labels['bl'] = self._gtk.ButtonImage("bed-level-t-l", scale=2.5)
self.labels['br'] = self._gtk.ButtonImage("bed-level-t-r", None, None, 2.5) self.labels['br'] = self._gtk.ButtonImage("bed-level-t-r", scale=2.5)
self.labels['fl'] = self._gtk.ButtonImage("bed-level-b-l", None, None, 2.5) self.labels['fl'] = self._gtk.ButtonImage("bed-level-b-l", scale=2.5)
self.labels['fr'] = self._gtk.ButtonImage("bed-level-b-r", None, None, 2.5) self.labels['fr'] = self._gtk.ButtonImage("bed-level-b-r", scale=2.5)
self.labels['lm'] = self._gtk.ButtonImage("bed-level-l-m", None, None, 2.5) self.labels['lm'] = self._gtk.ButtonImage("bed-level-l-m", scale=2.5)
self.labels['rm'] = self._gtk.ButtonImage("bed-level-r-m", None, None, 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", None, None, 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", None, None, 2.5) self.labels['bm'] = self._gtk.ButtonImage("bed-level-t-m", scale=2.5)
bedgrid = Gtk.Grid() valid_positions = True
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1) printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1) if printer_cfg is not None:
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1) logging.info(f"printer {printer_cfg}")
bedgrid.attach(self.labels['br'], 3, 0, 1, 1) screw_positions = printer_cfg.get("screw_positions", "")
screw_positions = [str(i.strip()) for i in screw_positions.split(',')]
rotation = 0 logging.info(f"Positions: {screw_positions}")
for screw in screw_positions:
if screw not in ("bl", "fl", "fr", "br", "bm", "fm", "lm", "rm", ""):
logging.error(f"Unknown screw: {screw}")
self._screen.show_popup_message(_("Unknown screw position") + f": {screw}")
valid_positions = False
if not (3 <= len(screw_positions) <= 8):
valid_positions = False
rotation = printer_cfg.getint("screw_rotation", 0)
logging.info(f"Rotation: {rotation}")
else:
valid_positions = False
if 'bed_screws' in self._config.get_config(): if 'bed_screws' in self._config.get_config():
rotation = self._config.get_config()['bed_screws'].getint("rotation", 0) rotation = self._config.get_config()['bed_screws'].getint("rotation", 0)
logging.debug("Rotation: %d", rotation) logging.debug(f"Rotation: {rotation}")
bedgrid = Gtk.Grid()
nscrews = len(self.screws)
if valid_positions:
if "bl" in screw_positions:
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1)
if "fl" in screw_positions:
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1)
if "fr" in screw_positions:
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1)
if "br" in screw_positions:
bedgrid.attach(self.labels['br'], 3, 0, 1, 1)
if "bm" in screw_positions:
bedgrid.attach(self.labels['bm'], 2, 0, 1, 1)
if "fm" in screw_positions:
bedgrid.attach(self.labels['fm'], 2, 2, 1, 1)
if "lm" in screw_positions:
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1)
if "rm" in screw_positions:
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1)
elif nscrews in {4, 6, 8}:
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1)
bedgrid.attach(self.labels['fl'], 1, 2, 1, 1)
bedgrid.attach(self.labels['fr'], 3, 2, 1, 1)
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:
label = Gtk.Label(
_("Bed screw configuration:") + f" {nscrews}\n\n"
+ _("Not supported for auto-detection, it needs to be configured in klipperscreen.conf")
)
label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
label.set_line_wrap(True)
grid.attach(label, 1, 0, 3, 2)
self.content.add(grid)
return
if rotation == 90: if rotation == 90:
# fl lm bl # fl lm bl
# fm bm # fm bm
# fr rm br # fr rm br
if self.y_cnt == 3:
bedgrid.attach(self.labels['bm'], 2, 0, 1, 1)
bedgrid.attach(self.labels['fm'], 2, 2, 1, 1)
if self.x_cnt == 3:
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1)
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1)
self.labels['bl'].connect("clicked", self.go_to_position, fl) self.labels['bl'].connect("clicked", self.go_to_position, fl)
self.labels['bm'].connect("clicked", self.go_to_position, lm) self.labels['bm'].connect("clicked", self.go_to_position, lm)
self.labels['br'].connect("clicked", self.go_to_position, bl) self.labels['br'].connect("clicked", self.go_to_position, bl)
@@ -167,12 +189,6 @@ class BedLevelPanel(ScreenPanel):
# fr fm fl # fr fm fl
# rm lm # rm lm
# br bm bl # br bm bl
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)
self.labels['bl'].connect("clicked", self.go_to_position, fr) self.labels['bl'].connect("clicked", self.go_to_position, fr)
self.labels['bm'].connect("clicked", self.go_to_position, fm) self.labels['bm'].connect("clicked", self.go_to_position, fm)
self.labels['br'].connect("clicked", self.go_to_position, fl) self.labels['br'].connect("clicked", self.go_to_position, fl)
@@ -195,12 +211,6 @@ class BedLevelPanel(ScreenPanel):
# br rm fr # br rm fr
# bm fm # bm fm
# bl lm fl # bl lm fl
if self.y_cnt == 3:
bedgrid.attach(self.labels['bm'], 2, 0, 1, 1)
bedgrid.attach(self.labels['fm'], 2, 2, 1, 1)
if self.x_cnt == 3:
bedgrid.attach(self.labels['lm'], 1, 1, 1, 1)
bedgrid.attach(self.labels['rm'], 3, 1, 1, 1)
self.labels['bl'].connect("clicked", self.go_to_position, br) self.labels['bl'].connect("clicked", self.go_to_position, br)
self.labels['bm'].connect("clicked", self.go_to_position, rm) self.labels['bm'].connect("clicked", self.go_to_position, rm)
self.labels['br'].connect("clicked", self.go_to_position, fr) self.labels['br'].connect("clicked", self.go_to_position, fr)
@@ -241,41 +251,24 @@ class BedLevelPanel(ScreenPanel):
'fl': fl, 'fl': fl,
'lm': lm 'lm': lm
} }
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)
grid.attach(bedgrid, 1, 0, 3, 2) grid.attach(bedgrid, 1, 0, 3, 2)
self.labels['dm'] = self._gtk.ButtonImage("motor-off", _("Disable XY"), "color3")
self.labels['dm'].connect("clicked", self.disable_motors)
grid.attach(self.labels['dm'], 0, 0, 1, 1)
if self._printer.config_section_exists("screws_tilt_adjust"):
self.labels['screws'] = self._gtk.ButtonImage("refresh", _("Screws Adjust"), "color4")
self.labels['screws'].connect("clicked", self.screws_tilt_calculate)
grid.attach(self.labels['screws'], 0, 1, 1, 1)
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(str(value)) self.labels[key].set_label(f"{value}")
if self._printer.config_section_exists("screws_tilt_adjust"): if self._printer.config_section_exists("screws_tilt_adjust"):
self.labels['screws'].set_sensitive(True) self.labels['screws'].set_sensitive(True)
def go_to_position(self, widget, position): def go_to_position(self, widget, position):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME) self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
logging.debug("Going to position: %s", position) logging.debug(f"Going to position: {position}")
script = [ script = [
"%s" % KlippyGcodes.MOVE_ABSOLUTE, f"{KlippyGcodes.MOVE_ABSOLUTE}",
"G1 Z7 F800\n", "G1 Z7 F800\n",
"G1 X%s Y%s F3600\n" % (position[0], position[1]), f"G1 X{position[0]} Y{position[1]} F3600\n",
"G1 Z.1 F300\n" "G1 Z.1 F300\n"
] ]
@@ -290,43 +283,66 @@ class BedLevelPanel(ScreenPanel):
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_gcode_response": if action != "notify_gcode_response":
if data.startswith('!!'): return
self.response_count = 0 if data.startswith('!!'):
self.response_count = 0
self.labels['screws'].set_sensitive(True)
return
result = re.match(
"^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]+ :" +
" (Adjust ->|adjust) ([CW]+ [0-9:]+)",
data
)
# screws_tilt_adjust uses PROBE positions and was offseted for the buttons to work equal to bed_screws
# for the result we need to undo the offset
if result:
x = round(float(result[2]) + self.x_offset, 1)
y = round(float(result[3]) + self.y_offset, 1)
for key, value in self.screw_dict.items():
if value and x == value[0] and y == value[1]:
logging.debug(f"X: {x} Y: {y} Adjust: {result[5]} Pos: {key}")
self.labels[key].set_label(result[5])
break
self.response_count += 1
if self.response_count >= len(self.screws) - 1:
self.labels['screws'].set_sensitive(True) self.labels['screws'].set_sensitive(True)
return 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\\.]",
" (Adjust ->|adjust) ([CW]+ [0-9:]+)",
data data
) )
if result: # screws_tilt_adjust uses PROBE positions and was offseted for the buttons to work equal to bed_screws
x = self.apply_offset(result.group(2), self.x_offset) # for the result we need to undo the offset
y = self.apply_offset(result.group(3), self.y_offset) if result and re.search('base', result[1]):
x = round(float(result[2]) + self.x_offset, 1)
y = round(float(result[3]) + self.y_offset, 1)
logging.debug(f"X: {x} Y: {y} is the reference")
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("X: %s Y: %s Adjust: %s Pos: %s" % (x, y, result.group(5), key)) logging.debug(f"X: {x} Y: {y} Pos: {key}")
self.labels[key].set_label(result.group(5)) self.labels[key].set_label(_("Reference"))
break
self.response_count += 1
if self.response_count >= len(self.screws) - 1:
self.labels['screws'].set_sensitive(True)
else:
result = re.match(
"^// (.*) : [xX= ]+([\\-0-9\\.]+), [yY= ]+([\\-0-9\\.]+), [zZ= ]+[\\-0-9\\.]",
data
)
if result and re.search('base', result.group(1)):
x = self.apply_offset(result.group(2), self.x_offset)
y = self.apply_offset(result.group(3), self.y_offset)
logging.debug("X: %s Y: %s is the reference" % (x, y))
for key, value in self.screw_dict.items():
if value and x == value[0] and y == value[1]:
logging.debug("X: %s Y: %s Pos: %s" % (x, y, key))
self.labels[key].set_label(_("Reference"))
def apply_offset(self, pos, offset): def _get_screws(self, config_section_name):
return max(0, int(float(pos) - offset)) screws = []
config_section = self._screen.printer.get_config_section(config_section_name)
for item in config_section:
logging.debug(f"{config_section_name}: {config_section[item]}")
result = re.match(r"([\-0-9\.]+)\s*,\s*([\-0-9\.]+)", config_section[item])
if result:
screws.append([
round(float(result[1]), 1),
round(float(result[2]), 1)
])
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": if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
+159 -257
View File
@@ -1,19 +1,13 @@
import gi import gi
import logging import logging
import numpy as np import contextlib
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango from gi.repository import Gtk, Pango
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib import rc
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
from matplotlib.ticker import LinearLocator
from ks_includes.KlippyGcodes import KlippyGcodes from ks_includes.KlippyGcodes import KlippyGcodes
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
from ks_includes.widgets.bedmap import BedMap
def create_panel(*args): def create_panel(*args):
@@ -21,151 +15,145 @@ def create_panel(*args):
class BedMeshPanel(ScreenPanel): class BedMeshPanel(ScreenPanel):
active_mesh = None
graphs = {}
def initialize(self, panel_name):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.clear = None
self.profiles = {}
self.show_create = False self.show_create = False
self.active_mesh = None
addprofile = self._gtk.ButtonImage("increase", " " + _("Add profile"), "color1", .66, Gtk.PositionType.LEFT, 1)
addprofile.connect("clicked", self.show_create_profile)
addprofile.set_hexpand(True)
self.clear = self._gtk.ButtonImage("cancel", " " + _("Clear"), "color2", .66, Gtk.PositionType.LEFT, 1)
self.clear.connect("clicked", self.send_clear_mesh)
self.clear.set_hexpand(True)
calibrate = self._gtk.ButtonImage("refresh", " " + _("Calibrate"), "color3", .66, Gtk.PositionType.LEFT, 1)
calibrate.connect("clicked", self.calibrate_mesh)
calibrate.set_hexpand(True)
scroll = self._gtk.ScrolledWindow() topbar = Gtk.Box(spacing=5)
topbar.set_hexpand(True)
topbar.set_vexpand(False)
topbar.add(addprofile)
topbar.add(self.clear)
topbar.add(calibrate)
# 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)
scroll = self._gtk.ScrolledWindow()
scroll.add(self.labels['profiles']) scroll.add(self.labels['profiles'])
scroll.set_vexpand(True)
addprofile = self._gtk.ButtonImage("increase", " %s" % _("Add bed mesh profile"),
"color1", .5, Gtk.PositionType.LEFT, False)
addprofile.connect("clicked", self.show_create_profile)
addprofile.set_size_request(60, 0)
addprofile.set_hexpand(False)
addprofile.set_halign(Gtk.Align.END)
abox = Gtk.Box(spacing=0)
abox.set_vexpand(False)
abox.add(addprofile)
# Create a box to contain all of the above
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True)
box.pack_start(abox, False, False, 0)
box.pack_end(scroll, True, True, 0)
self.load_meshes() self.load_meshes()
self.labels['main_box'] = box grid = self._gtk.HomogeneousGrid()
self.content.add(self.labels['main_box']) grid.set_row_homogeneous(False)
grid.attach(topbar, 0, 0, 2, 1)
self.labels['map'] = BedMap(self._gtk.get_font_size(), self.active_mesh)
if self._screen.vertical_mode:
grid.attach(self.labels['map'], 0, 2, 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)
else:
grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1)
self.labels['main_grid'] = grid
self.content.add(self.labels['main_grid'])
def activate(self): def activate(self):
for child in self.content.get_children(): self.load_meshes()
self.content.remove(child) with contextlib.suppress(KeyError):
self.content.add(self.labels['main_box']) self.activate_mesh(self._screen.printer.get_stat("bed_mesh", "profile_name"))
am = self._screen.printer.get_stat("bed_mesh", "profile_name")
self.activate_mesh(am)
def activate_mesh(self, profile): def activate_mesh(self, profile):
if self.active_mesh is not None:
self.profiles[self.active_mesh]['name'].set_sensitive(True)
self.profiles[self.active_mesh]['name'].get_style_context().remove_class("button_active")
if profile == "": if profile == "":
profile = "default" logging.info("Clearing active profile")
self.active_mesh = None
self.update_graph()
self.clear.set_sensitive(False)
return
if profile not in self.profiles:
self.add_profile(profile)
logging.debug("Activating profile: %s %s" % (self.active_mesh, profile)) if self.active_mesh != profile:
if profile != self.active_mesh: logging.info(f"Active {self.active_mesh} changing to {profile}")
if profile not in self.profiles: self.profiles[profile]['name'].set_sensitive(False)
self.add_profile(profile) self.profiles[profile]['name'].get_style_context().add_class("button_active")
if self.active_mesh is not None and self.active_mesh in self.profiles: self.active_mesh = profile
a = self.profiles[self.active_mesh] self.update_graph(profile=profile)
a['buttons'].remove(a['refresh']) self.clear.set_sensitive(True)
a['buttons'].pack_start(a['load'], False, False, 0)
self.active_mesh = profile def retrieve_bm(self, profile):
if self.active_mesh is not None: if profile is None:
a = self.profiles[profile] return None
a['buttons'].remove(a['load']) if profile == self.active_mesh:
a['buttons'].pack_start(a['refresh'], False, False, 0) bm = self._printer.get_stat("bed_mesh")
self._screen.show_all() if bm is None:
logging.info(f"Unable to load active mesh: {profile}")
return None
matrix = 'probed_matrix'
else:
bm = self._printer.get_config_section(f"bed_mesh {profile}")
if bm is False:
logging.info(f"Unable to load profile: {profile}")
self.remove_profile(profile)
return None
matrix = 'points'
return bm[matrix]
def update_graph(self, widget=None, profile=None):
self.labels['map'].update_bm(self.retrieve_bm(profile))
self.labels['map'].queue_draw()
def add_profile(self, profile): def add_profile(self, profile):
logging.debug(f"Adding Profile: {profile}")
name = self._gtk.Button(f"<big><b>{profile}</b></big>")
name.get_children()[0].set_use_markup(True)
name.get_children()[0].set_line_wrap(True)
name.get_children()[0].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
name.set_vexpand(False)
name.set_halign(Gtk.Align.START)
name.connect("clicked", self.send_load_mesh, profile)
name.connect("clicked", self.update_graph, profile)
buttons = {
"save": self._gtk.ButtonImage("complete", None, "color4", .75),
"delete": self._gtk.ButtonImage("cancel", None, "color2", .75),
}
buttons["save"].connect("clicked", self.send_save_mesh, profile)
buttons["delete"].connect("clicked", self.send_remove_mesh, profile)
for b in buttons.values():
b.set_hexpand(False)
b.set_vexpand(False)
b.set_halign(Gtk.Align.END)
button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
if profile != "default":
button_box.add(buttons["save"])
button_box.add(buttons["delete"])
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
box.pack_start(name, True, True, 0)
box.pack_start(button_box, False, False, 0)
frame = Gtk.Frame() frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
name = Gtk.Label() frame.add(box)
name.set_markup("<big><b>%s</b></big>" % profile)
name.set_hexpand(True)
name.set_vexpand(True)
name.set_halign(Gtk.Align.START)
name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
load = self._gtk.ButtonImage("load", _("Load"), "color2")
load.connect("clicked", self.send_load_mesh, profile)
load.set_size_request(60, 0)
load.set_hexpand(False)
load.set_halign(Gtk.Align.END)
refresh = self._gtk.ButtonImage("refresh", _("Calibrate"), "color4")
refresh.connect("clicked", self.calibrate_mesh)
refresh.set_size_request(60, 0)
refresh.set_hexpand(False)
refresh.set_halign(Gtk.Align.END)
view = self._gtk.ButtonImage("bed-level", _("View Mesh"), "color1")
view.connect("clicked", self.show_mesh, profile)
view.set_size_request(60, 0)
view.set_hexpand(False)
view.set_halign(Gtk.Align.END)
info = self._gtk.ButtonImage("info", None, "color3")
info.connect("clicked", self.show_mesh, profile)
info.set_size_request(60, 0)
info.set_hexpand(False)
info.set_halign(Gtk.Align.END)
save = self._gtk.ButtonImage("sd", _("Save"), "color3")
save.connect("clicked", self.send_save_mesh, profile)
save.set_size_request(60, 0)
save.set_hexpand(False)
save.set_halign(Gtk.Align.END)
delete = self._gtk.ButtonImage("cancel", _("Delete"), "color3")
delete.connect("clicked", self.send_remove_mesh, profile)
delete.set_size_request(60, 0)
delete.set_hexpand(False)
delete.set_halign(Gtk.Align.END)
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
labels.add(name)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.set_margin_top(10)
dev.set_margin_end(15)
dev.set_margin_start(15)
dev.set_margin_bottom(10)
dev.set_hexpand(True)
dev.set_vexpand(False)
dev.add(labels)
buttons = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
logging.debug("Profile compare: '%s' '%s'" % (self.active_mesh, profile))
if self.active_mesh == profile:
buttons.pack_start(refresh, False, False, 0)
else:
buttons.pack_start(load, False, False, 0)
# buttons.pack_end(info, False, False, 0)
if profile != "default":
buttons.pack_end(save, False, False, 0)
buttons.pack_end(delete, False, False, 0)
buttons.pack_end(view, False, False, 0)
dev.add(buttons)
frame.add(dev)
self.profiles[profile] = { self.profiles[profile] = {
"box": dev, "name": name,
"buttons": buttons, "button_box": button_box,
"row": frame, "row": frame,
"load": load, "save": buttons["save"],
"refresh": refresh, "delete": buttons["delete"],
"save": save,
"view": view,
} }
pl = list(self.profiles) pl = list(self.profiles)
@@ -184,36 +172,19 @@ class BedMeshPanel(ScreenPanel):
return True return True
return False return False
def create_profile(self, widget):
name = self.labels['profile_name'].get_text()
if " " in name:
name = '"%s"' % name
self._screen._ws.klippy.gcode_script("BED_MESH_PROFILE SAVE=%s" % name)
self.remove_create()
def calibrate_mesh(self, widget):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
self._screen._ws.klippy.gcode_script(
"BED_MESH_CALIBRATE"
)
if not (self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch")):
self.menu_item_clicked(widget, "refresh", {"name": "Mesh calibrate", "panel": "zcalibrate"})
def load_meshes(self): def load_meshes(self):
bm_profiles = self._screen.printer.get_config_section_list("bed_mesh ") bm_profiles = self._printer.get_stat("bed_mesh", "profiles")
self.profiles = {}
for prof in bm_profiles: for prof in bm_profiles:
self.add_profile(prof[9:]) if prof not in self.profiles:
self.add_profile(prof)
for prof in self.profiles:
if prof not in bm_profiles:
self.remove_profile(prof)
def process_update(self, action, data): def process_update(self, action, data):
if action == "notify_status_update": if action == "notify_status_update":
if "bed_mesh" in data and "profile_name" in data['bed_mesh']: with contextlib.suppress(KeyError):
if data['bed_mesh']['profile_name'] != self.active_mesh: self.activate_mesh(data['bed_mesh']['profile_name'])
self.activate_mesh(data['bed_mesh']['profile_name'])
def remove_create(self): def remove_create(self):
if self.show_create is False: if self.show_create is False:
@@ -224,7 +195,7 @@ class BedMeshPanel(ScreenPanel):
self.content.remove(child) self.content.remove(child)
self.show_create = False self.show_create = False
self.content.add(self.labels['main_box']) self.content.add(self.labels['main_grid'])
self.content.show() self.content.show()
def remove_profile(self, profile): def remove_profile(self, profile):
@@ -238,22 +209,10 @@ class BedMeshPanel(ScreenPanel):
pos = profiles.index(profile) + 1 if profile != "default" else 0 pos = profiles.index(profile) + 1 if profile != "default" else 0
self.labels['profiles'].remove_row(pos) self.labels['profiles'].remove_row(pos)
del self.profiles[profile] del self.profiles[profile]
if not self.profiles:
def send_load_mesh(self, widget, profile): self.active_mesh = None
self._screen._ws.klippy.gcode_script( self.update_graph()
KlippyGcodes.bed_mesh_load(profile) self.clear.set_sensitive(False)
)
def send_save_mesh(self, widget, profile):
self._screen._ws.klippy.gcode_script(
KlippyGcodes.bed_mesh_save(profile)
)
def send_remove_mesh(self, widget, profile):
self._screen._ws.klippy.gcode_script(
KlippyGcodes.bed_mesh_remove(profile)
)
self.remove_profile(profile)
def show_create_profile(self, widget): def show_create_profile(self, widget):
@@ -267,10 +226,10 @@ 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._screen.show_keyboard) self.labels['profile_name'].connect("focus-in-event", self._show_keyboard)
self.labels['profile_name'].grab_focus_without_selecting() self.labels['profile_name'].grab_focus_without_selecting()
save = self._gtk.ButtonImage("sd", _("Save"), "color3") save = self._gtk.ButtonImage("complete", _("Save"), "color3")
save.set_hexpand(False) save.set_hexpand(False)
save.connect("clicked", self.create_profile) save.connect("clicked", self.create_profile)
@@ -286,97 +245,40 @@ 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._screen.show_keyboard() self._show_keyboard()
self.show_create = True self.show_create = True
def show_mesh(self, widget, profile): def _show_keyboard(self, widget=None, event=None):
self._screen.show_keyboard(entry=self.labels['profile_name'])
bm = self._printer.get_config_section("bed_mesh %s" % profile) def create_profile(self, widget):
if bm is False: name = self.labels['profile_name'].get_text()
logging.info("Unable to load profile: %s" % profile) if self.active_mesh is None:
return self.calibrate_mesh(None)
if profile == self.active_mesh: self._screen._ws.klippy.gcode_script(f"BED_MESH_PROFILE SAVE={name}")
abm = self._printer.get_stat("bed_mesh") self.remove_create()
if abm is None:
logging.info("Unable to load active mesh: %s" % profile)
return
x_range = [int(abm['mesh_min'][0]), int(abm['mesh_max'][0])]
y_range = [int(abm['mesh_min'][1]), int(abm['mesh_max'][1])]
minz_mesh = min(min(abm['mesh_matrix']))
maxz_mesh = max(max(abm['mesh_matrix']))
# Do not use a very small zscale, because that could be misleading
if minz_mesh > -0.5:
minz_mesh = -0.5
if maxz_mesh < 0.5:
maxz_mesh = 0.5
z_range = [minz_mesh, maxz_mesh]
counts = [len(abm['mesh_matrix'][0]), len(abm['mesh_matrix'])]
deltas = [(x_range[1] - x_range[0]) / (counts[0] - 1), (y_range[1] - y_range[0]) / (counts[1] - 1)]
x = [(i * deltas[0]) + x_range[0] for i in range(counts[0])]
y = [(i * deltas[0]) + y_range[0] for i in range(counts[1])]
x, y = np.meshgrid(x, y)
z = np.asarray(abm['mesh_matrix'])
else:
x_range = [int(bm['min_x']), int(bm['max_x'])]
y_range = [int(bm['min_y']), int(bm['max_y'])]
z_range = [min(min(bm['points'])), max(max(bm['points']))]
deltas = [(x_range[1] - x_range[0]) / (int(bm['x_count']) - 1),
(y_range[1] - y_range[0]) / (int(bm['y_count']) - 1)]
x = [(i * deltas[0]) + x_range[0] for i in range(bm['x_count'])]
y = [(i * deltas[0]) + y_range[0] for i in range(bm['y_count'])]
x, y = np.meshgrid(x, y)
z = np.asarray(bm['points'])
rc('axes', edgecolor="#e2e2e2", labelcolor="#e2e2e2") def calibrate_mesh(self, widget):
rc(('xtick', 'ytick'), color="#e2e2e2") self._screen.show_popup_message(_("Calibrating"), level=1)
fig = plt.figure(facecolor='#12121277') if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
ax = Axes3D(fig, azim=245, elev=23) self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
ax.set(title=profile, xlabel="X", ylabel="Y", facecolor='none')
ax.spines['bottom'].set_color("#e2e2e2")
fig.add_axes(ax)
surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm, vmin=-0.1, vmax=0.1)
chartbox = ax.get_position() self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE")
ax.set_position([chartbox.x0, chartbox.y0 + 0.1, chartbox.width * .92, chartbox.height])
ax.set_zlim(z_range[0], z_range[1]) # Load zcalibrate to do a manual mesh
ax.zaxis.set_major_locator(LinearLocator(5)) if not (self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch")):
# A StrMethodFormatter is used automatically self.menu_item_clicked(widget, "refresh", {"name": _("Mesh calibrate"), "panel": "zcalibrate"})
ax.zaxis.set_major_formatter('{x:.02f}')
fig.colorbar(surf, shrink=0.7, aspect=5, pad=0.25)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) def send_clear_mesh(self, widget):
box.set_hexpand(True) self._screen._ws.klippy.gcode_script("BED_MESH_CLEAR")
box.set_vexpand(True)
title = Gtk.Label() def send_load_mesh(self, widget, profile):
title.set_markup("<b>%s</b>" % profile) self._screen._ws.klippy.gcode_script(KlippyGcodes.bed_mesh_load(profile))
title.set_hexpand(True)
title.set_halign(Gtk.Align.CENTER)
canvas_box = Gtk.Box() def send_save_mesh(self, widget, profile):
canvas_box.set_hexpand(True) self._screen._ws.klippy.gcode_script(KlippyGcodes.bed_mesh_save(profile))
canvas_box.set_vexpand(True)
box.add(title) def send_remove_mesh(self, widget, profile):
box.add(canvas_box) self._screen._ws.klippy.gcode_script(KlippyGcodes.bed_mesh_remove(profile))
self.remove_profile(profile)
buttons = [
{"name": _("Close"), "response": Gtk.ResponseType.CANCEL}
]
self._gtk.Dialog(self._screen, buttons, box, self._close_dialog)
alloc = canvas_box.get_allocation()
canvas = FigureCanvas(fig)
canvas.set_size_request(alloc.width, self._screen.height / 3 * 2)
canvas_box.add(canvas)
canvas_box.show_all()
# Remove the "matplotlib-canvas" class which forces a white background.
# https://github.com/matplotlib/matplotlib/commit/3c832377fb4c4b32fcbdbc60fdfedb57296bc8c0
style_ctx = canvas.get_style_context()
for css_class in style_ctx.list_classes():
style_ctx.remove_class(css_class)
def _close_dialog(self, widget, response):
widget.destroy()
+14 -13
View File
@@ -1,5 +1,4 @@
import gi import gi
import logging
import time import time
import re import re
@@ -24,12 +23,11 @@ COLORS = {
class ConsolePanel(ScreenPanel): class ConsolePanel(ScreenPanel):
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
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)
gcodes = 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_lbl.set_halign(Gtk.Align.END)
@@ -47,7 +45,7 @@ class ConsolePanel(ScreenPanel):
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, False) o3_button = self._gtk.ButtonImage("refresh", _('Clear') + " ", None, .66, Gtk.PositionType.RIGHT, 1)
o3_button.connect("clicked", self.clear) o3_button.connect("clicked", self.clear)
options = Gtk.Box() options = Gtk.Box()
@@ -80,12 +78,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._screen.show_keyboard) entry.connect("button-press-event", self._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, False) enter = self._gtk.ButtonImage("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)
@@ -105,11 +103,14 @@ 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):
self._screen.show_keyboard(entry=self.labels['entry'])
def clear(self, widget): def clear(self, widget):
self.labels['tb'].set_text("") self.labels['tb'].set_text("")
def add_gcode(self, type, time, message): def add_gcode(self, msgtype, msgtime, message):
if type == "command": if msgtype == "command":
color = COLORS['command'] color = COLORS['command']
elif message.startswith("!!"): elif message.startswith("!!"):
color = COLORS['error'] color = COLORS['error']
@@ -122,14 +123,14 @@ class ConsolePanel(ScreenPanel):
else: else:
color = COLORS['response'] color = COLORS['response']
message = '<span color="%s"><b>%s</b></span>' % (color, message) message = f'<span color="{color}"><b>{message}</b></span>'
message = message.replace('\n', '\n ') message = message.replace('\n', '\n ')
self.labels['tb'].insert_markup( self.labels['tb'].insert_markup(
self.labels['tb'].get_end_iter(), self.labels['tb'].get_end_iter(),
'\n<span color="%s">%s</span> %s' % (COLORS['time'], datetime.fromtimestamp(time).strftime("%H:%M:%S"), f'\n<span color="{COLORS["time"]}">{datetime.fromtimestamp(msgtime).strftime("%H:%M:%S")}</span> {message}',
message), -1 -1
) )
# Limit the length # Limit the length
if self.labels['tb'].get_line_count() > 999: if self.labels['tb'].get_line_count() > 999:
+2 -1
View File
@@ -11,7 +11,8 @@ def create_panel(*args):
class ExamplePanel(ScreenPanel): class ExamplePanel(ScreenPanel):
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
# Create gtk items here # Create gtk items here
+129
View File
@@ -0,0 +1,129 @@
import contextlib
import logging
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Pango
from ks_includes.screen_panel import ScreenPanel
from ks_includes.widgets.objectmap import ObjectMap
def create_panel(*args):
return ExcludeObjectPanel(*args)
class ExcludeObjectPanel(ScreenPanel):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self._screen = screen
self.object_list = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
self.object_list.set_valign(Gtk.Align.CENTER)
self.object_list.set_halign(Gtk.Align.START)
self.buttons = {}
self.current_object = self._gtk.ButtonImage("extrude", "", scale=.66, position=Gtk.PositionType.LEFT, lines=1)
self.current_object.connect("clicked", self.exclude_current)
self.current_object.set_vexpand(False)
self.excluded_objects = self._printer.get_stat("exclude_object", "excluded_objects")
logging.info(f'Excluded: {self.excluded_objects}')
self.objects = self._printer.get_stat("exclude_object", "objects")
self.labels['map'] = None
for obj in self.objects:
logging.info(f"Adding {obj['name']}")
self.add_object(obj["name"])
scroll = self._gtk.ScrolledWindow()
scroll.add(self.object_list)
scroll.set_halign(Gtk.Align.CENTER)
grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False)
grid.attach(self.current_object, 0, 0, 2, 1)
grid.attach(Gtk.Separator(), 0, 1, 2, 1)
if self.objects and "polygon" in self.objects[0]:
self.labels['map'] = ObjectMap(self._screen, self._printer, self._gtk.get_font_size())
if self._screen.vertical_mode:
grid.attach(self.labels['map'], 0, 2, 2, 1)
grid.attach(scroll, 0, 3, 2, 1)
scroll.set_size_request(self._screen.width, -1)
else:
grid.attach(self.labels['map'], 0, 2, 1, 1)
grid.attach(scroll, 1, 2, 1, 1)
scroll.set_size_request((self._screen.width * .9) // 2, -1)
else:
grid.attach(scroll, 0, 2, 2, 1)
scroll.set_size_request(self._gtk.get_content_width(), -1)
self.content.add(grid)
self.content.show_all()
def add_object(self, name):
if name not in self.buttons and name not in self.excluded_objects:
self.buttons[name] = self._gtk.Button(name.replace("_", " "))
self.buttons[name].get_children()[0].set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
self.buttons[name].get_children()[0].set_line_wrap(True)
self.buttons[name].connect("clicked", self.exclude_object, name)
self.buttons[name].get_style_context().add_class("frame-item")
self.object_list.add(self.buttons[name])
def exclude_object(self, widget, name):
if len(self.excluded_objects) == len(self.objects) - 1:
# Do not exclude the last object, this is a workaround for a bug of klipper that starts
# to move the toolhead really fast skipping gcode until the file ends
# Remove this if they fix it.
self._screen._confirm_send_action(
widget,
_("Are you sure you wish to cancel this print?"),
"printer.print.cancel",
)
return
script = {"script": f"EXCLUDE_OBJECT NAME={name}"}
self._screen._confirm_send_action(
widget,
_("Are you sure do you want to exclude the object?") + f"\n\n{name}",
"printer.gcode.script",
script
)
def exclude_current(self, widget):
self.exclude_object(widget, f"{self.current_object.get_label()}")
def process_update(self, action, data):
if action == "notify_status_update":
with contextlib.suppress(KeyError):
# Update objects
self.objects = data["exclude_object"]["objects"]
logging.info(f'Objects: {data["exclude_object"]["objects"]}')
for obj in self.buttons:
self.object_list.remove(self.buttons[obj])
self.buttons = {}
for obj in self.objects:
logging.info(f"Adding {obj['name']}")
self.add_object(obj["name"])
with contextlib.suppress(KeyError):
# Update current objects
if data["exclude_object"]["current_object"]:
self.current_object.set_label(f'{data["exclude_object"]["current_object"].replace("_", " ")}')
self.update_graph()
with contextlib.suppress(KeyError):
# Update excluded objects
logging.info(f'Excluded objects: {data["exclude_object"]["excluded_objects"]}')
self.excluded_objects = data["exclude_object"]["excluded_objects"]
for name in self.excluded_objects:
if name in self.buttons:
self.object_list.remove(self.buttons[name])
self.update_graph()
if len(self.excluded_objects) == len(self.objects):
self.menu_return(False)
elif action == "notify_gcode_response" and "Excluding object" in data:
self._screen.show_popup_message(data, level=1)
self.update_graph()
def activate(self):
self.update_graph()
def update_graph(self):
if self.labels['map']:
self.labels['map'].queue_draw()
+69 -98
View File
@@ -1,5 +1,6 @@
import gi import gi
import logging import logging
import re
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,28 +14,39 @@ def create_panel(*args):
class ExtrudePanel(ScreenPanel): class ExtrudePanel(ScreenPanel):
distance = 5
distances = ['5', '10', '15', '25']
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
macros = self._screen.printer.get_gcode_macros()
self.load_filament = any("LOAD_FILAMENT" in macro.upper() for macro in macros)
self.unload_filament = any("UNLOAD_FILAMENT" in macro.upper() for macro in macros)
self.load_filament = self.unload_filament = False
self.find_gcode_macros()
self.speed = 1
self.speeds = ['1', '2', '5', '25'] self.speeds = ['1', '2', '5', '25']
self.distances = ['5', '10', '15', '25']
print_cfg = self._config.get_printer_config(self._screen.connected_printer)
if print_cfg is not None:
dis = print_cfg.get("extrude_distances", '5, 10, 15, 25')
if re.match(r'^[0-9,\s]+$', dis):
dis = [str(i.strip()) for i in dis.split(',')]
if 1 < len(dis) < 5:
self.distances = dis
vel = print_cfg.get("extrude_speeds", '1, 2, 5, 25')
if re.match(r'^[0-9,\s]+$', vel):
vel = [str(i.strip()) for i in vel.split(',')]
if 1 < len(vel) < 5:
self.speeds = vel
self.distance = int(self.distances[1])
self.speed = int(self.speeds[1])
self.labels['extrude'] = self._gtk.ButtonImage("extrude", _("Extrude"), "color4") self.labels['extrude'] = self._gtk.ButtonImage("extrude", _("Extrude"), "color4")
self.labels['extrude'].connect("clicked", self.extrude, "+") self.labels['extrude'].connect("clicked", self.extrude, "+")
if not self.load_filament: self.labels['load'] = self._gtk.ButtonImage("arrow-down", _("Load"), "color3")
self.labels['load'] = self._gtk.ButtonImage("arrow-down", _("Load"))
else: self.labels['load'].connect("clicked", self.load_unload, "+")
self.labels['load'] = self._gtk.ButtonImage("arrow-down", _("Load"), "color3") self.labels['unload'] = self._gtk.ButtonImage("arrow-up", _("Unload"), "color2")
self.labels['load'].connect("clicked", self.load_unload, "+", self.load_filament)
if not self.unload_filament: self.labels['unload'].connect("clicked", self.load_unload, "-")
self.labels['unload'] = self._gtk.ButtonImage("arrow-up", _("Unload"))
else:
self.labels['unload'] = self._gtk.ButtonImage("arrow-up", _("Unload"), "color2")
self.labels['unload'].connect("clicked", self.load_unload, "-", self.unload_filament)
self.labels['retract'] = self._gtk.ButtonImage("retract", _("Retract"), "color1") self.labels['retract'] = self._gtk.ButtonImage("retract", _("Retract"), "color1")
self.labels['retract'].connect("clicked", self.extrude, "-") self.labels['retract'].connect("clicked", self.extrude, "-")
self.labels['temperature'] = self._gtk.ButtonImage("heat-up", _("Temperature"), "color4") self.labels['temperature'] = self._gtk.ButtonImage("heat-up", _("Temperature"), "color4")
@@ -44,13 +56,12 @@ class ExtrudePanel(ScreenPanel):
}) })
extgrid = self._gtk.HomogeneousGrid() extgrid = self._gtk.HomogeneousGrid()
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
limit = 5 limit = 5
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("extruder-%s" % i, self.labels[extruder] = self._gtk.ButtonImage(f"extruder-{i}",
"T%s" % 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.ButtonImage("extruder", "")
self.labels[extruder].connect("clicked", self.change_extruder, extruder) self.labels[extruder].connect("clicked", self.change_extruder, extruder)
@@ -63,11 +74,10 @@ class ExtrudePanel(ScreenPanel):
extgrid.attach(self.labels['temperature'], i + 1, 0, 1, 1) extgrid.attach(self.labels['temperature'], i + 1, 0, 1, 1)
distgrid = Gtk.Grid() distgrid = Gtk.Grid()
j = 0 for j, i in enumerate(self.distances):
for i in self.distances: self.labels[f"dist{i}"] = self._gtk.Button(i)
self.labels["dist" + str(i)] = self._gtk.ToggleButton(i) self.labels[f"dist{i}"].connect("clicked", self.change_distance, int(i))
self.labels["dist" + str(i)].connect("clicked", self.change_distance, i) ctx = self.labels[f"dist{i}"].get_style_context()
ctx = self.labels["dist" + str(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
(self._screen.lang_ltr is False and j == len(self.distances) - 1)): (self._screen.lang_ltr is False and j == len(self.distances) - 1)):
ctx.add_class("distbutton_top") ctx.add_class("distbutton_top")
@@ -76,18 +86,15 @@ class ExtrudePanel(ScreenPanel):
ctx.add_class("distbutton_bottom") ctx.add_class("distbutton_bottom")
else: else:
ctx.add_class("distbutton") ctx.add_class("distbutton")
if i == "5": if int(i) == self.distance:
ctx.add_class("distbutton_active") ctx.add_class("distbutton_active")
distgrid.attach(self.labels["dist" + str(i)], j, 0, 1, 1) distgrid.attach(self.labels[f"dist{i}"], j, 0, 1, 1)
j += 1
self.labels["dist5"].set_active(True)
speedgrid = Gtk.Grid() speedgrid = Gtk.Grid()
j = 0 for j, i in enumerate(self.speeds):
for i in self.speeds: self.labels[f"speed{i}"] = self._gtk.Button(i)
self.labels["speed" + str(i)] = self._gtk.ToggleButton(_(i)) self.labels[f"speed{i}"].connect("clicked", self.change_speed, int(i))
self.labels["speed" + str(i)].connect("clicked", self.change_speed, i) ctx = self.labels[f"speed{i}"].get_style_context()
ctx = self.labels["speed" + str(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
(self._screen.lang_ltr is False and j == len(self.speeds) - 1)): (self._screen.lang_ltr is False and j == len(self.speeds) - 1)):
ctx.add_class("distbutton_top") ctx.add_class("distbutton_top")
@@ -96,11 +103,9 @@ class ExtrudePanel(ScreenPanel):
ctx.add_class("distbutton_bottom") ctx.add_class("distbutton_bottom")
else: else:
ctx.add_class("distbutton") ctx.add_class("distbutton")
if i == "2": if int(i) == self.speed:
ctx.add_class("distbutton_active") ctx.add_class("distbutton_active")
speedgrid.attach(self.labels["speed" + str(i)], j, 0, 1, 1) speedgrid.attach(self.labels[f"speed{i}"], j, 0, 1, 1)
j += 1
self.labels["speed2"].set_active(True)
distbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) distbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.labels['extrude_dist'] = Gtk.Label(_("Distance (mm)")) self.labels['extrude_dist'] = Gtk.Label(_("Distance (mm)"))
@@ -112,8 +117,8 @@ class ExtrudePanel(ScreenPanel):
speedbox.add(speedgrid) speedbox.add(speedgrid)
filament_sensors = self._printer.get_filament_sensors() filament_sensors = self._printer.get_filament_sensors()
sensors = Gtk.Grid()
if len(filament_sensors) > 0: if len(filament_sensors) > 0:
sensors = Gtk.Grid()
sensors.set_column_spacing(5) sensors.set_column_spacing(5)
sensors.set_row_spacing(5) sensors.set_row_spacing(5)
sensors.set_halign(Gtk.Align.CENTER) sensors.set_halign(Gtk.Align.CENTER)
@@ -154,8 +159,7 @@ class ExtrudePanel(ScreenPanel):
grid.attach(self.labels['unload'], 2, 2, 2, 1) grid.attach(self.labels['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)
if len(filament_sensors) > 0: 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.labels['extrude'], 0, 2, 1, 1)
grid.attach(self.labels['load'], 1, 2, 1, 1) grid.attach(self.labels['load'], 1, 2, 1, 1)
@@ -163,8 +167,7 @@ class ExtrudePanel(ScreenPanel):
grid.attach(self.labels['retract'], 3, 2, 1, 1) grid.attach(self.labels['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)
if len(filament_sensors) > 0: grid.attach(sensors, 0, 4, 4, 1)
grid.attach(sensors, 0, 4, 4, 1)
self.content.add(grid) self.content.add(grid)
@@ -176,7 +179,9 @@ class ExtrudePanel(ScreenPanel):
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"),
lines=2,
) )
if ("toolhead" in data and "extruder" in data["toolhead"] and if ("toolhead" in data and "extruder" in data["toolhead"] and
@@ -191,7 +196,7 @@ 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("%s Enabled: %s" % (x, 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 data[x]['filament_detected']:
@@ -200,84 +205,50 @@ class ExtrudePanel(ScreenPanel):
else: else:
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected") self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected")
self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty") self.labels[x]['box'].get_style_context().add_class("filament_sensor_empty")
logging.info("%s: Filament detected: %s" % (x, data[x]['filament_detected'])) logging.info(f"{x}: Filament detected: {data[x]['filament_detected']}")
def change_distance(self, widget, distance): def change_distance(self, widget, distance):
if self.distance == distance: logging.info(f"### Distance {distance}")
return self.labels[f"dist{self.distance}"].get_style_context().remove_class("distbutton_active")
logging.info("### Distance " + str(distance)) self.labels[f"dist{distance}"].get_style_context().add_class("distbutton_active")
ctx = self.labels["dist" + str(self.distance)].get_style_context()
ctx.remove_class("distbutton_active")
self.distance = distance self.distance = distance
ctx = self.labels["dist" + self.distance].get_style_context()
ctx.add_class("distbutton_active")
for i in self.distances:
if i == self.distance:
continue
self.labels["dist" + str(i)].set_active(False)
def change_extruder(self, widget, extruder): def change_extruder(self, widget, extruder):
logging.info("Changing extruder to %s", extruder) logging.info(f"Changing extruder to {extruder}")
for tool in self._printer.get_tools(): for tool in self._printer.get_tools():
self.labels[tool].get_style_context().remove_class("button_active") self.labels[tool].get_style_context().remove_class("button_active")
self.labels[extruder].get_style_context().add_class("button_active") self.labels[extruder].get_style_context().add_class("button_active")
self._screen._ws.klippy.gcode_script("T%s" % self._printer.get_tool_number(extruder)) self._screen._ws.klippy.gcode_script(f"T{self._printer.get_tool_number(extruder)}")
def change_speed(self, widget, speed): def change_speed(self, widget, speed):
if self.speed == speed: logging.info(f"### Speed {speed}")
return self.labels[f"speed{self.speed}"].get_style_context().remove_class("distbutton_active")
logging.info("### Speed " + str(speed)) self.labels[f"speed{speed}"].get_style_context().add_class("distbutton_active")
self.labels["speed" + str(self.speed)].get_style_context().remove_class("distbutton_active")
self.speed = speed self.speed = speed
self.labels["speed" + self.speed].get_style_context().add_class("distbutton_active")
for i in self.speeds:
if i == self.speed:
continue
self.labels["speed" + str(i)].set_active(False)
def extrude(self, widget, dir):
dist = str(self.distance) if dir == "+" else "-" + str(self.distance)
speed = str(int(self.speed) * 60)
print(KlippyGcodes.extrude(dist, speed))
def extrude(self, widget, direction):
self._screen._ws.klippy.gcode_script(KlippyGcodes.EXTRUDE_REL) self._screen._ws.klippy.gcode_script(KlippyGcodes.EXTRUDE_REL)
self._screen._ws.klippy.gcode_script(KlippyGcodes.extrude(dist, speed)) self._screen._ws.klippy.gcode_script(KlippyGcodes.extrude(f"{direction}{self.distance}", f"{self.speed * 60}"))
def load_unload(self, widget, dir, found): def load_unload(self, widget, direction):
if dir == "-": if direction == "-":
if not found: if not self.unload_filament:
self._screen.show_popup_message("Macro UNLOAD_FILAMENT not found") self._screen.show_popup_message("Macro UNLOAD_FILAMENT not found")
else: else:
self._screen._ws.klippy.gcode_script("UNLOAD_FILAMENT SPEED=" + str(int(self.speed) * 60)) self._screen._ws.klippy.gcode_script(f"UNLOAD_FILAMENT SPEED={self.speed * 60}")
if dir == "+": if direction == "+":
if not found: if not self.load_filament:
self._screen.show_popup_message("Macro LOAD_FILAMENT not found") self._screen.show_popup_message("Macro LOAD_FILAMENT not found")
else: else:
self._screen._ws.klippy.gcode_script("LOAD_FILAMENT SPEED=" + str(int(self.speed) * 60)) self._screen._ws.klippy.gcode_script(f"LOAD_FILAMENT SPEED={self.speed * 60}")
def find_gcode_macros(self):
macros = self._screen.printer.get_gcode_macros()
for x in macros:
macro = x[12:].strip()
macro = macro.upper()
if macro == "LOAD_FILAMENT":
logging.info("Found %s" % macro)
self.load_filament = True
if macro == "UNLOAD_FILAMENT":
logging.info("Found %s" % macro)
self.unload_filament = True
def enable_disable_fs(self, switch, gparams, name, x): def enable_disable_fs(self, switch, gparams, name, x):
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("SET_FILAMENT_SENSOR SENSOR=" + name + " ENABLE=1") self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=1")
else: else:
self._printer.set_dev_stat(x, "enabled", False) self._printer.set_dev_stat(x, "enabled", False)
self._screen._ws.klippy.gcode_script("SET_FILAMENT_SENSOR SENSOR=" + name + " ENABLE=0") self._screen._ws.klippy.gcode_script(f"SET_FILAMENT_SENSOR SENSOR={name} ENABLE=0")
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_empty") self.labels[x]['box'].get_style_context().remove_class("filament_sensor_empty")
self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected") self.labels[x]['box'].get_style_context().remove_class("filament_sensor_detected")
+21 -40
View File
@@ -16,27 +16,20 @@ CHANGEABLE_FANS = ["fan", "fan_generic"]
class FanPanel(ScreenPanel): class FanPanel(ScreenPanel):
fan_speed = {} def __init__(self, screen, title, back=True):
user_selecting = False super().__init__(screen, title, back)
self.fan_speed = {}
def initialize(self, panel_name):
self.devices = {} self.devices = {}
scroll = self._gtk.ScrolledWindow()
# Create a grid for all devices # Create a grid for all devices
self.labels['devices'] = Gtk.Grid() self.labels['devices'] = Gtk.Grid()
scroll.add(self.labels['devices']) self.labels['devices'].set_valign(Gtk.Align.CENTER)
# Create a box to contain all of the above
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True)
box.pack_start(scroll, True, True, 0)
self.load_fans() self.load_fans()
self.content.add(box) scroll = self._gtk.ScrolledWindow()
scroll.add(self.labels['devices'])
self.content.add(scroll)
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_status_update": if action != "notify_status_update":
@@ -65,19 +58,11 @@ class FanPanel(ScreenPanel):
def add_fan(self, fan): def add_fan(self, fan):
logging.info("Adding fan: %s" % fan) logging.info(f"Adding fan: {fan}")
changeable = False changeable = any(fan.startswith(x) or fan == x for x in CHANGEABLE_FANS)
for x in CHANGEABLE_FANS:
if fan.startswith(x) or fan == x:
changeable = True
break
name = Gtk.Label() name = Gtk.Label()
if fan == "fan": fan_name = _("Part Fan") if fan == "fan" else fan.split()[1]
fan_name = "Part Fan" name.set_markup(f"\n<big><b>{fan_name}</b></big>\n")
else:
fan_name = " ".join(fan.split(" ")[1:])
name.set_markup("<big><b>%s</b></big>" % fan_name)
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
@@ -85,10 +70,7 @@ class FanPanel(ScreenPanel):
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.WORD_CHAR)
adj = Gtk.Adjustment(0, 0, 100, 1, 5, 0)
fan_col = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5) fan_col = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
fan_col.set_hexpand(True)
fan_col.set_vexpand(False)
stop_btn = self._gtk.ButtonImage("cancel", None, "color1", 1) stop_btn = self._gtk.ButtonImage("cancel", None, "color1", 1)
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)
@@ -97,9 +79,9 @@ class FanPanel(ScreenPanel):
max_btn.connect("clicked", self.update_fan_speed, fan, 100) max_btn.connect("clicked", self.update_fan_speed, fan, 100)
speed = float(self._printer.get_fan_speed(fan)) speed = float(self._printer.get_fan_speed(fan))
if changeable is True: if changeable:
speed = round(speed * 100) speed = round(speed * 100)
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj) scale = Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL, min=0, max=100, step=1)
scale.set_value(speed) scale.set_value(speed)
scale.set_digits(0) scale.set_digits(0)
scale.set_hexpand(True) scale.set_hexpand(True)
@@ -116,9 +98,7 @@ class FanPanel(ScreenPanel):
scale.set_hexpand(True) scale.set_hexpand(True)
fan_col.pack_start(scale, True, True, 10) fan_col.pack_start(scale, True, True, 10)
fan_row = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=5) fan_row = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
fan_row.set_hexpand(True)
fan_row.set_vexpand(False)
fan_row.add(name) fan_row.add(name)
fan_row.add(fan_col) fan_row.add(fan_col)
@@ -128,7 +108,6 @@ class FanPanel(ScreenPanel):
self.devices[fan] = { self.devices[fan] = {
"changeable": changeable, "changeable": changeable,
"row": frame,
"scale": scale, "scale": scale,
"speed": speed, "speed": speed,
} }
@@ -143,17 +122,20 @@ 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(self.devices[fan]['row'], 0, pos, 1, 1) self.labels['devices'].attach(frame, 0, pos, 1, 1)
self.labels['devices'].show_all() self.labels['devices'].show_all()
def load_fans(self): def load_fans(self):
fans = self._printer.get_fans() fans = self._printer.get_fans()
for fan in fans: for fan in fans:
# Support for hiding devices by name # Support for hiding devices by name
name = " ".join(fan.split(" ")[1:]) if not (fan == "fan") else fan name = fan.split()[1] if len(fan.split()) > 1 else fan
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()
@@ -161,8 +143,7 @@ class FanPanel(ScreenPanel):
if fan == "fan": if fan == "fan":
self._screen._ws.klippy.gcode_script(KlippyGcodes.set_fan_speed(value)) self._screen._ws.klippy.gcode_script(KlippyGcodes.set_fan_speed(value))
else: else:
f = " ".join(fan.split(" ")[1:]) self._screen._ws.klippy.gcode_script(f"SET_FAN_SPEED FAN={fan.split()[1]} SPEED={float(value) / 100}")
self._screen._ws.klippy.gcode_script("SET_FAN_SPEED FAN=%s SPEED=%s" % (f, float(value) / 100))
# Check the speed in case it wasn't applied # Check the speed in case it wasn't applied
GLib.timeout_add_seconds(1, self.check_fan_speed, fan) GLib.timeout_add_seconds(1, self.check_fan_speed, fan)
+61 -99
View File
@@ -1,6 +1,7 @@
import gi import gi
import logging import logging
import re import re
import contextlib
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
@@ -14,38 +15,29 @@ def create_panel(*args):
class FineTunePanel(ScreenPanel): class FineTunePanel(ScreenPanel):
user_selecting = False
bs = 0
bs_delta = "0.05"
bs_deltas = ["0.01", "0.05"] bs_deltas = ["0.01", "0.05"]
percent_delta = 1 bs_delta = bs_deltas[-1]
percent_deltas = ['1', '5', '10', '25'] percent_deltas = ['1', '5', '10', '25']
extrusion = 100 percent_delta = percent_deltas[-2]
speed = 100 speed = extrusion = 100
def initialize(self, panel_name):
logging.debug("FineTunePanel")
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
print_cfg = self._config.get_printer_config(self._screen.connected_printer) print_cfg = self._config.get_printer_config(self._screen.connected_printer)
if print_cfg is not None: if print_cfg is not None:
bs = print_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 len(bs) <= 2: if 1 < len(bs) < 3:
self.bs_deltas = bs self.bs_deltas = bs
else: self.bs_delta = self.bs_deltas[-1]
self.bs_deltas = [bs[0], bs[-1]]
self.bs_delta = self.bs_deltas[0]
# babystepping grid # babystepping grid
bsgrid = Gtk.Grid() bsgrid = Gtk.Grid()
j = 0 for j, i in enumerate(self.bs_deltas):
for i in self.bs_deltas: self.labels[f"bdelta{i}"] = self._gtk.Button(i)
self.labels[i] = self._gtk.ToggleButton(i) self.labels[f"bdelta{i}"].connect("clicked", self.change_bs_delta, float(i))
self.labels[i].connect("clicked", self.change_bs_delta, i) ctx = self.labels[f"bdelta{i}"].get_style_context()
ctx = self.labels[i].get_style_context()
if j == 0: if j == 0:
ctx.add_class("distbutton_top") ctx.add_class("distbutton_top")
elif j == len(self.bs_deltas) - 1: elif j == len(self.bs_deltas) - 1:
@@ -54,28 +46,22 @@ class FineTunePanel(ScreenPanel):
ctx.add_class("distbutton") ctx.add_class("distbutton")
if i == self.bs_delta: if i == self.bs_delta:
ctx.add_class("distbutton_active") ctx.add_class("distbutton_active")
bsgrid.attach(self.labels[i], j, 0, 1, 1) bsgrid.attach(self.labels[f"bdelta{i}"], j, 0, 1, 1)
j += 1
# Grid for percentage # Grid for percentage
deltgrid = Gtk.Grid() deltgrid = Gtk.Grid()
j = 0 for j, i in enumerate(self.percent_deltas):
for i in self.percent_deltas: self.labels[f"pdelta{i}"] = self._gtk.Button(f"{i}%")
self.labels[i] = self._gtk.ToggleButton("%s%%" % i) self.labels[f"pdelta{i}"].connect("clicked", self.change_percent_delta, int(i))
self.labels[i].connect("clicked", self.change_percent_delta, i) ctx = self.labels[f"pdelta{i}"].get_style_context()
ctx = self.labels[i].get_style_context()
if j == 0: if j == 0:
ctx.add_class("distbutton_top") ctx.add_class("distbutton_top")
elif j == len(self.percent_deltas) - 1: elif j == len(self.percent_deltas) - 1:
ctx.add_class("distbutton_bottom") ctx.add_class("distbutton_bottom")
else: else:
ctx.add_class("distbutton") ctx.add_class("distbutton")
if i == "1": if i == self.percent_delta:
ctx.add_class("distbutton_active") ctx.add_class("distbutton_active")
deltgrid.attach(self.labels[i], j, 0, 1, 1) deltgrid.attach(self.labels[f"pdelta{i}"], j, 0, 1, 1)
j += 1
self.labels["1"].set_active(True)
grid = self._gtk.HomogeneousGrid() grid = self._gtk.HomogeneousGrid()
grid.set_row_homogeneous(False) grid.set_row_homogeneous(False)
@@ -83,17 +69,17 @@ class FineTunePanel(ScreenPanel):
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1") self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1") self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"), self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
"color1", .6, Gtk.PositionType.LEFT, False) "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['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3") self.labels['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3")
self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%", self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color3", .6, Gtk.PositionType.LEFT, False) "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['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4") self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4")
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%", self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color4", .6, Gtk.PositionType.LEFT, False) "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)
@@ -111,17 +97,17 @@ class FineTunePanel(ScreenPanel):
else: else:
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1") self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"), self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
"color1", .6, Gtk.PositionType.LEFT, False) "color1", .6, Gtk.PositionType.LEFT, 1)
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1") self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
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%", self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color3", .6, Gtk.PositionType.LEFT, False) "color3", .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['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4") self.labels['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4")
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%", self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
"color4", .6, Gtk.PositionType.LEFT, False) "color4", .6, Gtk.PositionType.LEFT, 1)
self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4") 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)
@@ -154,84 +140,60 @@ class FineTunePanel(ScreenPanel):
if "gcode_move" in data: if "gcode_move" in data:
if "homing_origin" in data["gcode_move"]: if "homing_origin" in data["gcode_move"]:
self.labels['zoffset'].set_label(" %.2fmm" % data["gcode_move"]["homing_origin"][2]) 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 = int(round(data["gcode_move"]["extrude_factor"] * 100))
self.labels['extrudefactor'].set_label(" %3d%%" % self.extrusion) 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 = int(round(data["gcode_move"]["speed_factor"] * 100))
self.labels['speedfactor'].set_label(" %3d%%" % self.speed) self.labels['speedfactor'].set_label(f" {self.speed:3}%")
def change_babystepping(self, widget, dir): def change_babystepping(self, widget, direction):
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz": if direction == "reset":
self._screen.show_popup_message("Must home first") self.labels['zoffset'].set_label(' 0.00mm')
return self._screen._ws.klippy.gcode_script("SET_GCODE_OFFSET Z=0 MOVE=1")
elif direction in ["+", "-"]:
if dir == "+": with contextlib.suppress(KeyError):
gcode = "SET_GCODE_OFFSET Z_ADJUST=%s MOVE=1" % self.bs_delta z_offset = float(self._printer.data["gcode_move"]["homing_origin"][2])
elif dir == "-": if direction == "+":
gcode = "SET_GCODE_OFFSET Z_ADJUST=-%s MOVE=1" % self.bs_delta z_offset += float(self.bs_delta)
elif dir == "reset": else:
gcode = "SET_GCODE_OFFSET Z=0 MOVE=1" z_offset -= float(self.bs_delta)
else: self.labels['zoffset'].set_label(f' {round(z_offset, 2):.2f}mm')
gcode = "" self._screen._ws.klippy.gcode_script(f"SET_GCODE_OFFSET Z_ADJUST={direction}{self.bs_delta} MOVE=1")
self._screen._ws.klippy.gcode_script(gcode)
def change_bs_delta(self, widget, bs): def change_bs_delta(self, widget, bs):
if self.bs_delta == bs: logging.info(f"### BabyStepping {bs}")
return self.labels[f"bdelta{self.bs_delta}"].get_style_context().remove_class("distbutton_active")
logging.info("### BabyStepping " + str(bs)) self.labels[f"bdelta{bs}"].get_style_context().add_class("distbutton_active")
ctx = self.labels[str(self.bs_delta)].get_style_context()
ctx.remove_class("distbutton_active")
self.bs_delta = bs self.bs_delta = bs
ctx = self.labels[self.bs_delta].get_style_context()
ctx.add_class("distbutton_active")
for i in self.bs_deltas:
if i == self.bs_delta:
continue
self.labels[i].set_active(False)
def change_extrusion(self, widget, dir): def change_extrusion(self, widget, direction):
if dir == "+": if direction == "+":
self.extrusion += int(self.percent_delta) self.extrusion += self.percent_delta
elif dir == "-": elif direction == "-":
self.extrusion -= int(self.percent_delta) self.extrusion -= self.percent_delta
elif dir == "reset": elif direction == "reset":
self.extrusion = 100 self.extrusion = 100
if self.extrusion < 1: self.extrusion = max(self.extrusion, 1)
self.extrusion = 1 self.labels['extrudefactor'].set_label(f" {self.extrusion:3}%")
self._screen._ws.klippy.gcode_script(KlippyGcodes.set_extrusion_rate(self.extrusion)) self._screen._ws.klippy.gcode_script(KlippyGcodes.set_extrusion_rate(self.extrusion))
def change_speed(self, widget, dir): def change_speed(self, widget, direction):
if dir == "+": if direction == "+":
self.speed += int(self.percent_delta) self.speed += int(self.percent_delta)
elif dir == "-": elif direction == "-":
self.speed -= int(self.percent_delta) self.speed -= int(self.percent_delta)
elif dir == "reset": elif direction == "reset":
self.speed = 100 self.speed = 100
if self.speed < 1: self.speed = max(self.speed, 1)
self.speed = 1 self.labels['speedfactor'].set_label(f" {self.speed:3}%")
self._screen._ws.klippy.gcode_script(KlippyGcodes.set_speed_rate(self.speed)) self._screen._ws.klippy.gcode_script(KlippyGcodes.set_speed_rate(self.speed))
def change_percent_delta(self, widget, delta): def change_percent_delta(self, widget, delta):
if self.percent_delta == delta: logging.info(f"### Delta {delta}")
return self.labels[f"pdelta{self.percent_delta}"].get_style_context().remove_class("distbutton_active")
logging.info("### Delta " + str(delta)) self.labels[f"pdelta{delta}"].get_style_context().add_class("distbutton_active")
ctx = self.labels[str(self.percent_delta)].get_style_context()
ctx.remove_class("distbutton_active")
self.percent_delta = delta self.percent_delta = delta
ctx = self.labels[self.percent_delta].get_style_context()
ctx.add_class("distbutton_active")
for i in self.percent_deltas:
if i == self.percent_delta:
continue
self.labels[str(i)].set_active(False)
+19 -18
View File
@@ -12,20 +12,21 @@ def create_panel(*args):
class MacroPanel(ScreenPanel): class MacroPanel(ScreenPanel):
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.macros = {}
self.loaded_macros = []
self.sort_reverse = False self.sort_reverse = False
self.menu = ['macros_menu']
sort = Gtk.Label(_("Sort:"))
sort.set_hexpand(False)
self.sort_lbl = _("Name") self.sort_lbl = _("Name")
self.sort_btn = self._gtk.ButtonImage("arrow-up", self.sort_lbl, "color1", .66, Gtk.PositionType.RIGHT, False) 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)
adjust = self._gtk.ButtonImage("settings", None, "color2", 1, Gtk.PositionType.LEFT, False) self.allmacros = {}
self.loaded_macros = []
self.macros = {}
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.connect("clicked", self.load_menu, 'options') adjust.connect("clicked", self.load_menu, 'options')
adjust.set_hexpand(False) adjust.set_hexpand(False)
@@ -60,7 +61,7 @@ class MacroPanel(ScreenPanel):
return return
name = Gtk.Label() name = Gtk.Label()
name.set_markup("<big><b>%s</b></big>" % macro) name.set_markup(f"<big><b>{macro}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
@@ -68,7 +69,7 @@ class MacroPanel(ScreenPanel):
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.WORD_CHAR)
btn = self._gtk.ButtonImage("resume", None, "color3") btn = self._gtk.ButtonImage("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)
@@ -101,9 +102,9 @@ class MacroPanel(ScreenPanel):
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", .66)) self.sort_btn.set_image(self._gtk.Image("arrow-down", self._gtk.img_scale * .5))
else: else:
self.sort_btn.set_image(self._gtk.Image("arrow-up", .66)) self.sort_btn.set_image(self._gtk.Image("arrow-up", self._gtk.img_scale * .5))
self.sort_btn.show() self.sort_btn.show()
GLib.idle_add(self.reload_macros) GLib.idle_add(self.reload_macros)
@@ -118,8 +119,8 @@ class MacroPanel(ScreenPanel):
def load_gcode_macros(self): def load_gcode_macros(self):
macros = self._screen.printer.get_gcode_macros() macros = self._screen.printer.get_gcode_macros()
section_name = "displayed_macros %s" % self._screen.connected_printer section_name = f"displayed_macros {self._screen.connected_printer}"
logging.info("Macro section name [%s]" % section_name) logging.info(f"Macro section name [{section_name}]")
for x in macros: for x in macros:
macro = x[12:].strip() macro = x[12:].strip()
@@ -139,7 +140,7 @@ class MacroPanel(ScreenPanel):
self.allmacros[macro] = { self.allmacros[macro] = {
"name": macro, "name": macro,
"section": "displayed_macros %s" % self._screen.connected_printer, "section": f"displayed_macros {self._screen.connected_printer}",
} }
for macro in list(self.allmacros): for macro in list(self.allmacros):
self.add_option('options', self.allmacros, macro, self.allmacros[macro]) self.add_option('options', self.allmacros, macro, self.allmacros[macro])
@@ -148,7 +149,7 @@ class MacroPanel(ScreenPanel):
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()
name.set_markup("<big><b>%s</b></big>" % (option['name'])) name.set_markup(f"<big><b>{option['name']}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
+48 -53
View File
@@ -21,19 +21,25 @@ SHAPERS = ['zv', 'mzv', 'zvd', 'ei', '2hump_ei', '3hump_ei']
class InputShaperPanel(ScreenPanel): class InputShaperPanel(ScreenPanel):
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.has_sensor = False self.freq_xy_adj = {}
self.freq_xy_combo = {}
self.calibrate_btn = self._gtk.ButtonImage("move", _('Finding ADXL'), "color1", lines=1)
self.calibrate_btn.connect("clicked", self.on_popover_clicked)
self.calibrate_btn.set_sensitive(False)
self.status = Gtk.Label("")
self.status.set_hexpand(True)
self.status.set_vexpand(False)
self.status.set_halign(Gtk.Align.START)
self.status.set_ellipsize(Pango.EllipsizeMode.END)
self.calibrating_axis = None
self.calibrating_axis = None self.calibrating_axis = None
auto_calibration_label = Gtk.Label() auto_calibration_label = Gtk.Label()
auto_calibration_label.set_markup('<big><b>Auto Calibration</b></big>') auto_calibration_label.set_markup('<big><b>Auto Calibration</b></big>')
auto_calibration_label.set_hexpand(True) auto_calibration_label.set_hexpand(True)
self.calibrate_btn = self._gtk.ButtonImage("move", _('Finding ADXL'), "color1", word_wrap=False)
self.calibrate_btn.connect("clicked", self.on_popover_clicked)
self.calibrate_btn.set_sensitive(False)
auto_grid = Gtk.Grid() auto_grid = Gtk.Grid()
auto_grid.attach(auto_calibration_label, 0, 0, 1, 1) auto_grid.attach(auto_calibration_label, 0, 0, 1, 1)
auto_grid.attach(self.calibrate_btn, 1, 0, 1, 1) auto_grid.attach(self.calibrate_btn, 1, 0, 1, 1)
@@ -51,11 +57,9 @@ class InputShaperPanel(ScreenPanel):
input_grid.attach(manual_calibration_label, 0, 0, 3, 1) input_grid.attach(manual_calibration_label, 0, 0, 3, 1)
input_grid.attach(disclaimer, 0, 1, 3, 1) input_grid.attach(disclaimer, 0, 1, 3, 1)
self.freq_xy_adj = {}
self.freq_xy_combo = {}
for i, dim_freq in enumerate(XY_FREQ): for i, dim_freq in enumerate(XY_FREQ):
axis_lbl = Gtk.Label() axis_lbl = Gtk.Label()
axis_lbl.set_markup("<b>{}</b>".format(dim_freq['name'])) axis_lbl.set_markup(f"<b>{dim_freq['name']}</b>")
axis_lbl.set_hexpand(False) axis_lbl.set_hexpand(False)
axis_lbl.set_vexpand(True) axis_lbl.set_vexpand(True)
axis_lbl.set_halign(Gtk.Align.START) axis_lbl.set_halign(Gtk.Align.START)
@@ -81,12 +85,6 @@ class InputShaperPanel(ScreenPanel):
input_grid.attach(scale, 1, i + 2, 1, 1) input_grid.attach(scale, 1, i + 2, 1, 1)
input_grid.attach(self.freq_xy_combo[shaper_slug], 2, i + 2, 1, 1) input_grid.attach(self.freq_xy_combo[shaper_slug], 2, i + 2, 1, 1)
self.status = Gtk.Label("")
self.status.set_hexpand(True)
self.status.set_vexpand(False)
self.status.set_halign(Gtk.Align.START)
self.status.set_ellipsize(Pango.EllipsizeMode.END)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.add(auto_grid) box.add(auto_grid)
box.add(input_grid) box.add(input_grid)
@@ -124,7 +122,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(self.lang.gettext('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):
@@ -134,9 +132,11 @@ class InputShaperPanel(ScreenPanel):
shaper_type_y = self.freq_xy_combo['shaper_type_y'].get_active_text() shaper_type_y = self.freq_xy_combo['shaper_type_y'].get_active_text()
self._screen._ws.klippy.gcode_script( self._screen._ws.klippy.gcode_script(
'SET_INPUT_SHAPER SHAPER_FREQ_X={} SHAPER_TYPE_X={} SHAPER_FREQ_Y={} SHAPER_TYPE_Y={}'.format( f'SET_INPUT_SHAPER '
shaper_freq_x, shaper_type_x, shaper_freq_y, shaper_type_y f'SHAPER_FREQ_X={shaper_freq_x} '
) f'SHAPER_TYPE_X={shaper_type_x} '
f'SHAPER_FREQ_Y={shaper_freq_y} '
f'SHAPER_TYPE_Y={shaper_type_y}'
) )
def save_config(self): def save_config(self):
@@ -164,37 +164,32 @@ class InputShaperPanel(ScreenPanel):
) )
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_gcode_response":
if action == "notify_gcode_response": return
self.status.set_text('{}'.format(data.replace('shaper_', '').replace('damping_', ''))) self.status.set_text(f"{data.replace('shaper_', '').replace('damping_', '')}")
data = data.lower() data = data.lower()
if 'got 0' in data: if 'got 0' in data:
self.calibrate_btn.set_label(_('Check ADXL Wiring')) self.calibrate_btn.set_label(_('Check ADXL Wiring'))
self.calibrate_btn.set_sensitive(False) self.calibrate_btn.set_sensitive(False)
if 'unknown command:"accelerometer_query"' in data: if 'unknown command:"accelerometer_query"' in data:
self.calibrate_btn.set_label(_('ADXL Not Configured')) self.calibrate_btn.set_label(_('ADXL Not Configured'))
self.calibrate_btn.set_sensitive(False) self.calibrate_btn.set_sensitive(False)
if 'adxl345 values' in data or 'axes noise' in data: if 'adxl345 values' in data or 'axes noise' in data:
self.has_sensor = True self.calibrate_btn.set_sensitive(True)
self.calibrate_btn.set_label(_('Auto-calibrate'))
# Recommended shaper_type_y = ei, shaper_freq_y = 48.4 Hz
if 'recommended shaper_type_' in data:
results = re.search(r'shaper_type_(?P<axis>[xy])\s*=\s*(?P<shaper_type>.*?), shaper_freq_.\s*=\s*('
r'?P<shaper_freq>[0-9.]+)', data).groupdict()
self.freq_xy_adj['shaper_freq_' + results['axis']].set_value(float(results['shaper_freq']))
self.freq_xy_combo['shaper_type_' + results['axis']].set_active(SHAPERS.index(results['shaper_type']))
if self.calibrating_axis == results['axis'] or (self.calibrating_axis == "both" and results['axis'] == 'y'):
self.calibrate_btn.set_sensitive(True) self.calibrate_btn.set_sensitive(True)
self.calibrate_btn.set_label(_('Auto-calibrate')) self.calibrate_btn.set_label(_('Calibrated'))
# Recommended shaper_type_y = ei, shaper_freq_y = 48.4 Hz self.save_config()
if 'recommended shaper_type_' in data: # shaper_type_y:ei shaper_freq_y:48.400 damping_ratio_y:0.100000
results = re.search(r'shaper_type_(?P<axis>[xy])\s*=\s*(?P<shaper_type>.*?), shaper_freq_.\s*=\s*(' if 'shaper_type_' in data:
r'?P<shaper_freq>[0-9.]+)', data).groupdict() results = re.search(r'shaper_type_(?P<axis>[xy]):(?P<shaper_type>.*?) shaper_freq_.:('
self.freq_xy_adj['shaper_freq_' + results['axis']].set_value(float(results['shaper_freq'])) r'?P<shaper_freq>[0-9.]+)', data).groupdict()
self.freq_xy_combo['shaper_type_' + results['axis']].set_active(SHAPERS.index(results['shaper_type'])) self.freq_xy_adj['shaper_freq_' + results['axis']].set_value(float(results['shaper_freq']))
if self.calibrating_axis == results['axis']: self.freq_xy_combo['shaper_type_' + results['axis']].set_active(SHAPERS.index(results['shaper_type']))
self.calibrate_btn.set_sensitive(True)
self.calibrate_btn.set_label(_('Calibrated'))
self.save_config()
elif self.calibrating_axis == "both" and results['axis'] == 'y':
self.calibrate_btn.set_sensitive(True)
self.calibrate_btn.set_label(_('Calibrated'))
self.save_config()
# shaper_type_y:ei shaper_freq_y:48.400 damping_ratio_y:0.100000
if 'shaper_type_' in data:
results = re.search(r'shaper_type_(?P<axis>[xy]):(?P<shaper_type>.*?) shaper_freq_.:('
r'?P<shaper_freq>[0-9.]+)', data).groupdict()
self.freq_xy_adj['shaper_freq_' + results['axis']].set_value(float(results['shaper_freq']))
self.freq_xy_combo['shaper_type_' + results['axis']].set_active(SHAPERS.index(results['shaper_type']))
+213 -240
View File
@@ -3,11 +3,13 @@ import gi
import logging import logging
import os import os
import time import time
import contextlib
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 numpy import sqrt, pi, dot, array, median
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
from math import pi, sqrt
from statistics import median
def create_panel(*args): def create_panel(*args):
@@ -15,19 +17,36 @@ def create_panel(*args):
class JobStatusPanel(ScreenPanel): class JobStatusPanel(ScreenPanel):
is_paused = False
filename = state_timeout = prev_pos = prev_gpos = vel_timeout = animation_timeout = close_timeout = None
file_metadata = labels = {}
state = "standby"
timeleft_type = "auto"
progress = zoffset = flowrate = vel = 0
main_status_displayed = True
velstore = flowstore = []
def __init__(self, screen, title, back=False): def __init__(self, screen, title, back=False):
super().__init__(screen, title, False) super().__init__(screen, title, False)
self.extrusion_button = None
def initialize(self, panel_name): 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.set_row_homogeneous(False)
self.pos_z = 0
self.extrusion = 100
self.speed = 100
self.speed_factor = 1
self.req_speed = 0
self.f_layer_h = self.layer_h = 1
self.oheight = 0
self.current_extruder = None
self.fila_section = 0
self.buttons = {}
self.filename_label = self.filename = self.prev_pos = self.prev_gpos = None
self.close_timeout = self.vel_timeout = self.animation_timeout = None
self.file_metadata = self.fans = {}
self.state = "standby"
self.timeleft_type = "auto"
self.progress = self.zoffset = self.flowrate = self.vel = 0
self.main_status_displayed = True
self.velstore = self.flowstore = []
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',
@@ -56,13 +75,12 @@ class JobStatusPanel(ScreenPanel):
self.labels['height_lbl'] = Gtk.Label(_("Height:")) self.labels['height_lbl'] = Gtk.Label(_("Height:"))
self.labels['layer_lbl'] = Gtk.Label(_("Layer:")) self.labels['layer_lbl'] = Gtk.Label(_("Layer:"))
self.fans = {}
for fan in self._printer.get_fans(): for fan in self._printer.get_fans():
# fan_types = ["controller_fan", "fan_generic", "heater_fan"] # fan_types = ["controller_fan", "fan_generic", "heater_fan"]
if fan == "fan": if fan == "fan":
name = " " name = " "
elif fan.startswith("fan_generic"): elif fan.startswith("fan_generic"):
name = fan.split(" ")[1:][0][:1].upper() + ":" name = " ".join(fan.split(" ")[1:])[:1].upper() + ":"
if name.startswith("_"): if name.startswith("_"):
continue continue
else: else:
@@ -107,46 +125,33 @@ class JobStatusPanel(ScreenPanel):
overlay.add(self.labels['darea']) overlay.add(self.labels['darea'])
overlay.add_overlay(box) overlay.add_overlay(box)
self.labels['thumbnail'] = self._gtk.Image("file", 2) self.labels['thumbnail'] = self._gtk.Image("file", self._screen.width / 4, self._screen.height / 4)
if self._screen.vertical_mode:
self.labels['thumbnail'].set_size_request(0, self._screen.height / 4)
else:
self.labels['thumbnail'].set_size_request(self._screen.width / 3, 0)
self.labels['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():
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
diameter = float(self._printer.get_config_section(self.current_extruder)['filament_diameter'])
self.fila_section = pi * ((diameter / 2) ** 2)
self.create_status_grid() self.create_status_grid()
self.grid = self._gtk.HomogeneousGrid()
self.grid.set_row_homogeneous(False)
self.grid.attach(overlay, 0, 0, 1, 1) self.grid.attach(overlay, 0, 0, 1, 1)
self.grid.attach(fi_box, 1, 0, 3, 1) self.grid.attach(fi_box, 1, 0, 3, 1)
self.grid.attach(self.labels['info_grid'], 0, 1, 4, 2) self.grid.attach(self.labels['info_grid'], 0, 1, 4, 2)
self.grid.attach(self.buttons['button_grid'], 0, 3, 4, 1) self.grid.attach(self.buttons['button_grid'], 0, 3, 4, 1)
self.content.add(self.grid) self.content.add(self.grid)
self._screen.wake_screen()
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
# the diameter may change with extruders but is highly unusual
diameter = float(self._printer.get_config_section(self.current_extruder)['filament_diameter'])
self.fila_section = pi * ((diameter / 2) ** 2)
def create_status_grid(self, widget=None): def create_status_grid(self, widget=None):
self.main_status_displayed = True self.main_status_displayed = True
self.labels['temp_grid'] = Gtk.Grid() self.labels['temp_grid'] = Gtk.Grid()
if self._screen.width <= 480: nlimit = 2 if self._screen.width <= 480 else 3
nlimit = 2
else:
nlimit = 3
n = 0 n = 0
self.extruder_button = {} self.extruder_button = {}
if self._screen.printer.get_tools(): if self._screen.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("extruder-%s" % i, self.extruder_button[extruder] = self._gtk.ButtonImage(f"extruder-{i}",
None, None, .6, Gtk.PositionType.LEFT) None, None, .6, Gtk.PositionType.LEFT)
self.extruder_button[extruder].set_label(self.labels[extruder].get_text()) self.extruder_button[extruder].set_label(self.labels[extruder].get_text())
self.extruder_button[extruder].connect("clicked", self.menu_item_clicked, "temperature", self.extruder_button[extruder].connect("clicked", self.menu_item_clicked, "temperature",
@@ -181,16 +186,16 @@ class JobStatusPanel(ScreenPanel):
self.heater_button[device].set_halign(Gtk.Align.START) self.heater_button[device].set_halign(Gtk.Align.START)
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1) self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1)
n += 1 n += 1
extra_item = True extra_item = not self._show_heater_power
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
if printer_cfg is not None: if printer_cfg is not None:
titlebar_items = 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("Titlebar items: %s", titlebar_items) logging.info(f"Titlebar items: {titlebar_items}")
for device in self._screen.printer.get_heaters(): for device in self._screen.printer.get_heaters():
if device.startswith("temperature_sensor"): if device.startswith("temperature_sensor"):
name = device.split(" ")[1:][0] name = " ".join(device.split(" ")[1:])
for item in titlebar_items: for item in titlebar_items:
if name == item: if name == item:
if extra_item: if extra_item:
@@ -242,8 +247,10 @@ class JobStatusPanel(ScreenPanel):
szfe = Gtk.Grid() szfe = Gtk.Grid()
szfe.attach(self.speed_button, 0, 0, 1, 1) szfe.attach(self.speed_button, 0, 0, 1, 1)
szfe.attach(self.z_button, 1, 0, 1, 1) szfe.attach(self.z_button, 1, 0, 1, 1)
szfe.attach(self.extrusion_button, 0, 1, 1, 1) if self._screen.printer.get_tools():
szfe.attach(self.fan_button, 1, 1, 1, 1) szfe.attach(self.extrusion_button, 0, 1, 1, 1)
if self._screen.printer.get_fans():
szfe.attach(self.fan_button, 1, 1, 1, 1)
info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
info.get_style_context().add_class("printing-info") info.get_style_context().add_class("printing-info")
@@ -356,12 +363,17 @@ class JobStatusPanel(ScreenPanel):
ctx.stroke() ctx.stroke()
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'])
if self.state_timeout is None:
self.state_timeout = GLib.timeout_add_seconds(1, self.state_check)
self.create_status_grid() self.create_status_grid()
if self.vel_timeout is None:
self.vel_timeout = GLib.timeout_add_seconds(1, self.update_velocity)
self._screen.base_panel_show_all()
def deactivate(self):
if self.vel_timeout is not None:
GLib.source_remove(self.vel_timeout)
self.vel_timeout = None
def create_buttons(self): def create_buttons(self):
@@ -388,17 +400,13 @@ 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 saved_z_offset = 0
if self._printer.config_section_exists("probe"): if self._printer.config_section_exists("probe"):
saved_z_offset = float(self._screen.printer.get_config_section("probe")['z_offset']) saved_z_offset = float(self._screen.printer.get_config_section("probe")['z_offset'])
elif self._printer.config_section_exists("bltouch"): elif self._printer.config_section_exists("bltouch"):
saved_z_offset = float(self._screen.printer.get_config_section("bltouch")['z_offset']) saved_z_offset = float(self._screen.printer.get_config_section("bltouch")['z_offset'])
if self.zoffset > 0: sign = "+" if self.zoffset > 0 else "-"
sign = "+"
else:
sign = "-"
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)) label.set_text(_("Apply %s%.2f offset to Probe?") % (sign, abs(self.zoffset))
@@ -444,12 +452,12 @@ class JobStatusPanel(ScreenPanel):
self._screen.show_all() self._screen.show_all()
def cancel(self, widget): def cancel(self, widget):
buttons = [ buttons = [
{"name": _("Cancel Print"), "response": Gtk.ResponseType.OK}, {"name": _("Cancel Print"), "response": Gtk.ResponseType.OK},
{"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL} {"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL}
] ]
if len(self._printer.get_stat("exclude_object", "objects")) > 1:
buttons.insert(0, {"name": _("Exclude Object"), "response": Gtk.ResponseType.APPLY})
label = Gtk.Label() label = Gtk.Label()
label.set_markup(_("Are you sure you wish to cancel this print?")) label.set_markup(_("Are you sure you wish to cancel this print?"))
label.set_hexpand(True) label.set_hexpand(True)
@@ -460,11 +468,14 @@ class JobStatusPanel(ScreenPanel):
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) self._gtk.Dialog(self._screen, buttons, label, self.cancel_confirm)
self.disable_button("pause", "cancel")
def cancel_confirm(self, widget, response_id): def cancel_confirm(self, widget, response_id):
widget.destroy() widget.destroy()
if response_id == Gtk.ResponseType.APPLY:
self.menu_item_clicked(None, "exclude", {"panel": "exclude", "name": _("Exclude Object")})
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
@@ -482,8 +493,9 @@ class JobStatusPanel(ScreenPanel):
logging.debug("Closing job_status panel") logging.debug("Closing job_status panel")
self.remove_close_timeout() self.remove_close_timeout()
self.state_check() self.state_check()
if self.state not in ["printing", "paused"]: if self.state not in ["printing", "paused", "cancelling"]:
self._screen.printer_ready() self._screen.printer_ready()
self._printer.change_state("ready")
return False return False
def remove_close_timeout(self): def remove_close_timeout(self):
@@ -500,15 +512,13 @@ class JobStatusPanel(ScreenPanel):
self.buttons[arg].set_sensitive(False) self.buttons[arg].set_sensitive(False)
def _callback_metadata(self, newfiles, deletedfiles, modifiedfiles): def _callback_metadata(self, newfiles, deletedfiles, modifiedfiles):
if bool(self.file_metadata) is False and self.filename in modifiedfiles: if not bool(self.file_metadata) and self.filename in modifiedfiles:
self.update_file_metadata() self.update_file_metadata()
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.remove_close_timeout()
if self.state_timeout is None: self._screen.close_screensaver()
self.state_timeout = GLib.timeout_add_seconds(1, self.state_check)
self._screen.wake_screen()
self.state_check() self.state_check()
def process_update(self, action, data): def process_update(self, action, data):
@@ -528,7 +538,8 @@ class JobStatusPanel(ScreenPanel):
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.extruder_button[x].set_label(self.labels[x].get_text()) self.extruder_button[x].set_label(self.labels[x].get_text())
for x in self._printer.get_heaters(): for x in self._printer.get_heaters():
@@ -536,30 +547,30 @@ class JobStatusPanel(ScreenPanel):
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.heater_button[x].set_label(self.labels[x].get_text()) self.heater_button[x].set_label(self.labels[x].get_text())
self.update_message() self.update_message()
if "toolhead" in data and "extruder" in data["toolhead"]: with contextlib.suppress(KeyError):
if self.current_extruder is not None and data["toolhead"]["extruder"] != self.current_extruder: if data["toolhead"]["extruder"] != self.current_extruder:
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.extruder_button[self.current_extruder], 0, 0, 1, 1)
self._screen.show_all() self._screen.show_all()
if "max_accel" in data["toolhead"]: with contextlib.suppress(KeyError):
self.labels['max_accel'].set_text("%d mm/s²" % (data["toolhead"]["max_accel"])) self.labels['max_accel'].set_text(f"{data['toolhead']['max_accel']:.0f} mm/s²")
with contextlib.suppress(KeyError):
if "extruder" in data and "pressure_advance" in data['extruder']: self.labels['advance'].set_text(f"{data['extruder']['pressure_advance']:.2f}")
self.labels['advance'].set_text("%.2f" % data['extruder']['pressure_advance'])
if "gcode_move" in data: if "gcode_move" in data:
if "gcode_position" in data["gcode_move"]: with contextlib.suppress(KeyError):
self.labels['pos_x'].set_text("X: %6.2f" % (data["gcode_move"]["gcode_position"][0])) self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:6.2f}")
self.labels['pos_y'].set_text("Y: %6.2f" % (data["gcode_move"]["gcode_position"][1])) self.labels['pos_y'].set_text(f"Y: {data['gcode_move']['gcode_position'][1]:6.2f}")
self.labels['pos_z'].set_text("Z: %6.2f" % (data["gcode_move"]["gcode_position"][2])) 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] self.pos_z = data["gcode_move"]["gcode_position"][2]
if self.main_status_displayed: if self.main_status_displayed:
self.z_button.set_label(self.labels['pos_z'].get_text()) self.z_button.set_label(self.labels['pos_z'].get_text())
@@ -568,170 +579,161 @@ class JobStatusPanel(ScreenPanel):
if self.prev_gpos is not None: if self.prev_gpos is not None:
interval = now - self.prev_gpos[1] interval = now - self.prev_gpos[1]
# Calculate Velocity # Calculate Velocity
vel = [(pos[0] - self.prev_gpos[0][0]), vel = sqrt(sum([
(pos[1] - self.prev_gpos[0][1]), (pos[0] - self.prev_gpos[0][0]) ** 2,
(pos[2] - self.prev_gpos[0][2])] (pos[1] - self.prev_gpos[0][1]) ** 2,
vel = array(vel) (pos[2] - self.prev_gpos[0][2]) ** 2]
self.velstore.append(sqrt(vel.dot(vel)) / interval) )) / interval
self.velstore.append(vel)
self.prev_gpos = [pos, now] self.prev_gpos = [pos, now]
if "extrude_factor" in data["gcode_move"]: with contextlib.suppress(KeyError):
self.extrusion = int(round(data["gcode_move"]["extrude_factor"] * 100)) self.extrusion = int(round(data["gcode_move"]["extrude_factor"] * 100))
self.labels['extrude_factor'].set_text("%3d%%" % self.extrusion) self.labels['extrude_factor'].set_text(f"{self.extrusion:3}%")
if self.main_status_displayed: if self.main_status_displayed:
self.extrusion_button.set_label("%3d%%" % self.extrusion) self.extrusion_button.set_label(f"{self.extrusion:3}%")
if "speed_factor" in data["gcode_move"]: with contextlib.suppress(KeyError):
self.speed = int(round(data["gcode_move"]["speed_factor"] * 100)) self.speed = int(round(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("%3d%%" % self.speed) self.labels['speed_factor'].set_text(f"{self.speed:3}%")
if "speed" in data["gcode_move"]: with contextlib.suppress(KeyError):
self.req_speed = int(round(data["gcode_move"]["speed"] / 60 * self.speed_factor)) self.req_speed = int(round(data["gcode_move"]["speed"] / 60 * self.speed_factor))
if "homing_origin" in data["gcode_move"]: with contextlib.suppress(KeyError):
self.zoffset = data["gcode_move"]["homing_origin"][2] self.zoffset = data["gcode_move"]["homing_origin"][2]
self.labels['zoffset'].set_text("%.2f" % self.zoffset) self.labels['zoffset'].set_text(f"{self.zoffset:.2f}")
if "motion_report" in data: if "motion_report" in data:
if 'live_position' in data["motion_report"]: with contextlib.suppress(KeyError):
now = time.time() pos = data["motion_report"]["live_position"]
pos = data["motion_report"]["live_position"] now = time.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 # Calculate Velocity
vel = [(pos[0] - self.prev_pos[0][0]), vel = sqrt(sum([
(pos[1] - self.prev_pos[0][1]), (pos[0] - self.prev_pos[0][0]) ** 2,
(pos[2] - self.prev_pos[0][2])] (pos[1] - self.prev_pos[0][1]) ** 2,
vel = array(vel) (pos[2] - self.prev_pos[0][2]) ** 2]
self.velstore.append(sqrt(vel.dot(vel)) / interval) )) / interval
self.prev_pos = [pos, now] self.velstore.append(vel)
if "live_velocity" in data["motion_report"]: self.prev_pos = [pos, now]
self.velstore.append(data["motion_report"]["live_velocity"]) with contextlib.suppress(KeyError):
if "live_extruder_velocity" in data["motion_report"]: self.velstore.append(float(data["motion_report"]["live_velocity"]))
self.flowstore.append(self.flowrate) with contextlib.suppress(KeyError):
self.flowstore.append(self.fila_section * float(data["motion_report"]["live_extruder_velocity"]))
for fan in self.fans:
if fan in data and "speed" in data[fan]:
fan_speed = int(round(self._printer.get_fan_speed(fan, data[fan]["speed"]), 2) * 100)
self.fans[fan]['speed'] = ("%3d%%" % fan_speed)
fan_label = "" fan_label = ""
for fan in self.fans: for fan in self.fans:
fan_label += self.fans[fan]['name'] + self.fans[fan]['speed'] + " " with contextlib.suppress(KeyError):
self.labels['fan'].set_text(fan_label[:12]) fan_speed = int(round(self._printer.get_fan_speed(fan, data[fan]["speed"]), 2) * 100)
self.fans[fan]['speed'] = f"{fan_speed:3}%"
if "layer_height" in self.file_metadata: fan_label += f" {self.fans[fan]['name']}{self.fans[fan]['speed']}"
layer_label = str(1 + round((self.pos_z - self.f_layer_h) / self.layer_h)) if fan_label:
layer_label += " / " + self.labels['total_layers'].get_text() self.labels['fan'].set_text(fan_label[:12])
self.labels['layer'].set_label(layer_label)
self.state_check() self.state_check()
if self.state not in ["printing", "paused"]: if self.state not in ["printing", "paused"]:
return return
ps = self._printer.get_stat("print_stats") ps = self._printer.get_stat("print_stats")
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:
fila_used = float(ps['filament_used'])
self.labels['filament_used'].set_text("%.1f m" % (fila_used / 1000))
if 'filename' in ps and (ps['filename'] != self.filename): if 'filename' in ps and (ps['filename'] != self.filename):
logging.debug("Changing filename: '%s' to '%s'" % (self.filename, ps['filename'])) logging.debug(f"Changing filename: '{self.filename}' to '{ps['filename']}'")
self.update_filename() self.update_filename()
else: else:
self.update_percent_complete() self.update_percent_complete()
self.update_text("duration", str(self._gtk.formatTimeString(duration))) if 'info' in ps and 'total_layer' in ps['info'] and ps['info']['total_layer'] is not None:
self.update_text("time_left", self.calculate_time_left(duration, ps['filament_used'])) self.labels['total_layers'].set_label(f"{ps['info']['total_layer']}")
if 'info' in ps and 'current_layer' in ps['info'] and ps['info']['current_layer'] is not None:
self.labels['layer'].set_label(f"{ps['info']['current_layer']} / {self.labels['total_layers'].get_text()}")
elif "layer_height" in self.file_metadata and "object_height" in self.file_metadata:
self.labels['layer'].set_label(
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 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:
self.labels['filament_used'].set_text(f"{float(ps['filament_used']) / 1000:.1f} m")
self.update_time_left(duration, ps['filament_used'])
else:
self.update_time_left(duration)
if self.main_status_displayed: if self.main_status_displayed:
self.fan_button.set_label(self.labels['fan'].get_text()) self.fan_button.set_label(self.labels['fan'].get_text())
elapsed_label = self.labels['elapsed'].get_text() + " " + self.labels['duration'].get_text() elapsed_label = f"{self.labels['elapsed'].get_text()} {self.labels['duration'].get_text()}"
self.elapsed_button.set_label(elapsed_label) self.elapsed_button.set_label(elapsed_label)
remaining_label = self.labels['left'].get_text() + " " + self.labels['time_left'].get_text() remaining_label = f"{self.labels['left'].get_text()} {self.labels['time_left'].get_text()}"
self.left_button.set_label(remaining_label) self.left_button.set_label(remaining_label)
if self.vel_timeout is None:
self.vel_timeout = GLib.timeout_add_seconds(1, self.update_velocity)
def update_velocity(self): def update_velocity(self):
if len(self.velstore) > 0: if not self.velstore:
self.vel = (self.vel + median(array(self.velstore))) / 2 self.velstore.append(0)
self.velstore = [] if not self.flowstore:
if len(self.flowstore) > 0: self.flowstore.append(0)
self.flowrate = (self.flowrate + median(array(self.flowstore))) / 2 self.flowrate = median(self.flowstore)
self.flowstore = [] self.vel = median(self.velstore)
self.velstore = []
self.labels['flowrate'].set_label("%.1f mm³/s" % self.flowrate) self.flowstore = []
self.labels['req_speed'].set_text("%d/%d mm/s" % (self.vel, self.req_speed)) self.labels['flowrate'].set_label(f"{self.flowrate:.1f} mm³/s")
self.labels['req_speed'].set_text(f"{self.vel:.0f}/{self.req_speed:.0f} mm/s")
if self.main_status_displayed: if self.main_status_displayed:
self.speed_button.set_label("%3d%% %5d mm/s" % (self.speed, self.vel)) self.speed_button.set_label(f"{self.speed:3.0f}% {self.vel:5.0f} mm/s")
self.extrusion_button.set_label("%3d%% %5.1f mm³/s" % (self.extrusion, self.flowrate)) self.extrusion_button.set_label(f"{self.extrusion:3}% {self.flowrate:5.1f} mm³/s")
return True return True
def calculate_time_left(self, duration=0, filament_used=0): def update_time_left(self, duration=0, fila_used=0):
total_duration = None total_duration = None
if self.progress < 1: if self.progress < 1:
slicer_time = filament_time = file_time = None slicer_time = filament_time = file_time = None
timeleft_type = self._config.get_config()['main'].get('print_estimate_method', 'auto') timeleft_type = self._config.get_config()['main'].get('print_estimate_method', 'auto')
slicer_correction = (self._config.get_config()['main'].getint('print_estimate_compensation', 100) / 100)
# speed_factor compensation based on empirical testing
spdcomp = sqrt(self.speed_factor)
if "estimated_time" in self.file_metadata: with contextlib.suppress(KeyError):
if self.file_metadata['estimated_time'] > 0: if self.file_metadata['estimated_time'] > 0:
slicer_time = (self.file_metadata['estimated_time'] * slicer_correction) / spdcomp usrcomp = (self._config.get_config()['main'].getint('print_estimate_compensation', 100) / 100)
if slicer_time < duration: # speed_factor compensation based on empirical testing
slicer_time = None spdcomp = sqrt(self.speed_factor)
self.update_text("slicer_time", "-") slicer_time = (self.file_metadata['estimated_time'] * usrcomp) / spdcomp
else: self.update_text("slicer_time", self.format_time(slicer_time))
self.update_text("slicer_time", str(self._gtk.formatTimeString(slicer_time)))
if "filament_total" in self.file_metadata: with contextlib.suppress(Exception):
if self.file_metadata['filament_total'] > 0 and filament_used > 0: if self.file_metadata['filament_total'] > fila_used:
if self.file_metadata['filament_total'] > filament_used: filament_time = duration / (fila_used / self.file_metadata['filament_total'])
filament_time = duration / (filament_used / self.file_metadata['filament_total']) self.update_text("filament_time", self.format_time(filament_time))
if filament_time < duration:
filament_time = None
self.update_text("filament_time", "-")
else:
self.update_text("filament_time", str(self._gtk.formatTimeString(slicer_time)))
if self.progress > 0: with contextlib.suppress(ZeroDivisionError):
file_time = duration / self.progress file_time = duration / self.progress
self.update_text("file_time", str(self._gtk.formatTimeString(file_time))) self.update_text("file_time", self.format_time(file_time))
else:
self.update_text("file_time", "-")
if timeleft_type == "file" and file_time is not None: if timeleft_type == "file":
total_duration = file_time total_duration = file_time
elif timeleft_type == "filament" and filament_time is not None: elif timeleft_type == "filament":
total_duration = filament_time total_duration = filament_time
elif slicer_time is not None: elif slicer_time is not None:
if timeleft_type == "slicer": if timeleft_type == "slicer":
total_duration = slicer_time total_duration = slicer_time
elif filament_time is not None and self.progress > 0.14:
# Weighted arithmetic mean (Slicer is the most accurate)
total_duration = (slicer_time * 3 + filament_time + file_time) / 5
else: else:
if 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) total_duration = slicer_time
total_duration = (slicer_time * 3 + filament_time + file_time) / 5
else:
# At the begining file and filament are innacurate
total_duration = slicer_time
elif file_time is not None: elif file_time is not None:
if filament_time is not None: if filament_time is not None:
total_duration = (filament_time + file_time) / 2 total_duration = (filament_time + file_time) / 2
else: else:
total_duration = file_time 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: if total_duration is not None:
self.update_text("est_time", str(self._gtk.formatTimeString(total_duration))) self.update_text("time_left", self.format_time(total_duration - duration))
return str(self._gtk.formatTimeString((total_duration - duration)))
else:
return "-"
def state_check(self): def state_check(self):
ps = self._printer.get_stat("print_stats") ps = self._printer.get_stat("print_stats")
if ps['state'] == self.state: if 'state' not in ps or ps['state'] == self.state:
return True return True
if ps['state'] == "printing": if ps['state'] == "printing":
@@ -743,42 +745,32 @@ class JobStatusPanel(ScreenPanel):
self.progress = 1 self.progress = 1
self.update_progress() self.update_progress()
self.set_state("complete") self.set_state("complete")
self._screen.wake_screen() return self._add_timeout("job_complete_timeout")
self.remove_close_timeout()
timeout = self._config.get_main_config().getint("job_complete_timeout", 0)
if timeout != 0:
self.close_timeout = GLib.timeout_add_seconds(timeout, self.close_panel)
return False
elif ps['state'] == "error": elif ps['state'] == "error":
logging.debug("Error!")
self.set_state("error") self.set_state("error")
self.labels['status'].set_text("%s" % (_("Error"))) self.labels['status'].set_text(_("Error"))
self._screen.show_popup_message(ps['message']) self._screen.show_popup_message(ps['message'])
self._screen.wake_screen() return self._add_timeout("job_error_timeout")
self.remove_close_timeout()
timeout = self._config.get_main_config().getint("job_error_timeout", 0)
if timeout != 0:
self.close_timeout = GLib.timeout_add_seconds(timeout, self.close_panel)
return False
elif ps['state'] == "cancelled": elif ps['state'] == "cancelled":
# Print was cancelled
self.set_state("cancelled") self.set_state("cancelled")
self._screen.wake_screen() return self._add_timeout("job_cancelled_timeout")
self.remove_close_timeout()
timeout = self._config.get_main_config().getint("job_cancelled_timeout", 0)
if timeout != 0:
self.close_timeout = GLib.timeout_add_seconds(timeout, self.close_panel)
return False
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 set_state(self, state): def _add_timeout(self, job_timeout):
self._screen.close_screensaver()
self.remove_close_timeout()
timeout = self._config.get_main_config().getint(job_timeout, 0)
if timeout != 0:
self.close_timeout = GLib.timeout_add_seconds(timeout, self.close_panel)
return False
def set_state(self, state):
if self.state != state: if self.state != state:
logging.debug("Changing job_status state from '%s' to '%s'" % (self.state, 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.update_text("status", _("Paused"))
elif state == "printing": elif state == "printing":
@@ -825,12 +817,19 @@ class JobStatusPanel(ScreenPanel):
if self.filename is not None: if self.filename is not None:
self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1) self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1)
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1) if self.state != "cancelling":
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1)
self.show_all() self.show_all()
def show_file_thumbnail(self): def show_file_thumbnail(self):
if self._files.has_thumbnail(self.filename): if self._files.has_thumbnail(self.filename):
pixbuf = self.get_file_image(self.filename, 5, 5) if self._screen.vertical_mode:
width = self._screen.width * 0.9
height = self._screen.height / 4
else:
width = self._screen.width / 3
height = self._gtk.get_content_height() * 0.47
pixbuf = self.get_file_image(self.filename, width, height)
if pixbuf is not None: if pixbuf is not None:
self.labels['thumbnail'].set_from_pixbuf(pixbuf) self.labels['thumbnail'].set_from_pixbuf(pixbuf)
@@ -841,64 +840,48 @@ class JobStatusPanel(ScreenPanel):
"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": 24, "limit": (self._screen.width * 24 / 480) // (self._gtk.get_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: self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
# if self.labels['file'].is_ellipsized(): <- currently this doesn't work
if (self.filename_label['length'] - self.filename_label['limit']) > 0:
self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
self.update_percent_complete() self.update_percent_complete()
self.update_file_metadata() self.update_file_metadata()
def animate_label(self): def animate_label(self):
pos = self.filename_label['position'] pos = self.filename_label['position']
current = self.filename_label['current']
complete = self.filename_label['complete']
if pos > (self.filename_label['length'] - self.filename_label['limit']): if pos > (self.filename_label['length'] - self.filename_label['limit']):
self.filename_label['position'] = 0 self.filename_label['position'] = 0
self.labels['file'].set_label(complete) self.labels['file'].set_label(self.filename_label['complete'])
else: else:
self.labels['file'].set_label(current[pos:self.filename_label['length']]) self.labels['file'].set_label(self.filename_label['current'][pos:self.filename_label['length']])
self.filename_label['position'] += 1 self.filename_label['position'] += 1
return True return True
def update_file_metadata(self): def update_file_metadata(self):
if self._files.file_metadata_exists(self.filename): if self._files.file_metadata_exists(self.filename):
self.file_metadata = self._files.get_file_info(self.filename) self.file_metadata = self._files.get_file_info(self.filename)
logging.info("Update Metadata. File: %s Size: %s" % (self.filename, 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.update_text("est_time", self.format_time(self.file_metadata['estimated_time']))
str(self._gtk.formatTimeString(self.file_metadata['estimated_time'])))
if "thumbnails" in self.file_metadata:
tmp = self.file_metadata['thumbnails'].copy()
for i in tmp:
i['data'] = ""
self.show_file_thumbnail() self.show_file_thumbnail()
if "object_height" in self.file_metadata: if "object_height" in self.file_metadata:
self.height = float(self.file_metadata['object_height']) self.oheight = float(self.file_metadata['object_height'])
self.labels['height'].set_label(str(self.height) + " mm") self.labels['height'].set_label(f"{self.oheight} 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:
self.f_layer_h = float(self.file_metadata['first_layer_height']) self.f_layer_h = float(self.file_metadata['first_layer_height'])
else: else:
self.f_layer_h = self.layer_h self.f_layer_h = self.layer_h
self.labels['total_layers'].set_label(str(int((self.height - self.f_layer_h) / self.layer_h) + 1)) 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:
filament_total = float(self.file_metadata['filament_total']) / 1000 self.labels['filament_total'].set_text(f"{float(self.file_metadata['filament_total']) / 1000:.1f} m")
self.labels['filament_total'].set_text("%.1f m" % filament_total)
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)
def update_image_text(self, label, text):
if label in self.labels and 'l' in self.labels[label]:
self.labels[label]['l'].set_text(text)
def update_percent_complete(self): def update_percent_complete(self):
if self.state not in ["printing", "paused"]: if self.state not in ["printing", "paused"]:
return return
@@ -920,20 +903,10 @@ class JobStatusPanel(ScreenPanel):
self.labels[label].set_text(text) self.labels[label].set_text(text)
def update_progress(self): def update_progress(self):
if self.progress < 1: self.labels['progress_text'].set_text(f"{self.progress * 100:.0f}%")
self.labels['progress_text'].set_text("%s%%" % (str((int(self.progress * 100)))))
else:
self.labels['progress_text'].set_text("100")
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(str(msg)) self.labels['lcdmessage'].set_text(f"{msg}")
def update_temp(self, x, temp, target):
if x in self.labels and temp is not None:
if target is not None and target > 0:
self.labels[x].set_label("%3d/%3d°" % (temp, target))
else:
self.labels[x].set_label("%3d°" % temp)
+27 -27
View File
@@ -12,40 +12,36 @@ def create_panel(*args):
class LimitsPanel(ScreenPanel): class LimitsPanel(ScreenPanel):
values = {}
def initialize(self, panel_name):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.limits = {} self.limits = {}
self.options = None
scroll = self._gtk.ScrolledWindow() self.values = {}
# Create a grid for all limits
self.grid = Gtk.Grid() self.grid = Gtk.Grid()
scroll.add(self.grid)
conf = self._printer.get_config_section("printer") conf = self._printer.get_config_section("printer")
self.options = [ self.options = [
{"name": _("Max Acceleration"), "units": _("mm/s²"), "option": "max_accel", {"name": _("Max Acceleration"), "units": _("mm/s²"), "option": "max_accel",
"max": self.stn(conf['max_accel'])}, "max": int(float(conf['max_accel']))},
{"name": _("Max Acceleration to Deceleration"), "units": _("mm/s²"), "option": "max_accel_to_decel", {"name": _("Max Acceleration to Deceleration"), "units": _("mm/s²"), "option": "max_accel_to_decel",
"max": self.stn(conf['max_accel_to_decel']) if "max_accel_to_decel" in conf else "max": int(float(conf['max_accel_to_decel'])) if "max_accel_to_decel" in conf
round(self.stn(conf['max_accel']) / 2)}, else int(float(conf['max_accel']) / 2)},
{"name": _("Max Velocity"), "units": _("mm/s"), "option": "max_velocity", {"name": _("Max Velocity"), "units": _("mm/s"), "option": "max_velocity",
"max": self.stn(conf["max_velocity"])}, "max": int(float(conf["max_velocity"]))},
{"name": _("Square Corner Velocity"), "units": _("mm/s"), "option": "square_corner_velocity", {"name": _("Square Corner Velocity"), "units": _("mm/s"), "option": "square_corner_velocity",
"max": self.stn(conf['square_corner_velocity']) if "square_corner_velocity" in conf else 5} "max": int(float(conf['square_corner_velocity'])) if "square_corner_velocity" in conf
else 5}
] ]
for opt in self.options: for opt in self.options:
self.add_option(opt['option'], opt['name'], opt['units'], opt['max']) self.add_option(opt['option'], opt['name'], opt['units'], opt['max'])
scroll = self._gtk.ScrolledWindow()
scroll.add(self.grid)
self.content.add(scroll) self.content.add(scroll)
self.content.show_all() self.content.show_all()
def stn(self, str):
return int(float(str))
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_status_update": if action != "notify_status_update":
return return
@@ -68,15 +64,18 @@ class LimitsPanel(ScreenPanel):
if opt["option"] == option: if opt["option"] == option:
if self.values[option] > opt["max"]: if self.values[option] > opt["max"]:
self.limits[option]['scale'].get_style_context().add_class("option_slider_max") self.limits[option]['scale'].get_style_context().add_class("option_slider_max")
# Infinite scale
self.limits[option]['adjustment'].set_upper(self.values[option] * 1.5)
else: else:
self.limits[option]['scale'].get_style_context().remove_class("option_slider_max") self.limits[option]['scale'].get_style_context().remove_class("option_slider_max")
self.limits[option]['adjustment'].set_upper(opt["max"] * 1.5)
self.limits[option]['scale'].connect("button-release-event", self.set_opt_value, option) self.limits[option]['scale'].connect("button-release-event", self.set_opt_value, option)
def add_option(self, option, optname, units, value): def add_option(self, option, optname, units, value):
logging.info("Adding option: %s" % option) logging.info(f"Adding option: {option}")
name = Gtk.Label() name = Gtk.Label()
name.set_markup("<big><b>%s</b></big> (%s)" % (optname, units)) name.set_markup(f"<big><b>{optname}</b></big> ({units})")
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
@@ -84,17 +83,17 @@ class LimitsPanel(ScreenPanel):
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.WORD_CHAR)
adj = Gtk.Adjustment(0, 1, (value * 1.5), 1, 5, 0) # adj (value, lower, upper, step_increment, page_increment, page_size)
self.values[option] = value adj = Gtk.Adjustment(value, 1, (value * 1.5), 1, 5, 0)
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj) scale = Gtk.Scale.new(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
scale.set_value(self.values[option])
scale.set_digits(0) scale.set_digits(0)
scale.set_hexpand(True) scale.set_hexpand(True)
scale.set_has_origin(True) scale.set_has_origin(True)
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)
self.values[option] = value
reset = self._gtk.ButtonImage("refresh", None, "color1") reset = self._gtk.ButtonImage("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)
@@ -110,6 +109,7 @@ class LimitsPanel(ScreenPanel):
self.limits[option] = { self.limits[option] = {
"row": frame, "row": frame,
"scale": scale, "scale": scale,
"adjustment": adj,
} }
limits = sorted(self.limits) limits = sorted(self.limits)
@@ -129,10 +129,10 @@ class LimitsPanel(ScreenPanel):
value = self.limits[opt]['scale'].get_value() value = self.limits[opt]['scale'].get_value()
if opt == "max_accel": if opt == "max_accel":
self._screen._ws.klippy.gcode_script("SET_VELOCITY_LIMIT ACCEL=%s" % value) self._screen._ws.klippy.gcode_script(f"SET_VELOCITY_LIMIT ACCEL={value}")
elif opt == "max_accel_to_decel": elif opt == "max_accel_to_decel":
self._screen._ws.klippy.gcode_script("SET_VELOCITY_LIMIT ACCEL_TO_DECEL=%s" % value) self._screen._ws.klippy.gcode_script(f"SET_VELOCITY_LIMIT ACCEL_TO_DECEL={value}")
elif opt == "max_velocity": elif opt == "max_velocity":
self._screen._ws.klippy.gcode_script("SET_VELOCITY_LIMIT VELOCITY=%s" % value) self._screen._ws.klippy.gcode_script(f"SET_VELOCITY_LIMIT VELOCITY={value}")
elif opt == "square_corner_velocity": elif opt == "square_corner_velocity":
self._screen._ws.klippy.gcode_script("SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=%s" % value) self._screen._ws.klippy.gcode_script(f"SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={value}")
+113 -175
View File
@@ -2,7 +2,7 @@ import gi
import logging import logging
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
from panels.menu import MenuPanel from panels.menu import MenuPanel
from ks_includes.widgets.graph import HeaterGraph from ks_includes.widgets.graph import HeaterGraph
@@ -16,153 +16,146 @@ def create_panel(*args):
class MainPanel(MenuPanel): class MainPanel(MenuPanel):
def __init__(self, screen, title, back=False): def __init__(self, screen, title, back=False):
super().__init__(screen, title, False) super().__init__(screen, title, False)
self.left_panel = None
self.items = None
self.devices = {} self.devices = {}
self.graph_update = None self.graph_update = None
self.active_heater = None self.active_heater = None
self.h = 1
self.grid = self._gtk.HomogeneousGrid()
self.grid.set_hexpand(True)
self.grid.set_vexpand(True)
def initialize(self, panel_name, items, extrudercount): def initialize(self, items):
print("### Making MainMenu") logging.info("### Making MainMenu")
grid = self._gtk.HomogeneousGrid()
grid.set_hexpand(True)
grid.set_vexpand(True)
self.items = items self.items = items
self.create_menu_items() self.create_menu_items()
self._gtk.reset_temp_color() stats = self._printer.get_printer_status_data()["printer"]
grid = self._gtk.HomogeneousGrid()
self.grid = Gtk.Grid() if stats["temperature_devices"]["count"] > 0 or stats["extruders"]["count"] > 0:
self.grid.set_row_homogeneous(True) self._gtk.reset_temp_color()
self.grid.set_column_homogeneous(True) grid.attach(self.create_left_panel(), 0, 0, 1, 1)
else:
leftpanel = self.create_left_panel() self.graph_update = False
grid.attach(leftpanel, 0, 0, 1, 1)
if self._screen.vertical_mode: if self._screen.vertical_mode:
self.labels['menu'] = self.arrangeMenuItems(items, 3, True) self.labels['menu'] = self.arrangeMenuItems(items, 3, True)
grid.attach(self.labels['menu'], 0, 1, 1, 1) grid.attach(self.labels['menu'], 0, 1, 1, 1)
else: else:
self.labels['menu'] = self.arrangeMenuItems(items, 2, True) self.labels['menu'] = self.arrangeMenuItems(items, 2, True)
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() self.layout.show_all()
def update_graph_visibility(self):
if self.left_panel is None:
return
count = 0
for device in self.devices:
visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}",
device, fallback=True)
self.devices[device]['visible'] = visible
self.labels['da'].set_showing(device, visible)
if visible:
count += 1
self.devices[device]['name'].get_style_context().add_class(self.devices[device]['class'])
self.devices[device]['name'].get_style_context().remove_class("graph_label_hidden")
else:
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'])
if count > 0:
self.left_panel.add(self.labels['da'])
self.labels['da'].queue_draw()
self.labels['da'].show()
else:
self.left_panel.remove(self.labels['da'])
def activate(self): def activate(self):
# For this case False != None
if self.graph_update is None: if self.graph_update is None:
# This has a high impact on load # This has a high impact on load
self.graph_update = GLib.timeout_add_seconds(5, self.update_graph) self.graph_update = GLib.timeout_add_seconds(5, self.update_graph)
return self.update_graph_visibility()
self._screen.base_panel_show_all()
def deactivate(self): def deactivate(self):
if self.graph_update is not None: if self.graph_update:
GLib.source_remove(self.graph_update) GLib.source_remove(self.graph_update)
self.graph_update = None self.graph_update = None
if self.active_heater is not None:
self.hide_numpad()
def add_device(self, device): def add_device(self, device):
logging.info("Adding device: %s" % device) logging.info(f"Adding device: {device}")
temperature = self._printer.get_dev_stat(device, "temperature") temperature = self._printer.get_dev_stat(device, "temperature")
if temperature is None: if temperature is None:
return False return False
if not (device.startswith("extruder") or device.startswith("heater_bed")): devname = device.split()[1] if len(device.split()) > 1 else device
devname = " ".join(device.split(" ")[1:]) # Support for hiding devices by name
# Support for hiding devices by name if devname.startswith("_"):
if devname.startswith("_"): return False
return False
else:
devname = device
if device.startswith("extruder"): if device.startswith("extruder"):
i = 0 i = sum(d.startswith('extruder') for d in self.devices)
for d in self.devices: image = f"extruder-{i}" if self._printer.extrudercount > 1 else "extruder"
if d.startswith('extruder'): class_name = f"graph_label_{device}"
i += 1 dev_type = "extruder"
if self._printer.extrudercount > 1:
image = "extruder-%s" % i
else:
image = "extruder"
class_name = "graph_label_%s" % device
type = "extruder"
elif device == "heater_bed": elif device == "heater_bed":
image = "bed" image = "bed"
devname = "Heater Bed" devname = "Heater Bed"
class_name = "graph_label_heater_bed" class_name = "graph_label_heater_bed"
type = "bed" dev_type = "bed"
elif device.startswith("heater_generic"): elif device.startswith("heater_generic"):
self.h = 1 self.h = sum("heater_generic" in d for d in self.devices)
for d in self.devices:
if "heater_generic" in d:
self.h += 1
image = "heater" image = "heater"
class_name = "graph_label_sensor_%s" % self.h class_name = f"graph_label_sensor_{self.h}"
type = "sensor" dev_type = "sensor"
elif device.startswith("temperature_fan"): elif device.startswith("temperature_fan"):
f = 1 f = 1 + sum("temperature_fan" in d for d in self.devices)
for d in self.devices:
if "temperature_fan" in d:
f += 1
image = "fan" image = "fan"
class_name = "graph_label_fan_%s" % f class_name = f"graph_label_fan_{f}"
type = "fan" dev_type = "fan"
elif self._config.get_main_config().getboolean("only_heaters", False): elif self._config.get_main_config().getboolean("only_heaters", False):
return False return False
else: else:
s = 1 self.h += sum("sensor" in d for d in self.devices)
try:
s += self.h
except Exception:
pass
for d in self.devices:
if "sensor" in d:
s += 1
image = "heat-up" image = "heat-up"
class_name = "graph_label_sensor_%s" % s class_name = f"graph_label_sensor_{self.h}"
type = "sensor" dev_type = "sensor"
rgb, color = self._gtk.get_temp_color(type) rgb = self._gtk.get_temp_color(dev_type)
can_target = self._printer.get_temp_store_device_has_target(device) can_target = self._printer.get_temp_store_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)
text = "<span underline='double' underline_color='#%s'>%s</span>" % (color, devname.capitalize()) name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "), None, .5, Gtk.PositionType.LEFT, 1)
name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "), name.connect("clicked", self.toggle_visibility, device)
None, .5, Gtk.PositionType.LEFT, False)
name.connect('clicked', self.on_popover_clicked, device)
name.set_alignment(0, .5) name.set_alignment(0, .5)
name.get_style_context().add_class(class_name) visible = self._config.get_config().getboolean(f"graph {self._screen.connected_printer}", device, fallback=True)
child = name.get_children()[0].get_children()[0].get_children()[1] if visible:
child.set_ellipsize(Pango.EllipsizeMode.END) name.get_style_context().add_class(class_name)
else:
name.get_style_context().add_class("graph_label_hidden")
self.labels['da'].set_showing(device, visible)
temp = self._gtk.Button("") temp = self._gtk.Button("")
temp.connect('clicked', self.on_popover_clicked, device) if can_target:
temp.connect("clicked", self.show_numpad, device)
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.set_hexpand(True)
dev.set_vexpand(False)
dev.add(labels)
self.devices[device] = { self.devices[device] = {
"class": class_name, "class": class_name,
"type": type,
"name": name, "name": name,
"temp": temp, "temp": temp,
"can_target": can_target "can_target": can_target,
"visible": visible
} }
if self.devices[device]["can_target"]:
temp.get_child().set_label("%.1f %s" %
(temperature, self.format_target(self._printer.get_dev_stat(device, "target"))))
else:
temp.get_child().set_label("%.1f " % temperature)
devices = sorted(self.devices) devices = sorted(self.devices)
pos = devices.index(device) + 1 pos = devices.index(device) + 1
@@ -172,24 +165,37 @@ class MainPanel(MenuPanel):
self.labels['devices'].show_all() self.labels['devices'].show_all()
return True return True
def toggle_visibility(self, widget, device):
self.devices[device]['visible'] ^= True
logging.info(f"Graph show {self.devices[device]['visible']}: {device}")
section = f"graph {self._screen.connected_printer}"
if section not in self._config.get_config().sections():
self._config.get_config().add_section(section)
self._config.set(section, f"{device}", f"{self.devices[device]['visible']}")
self._config.save_user_config_options()
self.update_graph_visibility()
def change_target_temp(self, temp): def change_target_temp(self, temp):
MAX_TEMP = int(float(self._printer.get_config_section(self.active_heater)['max_temp'])) max_temp = int(float(self._printer.get_config_section(self.active_heater)['max_temp']))
if temp > MAX_TEMP: if temp > max_temp:
self._screen.show_popup_message(_("Can't set above the maximum:") + (" %s" % MAX_TEMP)) self._screen.show_popup_message(_("Can't set above the maximum:") + f' {max_temp}')
return return
temp = 0 if temp < 0 else temp temp = max(temp, 0)
name = self.active_heater.split()[1] if len(self.active_heater.split()) > 1 else self.active_heater
if self.active_heater.startswith('extruder'): if self.active_heater.startswith('extruder'):
self._screen._ws.klippy.set_tool_temp(self._printer.get_tool_number(self.active_heater), temp) self._screen._ws.klippy.set_tool_temp(self._printer.get_tool_number(self.active_heater), temp)
elif self.active_heater == "heater_bed": elif self.active_heater == "heater_bed":
self._screen._ws.klippy.set_bed_temp(temp) self._screen._ws.klippy.set_bed_temp(temp)
elif self.active_heater.startswith('heater_generic '): elif self.active_heater.startswith('heater_generic '):
self._screen._ws.klippy.set_heater_temp(" ".join(self.active_heater.split(" ")[1:]), temp) self._screen._ws.klippy.set_heater_temp(name, temp)
elif self.active_heater.startswith('temperature_fan '): elif self.active_heater.startswith('temperature_fan '):
self._screen._ws.klippy.set_temp_fan_temp(" ".join(self.active_heater.split(" ")[1:]), temp) self._screen._ws.klippy.set_temp_fan_temp(name, temp)
else: else:
logging.info("Unknown heater: %s" % self.active_heater) logging.info(f"Unknown heater: {self.active_heater}")
self._screen.show_popup_message(_("Unknown Heater") + " " + self.active_heater) self._screen.show_popup_message(_("Unknown Heater") + " " + self.active_heater)
self._printer.set_dev_stat(self.active_heater, "target", temp) self._printer.set_dev_stat(self.active_heater, "target", temp)
@@ -201,66 +207,28 @@ 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), 0) temp.set_size_request(round(self._gtk.get_font_size() * 7.7), -1)
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)
da = HeaterGraph(self._printer, self._gtk.get_font_size()) self.labels['da'] = HeaterGraph(self._printer, self._gtk.get_font_size())
da.set_vexpand(True) self.labels['da'].set_vexpand(True)
self.labels['da'] = da
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)
scroll.add(self.labels['devices']) scroll.add(self.labels['devices'])
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0) self.left_panel = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True) self.left_panel.add(scroll)
box.add(scroll)
box.add(self.labels['da'])
self.labels['graph_settemp'] = self._gtk.Button(label=_("Set Temp"))
self.labels['graph_settemp'].connect("clicked", self.show_numpad)
self.labels['graph_hide'] = self._gtk.Button(label=_("Hide"))
self.labels['graph_hide'].connect("clicked", self.graph_show_device, False)
self.labels['graph_show'] = self._gtk.Button(label=_("Show"))
self.labels['graph_show'].connect("clicked", self.graph_show_device)
popover = Gtk.Popover()
self.labels['popover_vbox'] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
popover.add(self.labels['popover_vbox'])
popover.set_position(Gtk.PositionType.BOTTOM)
self.labels['popover'] = popover
i = 2
for d in self._printer.get_temp_store_devices(): for d in self._printer.get_temp_store_devices():
if self.add_device(d): self.add_device(d)
i += 1
if self._screen.vertical_mode:
aux = 1.38
else:
aux = 1
graph_height = max(0, self._screen.height / aux - (i * 5 * self._gtk.get_font_size()))
self.labels['da'].set_size_request(0, graph_height)
return box
def graph_show_device(self, widget, show=True): return self.left_panel
logging.info("Graph show: %s %s" % (self.popover_device, show))
self.labels['da'].set_showing(self.popover_device, show)
if show:
self.devices[self.popover_device]['name'].get_style_context().remove_class("graph_label_hidden")
self.devices[self.popover_device]['name'].get_style_context().add_class(
self.devices[self.popover_device]['class'])
else:
self.devices[self.popover_device]['name'].get_style_context().remove_class(
self.devices[self.popover_device]['class'])
self.devices[self.popover_device]['name'].get_style_context().add_class("graph_label_hidden")
self.labels['da'].queue_draw()
self.popover_populate_menu()
self.labels['popover'].show_all()
def hide_numpad(self, widget): def hide_numpad(self, widget=None):
self.devices[self.active_heater]['name'].get_style_context().remove_class("active_device") self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active")
self.active_heater = None self.active_heater = None
if self._screen.vertical_mode: if self._screen.vertical_mode:
@@ -271,27 +239,6 @@ class MainPanel(MenuPanel):
self.grid.attach(self.labels['menu'], 1, 0, 1, 1) self.grid.attach(self.labels['menu'], 1, 0, 1, 1)
self.grid.show_all() self.grid.show_all()
def on_popover_clicked(self, widget, device):
self.popover_device = device
po = self.labels['popover']
po.set_relative_to(widget)
self.popover_populate_menu()
po.show_all()
def popover_populate_menu(self):
pobox = self.labels['popover_vbox']
for child in pobox.get_children():
pobox.remove(child)
if self.labels['da'].is_showing(self.popover_device):
pobox.pack_start(self.labels['graph_hide'], True, True, 5)
if self.devices[self.popover_device]['type'] != "sensor":
pobox.pack_start(self.labels['graph_settemp'], True, True, 5)
else:
pobox.pack_start(self.labels['graph_show'], True, True, 5)
if self.devices[self.popover_device]['type'] != "sensor":
pobox.pack_start(self.labels['graph_settemp'], True, True, 5)
def process_update(self, action, data): def process_update(self, action, data):
if action != "notify_status_update": if action != "notify_status_update":
return return
@@ -300,22 +247,24 @@ class MainPanel(MenuPanel):
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"),
) )
for h in self._printer.get_heaters(): for h in self._printer.get_heaters():
self.update_temp( self.update_temp(
h, h,
self._printer.get_dev_stat(h, "temperature"), self._printer.get_dev_stat(h, "temperature"),
self._printer.get_dev_stat(h, "target"), self._printer.get_dev_stat(h, "target"),
self._printer.get_dev_stat(h, "power"),
) )
return return
def show_numpad(self, widget): def show_numpad(self, widget, device):
if self.active_heater is not None: if self.active_heater is not None:
self.devices[self.active_heater]['name'].get_style_context().remove_class("active_device") self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active")
self.active_heater = self.popover_device self.active_heater = device
self.devices[self.active_heater]['name'].get_style_context().add_class("active_device") self.devices[self.active_heater]['name'].get_style_context().add_class("button_active")
if "keypad" not in self.labels: if "keypad" not in self.labels:
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.hide_numpad) self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.hide_numpad)
@@ -329,17 +278,6 @@ class MainPanel(MenuPanel):
self.grid.attach(self.labels["keypad"], 1, 0, 1, 1) self.grid.attach(self.labels["keypad"], 1, 0, 1, 1)
self.grid.show_all() self.grid.show_all()
self.labels['popover'].popdown()
def update_graph(self): def update_graph(self):
self.labels['da'].queue_draw() self.labels['da'].queue_draw()
return True return True
def update_temp(self, device, temp, target):
if device not in self.devices:
return
if self.devices[device]["can_target"]:
self.devices[device]["temp"].get_child().set_label("%.1f %s" % (temp, self.format_target(target)))
else:
self.devices[device]["temp"].get_child().set_label("%.1f " % temp)
+22 -33
View File
@@ -16,30 +16,30 @@ class MenuPanel(ScreenPanel):
i = 0 i = 0
j2_data = None j2_data = None
def initialize(self, panel_name, display_name, items): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.items = items self.items = None
self.create_menu_items()
self.grid = self._gtk.HomogeneousGrid() self.grid = self._gtk.HomogeneousGrid()
def initialize(self, items):
self.items = items
self.create_menu_items()
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)
scroll.add(self.grid) scroll.add(self.grid)
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 = self._printer.get_printer_status_data()
self.j2_data.update({ self.j2_data.update({
'moonraker_connected': self._screen._ws.is_connected() '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:
self.arrangeMenuItems(self.items, 4) self.arrangeMenuItems(self.items, 4)
def arrangeMenuItems(self, items, columns, expandLast=False): def arrangeMenuItems(self, items, columns, expand_last=False):
for child in self.grid.get_children(): for child in self.grid.get_children():
self.grid.remove(child) self.grid.remove(child)
@@ -47,8 +47,8 @@ class MenuPanel(ScreenPanel):
i = 0 i = 0
for item in items: for item in items:
key = list(item)[0] key = list(item)[0]
logging.debug("Evaluating item: %s" % key)
if not self.evaluate_enable(item[key]['enable']): if not self.evaluate_enable(item[key]['enable']):
logging.debug(f"X > {key}")
continue continue
if columns == 4: if columns == 4:
@@ -63,7 +63,7 @@ class MenuPanel(ScreenPanel):
row = int(i / columns) row = int(i / columns)
width = height = 1 width = height = 1
if expandLast is True and i + 1 == length and length % 2 == 1: if expand_last is True and i + 1 == length and length % 2 == 1:
width = 2 width = 2
self.grid.attach(self.labels[key], col, row, width, height) self.grid.attach(self.labels[key], col, row, width, height)
@@ -76,19 +76,17 @@ class MenuPanel(ScreenPanel):
key = list(self.items[i])[0] key = list(self.items[i])[0]
item = self.items[i][key] item = self.items[i][key]
env = Environment(extensions=["jinja2.ext.i18n"]) env = Environment(extensions=["jinja2.ext.i18n"], autoescape=True)
env.install_gettext_translations(self.lang) env.install_gettext_translations(self._config.get_lang())
j2_temp = env.from_string(item['name']) j2_temp = env.from_string(item['name'])
parsed_name = j2_temp.render() parsed_name = j2_temp.render()
b = self._gtk.ButtonImage( b = self._gtk.ButtonImage(item['icon'], parsed_name, f"color{(i % 4) + 1}")
item['icon'], parsed_name, "color" + str((i % 4) + 1) if item['panel'] is not None:
)
if item['panel'] is not False:
b.connect("clicked", self.menu_item_clicked, item['panel'], item) b.connect("clicked", self.menu_item_clicked, item['panel'], item)
elif item['method'] is not False: elif item['method'] is not None:
params = item['params'] if item['params'] is not False else {} params = item['params'] if item['params'] is not False else {}
if item['confirm'] is not False: 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:
b.connect("clicked", self._screen._send_action, item['method'], params) b.connect("clicked", self._screen._send_action, item['method'], params)
@@ -97,24 +95,15 @@ class MenuPanel(ScreenPanel):
self.labels[key] = b self.labels[key] = b
def evaluate_enable(self, enable): def evaluate_enable(self, enable):
if enable is True:
return True
if enable is False:
return False
if enable == "{{ moonraker_connected }}": if enable == "{{ moonraker_connected }}":
logging.info("moonraker is_connected %s", self._screen._ws.is_connected()) logging.info(f"moonraker connected {self._screen._ws.connected}")
return self._screen._ws.is_connected() return self._screen._ws.connected
self.j2_data = self._printer.get_printer_status_data() self.j2_data = self._printer.get_printer_status_data()
try: try:
logging.debug("Template: '%s'" % enable) j2_temp = Template(enable, autoescape=True)
logging.debug("Data: %s" % self.j2_data)
j2_temp = Template(enable)
result = j2_temp.render(self.j2_data) result = j2_temp.render(self.j2_data)
if result == 'True': return result == 'True'
return True except Exception as e:
return False logging.debug(f"Error evaluating enable statement: {enable}\n{e}")
except Exception:
logging.debug("Error evaluating enable statement: %s", enable)
return False return False
+53 -70
View File
@@ -7,40 +7,34 @@ from gi.repository import Gtk, Pango
from ks_includes.KlippyGcodes import KlippyGcodes from ks_includes.KlippyGcodes import KlippyGcodes
from ks_includes.screen_panel import ScreenPanel from ks_includes.screen_panel import ScreenPanel
AXIS_X = "X"
AXIS_Y = "Y"
AXIS_Z = "Z"
def create_panel(*args): def create_panel(*args):
return MovePanel(*args) return MovePanel(*args)
class MovePanel(ScreenPanel): class MovePanel(ScreenPanel):
distance = 1
distances = ['.1', '.5', '1', '5', '10', '25', '50'] distances = ['.1', '.5', '1', '5', '10', '25', '50']
distance = distances[-2]
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.settings = {} self.settings = {}
self.menu = ['move_menu'] self.menu = ['move_menu']
grid = self._gtk.HomogeneousGrid()
self.labels['x+'] = self._gtk.ButtonImage("arrow-right", _("X+"), "color1") self.labels['x+'] = self._gtk.ButtonImage("arrow-right", _("X+"), "color1")
self.labels['x+'].connect("clicked", self.move, AXIS_X, "+") self.labels['x+'].connect("clicked", self.move, "X", "+")
self.labels['x-'] = self._gtk.ButtonImage("arrow-left", _("X-"), "color1") self.labels['x-'] = self._gtk.ButtonImage("arrow-left", _("X-"), "color1")
self.labels['x-'].connect("clicked", self.move, AXIS_X, "-") self.labels['x-'].connect("clicked", self.move, "X", "-")
self.labels['y+'] = self._gtk.ButtonImage("arrow-up", _("Y+"), "color2") self.labels['y+'] = self._gtk.ButtonImage("arrow-up", _("Y+"), "color2")
self.labels['y+'].connect("clicked", self.move, AXIS_Y, "+") self.labels['y+'].connect("clicked", self.move, "Y", "+")
self.labels['y-'] = self._gtk.ButtonImage("arrow-down", _("Y-"), "color2") self.labels['y-'] = self._gtk.ButtonImage("arrow-down", _("Y-"), "color2")
self.labels['y-'].connect("clicked", self.move, AXIS_Y, "-") self.labels['y-'].connect("clicked", self.move, "Y", "-")
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color3") self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color3")
self.labels['z+'].connect("clicked", self.move, AXIS_Z, "+") self.labels['z+'].connect("clicked", self.move, "Z", "+")
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color3") self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color3")
self.labels['z-'].connect("clicked", self.move, AXIS_Z, "-") self.labels['z-'].connect("clicked", self.move, "Z", "-")
self.labels['home'] = self._gtk.ButtonImage("home", _("Home All"), "color4") self.labels['home'] = self._gtk.ButtonImage("home", _("Home All"), "color4")
self.labels['home'].connect("clicked", self.home) self.labels['home'].connect("clicked", self.home)
@@ -60,6 +54,7 @@ class MovePanel(ScreenPanel):
_("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()
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.labels['x+'], 2, 1, 1, 1)
@@ -92,16 +87,14 @@ class MovePanel(ScreenPanel):
grid.attach(self.labels['z_tilt'], 2, 0, 1, 1) grid.attach(self.labels['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.labels['quad_gantry_level'], 2, 0, 1, 1)
elif "delta" in self._screen.printer.get_config_section("printer")['kinematics']:
grid.attach(self.labels['motors-off'], 2, 0, 1, 1)
else: else:
if "delta" in self._screen.printer.get_config_section("printer")['kinematics']: grid.attach(self.labels['home-xy'], 2, 0, 1, 1)
grid.attach(self.labels['motors-off'], 2, 0, 1, 1)
else:
grid.attach(self.labels['home-xy'], 2, 0, 1, 1)
distgrid = Gtk.Grid() distgrid = Gtk.Grid()
j = 0 for j, i in enumerate(self.distances):
for i in self.distances: self.labels[i] = self._gtk.Button(i)
self.labels[i] = self._gtk.ToggleButton(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()
@@ -111,17 +104,14 @@ class MovePanel(ScreenPanel):
ctx.add_class("distbutton_bottom") ctx.add_class("distbutton_bottom")
else: else:
ctx.add_class("distbutton") ctx.add_class("distbutton")
if i == "1": if i == self.distance:
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)
j += 1
self.labels["1"].set_active(True)
self.labels['pos_x'] = Gtk.Label("X: 0") self.labels['pos_x'] = Gtk.Label("X: 0")
self.labels['pos_y'] = Gtk.Label("Y: 0") self.labels['pos_y'] = Gtk.Label("Y: 0")
self.labels['pos_z'] = Gtk.Label("Z: 0") self.labels['pos_z'] = Gtk.Label("Z: 0")
adjust = self._gtk.ButtonImage("settings", None, "color2", 1, Gtk.PositionType.LEFT, False) adjust = self._gtk.ButtonImage("settings", None, "color2", 1, Gtk.PositionType.LEFT, 1)
adjust.connect("clicked", self.load_menu, 'options') 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)"))
@@ -143,6 +133,7 @@ class MovePanel(ScreenPanel):
self.content.add(self.labels['move_menu']) self.content.add(self.labels['move_menu'])
printer_cfg = self._printer.get_config_section("printer") printer_cfg = self._printer.get_config_section("printer")
# The max_velocity parameter is not optional in klipper config.
max_velocity = int(float(printer_cfg["max_velocity"])) max_velocity = int(float(printer_cfg["max_velocity"]))
if "max_z_velocity" in printer_cfg: if "max_z_velocity" in printer_cfg:
max_z_velocity = int(float(printer_cfg["max_z_velocity"])) max_z_velocity = int(float(printer_cfg["max_z_velocity"]))
@@ -175,70 +166,51 @@ class MovePanel(ScreenPanel):
homed_axes = self._screen.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("X: %.2f" % (data["gcode_move"]["gcode_position"][0])) self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:.2f}")
self.labels['pos_y'].set_text("Y: %.2f" % (data["gcode_move"]["gcode_position"][1])) self.labels['pos_y'].set_text(f"Y: {data['gcode_move']['gcode_position'][1]:.2f}")
self.labels['pos_z'].set_text("Z: %.2f" % (data["gcode_move"]["gcode_position"][2])) self.labels['pos_z'].set_text(f"Z: {data['gcode_move']['gcode_position'][2]:.2f}")
else: else:
if "x" in homed_axes: if "x" in homed_axes:
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("X: %.2f" % (data["gcode_move"]["gcode_position"][0])) self.labels['pos_x'].set_text(f"X: {data['gcode_move']['gcode_position'][0]:.2f}")
else: else:
self.labels['pos_x'].set_text("X: ?") self.labels['pos_x'].set_text("X: ?")
if "y" in homed_axes: if "y" in homed_axes:
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_y'].set_text("Y: %.2f" % (data["gcode_move"]["gcode_position"][1])) self.labels['pos_y'].set_text(f"Y: {data['gcode_move']['gcode_position'][1]:.2f}")
else: else:
self.labels['pos_y'].set_text("Y: ?") self.labels['pos_y'].set_text("Y: ?")
if "z" in homed_axes: if "z" in homed_axes:
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_z'].set_text("Z: %.2f" % (data["gcode_move"]["gcode_position"][2])) self.labels['pos_z'].set_text(f"Z: {data['gcode_move']['gcode_position'][2]:.2f}")
else: else:
self.labels['pos_z'].set_text("Z: ?") self.labels['pos_z'].set_text("Z: ?")
def change_distance(self, widget, distance): def change_distance(self, widget, distance):
if self.distance == distance: logging.info(f"### Distance {distance}")
return self.labels[f"{self.distance}"].get_style_context().remove_class("distbutton_active")
logging.info("### Distance " + str(distance)) self.labels[f"{distance}"].get_style_context().add_class("distbutton_active")
ctx = self.labels[str(self.distance)].get_style_context()
ctx.remove_class("distbutton_active")
self.distance = distance self.distance = distance
ctx = self.labels[self.distance].get_style_context()
ctx.add_class("distbutton_active")
for i in self.distances:
if i == self.distance:
continue
self.labels[str(i)].set_active(False)
def move(self, widget, axis, dir): def move(self, widget, axis, direction):
if self._config.get_config()['main'].getboolean("invert_%s" % axis.lower(), False): if self._config.get_config()['main'].getboolean(f"invert_{axis.lower()}", False):
dir = "-" if dir == "+" else "+" direction = "-" if direction == "+" else "+"
dist = str(self.distance) if dir == "+" else "-" + str(self.distance) dist = f"{direction}{self.distance}"
config_key = "move_speed_z" if axis == AXIS_Z else "move_speed_xy" config_key = "move_speed_z" if axis == "Z" else "move_speed_xy"
speed = None
printer_cfg = self._config.get_printer_config(self._screen.connected_printer) printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
speed = None if printer_cfg is None else printer_cfg.getint(config_key, None)
if printer_cfg is not None:
speed = 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 = max(1, speed) self._screen._ws.klippy.gcode_script(f"{KlippyGcodes.MOVE_RELATIVE}\n{KlippyGcodes.MOVE} {axis}{dist} F{speed}")
if self._printer.get_stat("gcode_move", "absolute_coordinates"):
self._screen._ws.klippy.gcode_script( self._screen._ws.klippy.gcode_script("G90")
"%s\n%s %s%s F%s%s" % (
KlippyGcodes.MOVE_RELATIVE, KlippyGcodes.MOVE, axis, dist, speed * 60,
"\nG90" if self._printer.get_stat("gcode_move", "absolute_coordinates") is True else ""
)
)
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()
name.set_markup("<big><b>%s</b></big>" % (option['name'])) name.set_markup(f"<big><b>{option['name']}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
@@ -266,10 +238,10 @@ class MovePanel(ScreenPanel):
dev.add(box) dev.add(box)
elif option['type'] == "scale": elif option['type'] == "scale":
dev.set_orientation(Gtk.Orientation.VERTICAL) dev.set_orientation(Gtk.Orientation.VERTICAL)
val = int(self._config.get_config().get(option['section'], opt_name, fallback=option['value'])) scale = Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL,
adj = Gtk.Adjustment(val, option['range'][0], option['range'][1], option['step'], option['step'] * 5) min=option['range'][0], max=option['range'][1], step=option['step'])
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
scale.set_hexpand(True) scale.set_hexpand(True)
scale.set_value(int(self._config.get_config().get(option['section'], opt_name, fallback=option['value'])))
scale.set_digits(0) scale.set_digits(0)
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)
@@ -284,7 +256,6 @@ class MovePanel(ScreenPanel):
"row": frame "row": frame
} }
opts = sorted(opt_array)
opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name']) opts = sorted(list(opt_array), key=lambda x: opt_array[x]['name'])
pos = opts.index(opt_name) pos = opts.index(opt_name)
@@ -297,3 +268,15 @@ class MovePanel(ScreenPanel):
self.unload_menu() self.unload_menu()
return True return True
return False return False
def home(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
def homexy(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME_XY)
def z_tilt(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.Z_TILT)
def quad_gantry_level(self, widget):
self._screen._ws.klippy.gcode_script(KlippyGcodes.QUAD_GANTRY_LEVEL)
+40 -40
View File
@@ -16,22 +16,20 @@ def create_panel(*args):
class NetworkPanel(ScreenPanel): class NetworkPanel(ScreenPanel):
initialized = False initialized = False
def initialize(self, menu): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.show_add = False self.show_add = False
self.networks = {} self.networks = {}
self.interface = None
self.prev_network = None
self.update_timeout = None self.update_timeout = None
self.network_interfaces = netifaces.interfaces() self.network_interfaces = netifaces.interfaces()
self.wireless_interfaces = [int for int in self.network_interfaces if int.startswith('w')] self.wireless_interfaces = [iface for iface in self.network_interfaces if iface.startswith('w')]
self.wifi = None self.wifi = None
if len(self.wireless_interfaces) > 0: if len(self.wireless_interfaces) > 0:
logging.info("Found wireless interfaces: %s" % self.wireless_interfaces) logging.info(f"Found wireless interfaces: {self.wireless_interfaces}")
self.wifi = WifiManager(self.wireless_interfaces[0]) self.wifi = WifiManager(self.wireless_interfaces[0])
grid = self._gtk.HomogeneousGrid()
grid.set_hexpand(True)
# Get IP Address # Get IP Address
gws = netifaces.gateways() gws = netifaces.gateways()
if "default" in gws and netifaces.AF_INET in gws["default"]: if "default" in gws and netifaces.AF_INET in gws["default"]:
@@ -58,7 +56,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") reload_networks = self._gtk.ButtonImage("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)
@@ -67,7 +65,7 @@ class NetworkPanel(ScreenPanel):
sbox.set_vexpand(False) sbox.set_vexpand(False)
sbox.add(self.labels['interface']) sbox.add(self.labels['interface'])
if ip is not None: if ip is not None:
self.labels['ip'].set_text("IP: %s " % ip) self.labels['ip'].set_text(f"IP: {ip} ")
sbox.add(self.labels['ip']) sbox.add(self.labels['ip'])
sbox.add(reload_networks) sbox.add(reload_networks)
@@ -116,7 +114,6 @@ class NetworkPanel(ScreenPanel):
def add_network(self, ssid, show=True): def add_network(self, ssid, show=True):
if ssid is None: if ssid is None:
logging.info("SSID is None")
return return
ssid = ssid.strip() ssid = ssid.strip()
if ssid in list(self.networks): if ssid in list(self.networks):
@@ -129,11 +126,7 @@ class NetworkPanel(ScreenPanel):
if configured_networks[net]['ssid'] == ssid: if configured_networks[net]['ssid'] == ssid:
network_id = net network_id = net
if ssid.startswith("\x00"): display_name = _("Hidden") if ssid.startswith("\x00") else f"{ssid}"
display_name = _("Hidden")
else:
display_name = str(ssid)
netinfo = self.wifi.get_network_info(ssid) netinfo = self.wifi.get_network_info(ssid)
connected_ssid = self.wifi.get_connected_ssid() connected_ssid = self.wifi.get_connected_ssid()
if netinfo is None: if netinfo is None:
@@ -147,7 +140,7 @@ class NetworkPanel(ScreenPanel):
display_name += " (" + _("Connected") + ")" display_name += " (" + _("Connected") + ")"
name = Gtk.Label("") name = Gtk.Label("")
name.set_markup("<big><b>%s</b></big>" % display_name) name.set_markup(f"<big><b>{display_name}</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)
@@ -162,12 +155,12 @@ 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", None, "color3") connect = self._gtk.ButtonImage("load", style="color3")
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", "", "color3") delete = self._gtk.ButtonImage("delete", style="color3")
delete.connect("clicked", self.remove_wifi_network, ssid) delete.connect("clicked", self.remove_wifi_network, ssid)
delete.set_size_request(60, 0) delete.set_size_request(60, 0)
delete.set_hexpand(False) delete.set_hexpand(False)
@@ -225,7 +218,7 @@ class NetworkPanel(ScreenPanel):
if result: if result:
self.connect_network(widget, ssid, False) self.connect_network(widget, ssid, False)
else: else:
self._screen.show_popup_message("Error adding network %s" % ssid) self._screen.show_popup_message(f"Error adding network {ssid}")
def back(self): def back(self):
if self.show_add: if self.show_add:
@@ -256,7 +249,8 @@ class NetworkPanel(ScreenPanel):
del self.labels[i] del self.labels[i]
self.show_add = False self.show_add = False
def close_dialog(self, widget, response_id): @staticmethod
def close_dialog(widget, response_id):
widget.destroy() widget.destroy()
def connected_callback(self, ssid, prev_ssid): def connected_callback(self, ssid, prev_ssid):
@@ -272,7 +266,7 @@ class NetworkPanel(ScreenPanel):
snets = self.wifi.get_supplicant_networks() snets = self.wifi.get_supplicant_networks()
isdef = False isdef = False
for id, net in snets.items(): for netid, net in snets.items():
if net['ssid'] == ssid: if net['ssid'] == ssid:
isdef = True isdef = True
break break
@@ -309,13 +303,12 @@ class NetworkPanel(ScreenPanel):
self.wifi.connect(ssid) self.wifi.connect(ssid)
def connecting_status_callback(self, msg): def connecting_status_callback(self, msg):
self.labels['connecting_info'].set_text(self.labels['connecting_info'].get_text() + "\n" + msg) self.labels['connecting_info'].set_text(f"{self.labels['connecting_info'].get_text()}\n{msg}")
self.labels['connecting_info'].show_all() self.labels['connecting_info'].show_all()
def remove_network(self, ssid, show=True): def remove_network(self, ssid, show=True):
if ssid not in list(self.networks): if ssid not in list(self.networks):
return return
logging.info(self.labels['networklist'])
for i in range(len(self.labels['networklist'])): for i in range(len(self.labels['networklist'])):
if self.networks[ssid] == self.labels['networklist'].get_child_at(0, i): if self.networks[ssid] == self.labels['networklist'].get_child_at(0, i):
self.labels['networklist'].remove_row(i) self.labels['networklist'].remove_row(i)
@@ -346,13 +339,13 @@ 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("%s %s:" % (_("PSK for"), ssid)) label = self._gtk.Label(_("PSK for") + f' 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._screen.show_keyboard) self.labels['network_psk'].connect("focus-in-event", self._show_keyboard)
self.labels['network_psk'].grab_focus_without_selecting() self.labels['network_psk'].grab_focus_without_selecting()
save = self._gtk.ButtonImage("sd", _("Save"), "color3") save = self._gtk.ButtonImage("sd", _("Save"), "color3")
@@ -375,6 +368,9 @@ class NetworkPanel(ScreenPanel):
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)
@@ -385,11 +381,11 @@ class NetworkPanel(ScreenPanel):
info = freq = encr = chan = lvl = ipv4 = ipv6 = "" info = freq = encr = chan = lvl = ipv4 = ipv6 = ""
if ssid not in list(self.networks) or ssid not in self.labels['networks']: if ssid not in list(self.networks) or ssid not in self.labels['networks']:
logging.info("Unknown SSID %s", 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: if netinfo is None:
netinfo = [] netinfo = {}
if "connected" in netinfo: if "connected" in netinfo:
connected = netinfo['connected'] connected = netinfo['connected']
else: else:
@@ -400,10 +396,10 @@ class NetworkPanel(ScreenPanel):
hostname = stream.read().strip() hostname = stream.read().strip()
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 = "<b>%s:</b> %s " % ("IPv4", ifadd[netifaces.AF_INET][0]['addr']) ipv4 = f"<b>IPv4:</b> {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 = "<b>%s:</b> %s " % ("IPv6", ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]) ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} "
info = "<b>%s:</b> %s\n%s\n%s\n" % (_("Hostname"), hostname, ipv4, ipv6) info = f'<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:
@@ -412,12 +408,11 @@ class NetworkPanel(ScreenPanel):
if "frequency" in netinfo: if "frequency" in netinfo:
freq = "2.4 GHz" if netinfo['frequency'][0:1] == "2" else "5 Ghz" freq = "2.4 GHz" if netinfo['frequency'][0:1] == "2" else "5 Ghz"
if "channel" in netinfo: if "channel" in netinfo:
chan = _("Channel") + " " + netinfo['channel'] chan = _("Channel") + f' {netinfo["channel"]}'
if "signal_level_dBm" in netinfo: if "signal_level_dBm" in netinfo:
lvl = netinfo['signal_level_dBm'] + " " + _("dBm") lvl = f'{netinfo["signal_level_dBm"]} ' + _("dBm")
self.labels['networks'][ssid]['info'].set_markup("%s <small>%s %s %s %s</small>" % ( self.labels['networks'][ssid]['info'].set_markup(f"{info} <small>{encr} {freq} {chan} {lvl}</small>")
info, encr, freq, chan, lvl))
self.labels['networks'][ssid]['info'].show_all() self.labels['networks'][ssid]['info'].show_all()
def update_single_network_info(self): def update_single_network_info(self):
@@ -428,11 +423,16 @@ class NetworkPanel(ScreenPanel):
ipv4 = "" ipv4 = ""
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 = "<b>%s:</b> %s " % ("IPv4", ifadd[netifaces.AF_INET][0]['addr']) ipv4 = f"<b>IPv4:</b> {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 = ipv6 = "<b>%s:</b> %s " % ("IPv6", ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]) ipv6 = f"<b>IPv6:</b> {ifadd[netifaces.AF_INET6][0]['addr'].split('%')[0]} "
connected = "<b>%s</b>\n\n<small><b>%s</b></small>\n<b>%s:</b> %s\n%s\n%s\n" % ( connected = (
self.interface, _("Connected"), _("Hostname"), hostname, ipv4, ipv6) f'<b>{self.interface}</b>\n\n'
f'<small><b>' + _("Connected") + f'</b></small>\n'
f'<b>' + _("Hostname") + f':</b> {hostname}\n'
f'{ipv4}\n'
f'{ipv6}\n'
)
self.labels['networkinfo'].set_markup(connected) self.labels['networkinfo'].set_markup(connected)
self.labels['networkinfo'].show_all() self.labels['networkinfo'].show_all()
@@ -440,8 +440,8 @@ 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)
self.wifi.rescan()
if self.wifi is not None and self.wifi.is_initialized(): if self.wifi is not None and self.wifi.is_initialized():
self.wifi.rescan()
GLib.idle_add(self.load_networks) GLib.idle_add(self.load_networks)
def activate(self): def activate(self):
+118
View File
@@ -0,0 +1,118 @@
import gi
import logging
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Pango
from ks_includes.screen_panel import ScreenPanel
def create_panel(*args):
return OutputPinPanel(*args)
class OutputPinPanel(ScreenPanel):
def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.devices = {}
# Create a grid for all devices
self.labels['devices'] = Gtk.Grid()
self.labels['devices'].set_valign(Gtk.Align.CENTER)
self.load_pins()
scroll = self._gtk.ScrolledWindow()
scroll.add(self.labels['devices'])
self.content.add(scroll)
def load_pins(self):
output_pins = self._printer.get_output_pins()
for pin in output_pins:
# Support for hiding devices by name
name = pin.split()[1]
if name.startswith("_"):
continue
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):
logging.info(f"Adding pin: {pin}")
name = Gtk.Label()
name.set_markup(f'\n<big><b>{" ".join(pin.split(" ")[1:])}</b></big>\n')
name.set_hexpand(True)
name.set_vexpand(True)
name.set_halign(Gtk.Align.START)
name.set_valign(Gtk.Align.CENTER)
name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
scale = Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL, min=0, max=100, step=1)
scale.set_value(self.check_pin_value(pin))
scale.set_digits(0)
scale.set_hexpand(True)
scale.set_has_origin(True)
scale.get_style_context().add_class("fan_slider")
scale.connect("button-release-event", self.set_output_pin, pin)
min_btn = self._gtk.ButtonImage("cancel", None, "color1", 1)
min_btn.set_hexpand(False)
min_btn.connect("clicked", self.update_pin_value, pin, 0)
pin_col = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
pin_col.add(min_btn)
pin_col.add(scale)
pin_row = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
pin_row.add(name)
pin_row.add(pin_col)
frame = Gtk.Frame()
frame.get_style_context().add_class("frame-item")
frame.add(pin_row)
self.devices[pin] = {
"row": frame,
"scale": scale,
}
devices = sorted(self.devices)
pos = devices.index(pin)
self.labels['devices'].insert_row(pos)
self.labels['devices'].attach(self.devices[pin]['row'], 0, pos, 1, 1)
self.labels['devices'].show_all()
def set_output_pin(self, widget, event, pin):
self._screen._ws.klippy.gcode_script(f'SET_PIN PIN={" ".join(pin.split(" ")[1:])} '
f'VALUE={self.devices[pin]["scale"].get_value() / 100}')
# Check the speed in case it wasn't applied
GLib.timeout_add_seconds(1, self.check_pin_value, pin)
def check_pin_value(self, pin):
self.update_pin_value(None, pin, self._printer.get_pin_value(pin))
return False
def process_update(self, action, data):
if action != "notify_status_update":
return
for pin in self.devices:
if pin in data and "value" in data[pin]:
self.update_pin_value(None, pin, data[pin]["value"])
def update_pin_value(self, widget, pin, value):
if pin not in self.devices:
return
self.devices[pin]['scale'].disconnect_by_func(self.set_output_pin)
self.devices[pin]['scale'].set_value(round(float(value) * 100))
self.devices[pin]['scale'].connect("button-release-event", self.set_output_pin, pin)
if widget is not None:
self.set_output_pin(None, None, pin)
+18 -18
View File
@@ -12,32 +12,28 @@ def create_panel(*args):
class PowerPanel(ScreenPanel): class PowerPanel(ScreenPanel):
def initialize(self, panel_name): def __init__(self, screen, title, back=True):
super().__init__(screen, title, back)
self.devices = {} self.devices = {}
# Create a scroll window for the power devices
scroll = self._gtk.ScrolledWindow()
# Create a grid for all devices # Create a grid for all devices
self.labels['devices'] = Gtk.Grid() self.labels['devices'] = Gtk.Grid()
scroll.add(self.labels['devices']) self.labels['devices'].set_valign(Gtk.Align.CENTER)
# Create a box to contain all of the above
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
box.set_vexpand(True)
box.pack_start(scroll, True, True, 0)
self.load_power_devices() self.load_power_devices()
self.content.add(box) # Create a scroll window for the power devices
scroll = self._gtk.ScrolledWindow()
scroll.add(self.labels['devices'])
self.content.add(scroll)
def activate(self): def activate(self):
devices = self._screen.printer.get_power_devices() devices = self._screen.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(True if self._screen.printer.get_power_device_status(x) == "on" self.devices[x]['switch'].set_active(self._screen.printer.get_power_device_status(x) == "on")
else False)
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):
@@ -45,7 +41,7 @@ class PowerPanel(ScreenPanel):
frame.get_style_context().add_class("frame-item") frame.get_style_context().add_class("frame-item")
name = Gtk.Label() name = Gtk.Label()
name.set_markup("<big><b>%s</b></big>" % device) name.set_markup(f"<big><b>{device}</b></big>")
name.set_hexpand(True) name.set_hexpand(True)
name.set_vexpand(True) name.set_vexpand(True)
name.set_halign(Gtk.Align.START) name.set_halign(Gtk.Align.START)
@@ -55,7 +51,7 @@ class PowerPanel(ScreenPanel):
switch = Gtk.Switch() switch = Gtk.Switch()
switch.set_hexpand(False) switch.set_hexpand(False)
switch.set_active(True if self._screen.printer.get_power_device_status(device) == "on" else False) switch.set_active(self._screen.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.get_font_size() * 7))
switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5)) switch.set_property("height-request", round(self._gtk.get_font_size() * 3.5))
@@ -87,9 +83,13 @@ class PowerPanel(ScreenPanel):
devices = self._screen.printer.get_power_devices() devices = self._screen.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("Power toggled %s" % device) logging.debug(f"Power toggled {device}")
if switch.get_active(): if switch.get_active():
self._screen._ws.klippy.power_device_on(device) self._screen._ws.klippy.power_device_on(device)
else: else:
@@ -103,5 +103,5 @@ class PowerPanel(ScreenPanel):
return return
device = data['device'] device = data['device']
self.devices[device]['switch'].disconnect_by_func(self.on_switch) self.devices[device]['switch'].disconnect_by_func(self.on_switch)
self.devices[device]['switch'].set_active(True if data['status'] == "on" else False) self.devices[device]['switch'].set_active(data['status'] == "on")
self.devices[device]['switch'].connect("notify::active", self.on_switch, device) self.devices[device]['switch'].connect("notify::active", self.on_switch, device)
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff. Show more