73 Commits
Author SHA1 Message Date
Alfredo Monclus a92be75c48 refactor: optimize imports 2024-11-26 11:57:43 -03:00
Alfredo Monclus 2d2e80c3fd panels: allow to call them without name 2024-06-04 11:16:50 -03:00
alfrix 4dd489575e remove unused imports 2024-04-26 20:34:43 -03:00
Alfredo Monclus f22f7574b3 bed_level: support inversion and fix screws_rotation of 3/6 screws (#1335)
* bed_level: major rework

deprecate screw positions, we will be auto-detecting from now on

support rotating the layout (previously only rotated the button actions)

invert support, inverting axis in KS will invert the layout

* move: mark bed_level to reinit after invert

* bed_level: rotate with a shift function

* bed_level: rotation show popup if misconfigured

* bed_level: message for screw configurations not supportted in a more informative way

* docs: update bed_level docs
2024-04-18 12:10:58 -03:00
alfrix 6908d5832c bed_level: add a warning for the screws not being used 2024-04-13 10:25:19 -03:00
alfrix 6886c17604 bed_level: add a specific center screw icon
make z-bolt theme middle screws more visible

make colorized specific icons for the bed
2024-04-13 10:24:57 -03:00
alfrix ece8526dfe bed_level: do not round screw positions
fixes some cases where screws were not detected when doing screws_tilt_calibrate

i don't remember why they were rounded, but the panel went through several revisions at this point and it doesn't seem necessary
2024-04-09 21:55:01 -03:00
Péter Németh ff1d98f5a0 Fix bed level complete icon (#1268)
* Fix #1267
2024-02-11 21:08:13 -03:00
Alfredo Monclus b5e87152f1 bed_level: improvements (#1248)
1. use the status reference instead of regex matching (this was coded before the status existed)
2. change icons to reflect the rotation direction
3. change icon to reflect that the adjustment is good enough (according to klipper docs below 6 minutes)
4. auto open the panel when screws_tilt_calculate finished

close #1231
2024-01-25 22:46:51 -03:00
alfrix 6cf639c083 refactor widget creation
improves performance and makes the code cleaner

* add parameters instead of calling methods afterwards
* remove a a lot of size requests
* remove parameters that are being set to the default value
* simplify dialogs containers
2024-01-02 08:14:51 -03:00
alfrix fe664b44a5 bed_level: hotfix for b6199a4 2023-10-08 12:02:29 -03:00
alfrix b6199a4f24 config: deprecate old configs 2023-10-08 11:51:48 -03:00
alfrix dcad47bb51 bed_level: lint fix 2023-08-18 11:48:37 -03:00
alfrix 3780aa0c8d bed_level: fix center button not reporting rotation and reduce icon size fixes #1084 2023-08-18 11:48:37 -03:00
alfrix 90fc3288d7 Use callbacks to disable and enable buttons to improve user feedback
buttons now show a spinner if watiting for callback
2023-08-18 11:48:37 -03:00
alfrix e7b58edfbf klippygcodes: simplify and remove some alias that are irrelevant 2023-08-18 11:48:37 -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
Alfredo Monclus d3480cf571 bed_screws: use klipper config values for speed and heights (#1028) 2023-06-30 17:43:31 -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 be473bf626 bed_level: fix auto-detect when there is no config file fixes #918 2023-03-10 06:43:02 -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 70d7564a78 shorten _screen.printer to _printer 2022-12-11 09:17:18 -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 f8cde7bfe1 Add busy state, and disable buttons that usually take time during the state 2022-11-26 00:17:30 -03:00
alfrix 593d8c678b gtk: merge buttonimage and button 2022-11-22 14:55:42 -03:00
alfrix d0d79a64df base_panel: simplify action bar buttons enable-disable 2022-11-21 09:20:05 -03:00
alfrix dbd1474d63 screen_panel: share ks_printer_cfg between panels 2022-11-20 14:17:48 -03:00
alfrix c4c7e50314 printer: create get_probe to support other probe types 2022-11-20 11:07:24 -03:00
alfrix fc0f153023 reorder imports 2022-11-20 07:28:05 -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 2f427f7b82 lint fixes and minor refactorings 2022-09-21 11:54:49 -03:00
alfrix 38ceea5204 gtk: improve wrapping of labels 2022-09-02 19:58:35 -03:00
alfrix 054fc80006 bed_level: fix label rounding 2022-08-07 06:30:18 -03:00
alfrix be1b5228c1 bed_level: fix label rounding issues 2022-08-06 12:08:05 -03:00
alfrix 0ec2baf302 bed_level: fix for printers without name/config 2022-08-02 13:21:03 -03:00
alfrix af158a4279 bed_level: support 3 screws close #606 2022-08-01 12:23:40 -03:00
alfrix eb17bb58ad screen_panel: remove unused parameters 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 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 5ad82a64d4 Translations: install _() 2022-07-03 12:03:50 -03:00
alfrix 5a36729b76 PEP8, typos and warnings fixes 2022-05-31 11:14:42 -03:00
alfrix c33659c6f7 gtk: cleanup andoptimize image handling, incomplete themes should now work 2022-04-02 09:59:12 -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 84fc6e5757 Bed_level: Support 6 and 8 Screws and rotation (#484) 2022-02-23 14:04:54 -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
Jordan 5d6f80a170 bed_level: Fix #275. Make the screws button disabled while command is running. 2021-09-18 09:50:24 -04:00