Compare commits

..
1044 Commits
Author SHA1 Message Date
dependabot[bot] fe81370825 build(deps): bump websocket-client from 1.6.0 to 1.6.1 (#1030)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.6.0 to 1.6.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.6.0...v1.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-30 12:23:21 -03:00
alfrix c27b3fefc4 docs: add vnc examples close #1061 2023-07-30 12:22:58 -03:00
alfrix 6d5eb09010 screen: Changes in printer initialization to prevent loading main to early 2023-07-30 12:22:58 -03:00
alfrix 5713a348de Update translation: Spanish 2023-07-30 12:22:58 -03:00
alfrix de422f23ad update issue templates 2023-07-30 12:22:58 -03:00
alfrix 3a7818bd35 screen: remove pop parameter from show_panel and remove_panel, simpler 2023-07-30 12:22:58 -03:00
alfrix 34f9b958a7 remove unnecessary params from labels 2023-07-30 12:22:58 -03:00
alfrix 3f11897491 screen: make show_panel parameters more clear 2023-07-30 12:22:58 -03:00
alfrix 8d9236a2df screen: simplify panel loading
this removes create_panel function from panels and mandates a class name Panel

remove panel_type param and only use a panel_name that is it's filename

remove load_panel dict

always reinit panel, (simpler and safer but slower)
2023-07-30 12:22:58 -03:00
alfrix cb5b77303f screen: translate dpms failed and save settings after disabling it 2023-07-30 12:22:58 -03:00
alfrix 71dcb1f91d job_status: tweaks to the calc of time remaining 2023-07-30 12:22:58 -03:00
alfrix 403a3024ce docs: fix thumb links 2023-07-30 12:22:58 -03:00
alfrix 87ad2a70ba fine_tune: split speed and flow selectors close #935 2023-07-30 12:22:58 -03:00
alfrix 7ba9e49374 job_status: show save to endstop to apply offset for deltas close #916
Z_OFFSET_APPLY_ENDSTOP works in deltas since https://github.com/Klipper3d/klipper/commit/f078a279059670e692ea676237b152b4d42518e4
2023-07-30 12:22:58 -03:00
alfrix ae03e7d55d job_status: fix screen overflow on small screens 2023-07-30 12:22:58 -03:00
alfrix 72c6bdfe33 job_status: change progress percentage to time-based instead of file-based 2023-07-30 12:22:58 -03:00
alfrix 3c69bcb4c4 add parameter to labels to silence IDE warnings 2023-07-30 12:22:58 -03:00
alfrix a149796b19 reduce the use of contextlib 2023-07-30 12:22:58 -03:00
alfrix 1d2a89b4e7 screen: remove panel subscription
since now the panels are updated on activate, there is no need to keep them updated anymore
2023-07-30 12:22:58 -03:00
alfrix 2a9044e4f4 job_status: refactor to improve efficiency
job_status: refactor lcd_message
2023-07-30 12:22:58 -03:00
alfrix 870256df09 screen_panel: format_time round minutes since seconds are only shown with less than a minute 2023-07-30 12:22:58 -03:00
alfrix d0ab325744 config: changes in how the config is validated
now it validates in steps
1 defaults
2 user settings
3 user includes
4 auto-generated section

unknown keys will be removed from the auto-generated section if no other errors are found
detect and warn about missing newlines in headers
2023-07-30 12:22:58 -03:00
alfrix 432305bec9 move: add a failsafe for velocity fixes #1043 2023-07-30 12:22:58 -03:00
alfrix 46311e58f1 macros: use defaults as placeholders fix #1040 2023-07-30 12:22:58 -03:00
alfrix 0d05ef3b59 docs: add a notices about config newlines, preheat and menus 2023-07-30 12:22:58 -03:00
alfrix f19d39fce1 docs: fix quicktips link broken 2023-07-30 12:22:58 -03:00
alfrix ff292f77c9 docs: update repo locations 2023-07-30 12:22:58 -03:00
Daviteusz b249c79180 locale(pl): Update Polish translation (#1058) 2023-07-30 12:21:22 -03:00
Chad Condon e8a2d3443e Improve name presentation (#1055)
* Preserve manual capitalization

Avoid re-capitalizing names that already include uppercase letters.
This improves the presentation of names like "TMC2209", etc. when the
user has manually capitalized the name.

* Use title case

Use title case instead of only capitalizing the first character.
Ex. `heater_bed` now becomes "Heater Bed" instead of "Heater bed".
2023-07-24 17:00:12 -03:00
Selim fab620dce7 Update translation: Turkish (#1054) 2023-07-24 16:59:22 -03:00
Andriy 06240ee872 Update translation: Ukrainian (#1053) 2023-07-24 16:58:29 -03:00
AntoszHUN 12a79ed2c7 Update translation: Hungarian (#1044) 2023-07-24 16:57:47 -03:00
Samuel-0-0 ca71953cfa Update translation zh_CN (#1041) 2023-07-24 16:56:51 -03:00
DaviteuszandWeblate 304e285b7f locale(pl): update Polish translation (#1033)
Co-authored-by: Weblate <noreply@weblate.org>
2023-07-08 23:15:59 -03:00
Samuel-0-0 c02d001e9d Update translation zh_CN 2023-07-08 23:15:21 -03:00
saudade428 d589a1e31c Update translation zh_TW 2023-07-08 23:14:44 -03:00
alfrix 797ea99f33 extrude: change style to hexpand 2023-07-08 17:09:05 -03:00
alfrix 0cc58c0f08 docs: Update info about rotation 2023-07-08 15:51:42 -03:00
alfrix ffc5ff3c06 extrude: do not call T0 if there is only one extruder 2023-07-07 23:48:37 -03:00
alfrix d6b700381b fix possible issue with the mesh profile is not complete 2023-07-07 23:15:07 -03:00
alfrix f9af11d635 docs: add about section 2023-07-07 22:33:14 -03:00
alfrix 3ba6bd657f main_menu: add scrollbar fixes #1034 2023-07-04 11:46:44 -03:00
alfrix fff7f66780 update translations 2023-07-02 16:33:35 -03:00
Alfredo Monclus 6190581101 Reorganization (#1029) 2023-07-02 15:16:36 -03:00
alfrix 0f47d45294 fix language not saving fixes #1015 2023-07-02 13:41:42 -03:00
alfrix f94c7d38eb fix multiple zcalibrate opening 2023-07-02 11:31:35 -03:00
alfrix cb1793836c bed_mesh: load default if no mesh have been loaded
even though this is not default anymore in klipper it's still the best for new users who don't use multiple profiles
2023-07-01 15:16:34 -03:00
alfrix 9da9f4d11e main_menu: retry to create the left panel 2023-07-01 01:04:03 -03:00
alfrix 062e51f9be zcalibrate: use the new method manual_probe is_active to improve detection of status 2023-07-01 00:55:12 -03:00
Alfredo Monclus 294623c13f temp: add pid calibrate to the keypad (#1026) 2023-06-30 17:48:43 -03:00
DaviteuszandWeblate 828b5b6a4b locale(pl): Updated Polish translation (#1027)
Co-authored-by: Weblate <noreply@weblate.org>
2023-06-30 17:44:04 -03:00
Alfredo Monclus d3480cf571 bed_screws: use klipper config values for speed and heights (#1028) 2023-06-30 17:43:31 -03:00
Alfredo Monclus b5abd3d7b9 temperature: select the device that was selected in job_status (#1025) 2023-06-30 17:43:00 -03:00
alfrix 4f86de8c80 zcalibrate: show new value as abs 2023-06-25 15:29:40 -03:00
alfrix 5fb0acc3ac keyboard: tweak box size 2023-06-25 13:35:47 -03:00
alfrix 5a0df3a628 fix colors not applying correctly fix #944 2023-06-22 12:44:16 -03:00
alfrix baae949beb fix main_menu left_panel graph crashing/hiding after a config change of heaters 2023-06-22 12:44:16 -03:00
alfrix eb0e6ad803 job_status: disable restart and pause after pressing and simplify enable 2023-06-21 17:42:32 -03:00
alfrix a973300d2f klippygtk: scaling tweak for default text size to fit 4 sliders without scrollbars (limits and retraction) 2023-06-21 17:42:32 -03:00
alfrix 391254057a bed_level: use the same string for disable motors used in the other panels 2023-06-21 16:13:51 -03:00
alfrix efc8c3f437 macros: add popup (visual confirmation) of the macro sent 2023-06-21 16:10:29 -03:00
alfrix 2c582acc7b memory leak fix
the leak started in v0.2.9 (e1ea41f147) with the addition of del self.panel[panel].
del cannot be called on self.panels because some panels have bound methods that prevent them from being collected by the gc.
so, instead of trying to remove them, reinitialize the panels if it's needed (before v0.2.9 initialize was always called, so it's still better than it was)
at the moment leaving the panels on memory doesn't seem like a big issue, once all panels are loaded memory should remain stable

fixes #1019
fixes #1008
2023-06-21 16:10:29 -03:00
dependabot[bot] 7cf89aa014 build(deps): bump websocket-client from 1.5.3 to 1.6.0 (#1022)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.5.3 to 1.6.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.5.3...v1.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-21 16:09:18 -03:00
DaviteuszandWeblate 540528630b Translated using Weblate (Polish) (#1020)
Co-authored-by: Weblate <noreply@weblate.org>
2023-06-21 16:08:45 -03:00
alfrix 92ed72e48b fix panel removal not working correctly
previous fix addresed the leaking memory, but created more issues:
fixes #1012
fixes #1015
fixes #1017
2023-06-16 14:11:10 -03:00
alfrix 4920720c99 return False on Glib functions 2023-06-16 10:05:43 -03:00
alfrix 2241b54153 use only one jinja env
slightly improves performance
2023-06-16 10:05:24 -03:00
alfrix dbe3f03019 refactor graph update timer 2023-06-16 10:04:16 -03:00
Gabes Mak 7a7d275c31 Update Installation.md (#1016)
Fix wording
2023-06-16 09:58:35 -03:00
dependabot[bot] 3b8b8e9c9b build(deps): bump websocket-client from 1.5.2 to 1.5.3 (#1010)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.5.2...v1.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 13:41:14 -03:00
alfrix 35498d39c7 job_status: fix not fitting on 480 wide screens 2023-06-13 13:39:23 -03:00
alfrix 8a29b6e125 fix not reconnecting to moonraker and prevent simultaneous reconnections
fixes #999
2023-06-13 13:39:23 -03:00
alfrix c5522b29da screen: Log resolution/size changes 2023-06-13 13:39:23 -03:00
alfrix c1d8a4f033 menu: get rid of initalize 2023-06-13 13:39:23 -03:00
alfrix f7c12867d5 slimmer topbar buttons fixes #1006 2023-06-13 13:39:23 -03:00
alfrix f0a33bd360 keyboard: improvements and fixes
modify layout to make keyboard bigger in the same space
create shift for a more traditional aproach
fix highlighting fixes #1004
2023-06-13 11:54:42 -03:00
alfrix 72c1b1d5f2 main_panel: retry to show graph if moonrkaesr tempstore was not initialized yet 2023-06-13 11:54:42 -03:00
alfrix ff94b45c45 close dialogs when transitioning to printing
also simplify the transition
2023-06-13 11:08:18 -03:00
alfrix 1813533bec Revert "always unload panels fixes #932" and fix it in a different way
it did not work as expected (#996) and caused other issues with macros and menus
del self.panels causes a memory leak
2023-06-13 11:07:46 -03:00
alfrix fa73daaf71 camera: improve performance and latency and also fixes #1003 2023-06-09 08:59:32 -03:00
alfrix b74b1b600f screen: fix some warnings about init_check and define ind 2023-06-09 08:59:32 -03:00
alfrix 88afa50ea3 change getdefaultlocale to getlocale since it's getting deprecated in python 3.13 2023-06-06 05:34:35 -03:00
alfrix 65588424bf make keyboard highlight keys fixes #1000 2023-06-04 14:26:12 -03:00
alfrix 7a0848fa9f deprecate user slicer compensation, in hindsight this is something that the ui shouldn't do 2023-06-04 11:00:47 -03:00
alfrix 791938d733 rework screensaver timeout should fix #992 2023-06-04 10:29:41 -03:00
alfrix 2d61eba66b Fix macro shortcut reopening the same panel 2023-06-04 08:09:11 -03:00
alfrix 1e4885d291 do not close popups when changing state 2023-05-28 09:18:32 -06:00
alfrix 1462c8d08c printer: refactor with early return and safer state evaluate 2023-05-28 09:11:01 -06:00
alfrix c38a3273f3 fix Print panel not showing fixes #993 2023-05-27 20:53:32 -06:00
alfrix 2a0ea6e248 docs: fix broken link on the new troubleshooting merge vc into showing console 2023-05-27 20:47:05 -06:00
alfrix eb24987b27 docs: update and expand troubleshooting sections 2023-05-27 13:11:37 -06:00
Andriy 85ba01f2d8 Ukrainian localization update (#989)
Correcting the names of the previous translator and translating new meanings.
2023-05-27 13:03:14 -06:00
dependabot[bot] 5d4459ff0b build(deps): bump requests from 2.30.0 to 2.31.0 (#986)
Bumps [requests](https://github.com/psf/requests) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.30.0...v2.31.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 08:20:58 -06:00
dependabot[bot] 0798ce0737 build(deps): bump websocket-client from 1.5.1 to 1.5.2 (#984)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.5.1 to 1.5.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.5.1...v1.5.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 08:19:17 -06:00
alfrix 6781043942 docs: explain icon menu item: close #981 2023-05-20 05:13:56 -06:00
alfrix be13c1086e make the language list a menu instead of a dropdown fixes #915 2023-05-20 05:00:45 -06:00
alfrix 4db7fd288c always clear the popup timer fixes #967 2023-05-20 03:12:52 -06:00
alfrix 3dc535f8fb always unload panels fixes #932 2023-05-20 02:59:06 -06:00
alfrix 6b62adbfef Docs: update info about supported screws 2023-05-18 07:48:49 -06:00
ツ 0e877ac5d6 DE MO Generation Fix (#979) 2023-05-17 10:05:56 -06:00
ツ 1ab9b96db7 Added and updated strings for DE | Added formal version for "Sie" (#978)
* Added and updated strings

- Added missing strings
- Adjusted strings to be more in line
- Same terminology for all strings
- Added beside "Du" the formal verion de_formal for "Sie"
2023-05-17 08:09:05 -06:00
alfrix 8e77d24505 Update Ukranian (alexeyzel) close #977 2023-05-17 07:59:35 -06:00
dependabot[bot] a77148b603 build(deps): bump pycairo from 1.22.0 to 1.23.0 (#823)
Bumps [pycairo](https://github.com/pygobject/pycairo) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/pygobject/pycairo/releases)
- [Changelog](https://github.com/pygobject/pycairo/blob/main/NEWS)
- [Commits](https://github.com/pygobject/pycairo/compare/v1.22.0...v1.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-14 09:15:44 -06:00
JS-Cannon 46dd978dcc Fixed z-bolt images opacity (#960) 2023-05-14 09:03:18 -06:00
dependabot[bot] 17dd3bb83a build(deps): bump requests from 2.28.2 to 2.30.0 (#969)
Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.30.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.30.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-13 21:53:03 -06:00
dependabot[bot] 7905e4d7fa build(deps): bump pygobject from 3.42.2 to 3.44.1 (#936)
Bumps [pygobject](https://pygobject.readthedocs.io) from 3.42.2 to 3.44.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-13 21:52:28 -06:00
Thijs Triemstra b337d27dd4 add Dutch translation (#970) 2023-05-13 21:47:48 -06:00
alfrix 1e741ee439 fix menu items not evaluating fixes #959 2023-05-11 08:39:36 -06:00
alfrix 49d910af2b fix popup timer close #946 2023-05-09 07:51:09 -06:00
alfrix ebaedeaf6c macros: fix arrow not showing after click 2023-05-09 07:43:23 -06:00
alfrix 0b973ad4c5 Update pt translation (thanks rafaelSwi)
close #961
2023-05-07 07:26:26 -06:00
alfrix 13a358acd8 Update spanish 2023-05-07 07:17:14 -06:00
alfrix 54e7a8b6a2 update translation files 2023-05-07 07:04:43 -06:00
alfrix abacff9bd5 translate minute (singular) in the blanking list 2023-05-07 06:58:45 -06:00
Thijs Triemstra d21a9616e7 add 1 and 2 minute screen blanking options (#958)
for battery-powered devices
2023-05-07 06:56:13 -06:00
alfrix 282799c8cb bed_mesh: fix points not working
consider implementing a view button to not forcibly load a mesh to view it
2023-04-05 05:50:32 -06:00
alfrix d775e15fa0 add extra digit for z_offset close #943 2023-04-02 09:29:00 -06:00
alfrix a1c602b46d style: z-bolt add camera icon 2023-03-24 08:35:23 -06:00
alfrix 0f97f6e32c menu: don't create items if enable is false, previously it was just not shown 2023-03-24 08:35:11 -06:00
alfrix da9f970231 print: refactors 2023-03-22 06:51:34 -06:00
alfrix 3417765223 job_status: fix panel not showing and not updating thumbnails
safeguard against thumbnail corruption or other errors fixes #893
better system to update name and thumbnails fixes #889
2023-03-19 05:55:30 -06:00
alfrix b963c55140 job_status: fix save endstop not working fixes #929 2023-03-17 07:50:50 -06:00
alfrix 2d8419ca13 fix desktop icon not appearing 2023-03-17 07:50:50 -06:00
Jookiaandalfrix 5f3827a2cb screen: Only switch layouts if the window has been majorly resized (#913)
* screen: Only switch layouts if the window has been majorly resized

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

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

* fixup

---------

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

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

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

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

use a smaller button scale fixes #891

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

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

* allow for jinja template rendering for (nearly) all menu options
this shuffles params json checks to display time instead of config time
2023-02-13 21:06:33 -06:00
Thijs Triemstra fc7b8c5304 fix typos (#897) 2023-02-13 21:05:48 -06:00
alfrix a6bb0fd02e zcalibrate: fix dialog loop, fix popup errors not showing at end #844 2023-02-06 18:27:35 -06:00
dependabot[bot] dcb6d18709 build(deps): bump websocket-client from 1.5.0 to 1.5.1 (#888)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.5.0...v1.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 16:35:20 -06:00
alfrix 69571c88b8 fix german keyboard issue caused by #886 2023-02-05 22:32:07 -06:00
Cyril Guislain c33b5d6311 Fix German Keyboard and Add French Keyboard (#886) 2023-02-05 21:47:11 -06:00
alfrix 49add980b3 theme: add light icon to material-dark fix:#884 2023-02-05 10:24:58 -06:00
dependabot[bot] 8d8d3bf9af build(deps): bump requests from 2.28.1 to 2.28.2 (#868)
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.28.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.28.2)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-03 12:08:48 -03:00
Alfredo Monclus 314379e2af Use moonraker to restart KS (#656) 2022-07-03 12:08:36 -03:00
dependabot[bot] 3b73acec37 build(deps): bump websocket-client from 1.3.2 to 1.3.3 (#653)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.3.2 to 1.3.3.
- [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.2...v1.3.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-03 12:04:25 -03:00
alfrix d3cd4008a8 job_status and base_panel: safeguard against possible issues with temps 2022-07-03 12:03:50 -03:00
alfrix 784253ca77 extrude: use macro naming when there is no temp 2022-07-03 12:03:50 -03:00
alfrix 0feffff2ac translations: update all 2022-07-03 12:03:50 -03:00
alfrix bde7e8a886 docs: create an adb script 2022-07-03 12:03:50 -03:00
alfrix 71360b44ee docs: update Android guide to use the launcher 2022-07-03 12:03:50 -03:00
alfrix c20149ac25 docs: create an android guide 2022-07-03 12:03:50 -03:00
alfrix 92254942ef installer: restart KS if it's running 2022-07-03 12:03:50 -03:00
alfrix 3ed8142ab9 installer: overwrite the service unit 2022-07-03 12:03:50 -03:00
xcasxcursex 2fd5e6e89f Enable users to inject a custom script to start KlipperScreen (#660)
A helper script is included to ease migration
for the common Android XSDL use-case
2022-07-03 12:03:50 -03:00
alfrix 5e73fb03b5 base_panel: all action bar buttons should close the keyboard 2022-07-03 12:03:50 -03:00
alfrix 5ad82a64d4 Translations: install _() 2022-07-03 12:03:50 -03:00
alfrix 3bb470ded4 Fix keyboard size after being converted to a oriented Box 2022-07-03 12:03:50 -03:00
alfrix 831db2403d Fix potential issues with variables 2022-07-03 12:03:50 -03:00
alfrix b611491997 Optimize imports 2022-07-03 12:03:50 -03:00
alfrix 5c17656567 Remove some unneeded complexity in the macro shortcut 2022-07-03 12:03:50 -03:00
alfrix 06fceec84a Change the deprecated VBox and HBox to oriented Boxes 2022-07-03 12:03:50 -03:00
alfrix 12d90bcffa docs: keep the reqs updated 2022-07-03 12:03:50 -03:00
alfrix a445b89f13 config: deprecate get_main_config_option 2022-07-03 12:03:50 -03:00
alfrix 88ea416110 zcalibrate: fix issue with offset being a float 2022-07-03 12:03:50 -03:00
alfrix 5f1d239211 performance: do not use transparency 2022-07-03 12:03:50 -03:00
alfrix 312d131db5 use images for the sort order, drop freefont dependency 2022-07-03 12:03:50 -03:00
alfrix 5a02ac75ae basic support for extruder_stepper 2022-07-03 12:03:50 -03:00
alfrix c6df1b667c base_panel: fix keyboard not closing when clicking on macro shortcut 2022-07-03 12:03:50 -03:00
alfrix c18e2d148e layout: content margins in css
close #558 (use .action_bar{} and .content{} in a custom theme)
2022-07-03 12:03:50 -03:00
alfrix b76953ebfe theme: material darker use elevation and fix some colors 2022-07-03 12:03:50 -03:00
alfrix c4780fa56e performance: remove the background on default themes it can cause severe performance degradation and scrolling issues 2022-07-03 12:03:50 -03:00
alfrix faf997c7ae keyboard: improve layout and interactions on panels with entry 2022-07-03 12:03:50 -03:00
alfrix bd03a66dde screensaver: fix not having coverage in some situations 2022-07-03 12:03:50 -03:00
alfrix 431eb0058c system: remove unused function 2022-07-03 12:03:50 -03:00
Alfredo Monclus 6051e51f0e fan: add max and stop buttons 2022-07-03 12:03:50 -03:00
alfrix d3ce521bb0 keyboard: fix size while vertical 2022-07-03 12:03:50 -03:00
alfrix da26bf3143 base_panel: layout simplification 2022-07-03 12:03:50 -03:00
ZISQO 05b25cda15 Update ko_KR localization (#659) 2022-06-25 17:50:31 -03:00
alfrix eedf5448a0 docs: add another solution to seeing only console 2022-06-09 13:28:54 -03:00
Selim 8d83801b0e Turkish update (#637) 2022-06-05 23:30:39 -03:00
Adam Shanks 61c5bea9a0 Superscript (#635)
* Use superscript 2 and 3 as appropriate
2022-06-05 09:55:52 -03:00
alfrix 3775dbd44e extruder: fix issue with filament_sensors fixes #634 2022-06-04 11:43:52 -03:00
alfrix 880d4740e6 docs: moonraker update_manager needs managed_services 2022-06-04 11:00:13 -03:00
alfrix 511f715f7e retraction: allow higher limits fix #630 2022-06-03 14:39:15 -03:00
alfrix 9e800dd008 installer: add librsvg2-common as dependency fix #629 2022-06-03 13:38:22 -03:00
Andriy 6869514004 Update Ukrainian (#632) 2022-06-03 13:29:19 -03:00
Alfredo Monclus c6243e37fb Update issue templates 2022-06-03 13:26:45 -03:00
alfrix 73dbae7871 docs: update screenshots and add new panels 2022-06-02 16:20:37 -03:00
alfrix 2568a9262f docs: add DPMS to troubleshooting 2022-06-02 15:31:32 -03:00
alfrix 6bb712f970 Update translation files 2022-06-02 15:07:52 -03:00
Selim b8cf60bd2c Turkish Update (#631) 2022-06-02 12:14:59 -03:00
alfrix 5437eaead0 docs: fix build, re-skin and improve 2022-06-01 16:21:56 -03:00
dependabot[bot] 6b432c167f build(deps): bump pygobject from 3.42.0 to 3.42.1 (#589)
Bumps [pygobject](https://pygobject.readthedocs.io) from 3.42.0 to 3.42.1.

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-31 11:43:43 -03:00
dependabot[bot] 9d25836df4 build(deps): bump jinja2 from 3.1.1 to 3.1.2 (#605)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.1...3.1.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-31 11:43:25 -03:00
alfrix 54fc0458e0 KlippyGtk: fix style arguments 2022-05-31 11:14:42 -03:00
alfrix 3361c243b7 docs: hardware fix links 2022-05-31 11:14:42 -03:00
alfrix 2da5a4df32 docs: improve install instructions 2022-05-31 11:14:42 -03:00
alfrix 0f4f56bb9f Fix paused state
close #607
fix #611
2022-05-31 11:14:42 -03:00
alfrix 33195f203f Simplify code 2022-05-31 11:14:42 -03:00
alfrix 3889fdbe4c console: remove // 2022-05-31 11:14:42 -03:00
alfrix 7b4a24d079 job_status: simplify timeouts because sometimes it didn't work, also do not autoclose by default because there may be offsets to be saved 2022-05-31 11:14:42 -03:00
alfrix c91deda220 settings: wider scale slider 2022-05-31 11:14:42 -03:00
alfrix cc755edeb2 wider scrollbar because it's hard to use on small screens 2022-05-31 11:14:42 -03:00
alfrix 5a36729b76 PEP8, typos and warnings fixes 2022-05-31 11:14:42 -03:00
alfrix fd2a717ece settings: remove options that are directly on the panels 2022-05-31 11:14:42 -03:00
alfrix 48860159e9 move: add options to the panel 2022-05-31 11:14:42 -03:00
alfrix 4ff63798c8 job_status: ask for confirmation, and show saved offset 2022-05-31 11:14:42 -03:00
alfrix ea3e7ad3d1 splash_screen: use moonraker for actions if connected, hide system panel if it isn't connected
use systemctl if moonraker isn't available close #615
2022-05-31 11:14:42 -03:00
alfrix 562e49b8d2 logging: exceptions can log more info 2022-05-31 11:14:42 -03:00
alfrix 7c8d4ea4d7 extrude: add filament sensor support 2022-05-31 11:14:42 -03:00
alfrix b77b7c0976 job_status: M117 without text clears the label fix #614 2022-05-31 11:14:42 -03:00
alfrix 8550cbcab6 retraction: add reset 2022-05-31 11:14:42 -03:00
alfrix ade8911ba6 limits: add reset, allow to set above the configured maximum but turn the slider red 2022-05-31 11:14:42 -03:00
alfrix b9036901e7 job_status: animate filename if it's too long 2022-05-31 11:14:42 -03:00
alfrix f88a5c8440 macros: put the hide options on the panel 2022-05-31 11:14:42 -03:00
alfrix 53bc6f25ff macros: allow reverse sorting 2022-05-31 11:14:42 -03:00
alfrix 21633b9302 files: fix local thumbnails 2022-05-31 11:14:42 -03:00
alfrix a0a222c386 print: use the smaller thumb for the list if available 2022-05-31 11:14:42 -03:00
Mikko Gozaloandalfrix fa0d696120 Add Input Shaper panel
Original panel by Mikko Gozalo

Modified layour to fit 16:9 screens
Auto-home
Ability to measure X and Y independently
Get the current active values not the values from the config
Ask for save
Other minor tweaks

close #301

Co-authored-by: alfrix <alfredomonclus@gmail.com>
2022-05-31 11:14:42 -03:00
alfrix 7e988b3f35 zcalibrate: show the saved offset and offset to be saved 2022-05-31 11:14:42 -03:00
alfrix f98ac0bfe4 Move korean fonts to the optional category 2022-05-31 11:13:56 -03:00
NStevenU a29da7e76c Add Korean language support (#625)
* Add Korean language support

* Add Korean Language Support Font Installation
2022-05-31 11:12:20 -03:00
Ruslan Sayfutdinov 794dbea14e Allow setting 0 in preheat options (#612) 2022-05-31 11:10:27 -03:00
Selim 432b12d67e Turkish Language (#610) 2022-05-16 18:39:14 -03:00
alfrix 8accce00a9 job_status: fix thumbnail issue #608 2022-05-04 09:56:24 -03:00
alfrix 35381beeb6 limits: fix typo in label 2022-05-03 08:38:58 -03:00
alfrix 1eaa82ba2d config: fix print estimate default 2022-05-02 14:08:03 -03:00
alfrix 35c4136bd5 Job_status: fix speed label, fix estimate default 2022-05-02 12:09:12 -03:00
Alfredo Monclus 31546f0020 Improve Job status (#592)
Adds heater_generic and/or temp_sensors besides extruder/bed (because of the limited space maybe only 1)
Temps are now buttons and act as a shortcut to the temp panel
Adds fan_generic to the fan label and it's now a shortcut to the fan panel
The colors and size of the progress circle were changed to be more subtle.
Margins between items were augmented, because they are buttons now
Adds 3 information pages: move, extrusion and time:

    move can be opened with speed or z buttons
    time with elapsed/remaining buttons
    extrusion with the extrude_factor / flowrate button
2022-05-01 12:22:58 -03:00
AntoszHUN aac58bd885 Update Hungarian Language 2022-04-30 23:14:31 -03:00
alfrix 7ca118de86 console: limit length close #602 2022-04-30 23:13:43 -03:00
Alfredo Monclus 7420f38b15 installer improvements (#601)
The installer now catchs apt errors
FBturbo is now optional and FBdev is used as fallback
install xserver-xorg-legacy but do not force it, it's usually required for a lot of screens, but not 100%
hide pip update warnings, the new version broke stuff.
more granularity and steps to what's being installed, should make it easier to debug if something goes wrong
2022-04-29 12:12:00 -03:00
alfrix 6aa7f56231 extruder: fix temp overlap multi-extruder 2022-04-25 13:33:20 -03:00
alfrix 504d395661 temperature: fix issue with the new cooldown preheat setting 2022-04-23 11:57:52 -03:00
alfrix a77134d63b fan: prevent crash when using unicode characters 2022-04-23 10:46:19 -03:00
alfrix c763bd5a5b fans: fix for machines without [fan] 2022-04-20 14:54:47 -03:00
eltacoloco 228994b2f2 Swedish locale (#588)
Created sv_SE (Swedish) locales
2022-04-17 17:33:14 -03:00
alfrix 3a5427c7f0 console: add top margin and make it easier to read 2022-04-17 06:20:09 -03:00
alfrix b42043bc79 job_status fix issue with delta printers fixes #587 2022-04-13 20:06:02 -03:00
alfrix b3268223bb base_panel: fix titlebar items not showing if ks is started while printing 2022-04-12 16:21:35 -03:00
alfrix 430284b7a1 limits: add units 2022-04-11 23:32:07 -03:00
alfrix 8ad21ab7cb zcalibrate: fix vertical mode not working fixes #576 2022-04-11 23:24:15 -03:00
alfrixandtonywright 8ba28fde1c Add firmware retraction panel close #101
Co-authored-by: tonywright
2022-04-11 23:04:29 -03:00
alfrix 7078e52a4f zcalibrate: fix issue with delta kinematics fix #583 2022-04-11 22:46:13 -03:00
alfrix b555768980 safeguard against trying to load a missing theme 2022-04-11 09:08:07 -03:00
alfrix 2c6a853a80 docs: add preheat cooldown 2022-04-11 08:35:45 -03:00
Julien Kohler 3ea0b09863 Add possibility to define custom code for cooling (#579)
These changes allow to define custom code to be run when using the cooldown preset.

Here an example in the configuration:
```
[preheat cooldown]
gcode: M107
```
2022-04-11 08:25:07 -03:00
alfrix 618c9ac0e8 docs: add note about octoprint 2022-04-11 08:09:06 -03:00
alfrix a84cb63f8b readme: add docs build status 2022-04-11 08:02:31 -03:00
alfrix 0a8e757054 docs: add requirements file to fix docs 2022-04-08 19:16:09 -03:00
alfrix 0fb2046615 docs: add another fix to Cannot open virtual console close #580 2022-04-08 14:03:19 -03:00
alfrix 583397ebeb job_status: add save z button to save babystepping 2022-04-06 08:20:22 -03:00
alfrix 4bace34847 zcalibrate: add manual delta_calibrate fix #575 2022-04-05 20:02:28 -03:00
alfrix dd72e7d46a base_panel: fix #572 2022-04-05 19:57:38 -03:00
alfrix 013b50985f network: remove duplicate netifaces close #571 2022-04-05 19:50:35 -03:00
alfrix dc9cf760db Splash_screen: fix power on button dissapearing 2022-04-05 18:12:48 -03:00
alfrix 979217502d console: hide temps, clear button, button icons 2022-04-05 17:22:07 -03:00
alfrix 1ff0616457 zcalibrate: fix issue when position is not defined 2022-04-03 06:15:22 -03:00
alfrix e09d72f12d main and temp: fix same color for heater_generics and sensors 2022-04-02 14:29:31 -03:00
alfrix ab38dab291 style: add heater_generic icon 2022-04-02 14:29:31 -03:00
alfrix c33659c6f7 gtk: cleanup andoptimize image handling, incomplete themes should now work 2022-04-02 09:59:12 -03:00
alfrix c81836542a dependencies: keep numpy 1.21.4, 1.21.5 should be the last version that supports python 3.7 but somehow on some system doesn't work
fixes #569
2022-04-02 09:56:30 -03:00
alfrix cdb57f73bb v0.2.1
Screen:
* The no DPMS option should now protect from the first touch,
and it should provide a way for screens that turn all white/random colors/no-signal to just be all black
Zcalibrate:
* Add selector if multiple options can be used
* Go to the middle of the bed if position is not configured
* Add an option to set the custom position per printer
Fine_tune:
* Add reset button for each of the 3 options
Network:
* Add reload button
* Show hidden SSIDs as Hidden instead of x00
System:
* Add full update option to update all items at once
Mesh:
* Fix graph getting a bit out of screen in vertical mode
Menu:
* Use scrollbars when there are too many items
* Fix vertical mode not arranging items correctly
Move:
* Show ??? if not homed
* Hide originXY for delta kinematics
Splash:
* Change buttons to local commands if not connected to moonraker
* Fix issues with power button if klipper is not connected
Misc:
* Keyboard now works on all the entry boxes, you can press enter on them to confirm.
* If there is only 1 extruder, then the nozzle icon is shown instead of the number
2022-04-01 20:16:41 -03:00
alfrix 2a8a2ec2e7 network: fix display name not showing connected 2022-04-01 12:37:12 -03:00
alfrix 9f9e2ed6ad docs: update zcalibrate pos and dpms 2022-04-01 10:29:54 -03:00
alfrix f707ba8cf3 style: change load icon 2022-04-01 08:03:14 -03:00
alfrix 76b7ad54eb splash: do not show power_on if moonraker is not connected 2022-03-31 13:47:42 -03:00
alfrix 51b4d1e1e6 Update dependencies 2022-03-31 11:56:04 -03:00
alfrix 5eac3bef6b Update Translations 2022-03-31 11:26:25 -03:00
alfrix 53c7afd7a5 Use extruder icon without number if there is only 1 2022-03-30 22:58:37 -03:00
alfrix b70524cd28 Screensaver if dpms is off
This should protect against first touch when the screen is blanked
and help in cases where the driver implementation is not up to spec.
2022-03-29 23:37:59 -03:00
AntoszHUN 1e7c065ce4 Update Hungarian language (#562) 2022-03-28 16:51:26 -03:00
alfrix 6f86448405 Fix issues while Moonraker is connected but klipper is disconnected
fixes #548
2022-03-28 16:47:52 -03:00
alfrix 2a7acea86c network: fix issues, reload button, keyboard enter works on psk entry 2022-03-26 22:30:18 -03:00
alfrix e186fa6a3d bed_mesh and keypad: support writing with keyboard 2022-03-26 22:25:06 -03:00
alfrix b7d58a7ffb docs: fix xwrapper extension 2022-03-25 15:55:52 -03:00
alfrix 6a4eb7ac22 bed_mesh: fix graph out of screen in portrait 2022-03-25 14:30:13 -03:00
alfrix 4c8bb4ff6f splash_screen: change klipper restart and firmware restart if klipper is not connected 2022-03-25 14:07:37 -03:00
alfrix 9dc8335a07 fine_tune: add reset button, do not set babystepping prior to homing, reorganize a bit 2022-03-25 14:06:07 -03:00
alfrix a90ab54e1d print: hide _ and optimize a bit 2022-03-25 13:49:19 -03:00
alfrix 2e16193292 menu: fix portrait issues 2022-03-25 13:41:22 -03:00
alfrix d945ef8b0a printer: fix some issues with the graph 2022-03-25 12:06:08 -03:00
alfrix b73292c8f9 splash: hide ready msg while shutdown 2022-03-25 12:05:24 -03:00
alfrix bc366b708d menu and printer_select: support more than 8 items 2022-03-25 12:02:19 -03:00
alfrix 07bbbe9d51 zcalibrate: add selector for the different modes zcalibrate supports
closes #514
2022-03-25 10:51:08 -03:00
alfrix 3a91ba4604 style: set minimum height for distbuttons and simplify border removal 2022-03-25 09:57:11 -03:00
alfrix 2dc7a716ee move: show ? if not homed and remove home-xy on delta kinematics 2022-03-25 09:51:22 -03:00
alfrix ff087e7a6f system: feature: add Full Update 2022-03-25 09:49:10 -03:00
alfrix b83f12265d Splash_screen: fix return and duplicated power devices
fix forcefully returning the user from menu to splash when there is no connection to moonraker/klipper
fix a case where the power device was added multiple times to the list
2022-03-24 10:34:27 -03:00
alfrix ffaad4daf7 fine_tune and job_status: fix rounding error 2022-03-22 13:37:06 -03:00
alfrix d1e54bab64 docs: add layer progress to quicktips 2022-03-21 20:49:43 -03:00
alfrix abb02d3965 docs: vertical/portrait is available, remove the line that says it isn't 2022-03-21 20:42:59 -03:00
alfrix 62c91bc69b Update changelog 2022-03-21 17:17:30 -03:00
alfrix 0fd4c30ee8 docs: improve the touch rotation section 2022-03-21 17:07:50 -03:00
alfrix e59d43645a docs: remove calibration section, xinput-calibrator doesn't work, the project that is continuing that work is xlibinput-calibrator 2022-03-21 17:05:34 -03:00
alfrix d158090bea base_panel: cleanup logging 2022-03-21 13:20:52 -03:00
alfrix bc34b3c8d6 config: fix menu and preheat merge bugs
it's now possible to define a custom menu without the need to copy all the menu entries from defaults.conf
if you want to define all the entries, disable the default menu with 'use_default_menu: False' under [main]

if a preheat is defined then defaults are dropped in favor of keeping only user defines, this behaviour
has not changed, and it's intended since the user may not want any of the defaults; but it's now possible to
put preheat options in an include file.

fixes #530
fixes #497
fixes #408
2022-03-21 12:57:18 -03:00
Andriy 64ebf861fb Update Ukrainian
close #555
2022-03-21 11:53:33 -03:00
alfrix 50d3671d0f base_panel: simplify sidebar scaling 2022-03-21 07:14:58 -03:00
alfrix 5286e433fe logging: cleanup unnecesary lines 2022-03-21 06:34:02 -03:00
alfrix 50e72b0308 base_panel: fix error from trying to update temps before the printer initializes 2022-03-21 06:32:53 -03:00
alfrix 1dee914564 splash_screen: fix bug that prevented Power On from showing up 2022-03-21 05:46:14 -03:00
AntoszHUN 8108500dc2 Update Hungarian language (#554) 2022-03-20 18:12:16 -03:00
Mikko Gozalo 987cf89351 Add .gitignore (#300) 2022-03-20 18:10:02 -03:00
alfrix 48b2ef513f Fix files and printer memory leaks fixes #479 2022-03-20 12:11:41 -03:00
alfrix 4899701ae3 Update translations 2022-03-20 10:21:34 -03:00
alfrix 330a456ed3 scripts: fix permissions 2022-03-20 09:45:02 -03:00
alfrix 2ffb88e958 network: fix list when there is no netinfo 2022-03-20 09:42:03 -03:00
alfrix 82c8d62876 screen: move the wifi-manager to the network panel
moving the manager should increase startup times
only load it when the user wants to manage networks

network: add ip at the top (fixes #422)
network: always reload the list of networks
wifi: fix network list getting blank
network: make the list more resilient to netinfo errors
2022-03-20 09:19:45 -03:00
alfrix 0d259d6d04 main_menu and temp: reduce load
Drawing the graph has a high load impact, reduce the interval of redraw
if the user needs instantaneous values, then the list provides it,
the graph is there to provide historical data of behaviour not instantaneous values.

-------- | Load | Note
idle     | 0.3  | screensaver
menu     | 0.4  | No process update
extrude  | 0.6  | updates temp
graph 5s | 0.8  |
graph 1s | 1.2  |

the load is the 15 min mean after about half an hour
Tests carried out on a Pi3A
2022-03-19 14:47:59 -03:00
Alfredo Monclus 046e03b883 Improve error messages (#549)
Shows if the issue is with moonraker or klipper
if the issue is with klipper and there is info about it then show it
Reconnect now has a counter and it's visible to the user
2022-03-18 20:18:53 -03:00
alfrix 7dc74f74f4 temp_panel: fix #550 2022-03-18 17:51:37 -03:00
alfrix 22f3a2a37a docs: fix macro 2022-03-15 20:58:10 -03:00
alfrix b2eb7a1764 screen: log only default printer, the list is a couple of lines above 2022-03-15 20:20:59 -03:00
Jesper Hansen 1af42e6f0f Added option to select default printer at startup. (#542) 2022-03-15 20:14:36 -03:00
Zs.Antal aa6ae014d8 Update Hungarian language (#545)
Improved minor spellings.
Exchange of certain words.
Minor fixes.
2022-03-15 12:42:46 -03:00
Alfredo Monclus a893f47604 Show fan speed according to max_power and off_below (#543)
fixes #444
2022-03-15 12:41:47 -03:00
alfrix 2e1fa110de screen: Keep Traceback 2022-03-15 12:41:21 -03:00
alfrix 7ab64c5a85 docs: fix links 2022-03-15 12:41:21 -03:00
alfrix ee0cc9ca10 Remove unused variables 2022-03-15 12:41:21 -03:00
alfrix 5899c8feab Optimize imports 2022-03-15 12:41:21 -03:00
Alfredo Monclus d6672ee41f console: add switch to turn off autoscroll (#540)
also fix keyborard not closing, when the console is touched
and set Send button as translatable
2022-03-13 12:17:14 -03:00
Alfredo Monclus 6ce0ea7253 graph: various fixes (#539)
fix axis sizes for high resolutions (tie to font_size)
fix update interval sometimes being faster (fix printer timer)
fix new device added causing horizontal line (use min not max)
2022-03-13 12:10:42 -03:00
Alfredo Monclus b1dd83d955 job_status: rework time calculation
New 'Auto' setting that selects the best guess
added an slicer time compensation if you find that your slicer always under/over estimates by some amount
Split in days if the time is more than 24h
2022-03-10 11:43:53 -03:00
dependabot[bot] 7a4613bfe4 build(deps): bump pycairo from 1.20.1 to 1.21.0 (#534)
Bumps [pycairo](https://github.com/pygobject/pycairo) from 1.20.1 to 1.21.0.
- [Release notes](https://github.com/pygobject/pycairo/releases)
- [Changelog](https://github.com/pygobject/pycairo/blob/master/NEWS)
- [Commits](https://github.com/pygobject/pycairo/compare/v1.20.1...v1.21.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-10 11:37:39 -03:00
alfrix 490dc929bd splash_screen: make power_devices mandatory for the power on button 2022-03-10 11:26:43 -03:00
alfrix 65248bfef7 config: fix malfomed default config fixes #538 2022-03-10 09:32:53 -03:00
alfrix cee3243729 docs: improve troubleshooting close #537 2022-03-10 09:13:03 -03:00
alfrix b379363cf2 job_status: calculate progress with higher precision 2022-03-08 22:01:53 -03:00
Alfredo Monclus 708fec4c45 Fix issues waking up screen from a remote connection (#535)
When connected from vnc the screen did not unlock from the remote session click
This also implements an optional disable DPMS for people with issues where DPMS doesn't work as it should (hw issues, driver issues, etc)
Changes #340 almost entirely
2022-03-07 14:55:24 -03:00
Elektrickser f9f313f076 Update German Translation (#532) 2022-03-05 20:26:31 -03:00
alfrix 0458a19b63 base_panel: fix titlebar_items not configured 2 2022-03-05 18:15:20 -03:00
alfrix 3d009ad72b base_panel: fix titlebar_items not configured 2022-03-05 17:24:37 -03:00
alfrix 3c3db7fa21 base_panel: allow titlebar items to be configured 2022-03-05 11:50:26 -03:00
alfrix 088a6deabd splash_screen: allow power_devices to be configured 2022-03-05 11:33:24 -03:00
alfrix 882a088174 docs: fix changelog link 2022-03-05 08:19:26 -03:00
alfrix 7f03061ce6 graph: fix error when touching the graph area
Contrary to people beliefs, this is not the issue when their touchscreen doesn't work
2022-03-05 08:11:33 -03:00
Zs.Antal 27d00c049b Update Hungarian translation (#526) 2022-03-01 23:15:42 -05:00
alfrix 5c42c53ee8 screen: lint fix 2022-03-01 17:24:27 -03:00
alfrix 9b819f6a45 changelog: note about the Power On button 2022-03-01 17:22:34 -03:00
alfrix 49ab84e8d5 splash_screen: implement Power On Printer but make it more specific 2022-03-01 17:21:17 -03:00
alfrix 1b7f908d6b Websocket: wait at least 3 seconds until reconnect, 1 second was too low even locally 2022-03-01 16:17:27 -03:00
alfrix a1173d7113 power: fix switch aspect ratio 2022-03-01 09:12:27 -03:00
alfrix 244f964126 system and menu: fix not loading when no printer is online but moonraker is connected 2022-03-01 09:12:13 -03:00
alfrix 7e9fc97b4b splash_screen: fix #521 2022-03-01 09:10:05 -03:00
alfrix 5a4addf3ed screen: fix panels not reloading after save_config 2022-03-01 07:17:10 -03:00
alfrix 77aef7cf67 base_panel: Refactor titlebar, add heaters if there is space
close #239
2022-02-28 19:57:56 -03:00
alfrix ebfe0debb8 job_status: Set cancelled state earlier, and fix status label 2022-02-28 19:57:56 -03:00
alfrix 320b7a8836 Update websocket-client to 1.3.1 2022-02-28 19:57:50 -03:00
alfrix c77bdfe617 Translations: Fix plurals 2022-02-26 16:03:08 -03:00
Alfredo Monclus dd027c0583 Vertical mode (#480) 2022-02-24 16:00:51 -03:00
alfrix 3c1110d730 Base_panel: fix #413 2022-02-24 15:57:47 -03:00
alfrix df0f8961e5 Normalize icon sizes and style 2022-02-24 09:20:59 -03:00
alfrix be3c24198d Websocket: fix issue when trying to connect to an offline printer
Fix: #401
2022-02-23 23:24:01 -03:00
alfrix 21be9df72e Main_menu: fix graph colors when switching printers 2022-02-23 23:14:46 -03:00
alfrixandkomandrik c4ac1cb52e Ukranian Translation
Close #520

Co-authored-by: komandrik
2022-02-23 19:35:20 -03:00
alfrix c3b7498eb5 Docs: clarify how to save the calibration 2022-02-23 15:34:09 -03:00
Alfredo Monclus 84fc6e5757 Bed_level: Support 6 and 8 Screws and rotation (#484) 2022-02-23 14:04:54 -03:00
alfrix a01762b279 Screen: fix blanking producing random colors 2022-02-20 13:54:16 -03:00
Frank Tackitt 4674737d0c Show position including offsets in the move panel (#516)
This makes Z stepping make more sense after applying a Z offset and more
consistent with the results of sending manual gcodes.
2022-02-19 17:42:50 -03:00
Zs.Antal ea4b98f3d6 Updated Hungarian Language pack (#513) 2022-02-19 14:45:03 -03:00
alfrix 0625935062 print: remove dependency 2022-02-14 05:37:17 -03:00
alfrix 1753105265 sytem: fix updater when moonraker doesn't return configured_type 2022-02-13 17:28:15 -03:00
Randell Hodges 926773f4f3 Apply slider value on release (#430)
Scale will do the action when released instead of many times for every step while sliding.
2022-02-13 16:15:39 -03:00
alfrix bf67129528 main_menu and temp: Fix extruder colors when there are multiple extruders 2022-02-12 21:26:55 -03:00
alfrixandZs.Antal ef5873d095 Hungarian translation
Co-authored-by: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com>
2022-02-12 20:48:52 -03:00
alfrix 45d195bcd2 base_panel: Increase horizontal margin
The sidebar was too close to the content, this was better shown by adding a border to the sidebar wich showed that the content was clipping over it
2022-02-11 09:36:42 -03:00
alfrix de35769600 Temp_panel: Fix issue with temperature_fan #495
Since temperature_fan has a target, it needs to be in the list to properly work
2022-02-08 13:45:46 -03:00
dependabot[bot] cfe1bb8504 build(deps): bump humanize from 3.13.1 to 3.14.0 (#485)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.13.1 to 3.14.0.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.13.1...3.14.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-07 13:40:55 -03:00
Code_PhantomPainandsjqlwy 41b3309ff9 improve and finish zh_cn translations (#493)
Co-authored-by: sjqlwy <sjqlwy@yeah.net>
2022-02-07 13:40:25 -03:00
alfrix fce90ebf9d Print: hide extension in the list 2022-02-06 13:41:42 -03:00
alfrix d05ac06ad3 Settings_panel: Prevent long translations from squashing the slider
and improve switch to be more consistent
2022-02-05 14:47:35 -03:00
alfrix 1964f13e26 Update translations 2022-02-05 13:53:00 -03:00
alfrix 8375606771 Make Main_menu and Temp_panel look equal 2022-02-05 12:17:12 -03:00
alfrix d0b651c9dd Temp_panel: fix #490 2022-02-05 10:41:00 -03:00
alfrix 20aa25256f Graph: improve look when there is little space 2022-02-05 10:24:09 -03:00
alfrix c1b9123e9e Printer_select: improve arrangement if printers > 4 2022-02-05 10:18:41 -03:00
alfrix 5c23946283 Job_status: Fix issue with standby state that prevented closing 2022-02-04 14:18:11 -03:00
alfrix ffb62f149c Job_status: revert close_panel changes 2022-02-04 10:49:12 -03:00
alfrix e1877f2c2e Job_status: call state_check just before trying to close the panel
This shouldn't be needed but it's a reasonable safeguard
2022-02-04 09:34:05 -03:00
alfrix d5ab606509 Job_status: Fix not loading without display_status (needed for M117) 2022-02-04 09:28:11 -03:00
alfrix da7667e64e Job_status: Prevent the panel from closing itself when a print is in progress 2022-02-03 15:52:01 -03:00
alfrix 5384c59689 Job_status: Fix issues when the panel is not active
If the print finishes (or the user cancelled) while KS is in another panel, job_status was broken with no buttons, no filename, wrong progress and  wrong status, this fixes all those issues, and removes some redundant checks
2022-02-03 11:47:52 -03:00
Randell Hodges e478c3e8d9 Increase max move speed and separate XY and Z max speed (#411)
* Seperate XY and Z max speed
Increase max range of speed

* Limit the UI maximum for speed to 200, but allow a per printer override.

* Fix linting
2022-02-01 20:07:49 -05:00
alfrix 7db75ec30f Temp_panel: Fix target not updating when using both gcode and ks settings 2022-02-01 12:54:27 -03:00
Adam Polkosnik [fun] 57377a7e8b Bed leveling fix for printers with 4+ bed_screws (#445)
Fixes #443 on my printer with  6 bed screws.
It seemed to work with 3, 4, and 6 bed screws defined in printer.cfg
Also, added if statement to check for "screws_tilt_adjust" to avoid throwing an error when the section is not present.
2022-01-30 21:12:10 -03:00
alfrix aad665e3ca Extrude: visibly change load/unload if they are not found 2022-01-30 21:06:04 -03:00
alfrix f2d642b94d Installer: Workaround pip 22.0 issues 2022-01-30 18:28:27 -03:00
alfrix 588869aa57 Don't upgrade pip in the installer (pip 22.0 is being an issue) 2022-01-30 16:05:14 -03:00
alfrix 0f5752e3f1 Fix long line 2022-01-30 14:35:18 -03:00
alfrix b9b404a356 Tpanel: replace underscore with space close #463 2022-01-30 14:03:51 -03:00
Alfredo Monclus c1372c1839 Start in configurations without fans or extruders or temp devices
A bunch of conditionals that makes KS start and not stay in the splash screen
2022-01-30 10:55:05 -03:00
alfrix dad267d278 Temp_panel: Fix issue with shared_heaters Fix #482 2022-01-29 00:24:50 -03:00
alfrix 4c89eaf3e2 Temp: Start in delta mode when printing 2022-01-28 14:23:22 -03:00
alfrix c8a8f020af Installer: always unmask the service and enable 2022-01-26 09:07:26 -03:00
alfrix 21b0466f95 Create an uninstaller 2022-01-26 08:07:36 -03:00
alfrix 86cdcfafe4 Installer prevent the script from being run as root 2022-01-26 07:20:26 -03:00
alfrix 7bb99ecc7d Installer: clean deprecated command 2022-01-24 08:59:16 -03:00
alfrix d0ccdc0f7c Temp_panel: Show only heaters 2022-01-24 08:41:22 -03:00
dependabot[bot] f9f640ca52 build(deps): bump requests from 2.26.0 to 2.27.1 (#404)
Bumps [requests](https://github.com/psf/requests) from 2.26.0 to 2.27.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.26.0...v2.27.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 07:43:09 -03:00
alfrix 4e594c258f System: Fix long translations breaking the ui at low resolution 2022-01-24 07:17:35 -03:00
Adam Polkosnik [fun] 17b21bd41d Polish translation (#468)
* Added Polish translation

* Updated polish translation, fixed plural forms for "hour" in KlipperScreen.pot

* updated en lang, forgot trailing new line in .pot

* Small updates to .pl language translation
2022-01-24 07:11:38 -03:00
alfrix 213f1c92d6 Temp_panel: Maintain selection of heaters if the user go out of the panel and back 2022-01-23 13:51:18 -03:00
alfrix 02c008de84 Temp_panel: Fix temps not updating after opening another instance
Fix #446
2022-01-23 13:18:36 -03:00
Alfredo Monclus d8bc4747e8 Fix Startup without [virtual_sdcard] (#461)
* Rewrite evaluate_state

* Print: Show an error if trying to print without [virtual_sdcard]
2022-01-22 22:03:57 -03:00
alfrix 0592840ded Change scrolling behaviour in a few more places 2022-01-22 21:08:41 -03:00
Jordan 4b0b937c41 Change scrolling behavior to enable touch scroll. Fix #466 2022-01-22 15:30:02 -05:00
alfrix 1b38dbb36a Finish da-translation #465 2022-01-22 12:08:45 -03:00
srbjessen 5d19652b5b da-translation (#465)
* Update KlipperScreen.po
2022-01-22 12:06:37 -03:00
alfrix 07aa6bb7f7 Job_status: wrap long error messages 2022-01-22 09:36:50 -03:00
alfrix 8e8e23de0f Job_status: Fix not changing state if a print is issued during cancelling 2022-01-22 09:06:33 -03:00
alfrix de0b6ea435 Job_status: Fix thumbnail and metadata not updating after a cancel and re-upload 2022-01-22 09:06:33 -03:00
Alfredo Monclus 1065676018 Temp_panel: Do not set temp if not defined or out of range (#449) 2022-01-22 07:43:03 -03:00
Alfredo Monclus efa6344964 bed_mesh: use default profile (#450)
currently the bed_mesh panel will create a profile called None if no profile is selected, but klipper will use the default profile if that is the case, using the default profile if nothing was selected should be correct.
2022-01-22 07:35:57 -03:00
alfrix a754cdc239 Update docs: re-add the manual method of changing gl driver 2022-01-21 16:45:23 -03:00
Kmarty 0e3027638f Fix issue trying to set temperature from main_menu (#457)
'KlippyGcodes' has no attribute 'MAX_EXT_TEMP" by syncing (duplicit)
function change_target_temp() with 'panels/temperature.py'
2022-01-21 16:24:41 -03:00
Alfredo Monclus ec4213b971 System: fix updater dialog (#462) 2022-01-21 16:22:01 -03:00
alfrix d2419335b4 Fix startup: downgrade matplotlib to 3.5.0 2022-01-21 16:08:29 -03:00
Alfredo Monclus f156bd8529 Add numpy to requirements to prevent unexpected issues (#453) 2022-01-18 19:00:23 -05:00
Alfredo Monclus 5d3bae8ff9 Temp_panel: put devices in a scroll (#436)
* Temp_panel: put devices in a scroll

* Tweak margins

* Tpanel: Fix whitespace in message

* Fix #429 temperature_fan not updating target
2022-01-17 01:13:46 -05:00
Alfredo Monclus 8dd5c64006 Extrude panel: Support 5 extruders (#441) 2022-01-17 01:13:16 -05:00
Alfredo Monclus 86fc0f9988 Menu: Arrange 3 x 2 and 2 x 2 (#442)
* Arrange 3 x 3 and 2 x 2

* typo
2022-01-17 01:12:54 -05:00
Alfredo Monclus 8775221b5f Update Docs: add Thumbnail info, add xorg.log, optimize and organize images (#447)
* Update Docs: add Thumbnail info, add xorg.log, optimize pngs

* Organize images in subfolders
2022-01-17 01:12:19 -05:00
Devil-of-Chaos f796a72057 Add Ability to Use Custom Service (#418)
* Custom Servive

* Custom Service

* Update system.py

* Update Configuration.md
2022-01-13 11:17:45 -05:00
Alfredo Monclus 8c489bc465 Support hiding by name using underscore (#437) 2022-01-13 11:09:06 -05:00
Alfredo Monclus 6b043d63bc Improve config file search (#440) 2022-01-13 11:08:12 -05:00
Alfredo Monclus e1e3437d62 Relax timers for CPU efficiency (#439) 2022-01-13 11:05:34 -05:00
Alfredo Monclus 41aa953cfd Update Translations (#435) 2022-01-13 11:05:04 -05:00
Alfredo Monclus d24f3d6f5c Fix close Websocket (#434) 2022-01-13 11:04:02 -05:00
Alfredo Monclus 2982eb9645 Track the status of calibration and inform the user more (#402) 2022-01-12 20:03:57 -05:00
srbjessen 0aab9ff4c4 Danish translations (#399)
* Danish translations

* Missing "%s" and "%d"
2022-01-12 20:03:26 -05:00
Alfredo Monclus eb80be47db Temp_panel: Fix extruder not setting temps with numpad (#426) 2022-01-11 06:59:07 -05:00
Alfredo Monclus 8a8c6c064c Graph in temp panel, combine preheat and temp (#393)
* Graph in temp panel, combine preheat and temp

* Fix target not working properly

* Fix initial preselect

* Add the ability to change in delta temps

* Make the label translatable

* Add Unit to the label

* Add de/select button to popover

* Warn the user if nothing was selected

* Fix templabel

* Fix to comply with pep8

* Fix colors, thanks Jordan

* Fix popover selection

* Update docs image

* Gain horizontal space

* Gain even more horizontal space (remove target)

* Fix temperature_fan

* Add icon and style to temperature_fan

* List preheat deprecation in breaking changes

* Use the printer maximum temperature

* Cleanup target and fix popover select

* Fix codestyle

* Add extra preheat presets

* Change Class name

* Update docs image

* Improve Maximum temperature handling and Temperature fans
2022-01-11 00:39:42 -05:00
Alfredo Monclus 58e0aa74d0 Word Wrap (#395)
* Word-wrap dialogs

* prevent horizontal scrollbar caused by translators

* Fix weird indentation on print name
2022-01-03 12:45:55 -05:00
Alfredo Monclus 9449f24b5f Splash_screen: show full error message (#389)
* Splash_screen: show full error messge

* Fix splash not changing from connecting to error
2022-01-03 01:29:49 -05:00
Alfredo Monclus 9d3a6c7538 Support Manual Mesh calibration (#388)
* Bed_mesh: Home if not homed

* Bed_mesh: support manual bed mesh leveling

* Indentation Fix

* Change log string to represent current behaviour
2022-01-03 01:29:01 -05:00
Olivier Robardetandjordanruthe ce872a54b1 Update french translation (#385)
* Makes "Confirm Emergency Stop" setting localizable

* Updates french translation

Co-authored-by: jordanruthe <31575189+jordanruthe@users.noreply.github.com>
2022-01-03 01:27:17 -05:00
BrownRhinedandJordan 4bfd0d13fb add Chinese Traditional (#392)
* add Chinese Traditional

add Chinese Traditional

* Update KlipperScreen.po

* Update translation script and run it.

Co-authored-by: Jordan
2022-01-03 01:26:12 -05:00
Frank Tackitt d19e303f0d Support the "enter" key from a physical keyboard (#379)
* Support the "enter" key from a physical keyboard

I often have a usb keyboard dangling from my printer, and got annoyed I couldn't just hit enter from the console.

https://docs.gtk.org/gtk3/signal.Entry.activate.html

* Fix whitespace for linting
2021-12-24 09:32:07 -05:00
Alfredo Monclus 22221c61ac Fix Network Panel (#375)
* Network: Fix Keyboard still showing after connection

* Network: fix dialog setting wrong size

* Fix empty network panel
2021-12-24 09:31:47 -05:00
dependabot[bot] e7bf13b6df build(deps): bump matplotlib from 3.5.0 to 3.5.1 (#372)
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.5.0...v3.5.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-24 09:31:23 -05:00
dependabot[bot] 7ac4d3b290 build(deps): bump websocket-client from 1.2.1 to 1.2.3 (#358)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.2.1 to 1.2.3.
- [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.2.1...v1.2.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-24 09:31:13 -05:00
d8ahazard 6c3c579e6e Support multiple power devices. (#350)
Enable multiple devices to power on when turning on printer. Devices starting with "Printer" will turn on
2021-12-24 09:31:01 -05:00
Christian Kvasnyandjordanruthe 0b9d545c6f add speed as parameter to UN/LOAD_FILAMENT macro (#359)
* Configurable xy position for z-calibrate added

* fix coding style

* Z probe calibrate option added

* add speed as parameter for UN/LOAD_FILAMENT macro

* add macros.md to docs

* update description

* change macros-md
fix format

Co-authored-by: jordanruthe <31575189+jordanruthe@users.noreply.github.com>
2021-12-18 09:38:33 -05:00
Alfredo Monclus d9171e0d15 Always show Load/Unload buttons (#363)
But give the user an error if the Macro is missing
2021-12-17 12:43:25 -05:00
Alfredo Monclusandjordanruthe 964ae7986f Docs: Add Bulleye fix (#367)
Also configuration file clarifications, and other minor updates.

Co-authored-by: jordanruthe <31575189+jordanruthe@users.noreply.github.com>
2021-12-17 12:41:29 -05:00
Alfredo Monclus ae47cac064 Improve plot performance (#364) 2021-12-17 12:39:31 -05:00
Alfredo Monclus bfe6321c2f Improve pathing (#368)
* Improve pathing

* Improve Pathing: config.py
2021-12-17 12:39:18 -05:00
Alfredo Monclus 70767c2bb6 Fix UI broken in german at low res. (#369) 2021-12-17 12:37:57 -05:00
Alfredo Monclus 70caf24c35 Add light icon (#370) 2021-12-17 12:37:43 -05:00
Oli Wright bca1ac6ba6 Fix configuration filename (#373)
A rogue underscore (old formatting?) had been appended to the end of the config filename.  Removed.
2021-12-17 12:37:27 -05:00
Jordan 9660172e0b Enable startup with #360 to not error 2021-12-10 21:13:18 -05:00
Jordan 698b86ac1c Update main_panel image and include in main README 2021-12-09 08:52:25 -05:00
Alfredo Monclus 2a9e653505 Graph (#357)
* Add theme graph colors

* Fix graph not applying colors
2021-12-07 21:05:17 -05:00
Jordan d21e9cbfaa Main menu hide 'set temp' for devices that don't have a heater. 2021-12-07 21:05:17 -05:00
Jordan c3103d3b11 Fix graph error and make colors configurable 2021-12-07 21:05:17 -05:00
Jordan dd56d192cc Create keypad widget and include set temp on the main menu 2021-12-07 21:05:17 -05:00
Jordan e26e4006d6 Move graph location 2021-12-07 21:05:17 -05:00
Jordan fdf81ecf06 graph: Add ability to hide/show sensors. 2021-12-07 21:05:17 -05:00
Alfredo Monclus ac3bde654a tweaks (#291) 2021-12-07 21:05:17 -05:00
Jordan 139115a0e9 Updates to graphing.
Modify heaters to show only ones available in the temp store. Add 
ability to hide/show heaters.
2021-12-07 21:05:17 -05:00
Jordan 5bfcd0108a Adding graph capability to main menu 2021-12-07 21:05:17 -05:00
Makoto Schoppert 141bc38876 Update Troubleshooting.md (#356)
Fix a couple of typos
2021-12-07 20:24:26 -05:00
Alfredo Monclus 5ff249cb20 Switch from vext.gi to PyGObject (#348) 2021-12-04 12:29:35 -05:00
Alfredo Monclus eca3385ffe Add the full message of the commits in the updater (#343) 2021-12-04 12:29:17 -05:00
Alfredo Monclus 873f61d74b Change gdk deprecated functions (#342) 2021-12-04 12:29:01 -05:00
Alfredo Monclus 2c050a649c Wakeup touch block (#340)
* Prevent accidental touches on wakeup (DPMS needed)

* fixup

* This is a very old workaround to blank the cursor for the entire X

* Separate cursor change into a procedure

* Check for DPMS FAIL state first
2021-12-04 12:28:37 -05:00
dependabot[bot] 9f2711b506 build(deps): bump humanize from 3.12.0 to 3.13.1 (#347)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.12.0...3.13.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-04 12:28:16 -05:00
dependabot[bot] 2c6d3d1866 build(deps): bump matplotlib from 3.4.3 to 3.5.0 (#329)
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.4.3 to 3.5.0.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.4.3...v3.5.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-04 12:28:02 -05:00
Jordan 41d41dc2eb screen: Add configuration option for estop confirmation (Default off). Fixes #321 and fixes #341 2021-12-01 19:58:45 -05:00
Jordan dd0fd18b25 power: Sync power state on panel load. Fixes #322 2021-12-01 19:41:49 -05:00
Alfredo Monclus 1e5d701631 Update Docs (#346) 2021-11-29 11:09:25 -05:00
Alfredo Monclus 4569192ffa Improve the bed mesh plot (#338)
* Improve the bed mesh plot

* Fix when the mesh is offset or there are big values
2021-11-25 12:45:54 -05:00
Leif Bladt 13473c2cfd Update docs to point to new discourse thread 2021-11-25 12:45:43 -05:00
Jordan c8420c260b screen: RESPOND echo will now show a message on the screen. 2021-11-21 20:19:45 -05:00
Alfredo Monclus 0a6ac42069 Installer: improvements (#335)
* Fix vext.gi error
The problem occurs because vext and vext.gi are installed at the same time
we need to install the requirements in order

* Simplify path (the env was activated)

* Colorize output

* Abort if pip exit is not clean
2021-11-21 15:42:11 -05:00
Alfredo Monclus 4f61cedd6c Zcal panel: Support for Z_ENDSTOP_CALIBRATE (#327)
* Zcal panel: Support for Z_ENDSTOP_CALIBRATE

* Suggested changes

* Change naming of Gcodes because it can be calibrating an endstop and not a probe

* Update translations
2021-11-21 15:40:42 -05:00
Alfredo Monclus 39804814f5 Update FR translation (#332) 2021-11-18 07:18:26 -05:00
Jordan 2b2e096955 install script: Integrate vext.gi into requirements file 2021-11-16 22:48:32 -05:00
Alfredo Monclus b959cf5b4f Move panel: Add Z-tilt/Quad-gantry-level/HomeXY button (#326) 2021-11-16 21:05:02 -05:00
Elektrickser b52085746f More German Translations (#318)
* Add German Language

Translate the texts to german.

* Update system.py

change grid, to see all buttons on screen

* Revert "Add German Language"

This reverts commit 6982258839.

* Add German Language

add German translated files.

* fixed german translation

fixed "Laden"

* fixed german translation

add more translations

* Update system.py
2021-11-16 21:03:46 -05:00
Julian Schill 51d26a3a29 Add temperature fans to heaters (#325)
* Add temperature fans to heaters

* Make code prettier

* Indentation
2021-11-16 21:03:14 -05:00
dependabot[bot] 29e9bad1aa build(deps): bump jinja2 from 3.0.2 to 3.0.3 (#323)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.2...3.0.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-16 21:00:10 -05:00
Jordan 2f6149c5b7 Fix connect issues with moonraker. Addresses #328 2021-11-16 20:59:06 -05:00
Jordan f6fcb322f5 z_calibrate: Fix issue where z_calibrate_position section does not exist 2021-11-06 22:46:24 -04:00
Christian Kvasny 4780592778 Configurable xy position for z-calibrate added (#310)
* Configurable xy position for z-calibrate added

* fix coding style

* Z probe calibrate option added
2021-11-02 08:00:20 -04:00
dependabot[bot] 96a91f3e41 build(deps): bump humanize from 3.11.0 to 3.12.0 (#298)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.11.0...3.12.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-01 22:57:31 -04:00
hawkeyexp 47b7f0920e Fix german translation (#309)
* Fix german translation

* update binary
2021-11-01 22:53:18 -04:00
Alfredo Monclus d36364a807 Augment scrollbar contrast (#314)
Some screen have very little contrast and where making the scrollbar invisible
2021-11-01 22:51:55 -04:00
Vladimir Poleh c7901243cf Fix Network panel not functioning when Wi-Fi point is within range (#304) (#315) 2021-11-01 22:51:41 -04:00
Alfredo Monclus e7e91aee27 Material (#297) 2021-10-06 12:02:27 -04:00
dependabot[bot] 5a93e0009c build(deps): bump jinja2 from 3.0.1 to 3.0.2 (#295)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.0.1...3.0.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-06 12:02:17 -04:00
Alfredo Monclus e54c7dcbb3 Update docs and add theming section (#296) 2021-10-06 12:02:05 -04:00
Alfredo Monclusandjordanruthe 5f5e6336c0 Update Translations (#284)
* Update Translations

* Various fixes to not break the UI

* Add updater translations

* Fix pycodestyle

* Fix updater translations

* Fix pycodestyle

* Fix restart translation

* Fix \n in label

* Update French
Thank you Bahoue

* Separate "default"

Co-authored-by: jordanruthe <31575189+jordanruthe@users.noreply.github.com>
2021-10-04 20:18:27 -04:00
Alfredo Monclus c618044898 Support custom themes (#288)
* Remove relief
The relief gets stuck on touchscreens

* Support custom themes
2021-10-04 20:14:40 -04:00
Alfredo Monclus 423d344197 Fix Zcalibrate showing when there is no probe (#289) 2021-10-04 20:13:55 -04:00
Jordan 969b47f425 job_status: Tweaks to state changes 2021-10-01 19:48:03 -04:00
Jordan 3053502a32 fine_tune: Fix issue with wrong babystep interval selected. 2021-10-01 19:02:51 -04:00
Alfredo Monclus 5e3e8be005 Styling updates (#279)
* Dialog buttons colors

* Zcalibrate add colors for buttons

* Fix move panel misalignment and add color to home button

* z-bolt switch styling

* Splash screen homogeneous buttons

* remove switch slider border

* Remove max chars from filename (ellipsizes anyway)

* Fix colorized buttons moving when pressed

* Updater more row spacing

* Colorized button press
2021-09-22 23:14:21 -04:00
Bertrand Lemasle 7b904fec79 Fixed typo in limits,py (#283) 2021-09-22 18:10:03 -04:00
pappicio bfed3339d8 updates it lang (#278)
deleted outdated translation strings and update .po and .mo files
2021-09-21 18:24:32 -04:00
Alfredo Monclus 155ac2ab6f System: Updater improvements (#260)
* System: improve updater

* Styling updates

* dialog buttons pressed

* Update styling

* styling

* implement repo recovery

* check if dirty

* Fix scrollbars and logic

* Fix codestyling
2021-09-21 18:23:56 -04:00
Jordan cdf4d60b21 install script: Add fonts package. Addresses #254 2021-09-21 18:21:18 -04:00
Jordan b0b56a026c screen: Fixes for printer select button 2021-09-19 00:09:00 -04:00
Jordan 0c35e58308 limits: Fixes to limit 2021-09-19 00:08:36 -04:00
Jordan 36aaece846 screen: Put font size setting into KlippyGtk 2021-09-18 16:53:31 -04:00
Jordan 857b4a9bab docs: Add generic heater to preheat section 2021-09-18 10:32:51 -04:00
Frank Tackitt e1c478be83 Allow gcode commands with preheat options (#274)
* Allow gcode commands with preheat options

I use this to run a heatsoak macro during preheat.
  It moves to bed center, maxes the part cooling fan,
  and starts my nevermore chamber filter to circulate
  more air.

* Add documentation for preheat gcode
2021-09-18 10:32:13 -04:00
Jordan 414ac3f211 limits: Fix issue with square_corner_velocity possibly being a decimal 2021-09-18 10:09:58 -04:00
Jordan e9432ae308 Update language files. Include updates to it from @pappicio 2021-09-18 10:01:20 -04:00
Jordan 5d6f80a170 bed_level: Fix #275. Make the screws button disabled while command is running. 2021-09-18 09:50:24 -04:00
Jordan d7b8f4f1ed Add printer limits panel 2021-09-16 22:56:58 -04:00
Jordan 996777a6dd Rename KlipperScreen.conf to defaults.conf to avoid some confusion 2021-09-16 22:56:33 -04:00
Jordan 54c47554d2 Change how panel subscriptions work 2021-09-16 21:54:51 -04:00
Alfredo Monclus 62b65ba4d2 Add unload/load and reorganize extrude panel (#250)
* Add Load/Unload buttons and re-organize extruder panel
This uses the LOAD_FILAMENT and UNLOAD_FILAMENT macros so the user can have custom loading sequences.
If the macros are not found then the buttons don't show up

* Fix styling

* Fix styling2

* No colors because this are not buttons
2021-09-16 20:04:09 -04:00
Alfredo Monclus 67cc396ad9 Use a base css (#186)
* Use a base CSS for styles

* Fix updater dialogs too close to buttons and updater too close to the edge

* Fix blurry Dropdown and dialog buttons

* minor tweaks and fixes

* Solarized restyle

* more vertical clearance between items

* workaround colorized bar at high res.

* colorized pressed state
2021-09-16 20:02:36 -04:00
Jordan e9599a14c5 screen: Output font settings 2021-09-14 19:51:14 -04:00
pappicio c5f84998e4 Italian review (#266)
* Add files via upload

some other fixes on italian translation and updated .mo file!

* Delete ks_includes/locales/it/LC_MESSAGES directory

* Add files via upload
2021-09-12 20:59:45 -04:00
Jordan 1726126807 Update docs for update_manager to use user directory 2021-09-12 15:23:42 -04:00
Jordan 31606ddc38 Update metadata on file change. Fixes #227 2021-09-12 15:21:32 -04:00
Jordan e639a27de1 Test code: update line length 2021-09-11 17:36:30 -04:00
Jordan ed48cb75ad Fix workflow 2021-09-11 17:35:30 -04:00
jordanruthe c80a983fe3 Update test_code.yml 2021-09-11 17:28:03 -04:00
jordanruthe d0951c6d18 Add test_code.yml 2021-09-11 17:27:19 -04:00
Jordan 70d8315539 Update code style 2021-09-11 17:25:38 -04:00
Alfredo Monclus 98cb3ef743 Font Size Selector (#245) 2021-09-11 14:21:50 -04:00
Alfredo Monclus da8ba4db93 Preheat: Add colors to cooldown and temperature (#259) 2021-09-11 14:21:05 -04:00
Alfredo Monclus f943dee498 Update French (Bahoue) (#261) 2021-09-11 14:20:55 -04:00
pappicio 963214c549 Update Italian Language (#258)
some corrections
2021-09-11 14:20:41 -04:00
Jordan d540c038a4 Update Fan panel to include all configured fans. 2021-09-11 14:17:53 -04:00
Jordan 407d8ad000 base_panel: Updates to macro shortcut 2021-09-11 09:15:47 -04:00
Alfredo Monclus 517a6afab8 Dialogs updates (#252)
* Fix cursor on dialogs and make them fullscreen

* Fix date alignment varying with text length
2021-09-07 21:30:21 -04:00
Alfredo Monclus bf0f2d4342 Colorized theme update (#255) 2021-09-07 21:28:35 -04:00
Alfredo Monclus 3c4dfc4766 Add Italian translation (pappicio) (#257)
* Add Italian translation (pappicio)

* Fixup italian
2021-09-07 21:26:51 -04:00
Jordan 246c9829db screen: Make macros shortcut show/hide when configured. Addresses #246 2021-08-31 22:02:04 -04:00
Alfredo Monclus d41370cdf1 Use klipper_config by default if available (#241)
* Use klipper_config by default if available

* Update docs about config
2021-08-30 19:54:45 -04:00
Alfredo Monclus c54282962d Adjust titlebar height (#248) 2021-08-30 19:53:23 -04:00
Alfredo Monclus 11445db55a Fix for user keyboard layout (#244) 2021-08-30 19:52:48 -04:00
Alfredo Monclus 7bf7a54540 Ellipsize Job_status Filename and LCD message (#238) 2021-08-27 22:06:03 -04:00
Alfredo Monclus 452a56ffcb Update Spanish (#240) 2021-08-27 21:23:36 -04:00
Alfredo Monclus 13e163faf0 Check for blanking disabled (#237) 2021-08-22 17:39:02 -04:00
Alfredo Monclus 46245bb275 Macros shortcut on sidebar (#232)
* Macros shortcut

* Add config option
2021-08-22 17:38:03 -04:00
Alfredo MonclusandJordan 41e917bc41 Wake the screen at print start and end (#229)
* Wake the screen at print start and end

* job_status: Wake screen on re-print

Co-authored-by: Jordan <jordan.ruthe@gmail.com>
2021-08-19 21:07:24 -04:00
Alfredo Monclus 8bfaf69109 Updater UI cleanup (#230) 2021-08-19 21:00:07 -04:00
Alfredo Monclus 642385eead Strip .gcode from name in job_status (#231) 2021-08-19 20:45:28 -04:00
Alfredo Monclus e6a1cc483b Change solarized load icon (#233) 2021-08-19 20:45:05 -04:00
Alfredo Monclus 50b309a213 UI Fix for Other Languages (#228)
* Update translation files

* Fixup UI in other languages
2021-08-17 07:20:26 -04:00
Alfredo Monclus 17da2b3d4e Bigger Fonts and icons (#169) 2021-08-15 18:44:13 -04:00
dependabot[bot] 93c7010dc0 build(deps): bump requests from 2.25.1 to 2.26.0 (#205)
Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.26.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.25.1...v2.26.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:44:00 -04:00
dependabot[bot] 211d0c5d9b build(deps): bump humanize from 3.9.0 to 3.11.0 (#219)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.9.0 to 3.11.0.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.9.0...3.11.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:43:56 -04:00
dependabot[bot] d6799a1b04 build(deps): bump websocket-client from 1.1.0 to 1.2.1 (#225)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.1.0 to 1.2.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.1.0...v1.2.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:43:52 -04:00
dependabot[bot] cc75deb02f build(deps): bump matplotlib from 3.4.2 to 3.4.3 (#226)
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.4.2 to 3.4.3.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.4.2...v3.4.3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-15 18:43:46 -04:00
Jordan 3996f9f1c6 screen: Remove gcode_response logging 2021-08-04 20:27:59 -04:00
Jordan afbf96e30e files: Update metadata for file that was overwritten 2021-08-03 23:21:21 -04:00
Jordan 53889bba56 config: Allow switching of languages from GUI 2021-07-30 16:20:45 -04:00
Jordan 649ef38385 config: Allow specification of language in the config file 2021-07-30 12:42:02 -04:00
Peter Buchegger 4b1aa52e89 docs: fixing xinput argument (#208) 2021-07-21 07:38:31 -04:00
Jordan 10e1fa867b bed_level: Fix #206 Format change for SCREWS_TILT_ADJUST output 2021-07-18 16:41:56 -04:00
Alfredo Monclus be5ad88029 add temp to preheat (#196) 2021-07-14 20:01:29 -10:00
Alfredo Monclus 2018b8b852 Center dialogs (#201)
* Center dialogs

* Center and clean print dialog
2021-07-14 20:00:50 -10:00
Alfredo Monclus b2ce22caa9 Reorganize zcalibrate (#202) 2021-07-14 19:59:55 -10:00
Henky Prayoga 98a8d68c67 Fixed bug KlipperScreen ignoring moonraker_api_key configuration. (#204)
* Fixed bug KlipperScreen ignoring moonraker_api_key configuration.

Signed-off-by: Henky Prayoga <henky.prayoga@callysta-engineering.com>

* Fixed bug KlipperScreen ignoring moonraker_api_key configuration.

Signed-off-by: Henky Prayoga <henky.prayoga@callysta-engineering.com>

* Fixed bug KlipperScreen ignoring moonraker_api_key configuration.

Signed-off-by: Henky Prayoga <henky.prayoga@callysta-engineering.com>
2021-07-14 19:58:45 -10:00
Jordan f68f9c642b screen: Fix popup error message 2021-06-30 19:47:03 -04:00
Jordan 912ecea3e3 docs: Add multiple fb devices to troubleshooting 2021-06-27 19:04:13 -04:00
Jordan f681676e8d docs: Update to include troubleshooting and contact page. 2021-06-27 10:29:20 -04:00
Jordan 145d9c1d84 install-script: Change to account for fixing broken packages in apt 2021-06-27 10:27:04 -04:00
Jordan 4d3918a68a scripts: remove old files 2021-06-27 10:25:38 -04:00
Jordan 30cbaa7e23 gtk: Make keyboard height be dynamic based off resolution 2021-06-26 12:24:05 -04:00
Jordan Ruthe 57a952c4e0 Add colorized console image 2021-06-26 12:24:05 -04:00
Jordan Ruthe 85816932d3 Add console to the print menu in default configuration 2021-06-26 12:24:05 -04:00
Jordan a8038c39c0 console: Change colors for errors/warnings 2021-06-26 12:24:05 -04:00
Jordan 207c026cb5 Add console panel 2021-06-26 12:24:05 -04:00
dependabot[bot] 8d2b6230ad build(deps): bump humanize from 3.7.1 to 3.9.0 (#188)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.7.1 to 3.9.0.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.7.1...3.9.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-26 12:23:10 -04:00
Alfredo Monclus bf277dd3d2 splash_screen: Increase font size (#192) 2021-06-26 12:22:57 -04:00
Alfredo Monclus bcad2a9a78 job_status: more space for info (#193) 2021-06-26 12:21:56 -04:00
Alfredo Monclus b4064c6b9e job_status: fix cancel print label position (#194) 2021-06-26 12:21:40 -04:00
Alfredo Monclus 1c45b87f09 move: Add 50mm to move panel (#195) 2021-06-26 12:21:20 -04:00
Jordan ede73619ea docs: Touchscreen rotation configuration 2021-06-20 20:27:07 -04:00
Jordan ca2855b80b install script: Fix #142 2021-06-18 12:09:42 -04:00
Jordan 469376cf34 preheat: Change print to log statements 2021-06-16 21:13:53 -04:00
Jordan 000f30327b files: Handle case for create_dir notifications 2021-06-12 15:26:01 -04:00
Jordan d3ae02e8d8 system: Add restart option to services that moonraker supports 2021-06-12 06:30:00 -04:00
Jordan dfe9883923 system: Change information icon 2021-06-12 06:30:00 -04:00
Jordan 867ded34d9 Add update manager capability and revamp system panel to show all moonraker update clients 2021-06-12 06:30:00 -04:00
dependabot[bot] 23832e8ad6 build(deps): bump websocket-client from 1.0.1 to 1.1.0 (#184)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.0.1 to 1.1.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.0.1...v1.1.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-12 06:29:37 -04:00
dependabot[bot] 6bb81f1790 build(deps): bump humanize from 3.5.0 to 3.7.1 (#180)
Bumps [humanize](https://github.com/jmoiron/humanize) from 3.5.0 to 3.7.1.
- [Release notes](https://github.com/jmoiron/humanize/releases)
- [Commits](https://github.com/jmoiron/humanize/compare/3.5.0...3.7.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-12 06:29:22 -04:00
dependabot[bot] dab8206ada build(deps): bump netifaces from 0.10.9 to 0.11.0 (#174)
Bumps [netifaces](https://github.com/al45tair/netifaces) from 0.10.9 to 0.11.0.
- [Release notes](https://github.com/al45tair/netifaces/releases)
- [Changelog](https://github.com/al45tair/netifaces/blob/master/CHANGELOG)
- [Commits](https://github.com/al45tair/netifaces/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-12 06:29:14 -04:00
Alfredo Monclus e86dd8b935 Graphical Fixes (#181)
* Fix fan panel going out of screen

* Fix Numpad and clean css

* Fan panel margin tweak needed for bigger fonts
2021-06-11 07:16:14 -04:00
Alfredo Monclus 816d254582 Solarize warning icon (#179) 2021-06-06 23:07:54 -04:00
Jordan 58e3e17310 gtk: Gracefully fail if no image is found for buttons. Addresses #173 2021-06-06 21:43:06 -04:00
Jordan e49c19e2d9 websocket: Fixes due to issues with recent websocket-client update 2021-06-01 07:56:09 -04:00
dependabot[bot] bdbdd221ee build(deps): bump websocket-client from 1.0.0 to 1.0.1 (#165)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.0.0 to 1.0.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/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-27 12:54:35 -04:00
Alfredo Monclus 81f6bbe42d restart KS after theme change (#166) 2021-05-27 12:54:02 -04:00
Wang a537ad788a Update Chinese language pack (#168) 2021-05-27 12:46:28 -04:00
Alfredo Monclus 6eedbdca88 Update Spanish (#164) 2021-05-23 22:48:47 -04:00
Jordan Ruthe 84f725697c changelog: Update for config change 2021-05-20 20:29:14 -04:00
Jordan Ruthe eb80148692 config: Don't merge default options if a user option is defined. 2021-05-20 20:27:20 -04:00
Jordan Ruthe 360e8b4055 base_panel: Fix issue with nonetype error 2021-05-20 20:26:52 -04:00
Jordan Ruthe dcac0012c9 job_status: Log filesize. Add cancelling to ignore states for new print 2021-05-20 18:50:49 -04:00
Jordan Ruthe a06ae084db job_status: Cancel/Resume button corrections 2021-05-20 00:30:38 -04:00
Jordan Ruthe db166f97e4 screen: Deleted instantied panels so that Klipper config changes will be reflected 2021-05-20 00:16:01 -04:00
Jordan 00ec1a668e changelog: Change to only have breaking changes 2021-05-19 20:54:33 -04:00
dependabot[bot] 81ee57da1f build(deps): bump jinja2 from 2.11.3 to 3.0.1 (#160)
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.3 to 3.0.1.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.3...3.0.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 20:48:37 -04:00
Jordan 6e1f653762 wifi: Remove repetitive logging statements 2021-05-19 20:44:48 -04:00
Jordan 85ee8c4112 base_panel: Add extruder/heater bed temperatures to the title bar 2021-05-19 20:44:48 -04:00
Jordan a0de521631 base_panel: Include time 2021-05-19 20:44:48 -04:00
Jordan 73b54f7aba base_panel: Include back/home button 2021-05-19 20:44:48 -04:00
Jordan a0d3bd6a0c base_panel: Initial commit 2021-05-19 20:44:48 -04:00
jordanruthe bb62064616 Update FUNDING.yml 2021-05-19 20:41:36 -04:00
dependabot[bot] 32785c901f build(deps): bump websocket-client from 0.59.0 to 1.0.0 (#159)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 0.59.0 to 1.0.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/v0.59.0...v1.0.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 20:40:07 -04:00
dependabot[bot] be706fd16f build(deps): bump matplotlib from 3.4.1 to 3.4.2 (#149)
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](https://github.com/matplotlib/matplotlib/compare/v3.4.1...v3.4.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-19 20:39:59 -04:00
Alfredo Monclus 13617da10b Add delete and some tweaks to colorized (#156) 2021-05-15 17:16:11 -04:00
Jordan a1bd702a92 Fix issue with stale confiugration and temperature panel unassigned var #155 2021-05-13 23:01:06 -04:00
jordanruthe 7e3b919c62 Wifi manager (#148)
Updates to include ability to change wifi networks.
2021-05-13 20:53:58 -04:00
550 changed files with 44028 additions and 10468 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: klipperscreen
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
ko_fi: klipperscreen
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
+54
View File
@@ -0,0 +1,54 @@
name: Bug report
about: Create a report to help us improve
title: "[BUG] <title>"
labels: 'bug'
assignees: ''
body:
- type: markdown
attributes:
value: >-
## Thank you for choosing KlipperScreen
#### If you need general support, please visit us on [Discord](https://discord.gg/klipper)
#### The LOG file is REQUIRED, if you need help to find the log file:
#### Read the [Documentation](https://klipperscreen.readthedocs.io/en/latest/Troubleshooting/)
#### This is an Open Source project developed voluntarily, there are no Warranties, or ETA.
#### [License](https://github.com/KlipperScreen/KlipperScreen/blob/master/LICENSE)
- type: textarea
id: what-happened
attributes:
label: 'What happened?'
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: 'What did you expect to happen instead?'
description: A clear and concise description of what you expected to happen instead.
validations:
required: true
- type: textarea
id: repro-steps
attributes:
label: 'How to reproduce this bug?'
description: A clear and concise description with precise steps to reproduce this bug.
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: 'Additional information:'
description: Any additional info, screenshots or recordings which help to describe the issue.
- type: textarea
id: logs
attributes:
label: Log output
description: Please copy and paste or attach the klipperscreen.log or xorg.log or the tail of journalctl.
render: shell
validations:
required: true
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Klipper Discord Server
url: https://discord.gg/klipper
about: If you have questions or need general support.
@@ -0,0 +1,44 @@
name: Feature request
about: Suggest an idea for this project
title: "[FR] <title>"
labels: ''
assignees: ''
body:
- type: markdown
attributes:
value: >-
## Thank you for choosing KlipperScreen
#### This form is for feature request of KlipperScreen
#### This is an Open Source project developed voluntarily, there are no Warranties, or ETA.
#### [LICENSE](https://github.com/KlipperScreen/KlipperScreen/blob/master/LICENSE)
- type: textarea
id: solution
attributes:
label: 'Requested feature'
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: 'Is your feature request related to a problem?'
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: false
- type: textarea
id: alternative
attributes:
label: 'Describe alternatives you've considered'
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: info
attributes:
label: 'Additional information'
description: Add any other context drawings or screenshots about the feature.
validations:
required: false
+17
View File
@@ -0,0 +1,17 @@
name: test-code
on: [push, pull_request]
jobs:
lint-python-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: "screen.py ks_includes panels"
use-pylint: false
use-pycodestyle: true
use-flake8: false
use-black: false
use-mypy: false
use-isort: false
extra-pycodestyle-options: "--ignore=E402,W503,W504 --max-line-length=120 --max-doc-length=120"
+8
View File
@@ -0,0 +1,8 @@
.idea/
KlipperScreen.conf
__pycache__/
*.py[cod]
*$py.class
dist/
build/
venv/
+25 -6
View File
@@ -1,15 +1,34 @@
# KlipperScreen
KlipperScreen is touchscreen GUI for Klipper based 3D printers. KlipperScreen interfaces with [Klipper](https://github.com/kevinOConnor/klipper) via [Moonraker](https://github.com/arksine/moonraker).
KlipperScreen is a touchscreen GUI that interfaces with [Klipper](https://github.com/kevinOConnor/klipper) via [Moonraker](https://github.com/arksine/moonraker). It can switch between multiple printers to access them from a single location, and it doesn't even need to run on the same host, you can install it on another device and configure the IP address to access the printer.
Multiple printers update is here! Please check the configuration information for specifying several printers.
### Documentation
### Documentation [![Documentation Status](https://readthedocs.org/projects/klipperscreen/badge/?version=latest)](https://klipperscreen.readthedocs.io/en/latest/?badge=latest)
[Click here to access the documentation.](https://klipperscreen.readthedocs.io/en/latest/)
Screenshots are included in the documentation.
### Inspiration
KlipperScreen was inspired by [OctoScreen](https://github.com/Z-Bolt/OctoScreen/) and the need for a touchscreen GUI that
will natively work with [Klipper](https://github.com/kevinOConnor/klipper) and [Moonraker](https://github.com/arksine/moonraker).
[![Main Menu](docs/img/panels/main_panel.png)](https://klipperscreen.readthedocs.io/en/latest/Panels/)
[More Screenshots](https://klipperscreen.readthedocs.io/en/latest/Panels/)
### About the project
KlipperScreen has been created and maintained by Jordan Ruthe from 2020 to 2021
|Donate to Jordan|
|-|
|[Patreon](https://www.patreon.com/klipperscreen)|
|[Ko-fi](https://ko-fi.com/klipperscreen)|
The current maintainer is Alfredo Monclus (alfrix) from 2021 onwards
|Dontate to Alfrix|
|-|
|[Ko-fi](https://ko-fi.com/alfrix)|
thanks to all the people who helped along the way.
[Contributors](https://github.com/KlipperScreen/KlipperScreen/graphs/contributors)
+1
View File
@@ -0,0 +1 @@
screen.py
+103
View File
@@ -0,0 +1,103 @@
# Android
This article describes how to use KlipperScreen from an android device
!!! important
The experience may not be equal to run KlipperScreen natively,
depending on the device there maybe performance degradation or other issues
1. [First installl KlipperScreen on the Pi](Installation.md)
2. Install [XServer-XSDL](https://play.google.com/store/apps/details?id=x.org.server) on the android device
3. Choose [USB(ADB)](#adb) or [WIFI](#wifi)
### ADB
!!! warning
Leaving the phone always connected it's not recommended, remove the battery to avoid issues.
* Install ADB on the Pi
```bash
sudo apt-get install android-tools-adb
```
* Put your Android phone/tablet in Debug mode.
Usually it involves enabling developer mode and "USB debugging" but this varies on different vendors and versions of the device
search "how to enable android debugging on device-model-and-brand"
* Copy the launcher script
```bash
cd ~/KlipperScreen/scripts
cp sample-android-adb.sh launch_KlipperScreen.sh
chmod +x launch_KlipperScreen.sh
```
* Go to [Startup](#startup)
### WIFI
* Create a launcher script
```bash
cd ~/KlipperScreen/scripts
touch launch_KlipperScreen.sh
chmod +x launch_KlipperScreen.sh
nano launch_KlipperScreen.sh
```
* Paste this into the script (replace the example IP)
```bash
DISPLAY=192.168.150.122:0 $KS_XCLIENT
```
!!! important
It's recommended to use a static address, because if the address changes your connection will stop working.
* Go to [Startup](#startup)
## Startup
Start Xserver-XSDL On the android device
On the splash-screen of the app go to:
```
“CHANGE DEVICE CONFIGURATION”
└──Mouse Emulation Modde
└──Desktop, No Emulation
```
if you missed it, restart the app.
on the Pi
```bash
sudo service KlipperScreen stop
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
KlipperScreen says error option "service" is not supported anymore.
Stop the other service and Remove it, for example if the service is `KlippyScreenAndroid`:
```bash
sudo service KlippyScreenAndroid stop
sudo rm /etc/systemd/system/KlippyScreenAndroid.service
```
Follow this guide on how to setup the new launcher script with [USB(ADB)](#adb) or [WIFI](#wifi) and restart KS.
## Help
[The Discourse thread has old instructions but you may get some help if needed](https://klipper.discourse.group/t/how-to-klipperscreen-on-android-smart-phones/1196)
[#klipper-screen channel on Discord](https://discord.klipper3d.org/)
+27
View File
@@ -0,0 +1,27 @@
# Changelog
Breaking changes will be listed here.
#### [2022 03 21](https://github.com/jordanruthe/KlipperScreen/commit/bc34b3c8d6761c27a0b0c62fc4dfa11442b417f6)
* Default configuration is now merged again.
Fixing [2021 05 20](https://github.com/jordanruthe/KlipperScreen/commit/eb801486928bf02709033dcbc5f0a45ca43b23c1)
#### [2022 03 10](https://github.com/jordanruthe/KlipperScreen/commit/490dc929bd11e3c4200b999ce7204d84fa0bc184)
* The "Power On Printer" button now requires power_devices under the printer section in KlipperScreen.conf
the power_devices allowed are those defined in the config of moonraker of the printer
The "Power" panel will be in the Menu if there are power devices found
#### [2022 03 01](https://github.com/jordanruthe/KlipperScreen/commit/49ab84e8d51535d3469d97fdee53099cca6abc39)
* The "Power On Printer" button now requires that the printer name in KlipperScreen.conf
and the power device in moonraker.conf to have the same name.
The "Power" panel will be in the Menu if there are power devices found
#### [2022 01 11](https://github.com/jordanruthe/KlipperScreen/commit/8a8c6c064cc6d097b1b34a5c42b4001367e545a6)
* The Preheat panel has been deprecated in favor of an all in one Temperature panel
Remove preheat panel from your Klipperscreen.conf or replace the occurrences of preheat with temperature
#### [2021 05 20](https://github.com/jordanruthe/KlipperScreen/commit/eb801486928bf02709033dcbc5f0a45ca43b23c1)
* Default configuration is not merged if a user configuration is set for a specific option
For instance, if `menu __main` is user defined, the main menu will not have any defaults.
+150 -41
View File
@@ -1,73 +1,135 @@
# Configuration
KlipperScreen has some configuration options which are outlined below. KlipperScreen will search for a configuration
file in the following order:
_${HOME}/KlipperScreen.conf_
_${KlipperScreen_Directory}/KlipperScreen.conf_
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 `~/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.
!!! failure "Critical"
Each configuration option should be on a newline, as they are presented here.
The line endings should be of UNIX style (LF).
If one of those files are found, it will be used over the default configuration. The default configuration will be
merged with the custom configuration, so if you do not define any menus the default menus will be used.The default
config is included here: [ks_includes/KlipperScreen.conf](/ks_includes/KlipperScreen.conf)
## Include files
```
```py
[include conf.d/*.conf]
# Include another configuration file. Wildcards (*) will expand to match anything.
```
## Main Options
```
The options listed here are not changeable from within the ui.
```py
[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
# 0 means disabled
job_complete_timeout: 0
# Time (seconds) before the Job Status page reverts to main menu after a successful job
job_complete_timeout: 30
# Time (seconds) before the Job Status page reverts to main menu after a successful job.
# If this option is 0, the user must click on a button to go back to the main menu.
# Time in seconds before the Job Status closes itself if an error is encountered
job_error_timeout: 0
# Allows the cursor to be displayed on the screen
show_cursor: False
#
# The following main options are deprecated and will be removed in the near future
#
# If multiple printers are defined, this can be set the name of the one to show at startup.
default_printer: Ender 3 Pro
# Define the moonraker host/port if different from 127.0.0.1 and 7125
moonraker_host: 127.0.0.1
moonraker_port: 7125
# Moonraker API key if this is not connecting from a trusted client IP
moonraker_api_key: False
# To define a full set of custom menues (instead of merging user entries with default entries)
# set this to False. See Menu section below.
use_default_menu: True
# Define one or more moonraker power devices that turn on/off with the screensaver (CSV list)
screen_on_devices: example1, example2
screen_off_devices: example1, example2
```
## Printer Options
Multiple printers can be defined, currently only the first one will be used until an update in the near future.
```
Multiple printers can be defined
```py
# Define printer and name. Name is anything after the first printer word
[printer Ender 3 Pro]
# Define the moonraker host/port if different from 127.0.0.1 and 7125
moonraker_host: 127.0.0.1
# ports 443 and 7130 will use https/wss
moonraker_port: 7125
# Moonraker API key if this is not connecting from a trusted client IP
moonraker_api_key: False
# Define the z_babystep intervals in a CSV list. Currently only 2 are supported
z_babystep_values: 0.01, 0.05
```
# Override the movement speed and set a specific for this printer.
# These setting overrides the settings configured in the UI. If specified,
# the values configured in the UI will not be used.
move_speed_xy: 500
move_speed_z: 300
# Define one or more moonraker power devices that turn on this printer (CSV list)
# Default is the printer name
power_devices: example1, example2
# Define what items should be shown in titlebar besides the extruder and bed
# the name must be the same as defined in the klipper config
# valid options are temperature_sensors or temperature_fans, or heater_generic
titlebar_items: chamber, MCU, Pi
# The style of the user defined items in the titlebar
# Can be 'full' indicating that the full name is shown, 'short' for the first letter, or None (default) for no name
titlebar_name_type: None
# Z probe calibrate position
# By default is the middle of the bed
calibrate_x_position: 100
calibrate_y_position: 100
# Bed Screws
# define the screw positons required for odd number of screws in a comma separated list
# possible values are: bl, br, bm, fl, fr, fm, lm, rm, center
# they correspond to back-left, back-right, back-middle, front-left, front-right, front-middle, left-middle, right-middle
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
# Camera configuration
camera_url: http://127.0.0.1/webcam/?action=stream
```
## Preheat Options
```
!!! question
Adding a custom preheat section will cause the defaults to not load, this is
the intended behaviour.
```py
[preheat my_temp_setting]
# Temperature for the heated bed
bed: 40
# Temperature for the tools
extruder: 195
extruder1: 60
heater_bed: 40
# 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
heater_generic: 60
# optional GCode to run when the option is selected
gcode: MY_HEATSOAK_MACRO
```
There is a special preheat setting named cooldown to do additional things when the _cooldown_ button is pressed
for example:
```py
[preheat cooldown]
gcode: M107
```
## Menu
@@ -76,13 +138,22 @@ different items and there are several panel options available. It is possible to
button press. There are two menus available in KlipperScreen, __main and __print. The __main menu is displayed while the
printer is idle. The __print menu is accessible from the printing status page.
!!! info
A predefined set of menus is already provided and it's recommended to be used
A menu item is configured as follows:
```
```py
[menu __main my_menu_item]
# To build a sub-menu of this menu item, you would next use [menu __main my_menu_item sub_menu_item]
name: Item Name
icon: home
# Optional Parameters
#
# Icon name to be used, it can be any image in the directory:
# KlipperScreen/styles/{theme}/images/ where {theme} is your current theme
# Supported formats svg or png
icon: home
# Icon style, defined as "button.mycolor4" (for example) in the theme css
style: mycolor4
# Panel from the panels listed below
panel: preheat
# Moonraker method to call when the item is selected
@@ -93,21 +164,36 @@ params: {"script":"G28 X"}
# Available variables are listed below.
enable: {{ printer.power_devices.count > 0 }}
```
Available panels are listed here: [docs/panels.md](panels.md)
Available panels are listed here: [docs/panels.md](Panels.md)
Certain variables are available for conditional testing of the enable statement:
```
printer.bltouch # Available if bltouch section defined in config
```py
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.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.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
```
A sample configuration of a main menu would be as follows:
```
```py
[menu __main homing]
name: Homing
icon: home
@@ -128,3 +214,26 @@ icon: home
method: printer.gcode.script
params: {"script":"G28"}
```
## KlipperScreen behaviour towards configuration
KlipperScreen will search for a configuration file in the following order:
1. _~/KlipperScreen.conf_
2. _${KlipperScreen_Directory}/KlipperScreen.conf_
3. _~/printer_data/config/KlipperScreen.conf_
4. _~/klipper_config/KlipperScreen.conf_
If you need a custom location for the configuration file, you can add -c or --configfile to the systemd file and specify
the location of your configuration file.
If one of those files are found, it will be merged with the default configuration.
Default Preheat options will be discarded if a custom preheat is found.
If include files are defined then, they will be merged first.
The default config is included here: (do not edit use as reference)
_${KlipperScreen_Directory}/ks_includes/default.conf_
Preferably *do not* copy the entire default.conf file, just configure the settings needed.
If no config file is found, then when a setting is changed in the settings panel, a new configuration file will be created automatically.
+11
View File
@@ -0,0 +1,11 @@
# Contact
There are several ways to contact people who can assist with issues. Discord is going to be the quickest response as
there will be more people in the chat who can help.
## GitHub Issues
You may submit a GitHub issue request for any problems you are having.
## Klipper Community Discord
[Look for the channel `#klipper-screen`](https://discord.klipper3d.org/)
+183 -19
View File
@@ -1,26 +1,190 @@
# Hardware
KlipperScreen should run on any touchscreen that you can connect to a computer. The required video driver may
be slightly different depending on what model you get. I am developing on a 1024x600 resolution screen. Due to this,
other resolutions may not be scaled properly at this moment. UI scaling is a future development item.
There are no recommended screens, but the minimum supported resolution is 480x320.
#### Configure Hardware
Add the following to _/boot/config.txt_. You can alter the hdmi_cvt to your screen specifications. This example is setup
for a resolution of 1024x600 and a refresh rate of 60hz.
```
hdmi_cvt=1024 600 60 6 0 0 0
hdmi_group=2
hdmi_mode=87
hdmi_drive=2
```
* Development has been using 1024x600 for a screen resolution. Other resolutions may have issues currently
After changing _/boot/config.txt_ you must reboot your raspberry pi. Please also ensure you followed setting up your screen via the screen instructions. This will likely have a xorg.conf.d file for input from the touchscreen that you need to create.
In general, if the device can show a GNU/Linux desktop, then KlipperScreen should work too.
#### Hardware known to work
[Click here](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35) to go to a post on the Klipper discourse server for known hardware or see the below list.
* [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/)
* [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" RPi Display](http://www.lcdwiki.com/3.5inch_RPi_Display)
* [5" HDMI Display-B](http://lcdwiki.com/5inch_HDMI_Display-B)
* [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)
* [DFrobot DFR0550](https://wiki.dfrobot.com/5%27%27TFT-Display_with_Touchscreen_V1.0_SKU_DFR0550)
* [Android phone](Android.md)
[BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part)
[Raspberry PI 7" Touchscreen](https://www.raspberrypi.org/products/raspberry-pi-touch-display/)
* [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35)
### 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.
## Screen rotation
Configure the server to start in the desired orientation, there are many ways to achieve this,
here are some examples:
!!! warning
Rotation is handled by the OS and not by KlipperScreen,
if you can't rotate your screen it's usually an issue with the OS configuration
???+ example
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
```
??? example "Using Waveshare screen that is installed with LCD-show"
```bash
cd LCD-show/
sudo ./LCD43-show 270 lite
```
??? example "Using a screen installed with goodtft-LCD-show"
```bash
cd LCD-show/
sudo ./rotate.sh 90
```
??? example "Raspberry Pi"
To set screen orientation when in console mode, you will need to edit the kernel command line to pass the required orientation to the system.
```bash
sudo nano /boot/cmdline.txt
```
To rotate by 90 degrees clockwise, add the following to the cmdline, making sure everything is on the same line, do not add any carriage returns. Possible rotation values are 0, 90, 180 and 270.
```bash
video=DSI-1:800x480@60,rotate=90
```
Other values can be "HDMI-0" "HDMI-1, "DPI-0" etc
[Read the official docs for more info](https://www.raspberrypi.com/documentation/computers/config_txt.html)
[Raspberry Display docs](https://www.raspberrypi.com/documentation/accessories/display.html)
??? example "Raspberry Pi legacy mode (works with vc4-fkms-v3d)"
add to config.txt
```bash
display_lcd_rotate=2
```
Reboot
!!! warning
Pi4 doesn't support 90 and 270 degrees with this method, [see the official docs](https://www.raspberrypi.com/documentation/computers/config_txt.html#display_hdmi_rotate)
| Value | result |
| ---------- | ---------- |
| 0 | no rotation |
| 1 | rotate 90 degrees clockwise |
| 2 | rotate 180 degrees clockwise |
| 3 | rotate 270 degrees clockwise |
| 0x10000h | horizontal flip |
| 0x20000 | vertical flip |
[Read the official docs for more info](https://www.raspberrypi.com/documentation/computers/config_txt.html)
## Touchscreen touch rotation
If your touchscreen isn't registering touches properly after the screen has been rotated, you will need to apply a
transformation matrix.
First you will need your device name, on a terminal run:
```sh
DISPLAY=:0 xinput
```
Output:
```sh
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ADS7846 Touchscreen id=6 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
```
In this case the device is the ADS7846 Touchscreen, yours may be different
You can test a change by running:
```sh
DISPLAY=:0 xinput set-prop "<device name>" 'Coordinate Transformation Matrix' <matrix>
```
Where the matrix can be one of the following options:
* 0°: `1 0 0 0 1 0 0 0 1`
* 90° Clockwise: `0 -1 1 1 0 0 0 0 1`
* 90° Counter-Clockwise: `0 1 0 -1 0 1 0 0 1`
* 180° (Inverts X and Y): `-1 0 1 0 -1 1 0 0 1`
* invert Y: `-1 0 1 1 1 0 0 0 1`
* invert X: `-1 0 1 0 1 0 0 0 1`
For example:
```sh
DISPLAY=:0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
```
To make this permanent, modify the file `/etc/udev/rules.d/51-touchscreen.rules` and add following line:
```sh
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:
* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation)
* [Libinput docs](https://wayland.freedesktop.org/libinput/doc/1.9.0/absolute_axes.html)
+54 -48
View File
@@ -1,40 +1,40 @@
# Installation
#### Setup Raspberry Pi
This install process is meant for Raspbian non-desktop version. If you have installed it on the GUI version, use
`sudo raspi-config` to set boot to console by choosing the following options in order:
* 1 System Options
* S5 Boot / Auto Login
* B1 Console
## First steps
#### Klipper and Moonraker Installation
Install the screen, following the instructions provided by the manufacturer, Some screens don't neeed extra software but some need to be installed with a script.
It's strongly recommended to test it and ensure your hardware is working with Raspbian, Ubuntu or any distro you like.
Once you have established that the screen is working, then proceed installing KlipperScreen.
Follow the instructions to install klipper and moonraker.
klipper: https://github.com/KevinOConnor/klipper/
moonraker: https://github.com/Arksine/moonraker
## Setup
This install process is meant for a non-desktop version of the OS for example Raspbian Lite, but it should work on other versions.
Ensure that 127.0.0.1 is a trusted client for moonraker, such as in this example:
```
[authorization]
trusted_clients:
127.0.0.1
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
1System Options
└──S5 Boot / Auto Login
└──B1 Console
```
If you wish to use the update manager feature of moonraker for KlipperScreen, add the following block into the moonraker
configuration:
```
[update_manager client KlipperScreen]
type: git_repo
path: /home/pi/KlipperScreen
origin: https://github.com/jordanruthe/KlipperScreen.git
env: /home/pi/.KlipperScreen-env/bin/python
requirements: scripts/KlipperScreen-requirements.txt
install_script: scripts/KlipperScreen-install.sh
```
## Auto install
#### KlipperScreen Installation
To clone and install execute the following commands:
```
[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
![Screenshot](img/install/KIAUH.png)
You can visit [KIAUH on GitHub](https://github.com/th33xitus/kiauh) to learn more and view its documentation.
## Manual Install
First install [Klipper](https://www.klipper3d.org/Installation.html) and [Moonraker](https://moonraker.readthedocs.io/en/latest/installation/).
### KlipperScreen Installation
Execute the following commands:
```sh
cd ~/
git clone https://github.com/jordanruthe/KlipperScreen.git
cd ~/KlipperScreen
@@ -42,30 +42,36 @@ cd ~/KlipperScreen
```
This script will install packages that are listed under manual install, create a python virtual environment at
${HOME}/.KlipperScreen-env and install a systemd service file.
KlipperScreen will create a log file output at `/tmp/KlipperScreen.log`. If you are having issues and KlipperScreen has
not gotten to the point where the log file has been created. Run `journalctl -xe -u KlipperScreen` to view the ouput and
see any issues that may be happening.
As an option to do development or interact with KlipperScreen from your computer, you may install tigervnc-scraping-server and VNC to your pi instance. Follow tigervnc server setup procedures for details on how to do that.
`~/.KlipperScreen-env` and install a systemd service file.
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.
#### Touchscreen Calibration
Most people don't need to calibrate, but if you do need to calibrate your touchscreen, follow the below steps.
At this point KlipperScreen should be working, if it doesn't start then go to the [troubleshooting page](Troubleshooting.md)
Run this command:
```
DISPLAY=:0 xinput_calibrator --list
```
It will output something such as:
```
Device "wch.cn USB2IIC_CTP_CONTROL" id=6
```
## Moonraker configuration
Find the ID of your display and put it in the following command:
In moonraker.conf ensure that 127.0.0.1 is a trusted client:
```py
[authorization]
trusted_clients:
127.0.0.1
```
DISPLAY=:0 xinput_calibrator -v --device <id from last command>
!!! warning
`force_logins: true` requires the moonraker api key in [KlipperScreen.conf](Configuration.md)
If you wish to use the update manager feature of moonraker for KlipperScreen, add the following block to the moonraker.conf:
```py
[update_manager KlipperScreen]
type: git_repo
path: ~/KlipperScreen
origin: https://github.com/KlipperScreen/KlipperScreen.git
env: ~/.KlipperScreen-env/bin/python
requirements: scripts/KlipperScreen-requirements.txt
install_script: scripts/KlipperScreen-install.sh
managed_services: KlipperScreen
```
!!! note
If you see warnings in other UIs ignore them until KlipperScreen finishes installing.
+121
View File
@@ -0,0 +1,121 @@
# Panels
### Main Menu
![Main Menu](img/panels/main_panel.png)
### [Job Status](Panels/Job_status.md)
```py
panel: job_status
```
[![Job Status](img/panels/job_status.png)](Panels/Job_status.md)
### [Bed Level](Panels/Screws.md)
```py
panel: bed_level
```
[![Bed Level](img/panels/bed_level.png)](Panels/Screws.md)
### Bed Mesh
```py
panel: bed_mesh
```
![Bed Mesh](img/panels/bed_mesh.png)
### Console
```py
panel: console
```
![Console](img/panels/console.png)
### Extrude
```py
panel: extrude theme:material-dark
```
![Extrude](img/panels/extrude.png)
### Fan
```py
panel: fan
```
![Fan](img/panels/fan.png)
### Fine Tune
```py
panel: fine_tune
```
![Fine Tune Panel](img/panels/fine_tune.png)
### Gcode Macros
```py
panel: gcode_macros
```
![Gcode Macros Panel](img/panels/gcode_macros.png)
### Input Shapers
```py
panel: input_shaper
```
![Limits](img/panels/input_shaper.png)
### Limits
```py
panel: limits
```
![Limits](img/panels/limits.png)
### Menu
![Menu Panel](img/panels/menu.png)
### Move
```py
panel: move
```
![Move Panel](img/panels/move.png)
### Network
```py
panel: network
```
![Network Panel](img/panels/network.png)
### Power
```py
panel: power
```
![Power](img/panels/power.png)
### Print
```py
panel: print
```
![Print Panel](img/panels/print.png)
### Retraction
```py
panel: retraction
```
![Limits](img/panels/retraction.png)
### Settings
```py
panel: settings
```
![Settings](img/panels/settings.png)
### System
```py
panel: system
```
![System Panel](img/panels/system.png)
### [Temperature](Panels/Temperature.md)
```py
panel: temperature
```
[![Temperature](img/panels/temperature.png)](Panels/Temperature.md)
### [Z Calibrate](Panels/Zcalibrate.md)
```py
panel: zcalibrate
```
[![Z Calibrate](img/panels/zcalibrate.png)](Panels/Zcalibrate.md)
+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)
+45
View File
@@ -0,0 +1,45 @@
# 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 9 screws. if there is a center screw define the positions to avoid issues.
See "screw_positions" in the [printer options](https://klipperscreen.readthedocs.io/en/latest/Configuration/#printer-options)
## 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)
+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
+65
View File
@@ -0,0 +1,65 @@
# Quicktips
quick tips, without much explanation
## Hide macros, outputs or fans
As you probably already noticed, you can show and hide the gcode macros in the interface settings,
but you can also hide gcode macros by prefixing the name with an underscore.
```py
[gcode_macro MY_AWESOME_GCODE]
gcode:
_MY_HELPER_CODE
[gcode_macro _MY_HELPER_CODE]
gcode:
M300
```
MY_AWESOME_GCODE appears in your interface settings, _MY_HELPER_CODE not.
Another example:
Lets hide a temperature_fan:
```py
[temperature_fan fan1]
[temperature_fan _fan2]
```
fan1 will show in the interface, but _fan2 will be hidden.
## Thumbnails
Moved to [Thumbnails](Thumbnails.md)
## Layer Progress
Accurate layer progress as a message below the status:
PrusaSlicer/SuperSlicer > Printer Settings > Custom Gcode > After layer change Gcode
`M117 Layer {layer_num+1}/[total_layer_count] : {filament_settings_id[0]}`
![Layer_progress](img/quicktips/PS_SS_Layer_progress.png)
Accurate layer progress in the secondary screen of the printing panel:
The layer number in the secondary screen of the printing panelis calculated according to object height and provided layer height.
It will be innacurate when using variable layer height, but can be fixed by providing klipper with the correct data.
![speed_screenshot](img/panels/job_status_speed.png)
PrusaSlicer/SuperSlicer:
Printer Settings > Custom Gcode > Start Gcode
`SET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]`
Printer Settings > Custom Gcode > After layer change Gcode
`SET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}`
## Supported Macros
[Macros](macros.md)
+33
View File
@@ -0,0 +1,33 @@
# Theming
To create a custom theme, create a folder in: _${KlipperScreen_Directory}/styles/_
The folder name will be the theme name, in that folder create another folder named `images` this is where the icons should be placed. The icons must be SVG files and they need to have specific names that are defined in the code, use the default theme as a reference for the names or check the code.
To edit colors and styles, create a css file named `style.css` you can use the contents of another theme as a reference.
### Example 1
```sh
cd ~/KlipperScreen/styles
mkdir -p mytheme/images
cd mytheme
cp ../z-bolt/images/* images/
echo "window { background-color: red;}" > style.css
sudo service KlipperScreen restart
```
At this point `mytheme` should be on the list of themes, and when you select it the background should be red.
### Example 2
Creating a custom background from Mainsail sidebar and this css using Z-bolt icons
```css
window { background-image: url("/home/pi/mainsail/img/background.svg");}
button {background-color: rgba(0,0,0,0); border-radius:2em;}
```
![Custom theme example with background](img/theming/theme_example.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
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
#### 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
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)
+26 -13
View File
@@ -1,19 +1,32 @@
## Create Translations
# Translations
You can use a editor such as [poedit](https://poedit.net/) to assist in translations. This guide will assume that you
will be using poedit.
## Updating an existing translation:
This guide will refer to `language designation`. This can be found from running `echo $LANG` on your pi, as long as you
have set your pi up for your preferred language.
You can use an editor such as [poedit](https://poedit.net/) to assist in translations.
#### New Language
* Edit `ks_includes/locals/{ISO 639 lang code}/LC_MESSAGES/KlipperScreen.po`
To test your translation:
In poedit go to `File -> Compile to MO`. Save it on the same folder, and restart KlipperScreen
## Adding a new Language:
Example using poedit
* Select `Create a new translation` or `File -> New from POT/PO` and select `ks_includes/locals/KlipperScreen.pot`.
* Enter your language designation.
* Create the translations
* 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`
!!! important
Do not edit the POT file as is automatically generated and your changes will be lost.
* Save the file as `ks_includes/locales/{ISO 639 lang code}/LC_MESSAGES/KlipperScreen.po`
* Select `File -> Compile to MO`. Save it on the same folder, and restart KlipperScreen
Once you have followed those steps, as long as your pi is set up for your preferred language, KlipperScreen will
automatically use the translations provided in the file. KlipperScreen currently does not detect RTL languages, but
support for RTL is planned in the near future.
!!! note
[Wikipedia ISO 639 Language Codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
Once you have restarted KlipperScreen, select it from the list in the settings.
If you edited and recompiled, you need to restart KlipperScreen to reload the translation.
## Contributing:
[Attach your translation on a GitHub issue or create a PR](Contact.md)
+77
View File
@@ -0,0 +1,77 @@
# First Steps
The first step to troubleshooting any problem is getting the cause of the error.
* Find KlipperScreen.log:
!!! important
This log file should be provided if you ask for support.
Depending on your setup the file could be accessible 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 exist.
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.
## Screen shows console instead of KlipperScreen
If you see this line in the logs (`systemctl status KlipperScreen`):
```sh
xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
```
[Follow this steps](Troubleshooting/VC_ERROR.md)
If you see this line in the logs (`systemctl status KlipperScreen`):
```sh
KlipperScreen-start.sh: (EE) no screens found(EE)
```
[First check the screen](Troubleshooting/Physical_Install.md)
[If it's not any of the above follow this steps](Troubleshooting/Showing_console.md)
## Screen is all white or blank or no signal
If the screen never shows the console even during startup, Then it's typically an improperly installed screen,
You may see this line in the logs (`systemctl status KlipperScreen`):
```sh
KlipperScreen-start.sh: (EE) no screens found(EE)
```
[Follow this steps](Troubleshooting/Physical_Install.md)
## The screen shows colors or 'No signal' when idle
In KliperScreen settings find 'Screen DPMS' and turn it off.
Your screen doesn't seem to support turning off via software, the best you can do is to turn it all black.
## Touch issues
[Follow this steps](Troubleshooting/Touch_issues.md)
## Network panel doesn't list WI-FI networks
[Follow this steps](Troubleshooting/Network.md)
## OctoPrint
KlipperScreen was never intended to be used with OctoPrint, and there is no support for it.
## Other issues
If you found an issue not listed here, or can't make it work, please provide all the log files
a description of your hw, and a description of the issue when asking for support.
+50
View File
@@ -0,0 +1,50 @@
# Wi-Fi networks not listed
Check if network-manager is installed:
```
dpkg -s network-manager
```
if the response is the following:
```
dpkg-query: the package `network-manager' is not installed
```
go to [wpa_supplicant](wpa_supplicant.md)
if the response is the following:
```
Package: network-manager
Status: install ok installed
```
this line may appear in KlipperScreen.log:
`[wifi_nm.py:rescan()] [...] NetworkManager.wifi.scan request failed: not authorized`
in order to fix this polkit needs to be configured or disabled:
here is how to disable polkit for network-manager:
```sh
mkdir -p /etc/NetworkManager/conf.d
sudo nano /etc/NetworkManager/conf.d/any-user.conf
```
in the editor paste this:
```conf
[main]
auth-polkit=false
```
Then restart the service (or reboot):
```sh
systemctl restart NetworkManager.service
systemctl restart KlipperScreen.service
```
+28
View File
@@ -0,0 +1,28 @@
# Physical install issues
If the screen never shows the console even during startup, Then it's typically an improperly installed screen,
!!! important
It is advised follow the manufacturer instructions on how to physically connect the screen and install the proper drivers.
## Cable issues
* Check that the cable is inserted properly:
it shouldn't be loose, and in the case of DSI make sure the contacts face the right way
* If the touchscreen is connected via USB, try another port if available, if you are using a HUB try connecting the touch directly without the HUB.
* If the board has more than one HDMI try the other port
## Driver issues
Some screens need drivers installed the most common cases are:
### Waveshare
* [Waveshare Wiki](https://www.waveshare.com/wiki)
* [repo LCD-show](https://github.com/waveshare/LCD-show)
### Goodtft (generic/clones)
* [Goodtft Wiki](http://www.lcdwiki.com)
* [repo LCD-show](https://github.com/goodtft/LCD-show)
!!! critical
remember to add `lite` when installing. See [LCD-SHOW](Showing_console.md#lcd-show)
+62
View File
@@ -0,0 +1,62 @@
# Screen shows console instead of KlipperScreen
If the screen is connected via HDMI and the board has more than one HDMI try the other port
## LCD-show
when using LCD-show repos to install screens add `lite` at the end to properly install the screen on the lite version of the os.
for example:
```
sudo ./LCD35-show lite
```
## Using wrong framebuffer
This is usually the result of not adding `lite` at the end of the command when installing a screen that requires LCD-show.
Follow [above](LCD-show) first if this is the case.
If you have multiple framebuffers, you may need to fix the X11 configuration,
list the available framebuffers and check the current one:
```sh
ls /dev/fb*
```
If you more than one, try changing it:
the file could be:
- 99-fbturbo.conf
- 99-fbusb.conf
- 99-fbdev.conf
check if one of those or similar exist with:
```sh
ls /usr/share/X11/xorg.conf.d/
```
For example if 99-fbturbo.conf is there then edit it:
```sh
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
```
for example: change `/dev/fb0` to `/dev/fb1`
!!! important
do `ls /dev/fb*` as said before to check if the other fb exists do not change it blindly
Once you have saved that file, restart KlipperScreen.
```sh
sudo service KlipperScreen restart
```
## FBturbo failing
in the system log (`sudo systemctl status KlipperScreen`) this appears:
`xinit[948]: /usr/lib/xorg/Xorg: symbol lookup error: /usr/lib/xorg/modules/drivers/fbturbo_drv.so: undefined symbol: shadowUpdatePackedWeak`
Fix it by removing fbturbo driver
`sudo apt purge xserver-xorg-video-fbturbo`
+101
View File
@@ -0,0 +1,101 @@
# Touchscreen issues
## Touch not working
Some DSI screens have issues where touch doesn't work with Debian Bullseye, or even in Debian Buster after an update, the current fix
(at least until upstream is fixed) consist in changing the driver:
manually edit `/boot/config.txt` and change:
```sh
dtoverlay=vc4-kms-v3d
```
to:
```sh
dtoverlay=vc4-fkms-v3d
```
reboot to apply changes.
if that doesn't fix it, try removing the line or comment it out
```
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2
```
reboot to apply changes
If the screen is connected via USB It maybe a cable issue [See this section](Physical_Install.md#cable-issues)
## Touch rotation and matrix
If the touch works but it's not in the right place, it may need a transformation matrix.
First you will need your device name, on a terminal run:
```sh
DISPLAY=:0 xinput
```
Output:
```sh
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ADS7846 Touchscreen id=6 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
```
In this case the device is the ADS7846 Touchscreen, yours may be different
You can test a change by running:
```sh
DISPLAY=:0 xinput set-prop "<device name>" 'Coordinate Transformation Matrix' <matrix>
```
Where the matrix can be one of the following options:
* 0°: `1 0 0 0 1 0 0 0 1`
* 90° Clockwise: `0 -1 1 1 0 0 0 0 1`
* 90° Counter-Clockwise: `0 1 0 -1 0 1 0 0 1`
* 180° (Inverts X and Y): `-1 0 1 0 -1 1 0 0 1`
* invert Y: `-1 0 1 1 1 0 0 0 1`
* invert X: `-1 0 1 0 1 0 0 0 1`
* expand to twice the size horizontally: `0.5 0 0 0 1 0 0 0 1`
* compress horizontally:
it has been reported that the touch expands with non-hdmi screens because composite out is enabled when hdmi is unplugged.
if this is the case try adding `enable_tvout=0` to `/boot/config.txt` and reboot.
For example:
```sh
DISPLAY=:0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
```
To make this permanent, modify the file `/etc/udev/rules.d/51-touchscreen.rules` and add following line:
```sh
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:
* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation)
* [Libinput docs](https://wayland.freedesktop.org/libinput/doc/1.9.0/absolute_axes.html)
+31
View File
@@ -0,0 +1,31 @@
# Cannot open virtual Console
If you see this line in the logs:
```sh
xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
```
* Run `cat /etc/X11/Xwrapper.config`
This should have the line `allowed_users=anybody` in it
* Run `cat /etc/group | grep tty`
If your username is not listed under that line, you need to add it with the following command:
```sh
usermod -a -G tty pi
```
(if your username is not 'pi' change 'pi' to your username)
Restart KlipperScreen:
```sh
sudo service KlipperScreen restart
```
If it's still failing as a last resort add `needs_root_rights=yes` to `/etc/X11/Xwrapper.config`:
```sh
sudo bash -c "echo needs_root_rights=yes>>/etc/X11/Xwrapper.config"
```
restart KS.
+27
View File
@@ -0,0 +1,27 @@
## wpa_supplicant
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:
```sh
systemctl reboot
```
!!! tip
It's possible to just restart KlipperScreen and networking
+64
View File
@@ -0,0 +1,64 @@
# VNC
This article describes how to use KlipperScreen through a remote connection.
!!! warning
The experience may not be equal to run KlipperScreen natively,
depending on the device and network there maybe performance degradation or other issues
## On the Host device (for example a Raspberry Pi):
1. [First installl KlipperScreen](Installation.md)
2. Install a vnc server package, for example:
```bash
sudo apt install tigervnc-standalone-server
```
3. Create `launch_KlipperScreen.sh`:
```bash
#!/usr/bin/env bash
# Use display 10 to avoid clashing with local X server, if anyy
Xtigervnc -rfbport 5900 -noreset -AlwaysShared -SecurityTypes none :10&
DISPLAY=:10 $KS_XCLIENT&
wait
```
4. Restart KlipperScreen or reboot the system:
```bash
sudo systemctl service KlipperScreen restart
```
5. On KlipperScreen set the following configuration:
Display timeout: off
DPMS: off
## On the remote device:
1. Installa a VNC viewer and configure it to the ip of the host.
???+ example "Example using an iPad"
* Install a VNC viewer for example: `RealVNC Viewer: Remote Desktop`
#### Prevent unwanted rotation of UI:
* Go to `Settings` > `General` > Set `Use side switch to` to `Lock Rotation`
#### Avoid accidentally switching between apps:
* Go to `Restrictions` > Set passcode > Enable restrictions.
* Open
* Triple-click "Home" button
* Guided access pops up
* Press "Start"
* Now iPad is locked to VNC viewer until "Guided access" mode is disabled by triple-clicking "Home" button and entering the restrictions password.
#### On the VNC viewer:
* Press "+" button at the top right
* Enter IP address of your print host.
* Press "Save"
* Select "Interaction", select "Touch panel", go back
* Press "Done"
* Double-click on an icon with IP address you have just added.
* VNC client will complain about unencrypted connection. Disable the warning and say "Connect"
* Use or skip tutorial
* Press the "Pin" icon to hide the panel.
* Enjoy!
-116
View File
@@ -1,116 +0,0 @@
# Changelog
#### 2021 03 07
* Move fine tuning from control menu to job_status screen for easier access.
#### 2021 03 06
* Added ability to include configuration files.
#### 2021 03 05
* Multiple printers are now available in the main branch.
#### 2021 02 22
* Add configurable z_babystep intervals
* Add QUAD_GANTRY_LEVEL and Z_TILT_ADJUST to Homing menu
* Fixed cursor issue on startup
* Fixed font ratio for large, but short screens
* Configurable cursor display
* Re-vamped logging system
#### 2021 02 19
* Added support for heater generic
#### 2021 02 18
* Add directory support to print panel
* Add macros to print menu
#### 2021 02 17
* Fix issues with word wrapping in different languages
#### 2021 02 15
* Added action bar to left side (moves the Back, E-stop, and Home buttons)
* Added wifi manager. Will show current wifi details in network panel. Will allow switching networks in the future.
* Show printer name in main menu (user will need to configure the printer)
#### 2021 01 21
* Configure screen blanking from settings panel
#### 2021 01 21
* !! Important. matchbox-keyboard must be installed. Install script has changed to include this
* Added onscreen keyboard
* Can now add bed mesh profiles
#### 2021 01 20
* Add different time estimation methods to settings panel
* Job status panel will use time estimation method selected from settings panel
* Bugfixes to state tracking
#### 2021 01 10
* Added system reboot/shutdown buttons to systems panel.
#### 2021 01 09
* Better RTL support (most panels now properly support RTL)
* Fixes to install script for latest version of raspbian.
#### 2021 01 08
* Added settings panel. Invert axis and hiding macros can now be configured from within KlipperScreen
#### 2021 01 03
* Updated base language translation files with new phrases
* Allow translations from KlipperScreen.conf for
* Update menus for RTL languages
* Add fr_FR and he_IL language (courtesy of manu7irl)
#### 2020 12 21
* KlipperScreen doesn't have to be a trusted client. It can use the Moonraker API key
* Updates to job_status for multiple extruders. Will now show the current extruder.
* Updates to extrude panel to show multiple extruders and allow switching between them.
#### 2020 12 18
* Add gcode_macros panel
#### 2020 12 16
* Config file can now be specified when running from the command line
* Moonraker host/port can be specified in the configuration file
#### 2020 12 09
* Z value in job status now reflects the gcode Z value. This allows people with ABL to have a better understanding of Z
#### 2020 12 08
* Screen Width/Height are now definable in the configuration file
* Changed job page to allow for more information, display thumbnail of STL
* Job page will now say a job is complete and timeout to the main menu (time changeable from the config)
* Job page will now stay on the job page if there is an error.
* Restart option is available upon a completed/failed job
#### 2020 12 05
* Added ability to invert Z axis in move panel
* Fixed problem with metadata being retrieved constantly
#### 2020 12 04
* Removed fan options from fine tuning
* Add bed mesh panel
* Added more variables to the menu enable option
* Hide extrude panel during printing if the printer is not paused
* Add fan panel to print control menu
* Included screws_tilt_calculate gcode command into the bed level panel. This section must be configured in klipper.
#### 2020 12 02
* Change panel layout: Added Title, Back, Emergency Stop, and Home to panels.
#### 2020 11 28
* Add option for enable in menu for configuration. This can hide certain options
* Add Power panel to control power devices via moonraker
* Add klipper version to system panel
#### 2020 11 18
* Changed configuration file format.
* Moved default configuration file to an include folder.
* Added ability to do a confirm dialog from a menu item when running a script
* Added "Save Config" button to default configuration's Configuration menu.
#### 2020 11 14
* Update print panel to include line wrapping for longer filenames
#### 2020 11 13
* Fine Tuning Panel is now fully functional: Z BabyStepping, Fan Speed, Speed Factor, and Extrusion Factor
Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 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.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

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: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

+28 -22
View File
@@ -1,38 +1,44 @@
# KlipperScreen
KlipperScreen is touchscreen GUI for Klipper based 3D printers. KlipperScreen interfaces with [Klipper](https://github.com/kevinOConnor/klipper) via [Moonraker](https://github.com/arksine/moonraker).
Multiple printers update is here! Please check the configuration information for specifying several printers.
[Changelog](changelog.md)
KlipperScreen is a touchscreen GUI that interfaces with [Klipper](https://github.com/Klipper3d/klipper) via [Moonraker](https://github.com/arksine/moonraker). It can switch between multiple printers to access them from a single location, and it doesn't even need to run on the same host, you can install it on another device and configure the IP address to access the printer.
### Required Hardware
KlipperScreen should run on any touchscreen that you can connect to a computer. The required video driver may be
slightly different depending on what model you get. KlipperScreen will scale to the resolution of the screen being used.
However, three resolutions are tested during development: 1024x600, 800x480, 480x320.
There are no recommended screens, but there are several screens that work with KlipperScreen. They include screens that
use HDMI/USB, Raspberry Pi GPIO, or the Rapsberry Pi DSI (ribbon cable) port.
### Links
[Installation](Installation.md)
[Configuration](Configuration.md)
[Panels](panels.md)
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)
### Sample Panels
Main Menu
![Main Menu](img/main_panel.png)
![Main Menu](img/panels/main_panel.png)
Job Status
![Job Status](img/job_status.png)
![Job Status](img/panels/job_status.png)
[More](Panels.md)
### Inspiration
KlipperScreen was inspired by [OctoScreen](https://github.com/Z-Bolt/OctoScreen/) and the need for a touchscreen GUI that
will natively work with [Klipper](https://github.com/kevinOConnor/klipper) and [Moonraker](https://github.com/arksine/moonraker).
will natively work with [Klipper](https://github.com/klipper3d/klipper) and [Moonraker](https://github.com/arksine/moonraker).
### About the project
KlipperScreen has been created and maintained by Jordan Ruthe from 2020 to 2021
|Donate to Jordan|
|-|
|[Patreon](https://www.patreon.com/klipperscreen)|
|[Ko-fi](https://ko-fi.com/klipperscreen)|
The current maintainer is Alfredo Monclus (alfrix) from 2021 onwards
|Dontate to Alfrix|
|-|
|[Ko-fi](https://ko-fi.com/alfrix)|
thanks to all the people who helped along the way.
[Contributors](https://github.com/KlipperScreen/KlipperScreen/graphs/contributors)
+40
View File
@@ -0,0 +1,40 @@
# Supported Macros
## Extrude Panel
### LOAD_FILAMENT / UNLOAD_FILAMENT
Load and Unload Filament macros are used in the Extrude-Panel if it is available.
The selected speed is transferred to this macro.
The following example macros show how this can be used in the macro.
```jinja
[gcode_macro LOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
SAVE_GCODE_STATE NAME=load_state
M300 # beep
G91
G92 E0
G1 E350 F{max_velocity} # fast-load
G1 E25 F{speed} # purge
M300
M300
RESTORE_GCODE_STATE NAME=load_state
```
```jinja
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %}
SAVE_GCODE_STATE NAME=unload_state
G91
M300 # beep
G92 E0
G1 E25 F{speed} # purge
G1 E-420 F{max_velocity} # fast-unload
M300
M300
RESTORE_GCODE_STATE NAME=unload_state
```
-83
View File
@@ -1,83 +0,0 @@
# Panels
### Main Menu
![Main Menu](img/main_panel.png)
### Job Status
![Job Status](img/job_status.png)
### Bed Level
type: bed_level
![Bed Level](img/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://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#bed_screws)
* [screws_tilt_adjust](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#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
type: bed_mesh
![Bed Mesh](img/bed_mesh.png)
### Extrude
type: extrude
![Extrude](img/extrude.png)
### Fan
type: fan
![Fan](img/fan.png)
### Fine Tune
type: fine_tune
![Fine Tune Panel](img/fine_tune.png)
### Gcode Macros
type: gcode_macros
![Gcode Macros Panel](img/gcode_macros.png)
### Menu
type: menu
![Menu Panel](img/menu.png)
### Move
type: move
![Move Panel](img/move.png)
### Network
type: network
![Network Panel](img/network.png)
### Power
type: power
![Power](img/power.png)
### Preheat
type: preheat
![Preheat Panel](img/preheat.png)
### Print
type: print
![Print Panel](img/print.png)
### Settings
type: settings
![Settings](img/settings.png)
### System
type: system
![System Panel](img/system.png)
### Temperature
type: temperature
![Temperature](img/temperature.png)
### Z Calibrate
type: zcalibrate
![Z Calibrate](img/zcalibrate.png)
+2
View File
@@ -0,0 +1,2 @@
mkdocs>=1.3.0
mkdocs-material>=8.2.16
+34 -39
View File
@@ -1,78 +1,73 @@
class KlippyGcodes:
HOME = "G28"
HOME_XY = "G28 X Y"
Z_TILT = "Z_TILT_ADJUST"
QUAD_GANTRY_LEVEL = "QUAD_GANTRY_LEVEL"
HOME = "G28"
HOME_X = "G28 X"
HOME_Y = "G28 Y"
HOME_Z = "G28 Z"
MOVE = "G1"
MOVE_ABSOLUTE = "G90"
MOVE_RELATIVE = "G91"
MOVE = "G1"
MOVE_ABSOLUTE = "G90"
MOVE_RELATIVE = "G91"
EXTRUDE_ABS = "M82"
EXTRUDE_REL = "M83"
EXTRUDE_ABS = "M82"
EXTRUDE_REL = "M83"
SET_EXT_TEMP = "M104"
SET_BED_TEMP = "M140"
SET_EXT_TEMP = "M104"
MAX_EXT_TEMP = 450
SET_BED_TEMP = "M140"
MAX_BED_TEMP = 150
SET_EXT_FACTOR = "M221"
SET_FAN_SPEED = "M106"
SET_SPD_FACTOR = "M220"
SET_EXT_FACTOR = "M221"
SET_FAN_SPEED = "M106"
SET_SPD_FACTOR = "M220"
PROBE_CALIBRATE = "PROBE_CALIBRATE"
PROBE_MOVE = "TESTZ Z="
PROBE_ABORT = "ABORT"
PROBE_ACCEPT = "ACCEPT"
SAVE_CONFIG = "SAVE_CONFIG"
RESTART = "RESTART"
FIRMWARE_RESTART= "FIRMWARE_RESTART"
Z_ENDSTOP_CALIBRATE = "Z_ENDSTOP_CALIBRATE"
TESTZ = "TESTZ Z="
ABORT = "ABORT"
ACCEPT = "ACCEPT"
@staticmethod
def set_bed_temp(temp):
return "%s S%s" % (KlippyGcodes.SET_BED_TEMP, str(temp))
return f"{KlippyGcodes.SET_BED_TEMP} S{temp}"
@staticmethod
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
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
def set_temp_fan_temp(temp_fan, temp):
return f'SET_TEMPERATURE_FAN_TARGET temperature_fan="{temp_fan}" target={temp}'
@staticmethod
def set_fan_speed(speed):
speed = str( int(float(int(speed) % 101)/100*255) )
return "%s S%s" % (KlippyGcodes.SET_FAN_SPEED, speed)
return f"{KlippyGcodes.SET_FAN_SPEED} S{speed * 2.55:.0f}"
@staticmethod
def set_extrusion_rate(rate):
return "%s S%s" % (KlippyGcodes.SET_EXT_FACTOR, rate)
return f"{KlippyGcodes.SET_EXT_FACTOR} S{rate}"
@staticmethod
def set_speed_rate(rate):
return "%s S%s" % (KlippyGcodes.SET_SPD_FACTOR, rate)
return f"{KlippyGcodes.SET_SPD_FACTOR} S{rate}"
@staticmethod
def probe_move(dist):
return KlippyGcodes.PROBE_MOVE + dist
def testz_move(dist):
return KlippyGcodes.TESTZ + dist
@staticmethod
def extrude(dist, speed=500):
return "%s E%s F%s" % (KlippyGcodes.MOVE, dist, speed)
return f"{KlippyGcodes.MOVE} E{dist} F{speed}"
@staticmethod
def bed_mesh_load(profile):
return "BED_MESH_PROFILE LOAD='%s'" % profile
return f"BED_MESH_PROFILE LOAD='{profile}'"
@staticmethod
def bed_mesh_remove(profile):
return "BED_MESH_PROFILE REMOVE='%s'" % profile
return f"BED_MESH_PROFILE REMOVE='{profile}'"
@staticmethod
def bed_mesh_save(profile):
return "BED_MESH_PROFILE SAVE='%s'" % profile
return f"BED_MESH_PROFILE SAVE='{profile}'"
+182 -193
View File
@@ -1,235 +1,233 @@
# -*- coding: utf-8 -*-
import gi
import logging
import os
import pathlib
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GdkPixbuf, Gio, GLib, Pango
import os
klipperscreendir = os.getcwd()
from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango
def format_label(widget, lines=2):
if type(widget) == Gtk.Label:
return widget
if type(widget) in (Gtk.Container, Gtk.Bin, Gtk.Button, Gtk.Alignment, Gtk.Box):
for _ in widget.get_children():
lbl = format_label(_)
if lbl is not None:
lbl.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
lbl.set_line_wrap(True)
lbl.set_ellipsize(True)
lbl.set_ellipsize(Pango.EllipsizeMode.END)
lbl.set_lines(lines)
class KlippyGtk:
labels = {}
font_ratio = [51, 30]
width_ratio = 16
height_ratio = 9.375
def __init__(self, screen, width, height, theme):
def __init__(self, screen):
self.screen = screen
self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", screen.theme, "images")
self.cursor = screen.show_cursor
self.font_size_type = screen._config.get_main_config().get("font_size", "medium")
self.width = screen.width
self.height = screen.height
self.font_ratio = [33, 49] if self.screen.vertical_mode else [43, 29]
self.font_size = min(self.width / self.font_ratio[0], self.height / self.font_ratio[1])
self.img_scale = self.font_size * 2
self.button_image_scale = 1.38
self.bsidescale = .65 # Buttons with image at the side
self.width = width
self.height = height
self.theme = theme
self.font_size = int(min(
self.width / self.font_ratio[0],
self.height / self.font_ratio[1]
))
self.header_size = int(round((self.width / self.width_ratio) / 1.33))
self.img_width = int(round(self.width / self.width_ratio))
self.img_height = int(round(self.height / self.height_ratio))
self.action_bar_width = int(self.width * .1)
self.header_image_scale_width = 1.2
self.header_image_scale_height = 1.4
if self.font_size_type == "max":
self.font_size = self.font_size * 1.2
self.bsidescale = .7
elif self.font_size_type == "extralarge":
self.font_size = self.font_size * 1.14
self.img_scale = self.img_scale * 0.7
self.bsidescale = 1
elif self.font_size_type == "large":
self.font_size = self.font_size * 1.09
self.img_scale = self.img_scale * 0.9
self.bsidescale = .8
elif self.font_size_type == "small":
self.font_size = self.font_size * 0.91
self.bsidescale = .55
self.img_width = self.font_size * 3
self.img_height = self.font_size * 3
self.titlebar_height = self.font_size * 2
logging.info(f"Font size: {self.font_size:.1f} ({self.font_size_type})")
logging.debug("img width: %s height: %s" % (self.img_width, self.img_height))
if self.screen.vertical_mode:
self.action_bar_width = int(self.width)
self.action_bar_height = int(self.height * .1)
self.content_width = self.width
self.content_height = self.height - self.titlebar_height - self.action_bar_height
else:
self.action_bar_width = int(self.width * .1)
self.action_bar_height = int(self.height)
self.content_width = self.width - self.action_bar_width
self.content_height = self.height - self.titlebar_height
def get_action_bar_width(self):
return self.action_bar_width
self.keyboard_height = self.content_height * 0.5
if (self.height / self.width) >= 3: # Ultra-tall
self.keyboard_height = self.keyboard_height * 0.5
def get_content_width(self):
return self.width - self.action_bar_width
self.color_list = {} # This is set by screen.py init_style()
for key in self.color_list:
if "base" in self.color_list[key]:
rgb = [int(self.color_list[key]['base'][i:i + 2], 16) for i in range(0, 6, 2)]
self.color_list[key]['rgb'] = rgb
def get_content_height(self):
return self.height - self.header_size
def get_temp_color(self, device):
# logging.debug("Color list %s" % self.color_list)
if device not in self.color_list:
return False, False
def get_header_size(self):
return self.header_size
if 'base' in self.color_list[device]:
rgb = self.color_list[device]['rgb'].copy()
if self.color_list[device]['state'] > 0:
rgb[1] = rgb[1] + self.color_list[device]['hsplit'] * self.color_list[device]['state']
self.color_list[device]['state'] += 1
rgb = [x / 255 for x in rgb]
# logging.debug(f"Assigning color: {device} {rgb}")
else:
colors = self.color_list[device]['colors']
if self.color_list[device]['state'] >= len(colors):
self.color_list[device]['state'] = 0
color = colors[self.color_list[device]['state'] % len(colors)]
rgb = [int(color[i:i + 2], 16) / 255 for i in range(0, 6, 2)]
self.color_list[device]['state'] += 1
# logging.debug(f"Assigning color: {device} {rgb} {color}")
return rgb
def get_header_image_scale(self):
return [self.header_image_scale_width, self.header_image_scale_height]
def reset_temp_color(self):
for key in self.color_list:
self.color_list[key]['state'] = 0
def get_image_width(self):
return self.img_width
@staticmethod
def Label(label, style=None):
la = Gtk.Label(label)
if style is not None:
la.get_style_context().add_class(style)
return la
def get_image_height(self):
return self.img_height
def Image(self, image_name=None, width=None, height=None):
if image_name is None:
return Gtk.Image()
pixbuf = self.PixbufFromIcon(image_name, width, height)
return Gtk.Image.new_from_pixbuf(pixbuf) if pixbuf is not None else Gtk.Image()
def get_font_size(self):
return self.font_size
def PixbufFromIcon(self, filename, width=None, height=None):
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, filename)
for ext in ["svg", "png"]:
pixbuf = self.PixbufFromFile(f"{filename}.{ext}", int(width), int(height))
if pixbuf is not None:
return pixbuf
return None
def Label(self, label, style=None):
l = Gtk.Label(label)
if style != None and style != False:
l.get_style_context().add_class(style)
return l
@staticmethod
def PixbufFromFile(filename, width=-1, height=-1):
try:
return GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(width), int(height))
except Exception as e:
logging.exception(e)
logging.error(f"Unable to find image {filename}")
return None
def ImageLabel(self, image_name, text, size=20, style=False, width_scale=.32, height_scale=.32):
box1 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=15)
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
"%s/styles/%s/images/%s.svg" % (klipperscreendir, self.theme, str(image_name)),
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
image = Gtk.Image.new_from_pixbuf(pixbuf)
label = Gtk.Label()
label.set_text(text)
box1.add(image)
box1.add(label)
if style != False:
ctx = box1.get_style_context()
ctx.add_class(style)
return {"l": label, "b": box1}
def Image(self, image_name, style=False, width_scale=1, height_scale=1):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
"%s/styles/%s/images/%s" % (klipperscreendir, self.theme, str(image_name)),
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
return Gtk.Image.new_from_pixbuf(pixbuf)
def ImageFromFile(self, filename, style=False, width_scale=1, height_scale=1):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename,
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
return Gtk.Image.new_from_pixbuf(pixbuf)
def PixbufFromFile(self, filename, style=False, width_scale=1, height_scale=1):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename, int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)), True)
return pixbuf
def PixbufFromHttp(self, resource, style=False, width_scale=1, height_scale=1):
def PixbufFromHttp(self, resource, width=-1, height=-1):
response = self.screen.apiclient.get_thumbnail_stream(resource)
if response == False:
if response is False:
return None
stream = Gio.MemoryInputStream.new_from_data(response, None)
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)), True)
try:
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, int(width), int(height), True)
except Exception as e:
logging.exception(e)
return None
stream.close_async(2)
return pixbuf
def ProgressBar(self, style=False):
bar = Gtk.ProgressBar()
if style != False:
ctx = bar.get_style_context()
ctx.add_class(style)
return bar
def Button(self, label=None, style=None):
b = Gtk.Button(label=label)
b.set_hexpand(True)
b.set_vexpand(True)
b.set_can_focus(False)
b.props.relief = Gtk.ReliefStyle.NONE
if style != None:
b.get_style_context().add_class(style)
return b
def ButtonImage(self, image_name, label=None, style=None, width_scale=1, height_scale=1,
position=Gtk.PositionType.TOP, word_wrap=True):
filename = "%s/styles/%s/images/%s.svg" % (klipperscreendir, self.theme, str(image_name))
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
filename,
int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)),
True
)
img = Gtk.Image.new_from_pixbuf(pixbuf)
b = Gtk.Button(label=label)
b.set_image(img)
def Button(self, image_name=None, label=None, style=None, scale=None, position=Gtk.PositionType.TOP, lines=2):
if self.font_size_type == "max" and label is not None and scale is None:
image_name = None
b = Gtk.Button()
if label is not None:
b.set_label(label.replace("\n", " "))
b.set_hexpand(True)
b.set_vexpand(True)
b.set_can_focus(False)
if image_name is not None:
if scale is None:
scale = self.button_image_scale
if label is None:
scale = scale * 1.4
width = height = self.img_scale * scale
b.set_image(self.Image(image_name, width, height))
b.set_image_position(position)
b.set_always_show_image(True)
b.props.relief = Gtk.ReliefStyle.NONE
if word_wrap is True:
try:
# Get the label object
child = b.get_children()[0].get_children()[0].get_children()[1]
child.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
child.set_line_wrap(True)
except:
pass
if style != None:
if label is not None:
format_label(b, lines)
if style is not None:
b.get_style_context().add_class(style)
b.connect("clicked", self.screen.reset_screensaver_timeout)
return b
def Dialog(self, screen, buttons, content, callback=None, *args):
dialog = Gtk.Dialog()
dialog.set_default_size(screen.width - 15, screen.height - 15)
dialog.set_default_size(screen.width, screen.height)
dialog.set_resizable(False)
dialog.set_transient_for(screen)
dialog.set_modal(True)
for button in buttons:
dialog.add_button(button_text=button['name'], response_id=button['response'])
dialog.add_button(button['name'], button['response'])
button = dialog.get_widget_for_response(button['response'])
button.set_size_request((screen.width - 30) / 3, screen.height / 5)
format_label(button, 3)
dialog.connect("response", self.screen.reset_screensaver_timeout)
dialog.connect("response", callback, *args)
dialog.get_style_context().add_class("dialog")
grid = Gtk.Grid()
grid.set_size_request(screen.width - 60, -1)
grid.set_vexpand(True)
grid.set_halign(Gtk.Align.CENTER)
grid.set_valign(Gtk.Align.CENTER)
grid.add(content)
content_area = dialog.get_content_area()
content_area.set_margin_start(15)
content_area.set_margin_end(15)
content_area.set_margin_top(15)
content_area.set_margin_bottom(15)
content_area.add(grid)
content_area.add(content)
dialog.show_all()
# Change cursor to blank
if self.cursor:
dialog.get_window().set_cursor(
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.ARROW))
else:
dialog.get_window().set_cursor(
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.BLANK_CURSOR))
return dialog, grid
self.screen.dialogs.append(dialog)
logging.info(f"Showing dialog {dialog}")
return dialog
def remove_dialog(self, dialog, *args):
if self.screen.updating:
return
dialog.destroy()
if dialog in self.screen.dialogs:
logging.info("Removing Dialog")
self.screen.dialogs.remove(dialog)
return
logging.debug(f"Cannot remove dialog {dialog}")
def ToggleButtonImage(self, image_name, label, style=False, width_scale=1, height_scale=1):
filename = "%s/styles/%s/images/%s.svg" % (klipperscreendir, self.theme, str(image_name))
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
filename,
int(round(self.img_width * width_scale)),
int(round(self.img_height * height_scale)),
True
)
img = Gtk.Image.new_from_pixbuf(pixbuf)
b = Gtk.ToggleButton(label=label)
#b.props.relief = Gtk.RELIEF_NONE
b.set_image(img)
b.set_hexpand(True)
b.set_vexpand(True)
b.set_can_focus(False)
b.set_image_position(Gtk.PositionType.TOP)
b.set_always_show_image(True)
b.props.relief = Gtk.ReliefStyle.NONE
if style != False:
ctx = b.get_style_context()
ctx.add_class(style)
return b
def HomogeneousGrid(self, width=None, height=None):
@staticmethod
def HomogeneousGrid(width=None, height=None):
g = Gtk.Grid()
g.set_row_homogeneous(True)
g.set_column_homogeneous(True)
if width != None and height != None:
if width is not None and height is not None:
g.set_size_request(width, height)
return g
@@ -238,25 +236,16 @@ class KlippyGtk:
b.props.relief = Gtk.ReliefStyle.NONE
b.set_hexpand(True)
b.set_vexpand(True)
b.connect("clicked", self.screen.reset_screensaver_timeout)
return b
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/3600) !=0:
text += str(int(time/3600))+"h "
text += str(int(time/60)%60)+"m "+str(time%60)+"s"
return text
def formatTemperatureString(self, temp, target):
if (target > temp-2 and target < temp+2) or round(target,0) == 0:
return str(round(temp,1)) + "°C" #°C →"
return str(round(temp)) + " → " + str(round(target)) + "°C"
@staticmethod
def ScrolledWindow():
scroll = Gtk.ScrolledWindow()
scroll.set_property("overlay-scrolling", False)
scroll.set_vexpand(True)
scroll.add_events(Gdk.EventMask.BUTTON_PRESS_MASK |
Gdk.EventMask.TOUCH_MASK |
Gdk.EventMask.BUTTON_RELEASE_MASK)
scroll.set_kinetic_scrolling(True)
return scroll
+52 -26
View File
@@ -1,19 +1,28 @@
import json
import requests
import logging
import re
import requests
class KlippyRest:
def __init__(self, ip, port=7125, api_key=False):
self.ip = ip
self.port = port
self.api_key = api_key
self.status = ''
@property
def endpoint(self):
protocol = "http"
if int(self.port) in {443, 7130}:
protocol = "https"
return f"{protocol}://{self.ip}:{self.port}"
def get_server_info(self):
return self.send_request("server/info")
def get_oneshot_token(self):
r = self.send_request("access/oneshot_token")
if r == False:
if r is False or 'result' not in r:
return False
return r['result']
@@ -21,29 +30,46 @@ class KlippyRest:
return self.send_request("printer/info")
def get_thumbnail_stream(self, thumbnail):
url = "http://%s:%s/server/files/gcodes/%s" % (self.ip, self.port, thumbnail)
response = requests.get(url, stream=True)
if response.status_code == 200:
response.raw.decode_content = True
return response.content
return False
return self.send_request(f"server/files/gcodes/{thumbnail}", json=False)
def send_request(self, method):
url = "http://%s:%s/%s" % (self.ip, self.port, method)
logging.debug("Sending request to %s" % url)
headers = {} if self.api_key == False else {"x-api-key":self.api_key}
def send_request(self, method, json=True):
url = f"{self.endpoint}/{method}"
headers = {} if self.api_key is False else {"x-api-key": self.api_key}
data = False
try:
r = requests.get(url, headers=headers)
except:
return False
if r.status_code != 200:
return False
#TODO: Try/except
try:
data = json.loads(r.content)
except:
logging.exception("Unable to parse response from moonraker:\n %s" % r.content)
return False
response = requests.get(url, headers=headers, timeout=3)
response.raise_for_status()
if json:
logging.debug(f"Sending request to {url}")
data = response.json()
else:
data = response.content
except requests.exceptions.HTTPError as h:
self.status = self.format_status(h)
except requests.exceptions.ConnectionError as c:
self.status = self.format_status(c)
except requests.exceptions.Timeout as t:
self.status = self.format_status(t)
except requests.exceptions.JSONDecodeError as j:
self.status = self.format_status(j)
except requests.exceptions.RequestException as r:
self.status = self.format_status(r)
except Exception as e:
self.status = self.format_status(e)
if data:
self.status = ''
else:
logging.error(self.status.replace('\n', '>>'))
return data
@staticmethod
def format_status(status):
try:
rep = {"HTTPConnectionPool": "", "/server/info ": "", "Caused by ": "", "(": "", ")": "",
": ": "\n", "'": "", "`": "", "\"": ""}
rep = {re.escape(k): v for k, v in rep.items()}
pattern = re.compile("|".join(rep.keys()))
status = pattern.sub(lambda m: rep[re.escape(m.group(0))], f"{status}").split("\n")
return "\n".join(_ for _ in status if "urllib3" not in _ and _ != "")
except TypeError or KeyError:
return status
+136 -147
View File
@@ -1,116 +1,133 @@
#!/usr/bin/python
import gi
import time
import threading
import json
import requests
import websocket
import asyncio
import logging
import gi
import websocket
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib
from gi.repository import GLib
from ks_includes.KlippyGcodes import KlippyGcodes
#f = open("/home/pi/.moonraker_api_key", "r")
api_key = "" #f.readline()
#f.close()
api = {
"printer_info": {
"url": "/printer/info",
"method": "get_printer_info"
},
"apikey": {
"url": "/access/api_key"
},
"oneshot_token": {
"url": "/access/oneshot_token"
}
}
class KlippyWebsocket(threading.Thread):
_req_id = 0
connected = False
connecting = True
callback_table = {}
timeout = None
reconnect_count = 0
max_retries = 4
def __init__(self, screen, callback, host, port):
threading.Thread.__init__(self)
self._wst = None
self.ws_url = None
self._screen = screen
self._callback = callback
self.klippy = MoonrakerApi(self)
self.ws = None
self.closing = False
self.host = host
self.port = port
self._url = "%s:%s" % (host, 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):
# Enable a timeout so that way if moonraker is not running, it will attempt to reconnect
if self.timeout == None:
self.timeout = GLib.timeout_add(500, self.reconnect)
self.connect()
if self.connect() is not False:
GLib.timeout_add_seconds(10, self.reconnect)
def connect (self):
try:
token = self._screen.apiclient.get_oneshot_token()
except:
logging.debug("Unable to get oneshot token")
def reconnect(self):
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._screen.apiclient.status}')
return False
return self.connect()
self.ws_url = "ws://%s/websocket?token=%s" % (self._url, token)
self.ws = websocket.WebSocketApp(self.ws_url,
on_message = lambda ws,msg: self.on_message(ws, msg),
on_error = lambda ws,msg: self.on_error(ws, msg),
on_close = lambda ws: self.on_close(ws),
on_open = lambda ws: self.on_open(ws)
)
self._wst = threading.Thread(target=self.ws.run_forever)
self._wst.daemon = True
def connect(self):
if self.connected:
logging.debug("Already connected")
return False
logging.debug("Attempting to connect")
self.reconnect_count += 1
try:
state = self._screen.apiclient.get_server_info()
if state is False:
if self.reconnect_count > 2:
self._screen.printer_initializing(
_("Cannot connect to Moonraker") + '\n\n'
+ _("Retrying") + f' #{self.reconnect_count}'
)
return True
token = self._screen.apiclient.get_oneshot_token()
except Exception as e:
logging.critical(e, exc_info=True)
logging.debug("Unable to get oneshot token")
return True
self.ws_url = f"{self.ws_proto}://{self._url}/websocket?token={token}"
self.ws = websocket.WebSocketApp(
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)
try:
logging.debug("Starting websocket thread")
self._wst.start()
except Exception:
except Exception as e:
logging.critical(e, exc_info=True)
logging.debug("Error starting web socket")
return True
return False
def close(self):
self.closing = True
self.ws.close()
self.connecting = False
if self.ws is not None:
self.ws.close()
def is_connected(self):
return self.connected
def on_message(self, ws, message):
def on_message(self, *args):
message = args[1] if len(args) == 2 else args[0]
response = json.loads(message)
if "id" in response:
if response['id'] in self.callback_table:
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self.callback_table[response['id']][0],
response,
if "id" in response and response['id'] in self.callback_table:
args = (response,
self.callback_table[response['id']][1],
self.callback_table[response['id']][2],
*self.callback_table[response['id']][3]
)
self.callback_table.pop(response['id'])
return
*self.callback_table[response['id']][3])
GLib.idle_add(self.callback_table[response['id']][0], *args)
self.callback_table.pop(response['id'])
return
if "method" in response and "on_message" in self._callback:
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_message'],
response['method'],
response['params'][0] if "params" in response else {}
)
args = response['method'], response['params'][0] if "params" in response else {}
GLib.idle_add(self._callback['on_message'], *args)
return
def send_method(self, method, params={}, callback=None, *args):
if self.is_connected() == False:
def send_method(self, method, params=None, callback=None, *args):
if not self.connected:
return False
if params is None:
params = {}
self._req_id += 1
if callback != None:
if callback is not None:
self.callback_table[self._req_id] = [callback, method, params, [*args]]
data = {
@@ -122,65 +139,43 @@ class KlippyWebsocket(threading.Thread):
self.ws.send(json.dumps(data))
return True
def on_open(self, ws):
def on_open(self, *args):
logging.info("Moonraker Websocket Open")
logging.info("Self.connected = %s" % self.is_connected())
self.connected = True
if self.timeout != None:
GLib.source_remove(self.timeout)
self.timeout = None
self.connecting = False
self._screen.reinit_count = 0
self.reconnect_count = 0
if "on_connect" in self._callback:
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_connect']
)
GLib.idle_add(self._callback['on_connect'])
def on_close(self, ws):
if self.is_connected() == False:
def on_close(self, *args):
# args: ws, status, message
# sometimes ws is not passed due to bugs
message = args[2] if len(args) == 3 else args[1]
if message is not None:
logging.info(f"{message}")
if not self.connected:
logging.debug("Connection already closed")
return
if self.closing == True:
if self.closing:
logging.debug("Closing websocket")
self.ws.stop()
self.ws.keep_running = False
self.close()
self.closing = False
return
if "on_close" in self._callback:
GLib.idle_add(self._callback['on_close'], "Lost Connection to Moonraker")
logging.info("Moonraker Websocket Closed")
self.connected = False
if self.timeout == None:
self.timeout = GLib.timeout_add(500, self.reconnect)
if "on_close" in self._callback:
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_close'],
"Lost Connection to Moonraker"
)
@staticmethod
def on_error(*args):
error = args[1] if len(args) == 2 else args[0]
logging.debug(f"Websocket error: {error}")
def reconnect(self):
if self.is_connected():
logging.debug("Reconnected")
return False
logging.debug("Attempting to reconnect")
self.connect()
return True
def on_error(self, ws, error):
logging.debug("Websocket error: %s" % error)
if error.status_code == 401:
# Check for any pending reconnects and remove. No amount of trying will help
if self.timeout != None:
GLib.source_remove(self.timeout)
Gdk.threads_add_idle(
GLib.PRIORITY_HIGH_IDLE,
self._callback['on_close'],
"Unable to authenticate with moonraker.\nCheck the API key"
)
class MoonrakerApi:
def __init__ (self, ws):
def __init__(self, ws):
self._ws = ws
def emergency_stop(self):
@@ -190,7 +185,7 @@ class MoonrakerApi:
)
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(
"printer.gcode.script",
{"script": script},
@@ -198,8 +193,16 @@ class MoonrakerApi:
*args
)
def get_file_dir(self, path='gcodes', callback=None, *args):
logging.debug("Sending server.files.directory")
return self._ws.send_method(
"server.files.list",
{"path": path},
callback,
*args
)
def get_file_list(self, callback=None, *args):
#Commenting this log for being too noisy
logging.debug("Sending server.files.list")
return self._ws.send_method(
"server.files.list",
@@ -209,7 +212,6 @@ class MoonrakerApi:
)
def get_file_metadata(self, filename, callback=None, *args):
#logging.debug("Sending server.files.metadata: %s", filename)
return self._ws.send_method(
"server.files.metadata",
{"filename": filename},
@@ -218,14 +220,14 @@ class MoonrakerApi:
)
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(
"printer.objects.subscribe",
updates
)
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(
"machine.device_power.off",
{device: False},
@@ -234,7 +236,7 @@ class MoonrakerApi:
)
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(
"machine.device_power.on",
{device: False},
@@ -280,32 +282,8 @@ class MoonrakerApi:
*args
)
def temperature_set(self, heater, target, callback=None, *args):
if heater == "heater_bed":
logging.debug("Sending printer.gcode.script: %s", KlippyGcodes.set_bed_temp(target))
return self._ws.send_method(
"printer.gcode.script",
{
"script": KlippyGcodes.set_bed_temp(target)
},
callback,
*args
)
else:
logging.debug("Sending printer.gcode.script: %s",
KlippyGcodes.set_ext_temp(target, heater.replace("tool","")))
#TODO: Add max/min limits
return self._ws.send_method(
"printer.gcode.script",
{
"script": KlippyGcodes.set_ext_temp(target, heater.replace("tool",""))
},
callback,
*args
)
def set_bed_temp(self, target, callback=None, *args):
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(
"printer.gcode.script",
{
@@ -316,7 +294,7 @@ class MoonrakerApi:
)
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(
"printer.gcode.script",
{
@@ -326,8 +304,19 @@ class MoonrakerApi:
*args
)
def set_temp_fan_temp(self, temp_fan, target, callback=None, *args):
logging.debug(f"Sending temperature fan {temp_fan} to temp: {target}")
return self._ws.send_method(
"printer.gcode.script",
{
"script": KlippyGcodes.set_temp_fan_temp(temp_fan, target)
},
callback,
*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(
"printer.gcode.script",
{
File diff suppressed because it is too large. Load diff
+396 -186
View File
@@ -1,83 +1,54 @@
import configparser
import gettext
import os
import logging
import json
import re
import copy
import pathlib
import locale
from io import StringIO
from os import path
SCREEN_BLANKING_OPTIONS = [
"300", #5 Minutes
"900", #15 Minutes
"1800", #30 Minutes
"3600", #1 Hour
"7200", #2 Hours
"14400", #4 Hours
60, # 1 Minute
120, # 2 Minutes
300, # 5 Minutes
900, # 15 Minutes
1800, # 30 Minutes
3600, # 1 Hour
7200, # 2 Hours
14400, # 4 Hours
]
klipperscreendir = pathlib.Path(__file__).parent.resolve().parent
class ConfigError(Exception):
pass
class KlipperScreenConfig:
config = None
configfile_name = "KlipperScreen.conf"
do_not_edit_line = "#~# --- Do not edit below this line. This section is auto generated --- #~#"
do_not_edit_prefix = "#~#"
def __init__(self, configfile, lang=None, screen=None):
_ = lang.gettext
_n = lang.ngettext
self.configurable_options = [
{"invert_x": {"section": "main", "name": _("Invert X"), "type": "binary", "value": "False"}},
{"invert_y": {"section": "main", "name": _("Invert Y"), "type": "binary", "value": "False"}},
{"invert_z": {"section": "main", "name": _("Invert Z"), "type": "binary", "value": "False"}},
{"move_speed": {"section": "main", "name": _("Move Speed (mm/s)"), "type": "scale", "value": "20",
"range": [5,100], "step": 1
}},
{"print_sort_dir": {"section": "main", "type": None, "value": "name_asc"}},
{"print_estimate_method": {"section": "main", "name": _("Estimated Time Method"), "type": "dropdown",
"value": "file","options":[
{"name": _("File Estimation (default)"), "value": "file"},
{"name": _("Duration Only"), "value": "duration"},
{"name": _("Filament Used"), "value": "filament"},
{"name": _("Slicer"), "value": "slicer"}
]}},
{"screen_blanking": {"section": "main", "name": _("Screen Power Off Time"), "type": "dropdown",
"value": "3600", "callback": screen.set_screenblanking_timeout, "options":[
{"name": _("Off"), "value": "off"}
]}},
{"theme": {"section": "main", "name": _("Icon Theme"), "type": "dropdown",
"value": "z-bolt","options":[
{"name": _("Z-bolt (default)"), "value": "z-bolt"},
{"name": _("Colorized"), "value": "colorized"}
]}}
#{"": {"section": "main", "name": _(""), "type": ""}}
]
index = self.configurable_options.index(
[i for i in self.configurable_options if list(i)[0]=="screen_blanking"][0])
for num in SCREEN_BLANKING_OPTIONS:
hour = int(int(num)/3600)
if hour > 0:
name = str(hour) + " " + _n("hour","hours", hour)
else:
name = str(int(int(num)/60)) + " " + _("minutes")
self.configurable_options[index]['screen_blanking']['options'].append({
"name": name,
"value": num
})
self.default_config_path = "%s/ks_includes/%s" % (os.getcwd(), self.configfile_name)
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.config = configparser.ConfigParser()
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.lang = None
self.langs = {}
try:
self.config.read(self.default_config_path)
# In case a user altered defaults.conf
self.validate_config(self.config)
if self.config_path != self.default_config_path:
user_def, saved_def = self.separate_saved_config(self.config_path)
self.defined_config = configparser.ConfigParser()
@@ -85,44 +56,261 @@ class KlipperScreenConfig:
includes = [i[8:] for i in self.defined_config.sections() if i.startswith("include ")]
for include in includes:
self._include_config("/".join(self.config_path.split("/")[:-1]),include)
self._include_config("/".join(self.config_path.split("/")[:-1]), include)
self.exclude_from_config(self.defined_config)
self.log_config(self.defined_config)
self.config.read_string(user_def)
if saved_def != None:
self.config.read_string(saved_def)
logging.info("====== Saved Def ======\n%s\n=======================" % saved_def)
except KeyError:
raise ConfigError(f"Error reading config: {self.config_path}")
except:
logging.exception("Unknown error with config")
if self.validate_config(self.defined_config, string=user_def):
self.config.read_string(user_def)
if saved_def is not None:
auto_gen = configparser.ConfigParser()
auto_gen.read_string(saved_def)
if self.validate_config(auto_gen, string=saved_def, remove=True):
self.config.read_string(saved_def)
logging.info(f"====== Saved Def ======\n{saved_def}\n=======================")
# This is the final config
# self.log_config(self.config)
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 ")])
self.printers = []
for printer in printers:
self.printers.append({
printer[8:]: {
"moonraker_host": self.config.get(printer, "moonraker_host", fallback="127.0.0.1"),
"moonraker_port": self.config.get(printer, "moonraker_port", fallback="7125"),
"moonraker_api_key": self.config.get(printer, "moonraker_api_key", fallback=False)
}
})
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="")
}
})
if len(printers) == 0:
printers.append("Printer Printer")
self.printers = [
{printer[8:]: {
"moonraker_host": self.config.get(printer, "moonraker_host", fallback="127.0.0.1"),
"moonraker_port": self.config.get(printer, "moonraker_port", fallback="7125"),
"moonraker_api_key": self.config.get(printer, "moonraker_api_key", fallback="").replace('"', '')
}} for printer in printers
]
conf_printers_debug = self.printers.copy()
conf_printers_debug = copy.deepcopy(self.printers)
for printer in conf_printers_debug:
name = list(printer)[0]
item = conf_printers_debug[conf_printers_debug.index(printer)]
if item[list(printer)[0]]['moonraker_api_key'] != "":
item[list(printer)[0]]['moonraker_api_key'] = "redacted"
logging.debug("Configured printers: %s" % json.dumps(conf_printers_debug, indent=2))
if item[name]['moonraker_api_key'] != "":
item[name]['moonraker_api_key'] = "redacted"
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)
logging.debug(f"Selected lang: {lang} OS lang: {locale.getlocale()[0]}")
self.install_language(lang)
def install_language(self, lang):
if lang is None or lang == "system_lang":
for language in self.lang_list:
if locale.getlocale()[0].startswith(language):
logging.debug("Using system lang")
lang = language
if lang is not None and lang not in self.lang_list:
# try to match a parent
for language in self.lang_list:
if lang.startswith(language):
lang = language
self.set("main", "language", lang)
if lang not in self.lang_list:
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'])
def validate_config(self, config, string="", remove=False):
valid = True
if string:
msg = "Section headers have extra information after brackets possible newline issue:"
for line in string.split('\n'):
if re.match(r".+\].", line):
logging.error(line)
self.errors.append(f'{msg}\n\n{line}')
return False
for section in 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', "screen_on_devices", "screen_off_devices",
)
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", "camera_url",
)
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 config[section] if option != 'gcode']
elif section.startswith('menu '):
strs = ('name', 'icon', 'panel', 'method', 'params', 'enable', 'confirm', 'style')
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 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 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}]"'
if remove:
# This should only be called for the auto-generated section
self.config.remove_option(section, key)
else:
self.errors.append(msg)
elif key in numbers and not self.is_float(config[section][key]) \
or key in bools and not self.is_bool(config[section][key]):
msg = (
f'Unable to parse "{key}" from [{section}]\n'
f'Expected a {"number" if key in numbers else "boolean"} but got: {config[section][key]}'
)
self.errors.append(msg)
logging.error('Invalid configuration detected !!!')
valid = False
return valid
@staticmethod
def is_float(element):
try:
float(element)
return True
except ValueError:
return False
@staticmethod
def is_bool(element):
return element in ["False", "false", "True", "true"]
def get_errors(self):
return "".join(f'{error}\n\n' for error in self.errors)
def _create_configurable_options(self, screen):
self.configurable_options = [
{"language": {
"section": "main", "name": _("Language"), "type": None, "value": "system_lang",
"callback": screen.change_language, "options": [
{"name": _("System") + " " + _("(default)"), "value": "system_lang"}]}},
{"theme": {
"section": "main", "name": _("Icon Theme"), "type": "dropdown",
"value": "z-bolt", "callback": screen.restart_ks, "options": [
{"name": "Z-bolt" + " " + _("(default)"), "value": "z-bolt"}]}},
{"print_estimate_method": {
"section": "main", "name": _("Estimated Time Method"), "type": "dropdown",
"value": "auto", "options": [
{"name": _("Auto") + " " + _("(default)"), "value": "auto"},
{"name": _("File"), "value": "file"},
{"name": _("Filament Used"), "value": "filament"},
{"name": _("Slicer"), "value": "slicer"}]}},
{"screen_blanking": {
"section": "main", "name": _("Screen Power Off Time"), "type": "dropdown",
"value": "3600", "callback": screen.set_screenblanking_timeout, "options": [
{"name": _("Never"), "value": "off"}]
}},
{"24htime": {"section": "main", "name": _("24 Hour Time"), "type": "binary", "value": "True"}},
{"side_macro_shortcut": {
"section": "main", "name": _("Macro shortcut on sidebar"), "type": "binary",
"value": "True", "callback": screen.toggle_macro_shortcut}},
{"font_size": {
"section": "main", "name": _("Font Size"), "type": "dropdown",
"value": "medium", "callback": screen.restart_ks, "options": [
{"name": _("Small"), "value": "small"},
{"name": _("Medium") + " " + _("(default)"), "value": "medium"},
{"name": _("Large"), "value": "large"},
{"name": _("Extra Large"), "value": "extralarge"},
{"name": _("Maximum"), "value": "max"}]}},
{"confirm_estop": {"section": "main", "name": _("Confirm Emergency Stop"), "type": "binary",
"value": "False"}},
{"only_heaters": {"section": "main", "name": _("Hide sensors in Temp."), "type": "binary",
"value": "False", "callback": screen.reload_panels}},
{"use_dpms": {"section": "main", "name": _("Screen DPMS"), "type": "binary",
"value": "True", "callback": screen.set_dpms}},
{"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": ""}}
]
# Options that are in panels and shouldn't be added to the main settings
panel_options = [
{"invert_x": {"section": "main", "name": _("Invert X"), "type": None, "value": "False"}},
{"invert_y": {"section": "main", "name": _("Invert Y"), "type": None, "value": "False"}},
{"invert_z": {"section": "main", "name": _("Invert Z"), "type": None, "value": "False"}},
{"move_speed_xy": {"section": "main", "name": _("XY Move Speed (mm/s)"), "type": None, "value": "50"}},
{"move_speed_z": {"section": "main", "name": _("Z Move Speed (mm/s)"), "type": None, "value": "10"}},
{"print_sort_dir": {"section": "main", "type": None, "value": "name_asc"}},
]
self.configurable_options.extend(panel_options)
t_path = os.path.join(klipperscreendir, 'styles')
themes = [d for d in os.listdir(t_path) if (not os.path.isfile(os.path.join(t_path, d)) and d != "z-bolt")]
themes.sort()
theme_opt = self.configurable_options[1]['theme']['options']
for theme in themes:
theme_opt.append({"name": theme, "value": theme})
index = self.configurable_options.index(
[i for i in self.configurable_options if list(i)[0] == "screen_blanking"][0])
for num in SCREEN_BLANKING_OPTIONS:
hour = num // 3600
minute = num / 60
if hour > 0:
name = f'{hour} ' + ngettext("hour", "hours", hour)
else:
name = f'{minute:.0f} ' + ngettext("minute", "minutes", minute)
self.configurable_options[index]['screen_blanking']['options'].append({
"name": name,
"value": f"{num}"
})
for item in self.configurable_options:
name = list(item)[0]
@@ -131,68 +319,104 @@ class KlipperScreenConfig:
self.config.add_section(vals['section'])
if name not in list(self.config[vals['section']]):
self.config.set(vals['section'], name, vals['value'])
#self.build_main_menu(self.config)
def _include_config(self, dir, path):
full_path = path if path[0] == "/" else "%s/%s" % (dir, path)
def exclude_from_config(self, config):
exclude_list = ['preheat']
if not self.defined_config.getboolean('main', "use_default_menu", fallback=True):
logging.info("Using custom menu, removing default menu entries.")
exclude_list.extend(('menu __main', 'menu __print', 'menu __splashscreen'))
for i in exclude_list:
for j in config.sections():
if j.startswith(i):
for k in list(self.config.sections()):
if k.startswith(i):
del self.config[k]
def _include_config(self, directory, filepath):
full_path = filepath if filepath[0] == "/" else f"{directory}/{filepath}"
parse_files = []
if "*" in full_path:
parent_dir = "/".join(full_path.split("/")[:-1])
file = full_path.split("/")[-1]
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
files = os.listdir(parent_dir)
regex = "^%s$" % file.replace('*','.*')
for file in files:
if re.match(regex, file):
parse_files.append(os.path.join(parent_dir, file))
regex = f"^{file.replace('*', '.*')}$"
parse_files.extend(os.path.join(parent_dir, file) for file in files if re.match(regex, file))
else:
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
parse_files.append(full_path)
logging.info("Parsing files: %s" % parse_files)
logging.info(f"Parsing files: {parse_files}")
for file in parse_files:
config = configparser.ConfigParser()
config.read(file)
includes = [i[8:] for i in config.sections() if i.startswith("include ")]
for include in includes:
self._include_config("/".join(full_path.split("/")[:-1]), include)
self.config.read(file)
self.defined_config.read(file)
self.exclude_from_config(config)
self.log_config(config)
with open(file, 'r') as f:
string = f.read()
if self.validate_config(config, string=string):
self.config.read(file)
def separate_saved_config(self, config_path):
user_def = []
saved_def = None
saved_def = []
found_saved = False
if not path.exists(config_path):
return [None, None]
if not os.path.exists(config_path):
return ["", None]
with open(config_path) as file:
for line in file:
line = line.replace('\n','')
line = line.replace('\n', '')
if line == self.do_not_edit_line:
found_saved = True
saved_def = []
continue
if found_saved == False:
user_def.append(line.replace('\n',''))
else:
if line.startswith(self.do_not_edit_prefix):
saved_def.append(line[(len(self.do_not_edit_prefix)+1):])
return ["\n".join(user_def), None if saved_def == None else "\n".join(saved_def)]
if found_saved is False:
user_def.append(line.replace('\n', ''))
elif line.startswith(self.do_not_edit_prefix):
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)]
def get_config_file_location(self, file):
logging.info("Passed config file: %s" % file)
if not path.exists(file):
file = "%s/%s" % (os.getcwd(), self.configfile_name)
if not path.exists(file):
file = self.default_config_path
# Passed config (-c) by default is ~/KlipperScreen.conf
logging.info(f"Passed config (-c): {file}")
if os.path.exists(file):
return file
logging.info("Found configuration file at: %s" % file)
return file
file = os.path.join(klipperscreendir, self.configfile_name)
if os.path.exists(file):
return file
file = os.path.join(klipperscreendir, self.configfile_name.lower())
if os.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 os.path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if os.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 os.path.exists(file):
return file
file = os.path.join(klipper_config, self.configfile_name.lower())
if os.path.exists(file):
return file
# fallback
return self.default_config_path
def get_config(self):
return self.config
@@ -200,16 +424,16 @@ class KlipperScreenConfig:
def get_configurable_options(self):
return self.configurable_options
def get_lang(self):
return self.lang
def get_main_config(self):
return self.config['main']
def get_main_config_option(self, option, default=None):
return self.config['main'].get(option, default)
def get_menu_items(self, menu="__main", subsection=""):
if subsection != "":
subsection = subsection + " "
index = "menu %s %s" % (menu, subsection)
subsection = f"{subsection} "
index = f"menu {menu} {subsection}"
items = [i[len(index):] for i in self.config.sections() if i.startswith(index)]
menu_items = []
for item in items:
@@ -220,40 +444,29 @@ class KlipperScreenConfig:
return menu_items
def get_menu_name(self, menu="__main", subsection=""):
name = ("menu %s %s" % (menu, subsection)) if subsection != "" else ("menu %s" % menu)
if name not in self.config:
return False
return self.config[name].get('name')
name = f"menu {menu} {subsection}" if subsection != "" else f"menu {menu}"
return False if name not in self.config else self.config[name].get('name')
def get_preheat_options(self):
index = "preheat "
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 = {}
for item in items:
preheat_options[item] = self._build_preheat_item(index + item)
return preheat_options
def _build_preheat_item(self, name):
if name not in self.config:
return False
cfg = self.config[name]
return {opt: cfg.get("gcode", None) if opt == "gcode" else cfg.getfloat(opt, None) for opt in cfg}
def get_printer_config(self, name):
if not name.startswith("printer "):
name = "printer %s" % name
name = f"printer {name}"
if name not in self.config:
return None
return self.config[name]
def get_printer_power_name(self):
return self.config['settings'].get("printer_power_name", "printer")
return None if name not in self.config else self.config[name]
def get_printers(self):
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):
save_config = configparser.ConfigParser()
for item in self.configurable_options:
@@ -261,27 +474,28 @@ class KlipperScreenConfig:
opt = item[name]
curval = self.config[opt['section']].get(name)
if curval != opt["value"] or (
self.defined_config != None and opt['section'] in self.defined_config.sections() and
self.defined_config[opt['section']].get(name,None) not in (None, curval)):
self.defined_config is not None and opt['section'] in self.defined_config.sections() and
self.defined_config[opt['section']].get(name, None) not in (None, curval)):
if opt['section'] not in save_config.sections():
save_config.add_section(opt['section'])
save_config.set(opt['section'], name, str(curval))
macro_sections = [i for i in self.config.sections() if i.startswith("displayed_macros")]
for macro_sec in macro_sections:
for item in self.config.options(macro_sec):
value = self.config[macro_sec].getboolean(item, fallback=True)
if value == False or (self.defined_config != None and
macro_sec in self.defined_config.sections() and
self.defined_config[macro_sec].getboolean(item, fallback=True) == False and
self.defined_config[macro_sec].getboolean(item, fallback=True) != value):
if macro_sec not in save_config.sections():
save_config.add_section(macro_sec)
save_config.set(macro_sec, item, str(value))
extra_sections = [i for i in self.config.sections() if i.startswith("displayed_macros")]
extra_sections.extend([i for i in self.config.sections() if i.startswith("graph")])
for section in extra_sections:
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
section in self.defined_config.sections() and
self.defined_config[section].getboolean(item, fallback=True) is False and
self.defined_config[section].getboolean(item, fallback=True) != value):
if section not in save_config.sections():
save_config.add_section(section)
save_config.set(section, item, str(value))
save_output = self._build_config_string(save_config).split("\n")
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:
user_def = ""
@@ -289,21 +503,31 @@ class KlipperScreenConfig:
else:
user_def, saved_def = self.separate_saved_config(self.config_path)
extra_lb = "\n" if saved_def != None else ""
contents = "%s\n%s%s\n%s\n%s\n%s\n" % (user_def, self.do_not_edit_line, extra_lb,
self.do_not_edit_prefix, "\n".join(save_output), self.do_not_edit_prefix)
contents = (f"{user_def}\n"
f"{self.do_not_edit_line}\n"
f"{self.do_not_edit_prefix}\n"
+ '\n'.join(save_output) + f"\n"
f"{self.do_not_edit_prefix}\n")
if self.config_path != self.default_config_path:
path = self.config_path
filepath = self.config_path
else:
path = os.path.expanduser("~/KlipperScreen.conf")
filepath = os.path.expanduser("~/")
klipper_config = os.path.join(filepath, "printer_data", "config")
old_klipper_config = os.path.join(filepath, "klipper_config")
if os.path.exists(klipper_config):
filepath = os.path.join(klipper_config, self.configfile_name)
elif os.path.exists(old_klipper_config):
filepath = os.path.join(old_klipper_config, self.configfile_name)
else:
filepath = os.path.join(filepath, self.configfile_name)
logging.info(f'Creating a new config file in {filepath}')
try:
file = open(path, 'w')
file.write(contents)
file.close()
except:
logging.error("Error writing configuration file")
with open(filepath, 'w') as file:
file.write(contents)
except Exception as e:
logging.error(f"Error writing configuration file in {filepath}:\n{e}")
def set(self, section, name, value):
self.config.set(section, name, value)
@@ -321,7 +545,8 @@ class KlipperScreenConfig:
]
logging.info("\n".join(lines))
def _build_config_string(self, config):
@staticmethod
def _build_config_string(config):
sfile = StringIO()
config.write(sfile)
sfile.seek(0)
@@ -333,28 +558,13 @@ class KlipperScreenConfig:
cfg = self.config[name]
item = {
"name": cfg.get("name"),
"icon": cfg.get("icon"),
"panel": cfg.get("panel", False),
"method": cfg.get("method", False),
"confirm": cfg.get("confirm", False),
"enable": cfg.get("enable", True)
"icon": cfg.get("icon", None),
"panel": cfg.get("panel", None),
"method": cfg.get("method", None),
"confirm": cfg.get("confirm", None),
"enable": cfg.get("enable", "True"),
"params": cfg.get("params", "{}"),
"style": cfg.get("style", None)
}
try:
item["params"] = json.loads(cfg.get("params", "{}"))
except:
logging.debug("Unable to parse parameters for [%s]" % name)
item["params"] = {}
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", 0),
"bed": cfg.getint("bed", 0),
"heater_generic": cfg.getint("heater_generic", 0)
}
return item
@@ -1,6 +1,4 @@
[main]
moonraker_host: 127.0.0.1
moonraker_port: 7125
[preheat PLA]
bed = 40
@@ -10,24 +8,82 @@ extruder = 195
bed = 90
extruder = 220
[preheat PETG]
bed = 80
extruder = 240
[preheat FLEX]
bed = 0
extruder = 210
[menu __main]
name: {{ gettext('Main Menu') }}
[menu __main homing]
name: {{ gettext('Homing') }}
icon: home
[menu __main preheat]
name: {{ gettext('Preheat') }}
icon: heat-up
panel: preheat
[menu __main actions]
name: {{ gettext('Actions') }}
[menu __main move]
name: {{ gettext('Move') }}
icon: move
panel: move
[menu __main config]
name: {{ gettext('Configuration') }}
[menu move homing homeall]
name: {{ gettext('Home All') }}
icon: home
method: printer.gcode.script
params: {"script":"G28"}
[menu move homing homex]
name: {{ gettext('Home X') }}
icon: home-x
method: printer.gcode.script
params: {"script":"G28 X"}
[menu move homing homey]
name: {{ gettext('Home Y') }}
icon: home-y
method: printer.gcode.script
params: {"script":"G28 Y"}
[menu move homing homez]
name: {{ gettext('Home Z') }}
icon: home-z
method: printer.gcode.script
params: {"script":"G28 Z"}
[menu move homing homexy]
name: {{ gettext('Home XY') }}
icon: home
method: printer.gcode.script
params: {"script":"G28 X Y"}
[menu move homing quad_gantry_level]
name: {{ gettext('Quad Gantry Level') }}
icon: home-z
method: printer.gcode.script
params: {"script":"QUAD_GANTRY_LEVEL"}
enable: {{ printer.quad_gantry_level is defined }}
[menu move homing Z-Tilt]
name: {{ gettext('Z Tilt') }}
icon: z-tilt
method: printer.gcode.script
params: {"script":"Z_TILT_ADJUST"}
enable: {{ printer.z_tilt is defined }}
[menu __main temperature]
name: {{ gettext('Temperature') }}
icon: heat-up
panel: temperature
enable: {{ (printer.temperature_devices.count > 0) or (printer.extruders.count > 0)}}
[menu __main extrude]
name: {{ gettext('Extrude') }}
icon: extrude
panel: extrude
enable: {{ printer.extruders.count > 0 }}
[menu __main more]
name: {{ gettext('More') }}
icon: settings
[menu __main print]
@@ -35,131 +91,100 @@ name: {{ gettext('Print') }}
icon: print
panel: print
[menu __main homing homeall]
name: {{ gettext('Home All') }}
icon: home
method: printer.gcode.script
params: {"script":"G28"}
[menu __main more bedlevel]
name: {{ gettext('Bed Level') }}
icon: bed-level
panel: bed_level
enable: {{ printer.bed_screws or printer.screws_tilt_adjust}}
[menu __main homing homex]
name: {{ gettext('Home X') }}
icon: home-x
method: printer.gcode.script
params: {"script":"G28 X"}
[menu __main more bedmesh]
name: {{ gettext('Bed Mesh') }}
icon: bed-mesh
panel: bed_mesh
enable: {{ printer.bed_mesh is defined }}
[menu __main homing homey]
name: {{ gettext('Home Y') }}
icon: home-y
method: printer.gcode.script
params: {"script":"G28 Y"}
[menu __main more zoffset]
name: {{ gettext('Z Calibrate') }}
icon: z-farther
panel: zcalibrate
[menu __main homing homez]
name: {{ gettext('Home Z') }}
icon: home-z
method: printer.gcode.script
params: {"script":"G28 Z"}
[menu __main more limits]
name: {{ gettext('Limits') }}
icon: fine-tune
panel: limits
[menu __main homing homexy]
name: {{ gettext('Home XY') }}
icon: home
method: printer.gcode.script
params: {"script":"G28 X Y"}
[menu __main more retraction]
name: {{ gettext('Retraction') }}
icon: retract
panel: retraction
enable: {{ printer.firmware_retraction }}
[menu __main homing quad_gantry_level]
name: {{ gettext('Quad Gantry Level') }}
icon: home-z
method: printer.gcode.script
params: {"script":"QUAD_GANTRY_LEVEL"}
enable: {{ printer.quad_gantry_level is defined }}
[menu __main homing Z-Tilt]
name: {{ gettext('Z Tilt') }}
icon: z-tilt
method: printer.gcode.script
params: {"script":"Z_TILT_ADJUST"}
enable: {{ printer.z_tilt is defined }}
[menu __main actions move]
name: {{ gettext('Move') }}
icon: move
panel: move
[menu __main actions extrude]
name: {{ gettext('Extrude') }}
icon: filament
panel: extrude
[menu __main actions fan]
[menu __main more fan]
name: {{ gettext('Fan') }}
icon: fan
panel: fan
enable: {{ printer.fans.count > 0 }}
[menu __main actions temperature]
name: {{ gettext('Temperature') }}
icon: heat-up
panel: temperature
[menu __main actions macros]
[menu __main more macros]
name: {{ gettext('Macros') }}
icon: custom-script
panel: gcode_macros
enable: {{ printer.gcode_macros.count > 0 }}
[menu __main actions power]
[menu __main more pins]
name: {{ gettext('Pins') }}
icon: hashtag
panel: pins
enable: {{ printer.output_pins.count > 0 }}
[menu __main more power]
name: {{ gettext('Power') }}
icon: shutdown
panel: power
enable: {{ printer.power_devices.count > 0 }}
[menu __main actions disablemotors]
name: {{ gettext('Disable Motors') }}
icon: motor-off
method: printer.gcode.script
params: {"script":"M18"}
[menu __main more camera]
name: {{ gettext('Camera') }}
icon: camera
panel: camera
enable: {{ camera_configured }}
[menu __main config bedlevel]
name: {{ gettext('Bed Level') }}
icon: bed-level
panel: bed_level
[menu __main more console]
name: {{ gettext('Console') }}
icon: console
panel: console
[menu __main config bedmesh]
name: {{ gettext('Bed Mesh') }}
icon: bed-level
panel: bed_mesh
enable: {{ printer.bed_mesh is defined }}
[menu __main config zoffset]
name: {{ gettext('Z Calibrate') }}
icon: z-farther
panel: zcalibrate
enable: {{ ((printer.bltouch is defined) or (printer.probe is defined)) }}
[menu __main config network]
name: {{ gettext('Network') }}
icon: network
panel: network
[menu __main config system]
[menu __main more system]
name: {{ gettext('System') }}
icon: info
panel: system
[menu __main config save]
[menu __main more input_shaper]
name: {{ gettext('Input Shaper') }}
icon: move
panel: input_shaper
enable: {{ printer.input_shaper }}
[menu __main more save]
name: {{ gettext('Save Config') }}
icon: complete
method: printer.gcode.script
params: {"script":"SAVE_CONFIG"}
confirm:
{{ gettext('Save configuration.') }}
{{ gettext('Save configuration?') }}
{{ gettext('Klipper will reboot') }}
[menu __main config settings]
name: {{ gettext('Settings') }}
[menu __main more settings]
name: KlipperScreen
icon: settings
panel: settings
[menu __main more network]
name: {{ gettext('Network') }}
icon: network
panel: network
[menu __print]
name: {{ gettext('Print Control') }}
@@ -167,17 +192,25 @@ name: {{ gettext('Print Control') }}
name: {{ gettext('Temperature') }}
icon: heat-up
panel: temperature
enable: {{ (printer.temperature_devices.count > 0) or (printer.extruders.count > 0)}}
[menu __print fan]
name: {{ gettext('Fan') }}
icon: fan
panel: fan
enable: {{ printer.fans.count > 0 }}
[menu __print move]
name: {{ gettext('Move') }}
icon: move
panel: move
enable: {{ (printer.pause_resume.is_paused == True) }}
[menu __print extrude]
name: {{ gettext('Extrude') }}
icon: filament
panel: extrude
enable: {{ printer.pause_resume.is_paused == True }}
enable: {{ (printer.pause_resume.is_paused == True) and (printer.extruders.count > 0) }}
[menu __print power]
name: {{ gettext('Power') }}
@@ -191,22 +224,39 @@ icon: custom-script
panel: gcode_macros
enable: {{ printer.gcode_macros.count > 0 }}
[menu __print camera]
name: {{ gettext('Camera') }}
icon: camera
panel: camera
enable: {{ camera_configured }}
[menu __print console]
name: {{ gettext('Console') }}
icon: console
panel: console
[menu __print limits]
name: {{ gettext('Limits') }}
icon: fine-tune
panel: limits
[menu __print network]
name: {{ gettext('Network') }}
icon: network
panel: network
[menu __print system]
name: {{ gettext('System') }}
icon: info
panel: system
[menu __print retraction]
name: {{ gettext('Retraction') }}
icon: retract
panel: retraction
enable: {{ printer.firmware_retraction }}
[menu __print settings]
name: {{ gettext('Settings') }}
icon: settings
panel: settings
[menu __splashscreen]
name: {{ gettext('Menu') }}
@@ -225,3 +275,9 @@ panel: network
name: {{ gettext('System') }}
icon: info
panel: system
enable: {{ moonraker_connected }}
[menu __splashscreen settings]
name: KlipperScreen
icon: settings
panel: settings
+6
View File
@@ -0,0 +1,6 @@
#define emptyCursor_width 1
#define emptyCursor_height 1
#define emptyCursor_x_hot 0
#define emptyCursor_y_hot 0
static unsigned char emptyCursor_bits[] = {
0x00};
+69 -49
View File
@@ -1,40 +1,37 @@
import logging
import json
import os
import base64
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk, GLib
from gi.repository import GLib
class KlippyFiles():
thumbnail_dir = "/tmp/.KS-thumbnails"
class KlippyFiles:
def __init__(self, screen):
self.loop = None
self._poll_task = None
self._screen = screen
self.callbacks = []
self.files = {}
self.filelist = []
self.metadata_timeout = {}
if not os.path.exists(self.thumbnail_dir):
os.makedirs(self.thumbnail_dir)
self.gcodes_path = None
def initialize(self):
self.gcodes_path = None
if "virtual_sdcard" in self._screen.printer.get_config_section_list():
vsd = self._screen.printer.get_config_section("virtual_sdcard")
if "path" in vsd:
self.gcodes_path = vsd['path']
logging.info("Gcodes path: %s" % self.gcodes_path)
self.gcodes_path = os.path.expanduser(vsd['path'])
logging.info(f"Gcodes path: {self.gcodes_path}")
def reset(self):
self._screen = None
self.callbacks = None
self.files = None
self.filelist = None
self.gcodes_path = None
def _callback(self, result, method, params):
if method == "server.files.list":
if "result" in result and isinstance(result['result'],list):
if "result" in result and isinstance(result['result'], list):
newfiles = []
deletedfiles = self.filelist.copy()
for item in result['result']:
@@ -45,45 +42,61 @@ class KlippyFiles():
newfiles.append(file)
self.add_file(item, False)
if len(newfiles) > 0 or len(deletedfiles) > 0:
if newfiles or len(deletedfiles) > 0:
self.run_callbacks(newfiles, deletedfiles)
if len(deletedfiles) > 0:
for file in deletedfiles:
self.remove_file(file)
elif method == "server.files.directory":
if "result" in result:
directory = params['path'][7:] if params['path'].startswith('gcodes/') else params['path']
if directory[-1] == '/':
directory = directory[:-1]
newfiles = []
for file in result['result']['files']:
fullpath = f"{directory}/{file['filename']}"
if fullpath not in self.filelist:
newfiles.append(fullpath)
if newfiles:
self.run_callbacks(newfiles)
elif method == "server.files.metadata":
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
for x in result['result']:
self.files[params['filename']][x] = result['result'][x]
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']:
thumbnail['local'] = False
if self.gcodes_path != None:
if self.gcodes_path is not None:
fpath = os.path.join(self.gcodes_path, params['filename'])
fdir = os.path.dirname(fpath)
path = os.path.join(fdir, thumbnail['relative_path'])
if os.access(path, os.R_OK):
thumbnail['local'] = True
thumbnail['path'] = path
if thumbnail['local'] == False:
if thumbnail['local'] is False:
fdir = os.path.dirname(params['filename'])
thumbnail['path'] = os.path.join(fdir, thumbnail['relative_path'])
self.run_callbacks(mods=[params['filename']])
def add_file(self, item, notify=True):
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
filename = item['path'] if "path" in item else item['filename']
if filename in self.filelist:
logging.info("File already exists: %s" % filename)
logging.info(f"File already exists: {filename}")
self.request_metadata(filename)
args = None, None, [filename]
GLib.idle_add(self.run_callbacks, *args)
return
self.filelist.append(filename)
@@ -92,48 +105,52 @@ class KlippyFiles():
"modified": item['modified']
}
self.request_metadata(filename)
if notify == True:
if notify is True:
self.run_callbacks(newfiles=[filename])
def add_file_callback(self, callback):
try:
self.callbacks.append(callback)
except:
logging.debug("Callback not found: %s" % callback)
except Exception as e:
logging.debug(f"Callback not found: {callback}:\n{e}")
def process_update(self, data):
if 'item' in data and data['item']['root'] != 'gcodes':
return
if data['action'] == "create_file":
if data['action'] == "create_dir":
self._screen._ws.klippy.get_file_dir(f"gcodes/{data['item']['path']}", self._callback)
elif data['action'] == "create_file":
self.add_file(data['item'])
elif data['action'] == "delete_file":
self.remove_file(data['item']['path'])
elif data['action'] == "modify_file":
self.request_metadata(data['item']['path'])
elif data['action'] == "move_file":
self.add_file(data['item'], False)
self.remove_file(data['source_item']['path'], False)
self.run_callbacks(newfiles=[data['item']['path']], deletedfiles=[data['source_item']['path']])
return False
def remove_file_callback(self, callback):
if callback in self.callbacks:
self.callbacks.pop(self.callbacks.index(callback))
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):
if not self.file_exists(filename):
return False
if "slicer" in self.files[filename]:
return True
if self.file_exists(filename):
return "slicer" in self.files[filename]
return False
def get_thumbnail_location(self, filename):
if not self.has_thumbnail(filename):
return None
thumb = self.files[filename]['thumbnails'][0]
if thumb['local'] == False:
def get_thumbnail_location(self, filename, small=False):
if small and len(self.files[filename]['thumbnails']) > 1 \
and self.files[filename]['thumbnails'][0]['width'] > self.files[filename]['thumbnails'][1]['width']:
thumb = self.files[filename]['thumbnails'][1]
else:
thumb = self.files[filename]['thumbnails'][0]
if thumb['local'] is False:
return ['http', thumb['path']]
return ['file', thumb['path']]
@@ -149,6 +166,7 @@ class KlippyFiles():
def refresh_files(self):
self._screen._ws.klippy.get_file_list(self._callback)
return False
def remove_file(self, filename, notify=True):
if filename not in self.filelist:
@@ -157,25 +175,27 @@ class KlippyFiles():
self.filelist.remove(filename)
self.files.pop(filename, None)
if notify == True:
if notify is True:
self.run_callbacks(deletedfiles=[filename])
def ret_file_data (self, filename):
print("Getting file info for %s" % (filename))
self._screen._ws.klippy.get_file_metadata(filename, self._callback)
def run_callbacks(self, newfiles=[], deletedfiles=[], mods=[]):
def run_callbacks(self, newfiles=None, deletedfiles=None, mods=None):
if mods is None:
mods = []
if deletedfiles is None:
deletedfiles = []
if newfiles is None:
newfiles = []
if len(self.callbacks) <= 0:
return
return False
for cb in self.callbacks:
GLib.idle_add(cb, newfiles, deletedfiles, mods)
args = newfiles, deletedfiles, mods
GLib.idle_add(cb, *args)
return False
def get_file_list(self):
return self.filelist
def get_file_info(self, filename):
if filename not in self.files:
return {"path":None,"modified":0,"size":0}
return {"path": None, "modified": 0, "size": 0}
return self.files[filename]
+65 -21
View File
@@ -35,8 +35,8 @@ try:
dummy1_i_p = ctypes.create_string_buffer(8)
dummy2_i_p = ctypes.create_string_buffer(8)
if display.value:
if libXext.DPMSQueryExtension(display, dummy1_i_p, dummy2_i_p)\
and libXext.DPMSCapable(display):
if libXext.DPMSQueryExtension(display, dummy1_i_p, dummy2_i_p) \
and libXext.DPMSCapable(display):
onoff_p = ctypes.create_string_buffer(1)
state_p = ctypes.create_string_buffer(2)
if libXext.DPMSInfo(display, state_p, onoff_p):
@@ -45,9 +45,39 @@ try:
state = struct.unpack('H', state_p.raw)[0]
libXext.XCloseDisplay(display)
return state
dpms_loaded = True
except:
pass
except Exception as msg:
logging.error(f"Couldn't load DPMS: {msg}")
def get_network_interfaces():
stream = os.popen("ip addr | grep ^'[0-9]' | cut -d ' ' -f 2 | grep -o '[a-zA-Z0-9\\.]*'")
return [i for i in stream.read().strip().split('\n') if not i.startswith('lo')]
def get_wireless_interfaces():
p = subprocess.Popen(["which", "iwconfig"], stdout=subprocess.PIPE)
while p.poll() is None:
time.sleep(.1)
if p.poll() != 0:
return None
try:
p = subprocess.Popen(["iwconfig"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = p.stdout.read().decode('ascii').split('\n')
except Exception as e:
logging.critical(e, exc_info=True)
logging.info("Error with running iwconfig command")
return None
interfaces = []
for line in result:
match = re.search('^(\\S+)\\s+.*$', line)
if match:
interfaces.append(match[1])
return interfaces
def get_software_version():
@@ -69,30 +99,36 @@ def get_software_version():
logging.exception("Error runing git describe")
return "?"
def patch_threading_excepthook():
"""Installs our exception handler into the threading modules Thread object
Inspired by https://bugs.python.org/issue1230540
"""
old_init = threading.Thread.__init__
def new_init(self, *args, **kwargs):
old_init(self, *args, **kwargs)
old_run = self.run
def run_with_excepthook(*args, **kwargs):
try:
old_run(*args, **kwargs)
except (KeyboardInterrupt, SystemExit):
raise
except:
except Exception:
sys.excepthook(*sys.exc_info(), thread_identifier=threading.get_ident())
self.run = run_with_excepthook
threading.Thread.__init__ = new_init
# Timed rotating file handler based on Klipper and Moonraker's implementation
class KlipperScreenLoggingHandler(logging.handlers.TimedRotatingFileHandler):
# Rotating file handler based on Klipper and Moonraker's implementation
class KlipperScreenLoggingHandler(logging.handlers.RotatingFileHandler):
def __init__(self, software_version, filename, **kwargs):
super(KlipperScreenLoggingHandler, self).__init__(filename, **kwargs)
self.rollover_info = {
'header': f"{'-'*20}KlipperScreen Log Start{'-'*20}",
'header': f"{'-' * 20}KlipperScreen Log Start{'-' * 20}",
'version': f"Git Version: {software_version}",
}
lines = [line for line in self.rollover_info.values() if line]
@@ -108,6 +144,7 @@ class KlipperScreenLoggingHandler(logging.handlers.TimedRotatingFileHandler):
if self.stream is not None:
self.stream.write("\n".join(lines) + "\n")
# Logging based on Arksine's logging setup
def setup_logging(log_file, software_version):
root_logger = logging.getLogger()
@@ -120,22 +157,29 @@ def setup_logging(log_file, software_version):
stdout_fmt = logging.Formatter(
'%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
stdout_hdlr.setFormatter(stdout_fmt)
fh = None
if log_file:
fh = KlipperScreenLoggingHandler(software_version, log_file, when='midnight', backupCount=2)
formatter = logging.Formatter(
'%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
fh = listener = None
try:
fh = KlipperScreenLoggingHandler(software_version, log_file, maxBytes=4194304, backupCount=1)
formatter = logging.Formatter('%(asctime)s [%(filename)s:%(funcName)s()] - %(message)s')
fh.setFormatter(formatter)
listener = logging.handlers.QueueListener(
queue, fh, stdout_hdlr)
else:
listener = logging.handlers.QueueListener(
queue, stdout_hdlr)
listener = logging.handlers.QueueListener(queue, fh, stdout_hdlr)
except Exception as e:
print(
f"Unable to create log file at '{os.path.normpath(log_file)}'.\n"
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()
def logging_exception_handler(type, value, tb, thread_identifier=None):
logging.exception("Uncaught exception %s: %s\nTraceback: %s" % (type, value, "\n".join(traceback.format_tb(tb))))
def logging_exception_handler(ex_type, value, tb, thread_identifier=None):
logging.exception(
f'Uncaught exception {ex_type}: {value}\n'
+ '\n'.join([str(x) for x in [*traceback.format_tb(tb)]])
)
sys.excepthook = logging_exception_handler
logging.captureWarnings(True)
Loaded 100 of 550 files, more files were not shown because too many files have changed in this diff. Show more