Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a9180d482 | ||
|
|
e1fcfdc9c7 | ||
|
|
c37acb5c00 | ||
|
|
8f71eb7ca8 | ||
|
|
e9ed33c580 | ||
|
|
bf76132a0f | ||
|
|
df32787dc0 | ||
|
|
7ffc394366 | ||
|
|
44c417bc85 |
No files matched your search
@@ -1,54 +0,0 @@
|
||||
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
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Klipper Discord Server
|
||||
url: https://discord.gg/klipper
|
||||
about: If you have questions or need general support.
|
||||
@@ -1,44 +0,0 @@
|
||||
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
|
||||
@@ -2,7 +2,7 @@ name: test-code
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
lint-python-code:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ricardochaves/python-lint@v1.4.0
|
||||
@@ -14,4 +14,4 @@ jobs:
|
||||
use-black: false
|
||||
use-mypy: false
|
||||
use-isort: false
|
||||
extra-pycodestyle-options: "--ignore=E402,W503,W504 --max-line-length=120 --max-doc-length=120"
|
||||
extra-pycodestyle-options: "--ignore=E226,E301,E302,E303,E402,W503,W504 --max-line-length=120 --max-doc-length=120"
|
||||
@@ -1,8 +0,0 @@
|
||||
.idea/
|
||||
KlipperScreen.conf
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
dist/
|
||||
build/
|
||||
venv/
|
||||
@@ -1,34 +1,15 @@
|
||||
# KlipperScreen
|
||||
|
||||
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.
|
||||
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).
|
||||
|
||||
### Documentation [](https://klipperscreen.readthedocs.io/en/latest/?badge=latest)
|
||||
Multiple printers update is here! Please check the configuration information for specifying several printers.
|
||||
|
||||
### Documentation
|
||||
|
||||
[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).
|
||||
|
||||
[](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 +0,0 @@
|
||||
screen.py
|
||||
@@ -1,103 +0,0 @@
|
||||
# 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/)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,159 +1,90 @@
|
||||
# Configuration
|
||||
|
||||
Usually you don't need to create a configuration file, but if you need to change something that is not changeable in the UI
|
||||
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).
|
||||
Create a blank file in `~/klipper_config/KlipperScreen.conf_`, if the file already exist then just edit it.
|
||||
|
||||
Write in the file only the options that need to be changed.
|
||||
|
||||
## 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]
|
||||
# Time in seconds before the Job Status page closes itself after a successful job/print
|
||||
# 0 means disabled
|
||||
job_complete_timeout: 0
|
||||
# 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 closes itself if an error is encountered
|
||||
# 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.
|
||||
job_error_timeout: 0
|
||||
|
||||
# Specify the language
|
||||
# The language can be specified here instead of using the system default language.
|
||||
language: en
|
||||
|
||||
# Allows the cursor to be displayed on the screen
|
||||
show_cursor: False
|
||||
|
||||
# If multiple printers are defined, this can be set the name of the one to show at startup.
|
||||
default_printer: Ender 3 Pro
|
||||
|
||||
# To define a full set of custom menues (instead of merging user entries with default entries)
|
||||
# set this to False. See Menu section below.
|
||||
use_default_menu: True
|
||||
|
||||
# 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
|
||||
```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
|
||||
## Z probe calibrate Option
|
||||
If for any reason the XYZ home position is not suitable for calibrating the probe Z offset, you can enter the coordinates for the desired position here.
|
||||
```
|
||||
[z_calibrate_position]
|
||||
# The specified positions must be> 0 otherwise this option is ignored.
|
||||
# the center of the print bed is a good value
|
||||
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
|
||||
# Temperature for generic heaters
|
||||
heater_generic: 40
|
||||
# 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
|
||||
This allows a custom configuration for the menu displayed while the printer is idle. You can use sub-menus to group
|
||||
different items and there are several panel options available. It is possible to have a gcode script run on a menu
|
||||
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
|
||||
# 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
|
||||
# Optional Parameters
|
||||
# Panel from the panels listed below
|
||||
panel: preheat
|
||||
# Moonraker method to call when the item is selected
|
||||
@@ -164,36 +95,21 @@ 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:
|
||||
```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.gcode_macros.count # Number of gcode macros
|
||||
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
|
||||
@@ -221,15 +137,13 @@ 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_
|
||||
3. _~/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.
|
||||
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: (do not edit use as reference)
|
||||
_${KlipperScreen_Directory}/ks_includes/default.conf_
|
||||
|
||||
@@ -8,4 +8,6 @@ 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/)
|
||||
The invite link: https://discord.klipper3d.org/
|
||||
|
||||
Look for the channel `#klipper-screen`
|
||||
@@ -1,190 +1,81 @@
|
||||
# Hardware
|
||||
|
||||
There are no recommended screens, but the minimum supported resolution is 480x320.
|
||||
There are no recommended screens, but here are some guidelines:
|
||||
|
||||
In general, if the device can show a GNU/Linux desktop, then KlipperScreen should work too.
|
||||
* There is no support for vertical/portrait mode, only widescreen
|
||||
* Minimum resolution of 480x320
|
||||
|
||||
#### Hardware known to work
|
||||
|
||||
* [BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part)
|
||||
* [BTT 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)
|
||||
* [Android Phone](https://klipper.discourse.group/t/how-to-klipperscreen-on-android-smart-phones/1196)
|
||||
* [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)
|
||||
|
||||
|
||||
* [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35)
|
||||
|
||||
### Configuration
|
||||
#### Configuration
|
||||
|
||||
Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then [install](Installation.md) KlipperScreen, if you are having troubles refer to the [troubleshooting page](Troubleshooting.md) for further information.
|
||||
Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then  KlipperScreen, if you are having troubles refer to the  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:
|
||||
#### Touchscreen Calibration
|
||||
Most people don't need to calibrate, but if you do need to calibrate your touchscreen, follow the below steps.
|
||||
|
||||
!!! 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
|
||||
Run this command:
|
||||
```
|
||||
DISPLAY=:0 xinput_calibrator --list
|
||||
```
|
||||
It will output something such as:
|
||||
```
|
||||
Device "wch.cn USB2IIC_CTP_CONTROL" id=6
|
||||
```
|
||||
|
||||
Find the ID of your display and put it in the following command:
|
||||
```
|
||||
DISPLAY=:0 xinput_calibrator -v --device <id from last command>
|
||||
```
|
||||
|
||||
???+ 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
|
||||
#### 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:
|
||||
transformation matrix. You can have the matrix be one of the following:
|
||||
|
||||
* 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`
|
||||
* 180°: `-1 0 1 0 -1 1 0 0 1`
|
||||
|
||||
For example:
|
||||
To check the current matrix, you will need your `<screen name>`
|
||||
(which can be found via the last section, ex: "wch.cn USB2IIC_CTP_CONTROL").
|
||||
Run the following command: `xinput list-props "wch.cn USB2IIC_CTP_CONTROL"`
|
||||
|
||||
```sh
|
||||
DISPLAY=:0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
|
||||
It will output something such as:
|
||||
```
|
||||
Device '<screen name>':
|
||||
Device Enabled (115): 1
|
||||
Coordinate Transformation Matrix (116): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
|
||||
libinput Calibration Matrix (247): -1.000000, 0.000000, 1.000000, 0.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000
|
||||
libinput Calibration Matrix Default (248): -1.000000, 0.000000, 1.000000, 0.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000
|
||||
libinput Send Events Modes Available (249): 1, 0
|
||||
libinput Send Events Mode Enabled (250): 0, 0
|
||||
libinput Send Events Mode Enabled Default (251): 0, 0
|
||||
Device Node (252): "/dev/input/event0"
|
||||
Device Product ID (253): 6790, 58083
|
||||
```
|
||||
|
||||
You can verify by checking that the 'Coordinate Transformation Matrix' or 'libinput Calibration Matrix'.
|
||||
|
||||
You can test a change by running: `xinput set-prop "<screen name>" 'Coordinate Transformation Matrix' <matrix>`
|
||||
|
||||
Replace matrix with one of the options above, such as: `1 0 0 0 1 0 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
|
||||
ACTION=="add", ATTRS{name}=="<screen name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
|
||||
```
|
||||
|
||||
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)
|
||||
@@ -1,40 +1,44 @@
|
||||
# Installation
|
||||
|
||||
## First steps
|
||||
#### Setup Raspberry Pi
|
||||
This install process is meant for Raspbian non-desktop version aka Raspbian Lite.
|
||||
|
||||
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.
|
||||
If you have installed it on the GUI version, then use `sudo raspi-config` to set boot to console by choosing the following options in order:
|
||||
|
||||
## 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.
|
||||
* 1 System Options
|
||||
* S5 Boot / Auto Login
|
||||
* B1 Console
|
||||
|
||||
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:
|
||||
#### Klipper and Moonraker Installation
|
||||
|
||||
```sh
|
||||
1System Options
|
||||
└──S5 Boot / Auto Login
|
||||
└──B1 Console
|
||||
Follow the instructions to install Klipper and Moonraker.
|
||||
* klipper: https://www.klipper3d.org/Installation.html
|
||||
* moonraker: https://moonraker.readthedocs.io/en/latest/installation/
|
||||
|
||||
In moonraker.conf ensure that 127.0.0.1 is a trusted client for moonraker, such as in this example:
|
||||
```
|
||||
[authorization]
|
||||
trusted_clients:
|
||||
127.0.0.1
|
||||
```
|
||||
|
||||
## Auto install
|
||||
Note: `force_logins: true` requires the moonraker api key in [KlipperScreen.conf](Configuration.md)
|
||||
|
||||
[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
|
||||
If you wish to use the update manager feature of moonraker for KlipperScreen, add the following block into the moonraker
|
||||
configuration:
|
||||
```
|
||||
[update_manager KlipperScreen]
|
||||
type: git_repo
|
||||
path: ~/KlipperScreen
|
||||
origin: https://github.com/jordanruthe/KlipperScreen.git
|
||||
env: ~/.KlipperScreen-env/bin/python
|
||||
requirements: scripts/KlipperScreen-requirements.txt
|
||||
install_script: scripts/KlipperScreen-install.sh
|
||||
```
|
||||
|
||||

|
||||
|
||||
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
|
||||
#### KlipperScreen Installation
|
||||
Execute the following commands:
|
||||
|
||||
```sh
|
||||
```
|
||||
cd ~/
|
||||
git clone https://github.com/jordanruthe/KlipperScreen.git
|
||||
cd ~/KlipperScreen
|
||||
@@ -42,36 +46,9 @@ cd ~/KlipperScreen
|
||||
```
|
||||
|
||||
This script will install packages that are listed under manual install, create a python virtual environment at
|
||||
`~/.KlipperScreen-env` and install a systemd service file.
|
||||
~/.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.
|
||||
|
||||
At this point KlipperScreen should be working, if it doesn't start then go to the [troubleshooting page](Troubleshooting.md)
|
||||
|
||||
## Moonraker configuration
|
||||
|
||||
In moonraker.conf ensure that 127.0.0.1 is a trusted client:
|
||||
|
||||
```py
|
||||
[authorization]
|
||||
trusted_clients:
|
||||
127.0.0.1
|
||||
```
|
||||
!!! 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.
|
||||
At this point KlipperScreen should be working, check out the [hardware page](Hardware.md) if you still haven't installed the screen, or head to the [troubleshooting page](Troubleshooting.md) if you are having problems
|
||||
@@ -1,121 +0,0 @@
|
||||
# Panels
|
||||
|
||||
### Main Menu
|
||||

|
||||
|
||||
### [Job Status](Panels/Job_status.md)
|
||||
```py
|
||||
panel: job_status
|
||||
```
|
||||
[](Panels/Job_status.md)
|
||||
|
||||
### [Bed Level](Panels/Screws.md)
|
||||
```py
|
||||
panel: bed_level
|
||||
```
|
||||
[](Panels/Screws.md)
|
||||
|
||||
### Bed Mesh
|
||||
```py
|
||||
panel: bed_mesh
|
||||
```
|
||||

|
||||
|
||||
### Console
|
||||
```py
|
||||
panel: console
|
||||
```
|
||||

|
||||
|
||||
### Extrude
|
||||
```py
|
||||
panel: extrude theme:material-dark
|
||||
```
|
||||

|
||||
|
||||
### Fan
|
||||
```py
|
||||
panel: fan
|
||||
```
|
||||

|
||||
|
||||
### Fine Tune
|
||||
```py
|
||||
panel: fine_tune
|
||||
```
|
||||

|
||||
|
||||
### Gcode Macros
|
||||
```py
|
||||
panel: gcode_macros
|
||||
```
|
||||

|
||||
|
||||
### Input Shapers
|
||||
```py
|
||||
panel: input_shaper
|
||||
```
|
||||

|
||||
|
||||
### Limits
|
||||
```py
|
||||
panel: limits
|
||||
```
|
||||

|
||||
|
||||
### Menu
|
||||

|
||||
|
||||
### Move
|
||||
```py
|
||||
panel: move
|
||||
```
|
||||

|
||||
|
||||
### Network
|
||||
```py
|
||||
panel: network
|
||||
```
|
||||

|
||||
|
||||
### Power
|
||||
```py
|
||||
panel: power
|
||||
```
|
||||

|
||||
|
||||
### Print
|
||||
```py
|
||||
panel: print
|
||||
```
|
||||

|
||||
|
||||
### Retraction
|
||||
```py
|
||||
panel: retraction
|
||||
```
|
||||

|
||||
|
||||
### Settings
|
||||
```py
|
||||
panel: settings
|
||||
```
|
||||

|
||||
|
||||
### System
|
||||
```py
|
||||
panel: system
|
||||
```
|
||||

|
||||
|
||||
### [Temperature](Panels/Temperature.md)
|
||||
```py
|
||||
panel: temperature
|
||||
```
|
||||
[](Panels/Temperature.md)
|
||||
|
||||
### [Z Calibrate](Panels/Zcalibrate.md)
|
||||
```py
|
||||
panel: zcalibrate
|
||||
```
|
||||
[](Panels/Zcalibrate.md)
|
||||
@@ -1,28 +0,0 @@
|
||||
# Job Status
|
||||
|
||||
Also known as "Print Status" or the "printing panel" shows the relevant information of the current print.
|
||||
|
||||

|
||||
|
||||
!!! 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
|
||||

|
||||
!!! 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
|
||||

|
||||
|
||||
## Time info
|
||||

|
||||
|
||||
## 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)
|
||||
@@ -1,45 +0,0 @@
|
||||
# Bed level
|
||||
|
||||

|
||||
|
||||
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.
|
||||
@@ -1,23 +0,0 @@
|
||||
# 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.
|
||||
|
||||

|
||||
|
||||
## Delta adjust
|
||||
Change the target of the selected devices, the amount is selectable.
|
||||
This is the default mode while printing
|
||||
|
||||

|
||||
|
||||
## Direct input with keypad
|
||||
Allows to set the exact temperature using the keypad.
|
||||
|
||||

|
||||
@@ -1,44 +0,0 @@
|
||||
# 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)
|
||||
|
||||

|
||||
|
||||
|
||||
## 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
|
||||
@@ -1,65 +0,0 @@
|
||||
# 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]}`
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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)
|
||||
@@ -8,7 +8,7 @@ To edit colors and styles, create a css file named `style.css` you can use the c
|
||||
|
||||
### Example 1
|
||||
|
||||
```sh
|
||||
```
|
||||
cd ~/KlipperScreen/styles
|
||||
mkdir -p mytheme/images
|
||||
cd mytheme
|
||||
@@ -24,10 +24,10 @@ At this point `mytheme` should be on the list of themes, and when you select it
|
||||
|
||||
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;}
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# Thumbnails
|
||||
KlipperScreen can display thumbnails in the file browser and as previews in the print status.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
### SuperSlicer
|
||||
In “Expert” mode SuperSlicer has some very convenient options in the “Printer Settings” tab to activate and customize the previews.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
### 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
|
||||
|
||||

|
||||
@@ -1,32 +1,19 @@
|
||||
# Translations
|
||||
## Create Translations
|
||||
|
||||
## Updating an existing translation:
|
||||
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.
|
||||
|
||||
You can use an editor such as [poedit](https://poedit.net/) to assist in translations.
|
||||
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.
|
||||
|
||||
* 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
|
||||
#### New Language
|
||||
|
||||
* Select `Create a new translation` or `File -> New from POT/PO` and select `ks_includes/locals/KlipperScreen.pot`.
|
||||
!!! 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
|
||||
* 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`
|
||||
|
||||
!!! 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)
|
||||
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.
|
||||
@@ -1,77 +1,48 @@
|
||||
# Troubleshooting
|
||||
|
||||
# First Steps
|
||||
This page will have common problems and common solutions to those problems.
|
||||
|
||||
The first step to troubleshooting any problem is getting the cause of the error.
|
||||
## First Steps
|
||||
|
||||
* Find KlipperScreen.log:
|
||||
The first step to troubleshooting any problem is getting the cause of the error. KlipperScreen log output will occur
|
||||
in two places. Check for the file `/tmp/KlipperScreen.log` and look at the contents by running
|
||||
`cat /tmp/KlipperScreen.log` or grabbing the file over WinSCP or another scp program.
|
||||
|
||||
!!! important
|
||||
This log file should be provided if you ask for support.
|
||||
If that file is non-existent, there is a problem in KlipperScreen starting up. To get the error output in this case,
|
||||
run `journalctl -xe -u KlipperScreen`.
|
||||
|
||||
Depending on your setup the file could be accessible from the web interface alongside other logs
|
||||
|
||||
Mainsail | Fluidd
|
||||
:-:|:-:
|
||||
 | 
|
||||
## Common Errors
|
||||
|
||||
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.
|
||||
### Problems occurring before the log file appears
|
||||
|
||||
If KlipperScreen.log doesn't exist, run `systemctl status KlipperScreen`<br>
|
||||
(or `journalctl -xe -u KlipperScreen`)
|
||||
This section will detail problems that may happen before the log file has been created. Each section will start with a
|
||||
relevant line from the journalctl output.
|
||||
|
||||
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
|
||||
#### Cannot open virtual Console
|
||||
```
|
||||
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)
|
||||
* Check /etc/X11/Xwrapper.conf
|
||||
This should have the line `allowed_users=anybody` in it
|
||||
* Check /etc/group
|
||||
Run the command `cat /etc/group | grep tty`. If you username is not listed under that line, you need to add it with the
|
||||
following command (if you username is not 'pi' change 'pi' to your username):
|
||||
`usermode -a -G tty pi`
|
||||
|
||||
|
||||
## The screen shows colors or 'No signal' when idle
|
||||
### Problems occurring with the log file
|
||||
|
||||
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.
|
||||
#### Screen shows console instead of KlipperScreen
|
||||
Run the command `ls /dev/fb*`. If you have multiple devices, you may need to fix the X11 configuration.
|
||||
|
||||
## Touch issues
|
||||
Run the command `cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf | grep /dev/fb`. Try modifying the file (
|
||||
`sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf`) and change `/dev/fb0` to a different file listed in the
|
||||
previous command (i.e. `/dev/fb1`).
|
||||
|
||||
Once you have saved that file, restart KlipperScreen and it should show up on your display.
|
||||
|
||||
[Follow this steps](Troubleshooting/Touch_issues.md)
|
||||
#### Screen is all white or blank
|
||||
|
||||
## 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.
|
||||
Improperly installed screen, follow the manufacturer instructions on how to physically connect the screen and install the proper drivers.
|
||||
@@ -1,50 +0,0 @@
|
||||
# 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
|
||||
```
|
||||
@@ -1,28 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,62 +0,0 @@
|
||||
# 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`
|
||||
@@ -1,101 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,31 +0,0 @@
|
||||
# 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.
|
||||
@@ -1,27 +0,0 @@
|
||||
## 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
|
||||
@@ -1,64 +0,0 @@
|
||||
# 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!
|
||||
@@ -0,0 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
Breaking changes will be listed here.
|
||||
|
||||
#### 2021 05 20
|
||||
* 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.
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -1,44 +1,24 @@
|
||||
# KlipperScreen
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Required Hardware
|
||||
|
||||
KlipperScreen should run on any touchscreen that you can connect to a host (Raspberry, PC, Tablet), but not screens that connect directly to the printer MCU board.
|
||||
|
||||
A physical touchscreen is not strictly required, for example you may install a remote desktop server like tigervnc-scraping-server and connect from a client device, [check out the hardware page for further information.](Hardware.md)
|
||||
A physical touchscreen is not strictly required, for example you may install a remote desktop server like tigervnc-scraping-server and connect from a client device, 
|
||||
|
||||
### Sample Panels
|
||||
|
||||
Main Menu
|
||||
|
||||

|
||||

|
||||
|
||||
Job Status
|
||||

|
||||
|
||||

|
||||
|
||||
[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/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)
|
||||
[Changelog](changelog.md)
|
||||
@@ -1,40 +0,0 @@
|
||||
# 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
|
||||
```
|
||||
@@ -0,0 +1,87 @@
|
||||
# Panels
|
||||
|
||||
### Main Menu
|
||||

|
||||
|
||||
### Job Status
|
||||

|
||||
|
||||
### Bed Level
|
||||
type: bed_level
|
||||

|
||||
|
||||
The bed level panel has the ability to have preset locations from Klipper. Please see documentation on the following
|
||||
Klipper Sections:
|
||||
* [bed_screws](https://www.klipper3d.org/Config_Reference.html#bed_screws)
|
||||
* [screws_tilt_adjust](https://www.klipper3d.org/Config_Reference.html#screws_tilt_adjust)
|
||||
|
||||
_Important Note: Due to Klipper using the bltouch/probe offsets in screws_tilt_adjust, if a bltouch/probe is enabled_
|
||||
_KlipperScreen will add the offset to the defined screw values. This will not occur if bed_screws section is used._
|
||||
|
||||
This panel will favor screws_tilt_adjust over the bed_screws section. If screws_tilt_adjust is defined, an extra button
|
||||
for _Screws Calibrate_ will appear. This button runs the SCREWS_TILT_CALCULATE command and shows the results on the
|
||||
panel.
|
||||
|
||||
### Bed Mesh
|
||||
type: bed_mesh theme:material-dark
|
||||

|
||||
|
||||
### Extrude
|
||||
type: extrude theme:material-dark
|
||||

|
||||
|
||||
### Fan
|
||||
type: fan
|
||||

|
||||
|
||||
### Fine Tune
|
||||
type: fine_tune theme:custom
|
||||

|
||||
|
||||
### Gcode Macros
|
||||
type: gcode_macros theme: material-darker
|
||||

|
||||
|
||||
### Menu
|
||||
type: menu
|
||||

|
||||
|
||||
### Move
|
||||
type: move
|
||||

|
||||
|
||||
### Network
|
||||
type: network
|
||||

|
||||
|
||||
### Power
|
||||
type: power
|
||||

|
||||
|
||||
### Preheat
|
||||
type: preheat
|
||||

|
||||
|
||||
### Print
|
||||
type: print
|
||||

|
||||
|
||||
### Settings
|
||||
type: settings theme:colorized
|
||||

|
||||
|
||||
### System
|
||||
type: system
|
||||

|
||||
|
||||
### Temperature
|
||||
type: temperature theme:material-light
|
||||

|
||||
|
||||
### Z Calibrate
|
||||
type: zcalibrate
|
||||

|
||||
|
||||
### Limits
|
||||
type: limits theme: material-dark
|
||||

|
||||
@@ -1,2 +0,0 @@
|
||||
mkdocs>=1.3.0
|
||||
mkdocs-material>=8.2.16
|
||||
@@ -1,5 +1,9 @@
|
||||
class KlippyGcodes:
|
||||
|
||||
HOME = "G28"
|
||||
HOME_X = "G28 X"
|
||||
HOME_Y = "G28 Y"
|
||||
HOME_Z = "G28 Z"
|
||||
HOME_XY = "G28 X Y"
|
||||
Z_TILT = "Z_TILT_ADJUST"
|
||||
QUAD_GANTRY_LEVEL = "QUAD_GANTRY_LEVEL"
|
||||
@@ -12,7 +16,10 @@ class KlippyGcodes:
|
||||
EXTRUDE_REL = "M83"
|
||||
|
||||
SET_EXT_TEMP = "M104"
|
||||
MAX_EXT_TEMP = 450
|
||||
|
||||
SET_BED_TEMP = "M140"
|
||||
MAX_BED_TEMP = 150
|
||||
|
||||
SET_EXT_FACTOR = "M221"
|
||||
SET_FAN_SPEED = "M106"
|
||||
@@ -24,33 +31,39 @@ class KlippyGcodes:
|
||||
ABORT = "ABORT"
|
||||
ACCEPT = "ACCEPT"
|
||||
|
||||
SAVE_CONFIG = "SAVE_CONFIG"
|
||||
RESTART = "RESTART"
|
||||
FIRMWARE_RESTART = "FIRMWARE_RESTART"
|
||||
|
||||
|
||||
@staticmethod
|
||||
def set_bed_temp(temp):
|
||||
return f"{KlippyGcodes.SET_BED_TEMP} S{temp}"
|
||||
return "%s S%s" % (KlippyGcodes.SET_BED_TEMP, str(temp))
|
||||
|
||||
@staticmethod
|
||||
def set_ext_temp(temp, tool=0):
|
||||
return f"{KlippyGcodes.SET_EXT_TEMP} T{tool} S{temp}"
|
||||
return "%s T%s S%s" % (KlippyGcodes.SET_EXT_TEMP, str(tool), str(temp))
|
||||
|
||||
@staticmethod
|
||||
def set_heater_temp(heater, temp):
|
||||
return f'SET_HEATER_TEMPERATURE heater="{heater}" target={temp}'
|
||||
return 'SET_HEATER_TEMPERATURE heater="%s" target=%s' % (heater, str(temp))
|
||||
|
||||
@staticmethod
|
||||
def set_temp_fan_temp(temp_fan, temp):
|
||||
return f'SET_TEMPERATURE_FAN_TARGET temperature_fan="{temp_fan}" target={temp}'
|
||||
return 'SET_TEMPERATURE_FAN_TARGET temperature_fan="%s" target=%s' % (temp_fan, str(temp))
|
||||
|
||||
@staticmethod
|
||||
def set_fan_speed(speed):
|
||||
return f"{KlippyGcodes.SET_FAN_SPEED} S{speed * 2.55:.0f}"
|
||||
speed = str(int(float(int(speed) % 101)/100*255))
|
||||
return "%s S%s" % (KlippyGcodes.SET_FAN_SPEED, speed)
|
||||
|
||||
@staticmethod
|
||||
def set_extrusion_rate(rate):
|
||||
return f"{KlippyGcodes.SET_EXT_FACTOR} S{rate}"
|
||||
return "%s S%s" % (KlippyGcodes.SET_EXT_FACTOR, rate)
|
||||
|
||||
@staticmethod
|
||||
def set_speed_rate(rate):
|
||||
return f"{KlippyGcodes.SET_SPD_FACTOR} S{rate}"
|
||||
return "%s S%s" % (KlippyGcodes.SET_SPD_FACTOR, rate)
|
||||
|
||||
@staticmethod
|
||||
def testz_move(dist):
|
||||
@@ -58,16 +71,16 @@ class KlippyGcodes:
|
||||
|
||||
@staticmethod
|
||||
def extrude(dist, speed=500):
|
||||
return f"{KlippyGcodes.MOVE} E{dist} F{speed}"
|
||||
return "%s E%s F%s" % (KlippyGcodes.MOVE, dist, speed)
|
||||
|
||||
@staticmethod
|
||||
def bed_mesh_load(profile):
|
||||
return f"BED_MESH_PROFILE LOAD='{profile}'"
|
||||
return "BED_MESH_PROFILE LOAD='%s'" % profile
|
||||
|
||||
@staticmethod
|
||||
def bed_mesh_remove(profile):
|
||||
return f"BED_MESH_PROFILE REMOVE='{profile}'"
|
||||
return "BED_MESH_PROFILE REMOVE='%s'" % profile
|
||||
|
||||
@staticmethod
|
||||
def bed_mesh_save(profile):
|
||||
return f"BED_MESH_PROFILE SAVE='{profile}'"
|
||||
return "BED_MESH_PROFILE SAVE='%s'" % profile
|
||||
@@ -1,85 +1,79 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import gi
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
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)
|
||||
from gi.repository import Gtk, Gdk, GdkPixbuf, Gio, GLib, Pango
|
||||
|
||||
klipperscreendir = os.getcwd()
|
||||
|
||||
class KlippyGtk:
|
||||
labels = {}
|
||||
font_ratio = [43, 29]
|
||||
keyboard_ratio = .22
|
||||
width_ratio = 16
|
||||
height_ratio = 9.375
|
||||
|
||||
def __init__(self, screen):
|
||||
def __init__(self, screen, width, height, theme, cursor, fontsize_type):
|
||||
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
|
||||
|
||||
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})")
|
||||
|
||||
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
|
||||
|
||||
self.keyboard_height = self.content_height * 0.5
|
||||
if (self.height / self.width) >= 3: # Ultra-tall
|
||||
self.keyboard_height = self.keyboard_height * 0.5
|
||||
self.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]
|
||||
))
|
||||
if fontsize_type == "small":
|
||||
self.font_size = round(self.font_size * 0.91)
|
||||
elif (fontsize_type == "large"):
|
||||
self.font_size = round(self.font_size * 1.09)
|
||||
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
|
||||
self.cursor = cursor
|
||||
|
||||
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)]
|
||||
rgb = [int(self.color_list[key]['base'][i:i+2], 16) for i in range(0, 6, 2)]
|
||||
self.color_list[key]['rgb'] = rgb
|
||||
|
||||
logging.debug("img width: %s height: %s" % (self.img_width, self.img_height))
|
||||
|
||||
def get_action_bar_width(self):
|
||||
return self.action_bar_width
|
||||
|
||||
def get_content_width(self):
|
||||
return self.width - self.action_bar_width
|
||||
|
||||
def get_content_height(self):
|
||||
return self.height - self.header_size
|
||||
|
||||
def get_font_size(self):
|
||||
return self.font_size
|
||||
|
||||
def get_header_size(self):
|
||||
return self.header_size
|
||||
|
||||
def get_header_image_scale(self):
|
||||
return [self.header_image_scale_width, self.header_image_scale_height]
|
||||
|
||||
def get_image_width(self):
|
||||
return self.img_width
|
||||
|
||||
def get_image_height(self):
|
||||
return self.img_height
|
||||
|
||||
def get_keyboard_height(self):
|
||||
return (self.width - self.get_action_bar_width()) * self.keyboard_ratio
|
||||
|
||||
def get_temp_color(self, device):
|
||||
# logging.debug("Color list %s" % self.color_list)
|
||||
logging.debug("Color list %s" % self.color_list)
|
||||
if device not in self.color_list:
|
||||
return False, False
|
||||
|
||||
@@ -88,91 +82,157 @@ class KlippyGtk:
|
||||
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}")
|
||||
color = '{:02X}{:02X}{:02X}'.format(rgb[0], rgb[1], rgb[2])
|
||||
rgb = [x/255 for x in rgb]
|
||||
logging.debug("Assigning color: %s %s %s" % (device, rgb, color))
|
||||
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)]
|
||||
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
|
||||
logging.debug("Assigning color: %s %s %s" % (device, rgb, color))
|
||||
|
||||
return rgb, color
|
||||
|
||||
def reset_temp_color(self):
|
||||
for key in self.color_list:
|
||||
self.color_list[key]['state'] = 0
|
||||
|
||||
@staticmethod
|
||||
def Label(label, style=None):
|
||||
|
||||
def Label(self, label, style=None):
|
||||
la = Gtk.Label(label)
|
||||
if style is not None:
|
||||
if style is not None and style is not False:
|
||||
la.get_style_context().add_class(style)
|
||||
return la
|
||||
|
||||
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 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)
|
||||
|
||||
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
|
||||
image = Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
|
||||
@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
|
||||
label = Gtk.Label()
|
||||
label.set_markup(text)
|
||||
box1.add(image)
|
||||
box1.add(label)
|
||||
|
||||
def PixbufFromHttp(self, resource, width=-1, height=-1):
|
||||
if style is not False:
|
||||
ctx = box1.get_style_context()
|
||||
ctx.add_class(style)
|
||||
|
||||
return {"l": label, "b": box1}
|
||||
|
||||
def ImageMenuButton(self, image_name, text, size=20, style=False, width_scale=.32, height_scale=.32, popover=False):
|
||||
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)
|
||||
|
||||
mb = Gtk.MenuButton(label="", popover=popover)
|
||||
label = mb.get_label()
|
||||
box1.add(image)
|
||||
box1.add(mb)
|
||||
|
||||
if style is not False:
|
||||
ctx = box1.get_style_context()
|
||||
ctx.add_class(style)
|
||||
|
||||
return {"l": label, "mb": mb, "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):
|
||||
response = self.screen.apiclient.get_thumbnail_stream(resource)
|
||||
if response is False:
|
||||
return None
|
||||
stream = Gio.MemoryInputStream.new_from_data(response, None)
|
||||
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)
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(
|
||||
stream, int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
return pixbuf
|
||||
|
||||
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", " "))
|
||||
def ProgressBar(self, style=False):
|
||||
bar = Gtk.ProgressBar()
|
||||
|
||||
if style is not 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)
|
||||
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 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 ButtonImage(self, image_name, label=None, style=None, width_scale=1.38, height_scale=1.38,
|
||||
position=Gtk.PositionType.TOP, word_wrap=True):
|
||||
filename = "%s/styles/%s/images/%s.svg" % (klipperscreendir, self.theme, str(image_name))
|
||||
if not os.path.exists(filename):
|
||||
logging.error("Unable to find button image (theme, image): (%s, %s)" % (self.theme, str(image_name)))
|
||||
filename = "%s/styles/%s/images/%s.svg" % (klipperscreendir, self.theme, "warning")
|
||||
|
||||
b = Gtk.Button(label=label)
|
||||
|
||||
if os.path.exists(filename):
|
||||
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.set_image(img)
|
||||
|
||||
b.set_hexpand(True)
|
||||
b.set_vexpand(True)
|
||||
b.set_can_focus(False)
|
||||
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 Exception:
|
||||
pass
|
||||
|
||||
if style is not None:
|
||||
b.get_style_context().add_class(style)
|
||||
|
||||
return b
|
||||
|
||||
def Dialog(self, screen, buttons, content, callback=None, *args):
|
||||
@@ -183,15 +243,15 @@ class KlippyGtk:
|
||||
dialog.set_modal(True)
|
||||
|
||||
for button in buttons:
|
||||
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.add_button(button_text=button['name'], response_id=button['response'])
|
||||
|
||||
dialog.connect("response", self.screen.reset_screensaver_timeout)
|
||||
dialog.connect("response", callback, *args)
|
||||
dialog.get_style_context().add_class("dialog")
|
||||
|
||||
box = Gtk.Box()
|
||||
box.set_size_request(screen.width - 60, 0)
|
||||
box.set_vexpand(True)
|
||||
|
||||
content_area = dialog.get_content_area()
|
||||
content_area.set_margin_start(15)
|
||||
content_area.set_margin_end(15)
|
||||
@@ -202,28 +262,40 @@ class KlippyGtk:
|
||||
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))
|
||||
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.ARROW))
|
||||
else:
|
||||
dialog.get_window().set_cursor(
|
||||
Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.BLANK_CURSOR))
|
||||
dialog.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.BLANK_CURSOR))
|
||||
|
||||
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}")
|
||||
|
||||
@staticmethod
|
||||
def HomogeneousGrid(width=None, height=None):
|
||||
def ToggleButtonImage(self, image_name, label, style=False, width_scale=1.38, height_scale=1.38):
|
||||
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.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 is not False:
|
||||
ctx = b.get_style_context()
|
||||
ctx.add_class(style)
|
||||
|
||||
return b
|
||||
|
||||
def HomogeneousGrid(self, width=None, height=None):
|
||||
g = Gtk.Grid()
|
||||
g.set_row_homogeneous(True)
|
||||
g.set_column_homogeneous(True)
|
||||
@@ -236,16 +308,25 @@ 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
|
||||
|
||||
@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
|
||||
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"
|
||||
@@ -1,28 +1,19 @@
|
||||
import logging
|
||||
import re
|
||||
import json
|
||||
import requests
|
||||
|
||||
import logging
|
||||
|
||||
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 is False or 'result' not in r:
|
||||
if r is False:
|
||||
return False
|
||||
return r['result']
|
||||
|
||||
@@ -30,46 +21,29 @@ class KlippyRest:
|
||||
return self.send_request("printer/info")
|
||||
|
||||
def get_thumbnail_stream(self, thumbnail):
|
||||
return self.send_request(f"server/files/gcodes/{thumbnail}", json=False)
|
||||
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
|
||||
|
||||
def send_request(self, method, json=True):
|
||||
url = f"{self.endpoint}/{method}"
|
||||
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 is False else {"x-api-key": self.api_key}
|
||||
data = False
|
||||
try:
|
||||
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
|
||||
r = requests.get(url, headers=headers)
|
||||
except Exception:
|
||||
return False
|
||||
if r.status_code != 200:
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def format_status(status):
|
||||
# TODO: Try/except
|
||||
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
|
||||
data = json.loads(r.content)
|
||||
except Exception:
|
||||
logging.exception("Unable to parse response from moonraker:\n %s" % r.content)
|
||||
return False
|
||||
|
||||
return data
|
||||
@@ -1,130 +1,125 @@
|
||||
#!/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 GLib
|
||||
from gi.repository import Gtk, Gdk, GLib
|
||||
from ks_includes.KlippyGcodes import KlippyGcodes
|
||||
|
||||
api_key = ""
|
||||
|
||||
api = {
|
||||
"printer_info": {
|
||||
"url": "/printer/info",
|
||||
"method": "get_printer_info"
|
||||
},
|
||||
"apikey": {
|
||||
"url": "/access/api_key"
|
||||
},
|
||||
"oneshot_token": {
|
||||
"url": "/access/oneshot_token"
|
||||
}
|
||||
}
|
||||
|
||||
class KlippyWebsocket(threading.Thread):
|
||||
_req_id = 0
|
||||
connected = False
|
||||
connecting = True
|
||||
callback_table = {}
|
||||
reconnect_count = 0
|
||||
max_retries = 4
|
||||
timeout = None
|
||||
|
||||
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
|
||||
|
||||
@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()
|
||||
self._url = "%s:%s" % (host, port)
|
||||
|
||||
def initial_connect(self):
|
||||
if self.connect() is not False:
|
||||
GLib.timeout_add_seconds(10, self.reconnect)
|
||||
|
||||
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()
|
||||
# Enable a timeout so that way if moonraker is not running, it will attempt to reconnect
|
||||
if self.timeout is None:
|
||||
self.timeout = GLib.timeout_add(500, self.reconnect)
|
||||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
if self.connected:
|
||||
logging.debug("Already connected")
|
||||
return False
|
||||
logging.debug("Attempting to connect")
|
||||
self.reconnect_count += 1
|
||||
def ws_on_close(ws, a=None, b=None):
|
||||
self.on_close(ws)
|
||||
|
||||
def ws_on_error(ws, msg):
|
||||
self.on_error(ws, msg)
|
||||
|
||||
def ws_on_message(ws, msg):
|
||||
self.on_message(ws, msg)
|
||||
|
||||
def ws_on_open(ws):
|
||||
self.on_open(ws)
|
||||
|
||||
try:
|
||||
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
|
||||
if state is False or state['result']['klippy_connected'] is False:
|
||||
return False
|
||||
printer_info = self._screen.apiclient.get_printer_info()
|
||||
if printer_info is False:
|
||||
return False
|
||||
token = self._screen.apiclient.get_oneshot_token()
|
||||
except Exception as e:
|
||||
logging.critical(e, exc_info=True)
|
||||
except Exception:
|
||||
logging.debug("Unable to get oneshot token")
|
||||
return True
|
||||
return False
|
||||
|
||||
self.ws_url = f"{self.ws_proto}://{self._url}/websocket?token={token}"
|
||||
self.ws_url = "ws://%s/websocket?token=%s" % (self._url, 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)
|
||||
self.ws_url, on_close=ws_on_close, on_error=ws_on_error, on_message=ws_on_message, on_open=ws_on_open)
|
||||
|
||||
self._wst = threading.Thread(target=self.ws.run_forever)
|
||||
self._wst.daemon = True
|
||||
try:
|
||||
logging.debug("Starting websocket thread")
|
||||
self._wst.start()
|
||||
except Exception as e:
|
||||
logging.critical(e, exc_info=True)
|
||||
except Exception:
|
||||
logging.debug("Error starting web socket")
|
||||
return True
|
||||
return False
|
||||
|
||||
def close(self):
|
||||
self.closing = True
|
||||
self.connecting = False
|
||||
if self.ws is not None:
|
||||
self.ws.close()
|
||||
self.ws.close()
|
||||
|
||||
def on_message(self, *args):
|
||||
message = args[1] if len(args) == 2 else args[0]
|
||||
def is_connected(self):
|
||||
return self.connected
|
||||
|
||||
def on_message(self, ws, message):
|
||||
response = json.loads(message)
|
||||
if "id" in response and response['id'] in self.callback_table:
|
||||
args = (response,
|
||||
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,
|
||||
self.callback_table[response['id']][1],
|
||||
self.callback_table[response['id']][2],
|
||||
*self.callback_table[response['id']][3])
|
||||
GLib.idle_add(self.callback_table[response['id']][0], *args)
|
||||
self.callback_table.pop(response['id'])
|
||||
return
|
||||
*self.callback_table[response['id']][3]
|
||||
)
|
||||
self.callback_table.pop(response['id'])
|
||||
return
|
||||
|
||||
if "method" in response and "on_message" in self._callback:
|
||||
args = response['method'], response['params'][0] if "params" in response else {}
|
||||
GLib.idle_add(self._callback['on_message'], *args)
|
||||
Gdk.threads_add_idle(
|
||||
GLib.PRIORITY_HIGH_IDLE,
|
||||
self._callback['on_message'],
|
||||
response['method'],
|
||||
response['params'][0] if "params" in response else {}
|
||||
)
|
||||
return
|
||||
|
||||
def send_method(self, method, params=None, callback=None, *args):
|
||||
if not self.connected:
|
||||
def send_method(self, method, params={}, callback=None, *args):
|
||||
if self.is_connected() is False:
|
||||
return False
|
||||
if params is None:
|
||||
params = {}
|
||||
|
||||
self._req_id += 1
|
||||
if callback is not None:
|
||||
@@ -139,40 +134,53 @@ class KlippyWebsocket(threading.Thread):
|
||||
self.ws.send(json.dumps(data))
|
||||
return True
|
||||
|
||||
def on_open(self, *args):
|
||||
def on_open(self, ws):
|
||||
logging.info("Moonraker Websocket Open")
|
||||
logging.info("Self.connected = %s" % self.is_connected())
|
||||
self.connected = True
|
||||
self.connecting = False
|
||||
self._screen.reinit_count = 0
|
||||
self.reconnect_count = 0
|
||||
if self.timeout is not None:
|
||||
GLib.source_remove(self.timeout)
|
||||
self.timeout = None
|
||||
if "on_connect" in self._callback:
|
||||
GLib.idle_add(self._callback['on_connect'])
|
||||
Gdk.threads_add_idle(
|
||||
GLib.PRIORITY_HIGH_IDLE,
|
||||
self._callback['on_connect']
|
||||
)
|
||||
|
||||
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:
|
||||
def on_close(self, ws):
|
||||
if self.is_connected() is False:
|
||||
logging.debug("Connection already closed")
|
||||
return
|
||||
if self.closing:
|
||||
|
||||
if self.closing is True:
|
||||
logging.debug("Closing websocket")
|
||||
self.ws.keep_running = False
|
||||
self.close()
|
||||
self.closing = False
|
||||
self.ws.stop()
|
||||
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 is None:
|
||||
self.timeout = GLib.timeout_add(500, self.reconnect)
|
||||
|
||||
@staticmethod
|
||||
def on_error(*args):
|
||||
error = args[1] if len(args) == 2 else args[0]
|
||||
logging.debug(f"Websocket error: {error}")
|
||||
if "on_close" in self._callback:
|
||||
Gdk.threads_add_idle(
|
||||
GLib.PRIORITY_HIGH_IDLE,
|
||||
self._callback['on_close'],
|
||||
"Lost Connection to Moonraker",
|
||||
True
|
||||
)
|
||||
|
||||
def reconnect(self):
|
||||
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)
|
||||
|
||||
class MoonrakerApi:
|
||||
def __init__(self, ws):
|
||||
@@ -185,7 +193,7 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def gcode_script(self, script, callback=None, *args):
|
||||
logging.debug(f"Sending printer.gcode.script: {script}")
|
||||
logging.debug("Sending printer.gcode.script: %s", script)
|
||||
return self._ws.send_method(
|
||||
"printer.gcode.script",
|
||||
{"script": script},
|
||||
@@ -220,14 +228,14 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def object_subscription(self, updates):
|
||||
logging.debug("Sending printer.objects.subscribe")
|
||||
logging.debug("Sending printer.objects.subscribe: %s", str(updates))
|
||||
return self._ws.send_method(
|
||||
"printer.objects.subscribe",
|
||||
updates
|
||||
)
|
||||
|
||||
def power_device_off(self, device, callback=None, *args):
|
||||
logging.debug(f"Sending machine.device_power.off: {device}")
|
||||
logging.debug("Sending machine.device_power.off: %s" % device)
|
||||
return self._ws.send_method(
|
||||
"machine.device_power.off",
|
||||
{device: False},
|
||||
@@ -236,7 +244,7 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def power_device_on(self, device, callback=None, *args):
|
||||
logging.debug("Sending machine.device_power.on {device}")
|
||||
logging.debug("Sending machine.device_power.on %s" % device)
|
||||
return self._ws.send_method(
|
||||
"machine.device_power.on",
|
||||
{device: False},
|
||||
@@ -282,8 +290,33 @@ 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(f"Sending set_bed_temp: {KlippyGcodes.set_bed_temp(target)}")
|
||||
logging.debug("Sending set_bed_temp: %s", KlippyGcodes.set_bed_temp(target))
|
||||
return self._ws.send_method(
|
||||
"printer.gcode.script",
|
||||
{
|
||||
@@ -294,7 +327,7 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def set_heater_temp(self, heater, target, callback=None, *args):
|
||||
logging.debug(f"Sending heater {heater} to temp: {target}")
|
||||
logging.debug("Sending heater %s to temp: %s", heater, target)
|
||||
return self._ws.send_method(
|
||||
"printer.gcode.script",
|
||||
{
|
||||
@@ -305,7 +338,7 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def set_temp_fan_temp(self, temp_fan, target, callback=None, *args):
|
||||
logging.debug(f"Sending temperature fan {temp_fan} to temp: {target}")
|
||||
logging.debug("Sending temperature fan %s to temp: %s", temp_fan, target)
|
||||
return self._ws.send_method(
|
||||
"printer.gcode.script",
|
||||
{
|
||||
@@ -316,7 +349,7 @@ class MoonrakerApi:
|
||||
)
|
||||
|
||||
def set_tool_temp(self, tool, target, callback=None, *args):
|
||||
logging.debug(f"Sending set_tool_temp: {KlippyGcodes.set_ext_temp(target, tool)}")
|
||||
logging.debug("Sending set_tool_temp: %s", KlippyGcodes.set_ext_temp(target, tool))
|
||||
return self._ws.send_method(
|
||||
"printer.gcode.script",
|
||||
{
|
||||
|
||||
@@ -5,29 +5,23 @@ import logging
|
||||
import json
|
||||
import re
|
||||
import copy
|
||||
import pathlib
|
||||
import locale
|
||||
|
||||
from io import StringIO
|
||||
|
||||
from os import path
|
||||
|
||||
SCREEN_BLANKING_OPTIONS = [
|
||||
60, # 1 Minute
|
||||
120, # 2 Minutes
|
||||
300, # 5 Minutes
|
||||
900, # 15 Minutes
|
||||
1800, # 30 Minutes
|
||||
3600, # 1 Hour
|
||||
7200, # 2 Hours
|
||||
14400, # 4 Hours
|
||||
"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"
|
||||
@@ -35,20 +29,14 @@ class KlipperScreenConfig:
|
||||
do_not_edit_prefix = "#~#"
|
||||
|
||||
def __init__(self, configfile, screen=None):
|
||||
self.lang_list = None
|
||||
self.errors = []
|
||||
self.default_config_path = os.path.join(klipperscreendir, "ks_includes", "defaults.conf")
|
||||
self.default_config_path = "%s/ks_includes/%s" % (os.getcwd(), "defaults.conf")
|
||||
self.config = configparser.ConfigParser()
|
||||
self.config_path = self.get_config_file_location(configfile)
|
||||
logging.debug(f"Config path location: {self.config_path}")
|
||||
logging.debug("Config path location: %s" % 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()
|
||||
@@ -58,242 +46,118 @@ class KlipperScreenConfig:
|
||||
for include in includes:
|
||||
self._include_config("/".join(self.config_path.split("/")[:-1]), include)
|
||||
|
||||
self.exclude_from_config(self.defined_config)
|
||||
for i in ['menu __main', 'menu __print', 'menu __splashscreen', 'preheat']:
|
||||
for j in self.defined_config.sections():
|
||||
if j.startswith(i):
|
||||
for k in list(self.config.sections()):
|
||||
if k.startswith(i):
|
||||
del self.config[k]
|
||||
break
|
||||
|
||||
self.log_config(self.defined_config)
|
||||
if self.validate_config(self.defined_config, string=user_def):
|
||||
self.config.read_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)
|
||||
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 Exception:
|
||||
logging.exception("Unknown error with config")
|
||||
|
||||
printers = sorted([i for i in self.config.sections() if i.startswith("printer ")])
|
||||
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
|
||||
]
|
||||
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="")
|
||||
}
|
||||
})
|
||||
|
||||
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[name]['moonraker_api_key'] != "":
|
||||
item[name]['moonraker_api_key'] = "redacted"
|
||||
logging.debug(f"Configured printers: {json.dumps(conf_printers_debug, indent=2)}")
|
||||
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))
|
||||
|
||||
lang = self.get_main_config_option("language", None)
|
||||
lang = [lang] if lang is not None and lang != "default" else None
|
||||
logging.info("Detected language: %s" % lang)
|
||||
self.lang = gettext.translation('KlipperScreen', localedir='ks_includes/locales', languages=lang,
|
||||
fallback=True)
|
||||
|
||||
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.lang.gettext
|
||||
_n = self.lang.ngettext
|
||||
|
||||
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"}]}},
|
||||
{"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"}},
|
||||
{"language": {"section": "main", "name": _("Language"), "type": "dropdown", "value": "system_lang",
|
||||
"callback": screen.restart_warning, "options": [
|
||||
{"name": _("System") + " " + _("(default)"), "value": "system_lang"}
|
||||
]}},
|
||||
{"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": "auto", "options": [
|
||||
{"name": _("Auto") + " " + _("(default)"), "value": "auto"},
|
||||
{"name": _("File"), "value": "file"},
|
||||
"value": "file", "options": [
|
||||
{"name": _("File") + " " + _("(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": _("Never"), "value": "off"}]
|
||||
{"name": _("Off"), "value": "off"}]
|
||||
}},
|
||||
{"theme": {
|
||||
"section": "main", "name": _("Icon Theme"), "type": "dropdown",
|
||||
"value": "z-bolt", "callback": screen.restart_warning, "options": [
|
||||
{"name": "Z-bolt" + " " + _("(default)"), "value": "z-bolt"}]}},
|
||||
{"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": [
|
||||
"value": "medium", "callback": screen.restart_warning, "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",
|
||||
{"name": _("Large"), "value": "large"}]}},
|
||||
{"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"}},
|
||||
]
|
||||
lang_path = os.path.join(os.getcwd(), 'ks_includes/locales')
|
||||
langs = [d for d in os.listdir(lang_path) if not os.path.isfile(os.path.join(lang_path, d))]
|
||||
langs.sort()
|
||||
lang_opt = self.configurable_options[3]['language']['options']
|
||||
|
||||
self.configurable_options.extend(panel_options)
|
||||
for lang in langs:
|
||||
lang_opt.append({"name": lang, "value": lang})
|
||||
|
||||
t_path = os.path.join(klipperscreendir, 'styles')
|
||||
t_path = os.path.join(os.getcwd(), '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']
|
||||
theme_opt = self.configurable_options[8]['theme']['options']
|
||||
|
||||
for theme in themes:
|
||||
theme_opt.append({"name": theme, "value": theme})
|
||||
@@ -301,15 +165,14 @@ class KlipperScreenConfig:
|
||||
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
|
||||
hour = int(int(num)/3600)
|
||||
if hour > 0:
|
||||
name = f'{hour} ' + ngettext("hour", "hours", hour)
|
||||
name = str(hour) + " " + _n("hour", "hours", hour)
|
||||
else:
|
||||
name = f'{minute:.0f} ' + ngettext("minute", "minutes", minute)
|
||||
name = str(int(int(num)/60)) + " " + _("minutes")
|
||||
self.configurable_options[index]['screen_blanking']['options'].append({
|
||||
"name": name,
|
||||
"value": f"{num}"
|
||||
"value": num
|
||||
})
|
||||
|
||||
for item in self.configurable_options:
|
||||
@@ -320,58 +183,43 @@ class KlipperScreenConfig:
|
||||
if name not in list(self.config[vals['section']]):
|
||||
self.config.set(vals['section'], name, vals['value'])
|
||||
|
||||
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}"
|
||||
def _include_config(self, dir, path):
|
||||
full_path = path if path[0] == "/" else "%s/%s" % (dir, path)
|
||||
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(f"Config Error: Directory {parent_dir} does not exist")
|
||||
logging.info("Config Error: Directory %s does not exist" % parent_dir)
|
||||
return
|
||||
files = os.listdir(parent_dir)
|
||||
regex = f"^{file.replace('*', '.*')}$"
|
||||
parse_files.extend(os.path.join(parent_dir, file) for file in files if re.match(regex, file))
|
||||
|
||||
regex = "^%s$" % file.replace('*', '.*')
|
||||
for file in files:
|
||||
if re.match(regex, file):
|
||||
parse_files.append(os.path.join(parent_dir, file))
|
||||
else:
|
||||
if not os.path.exists(os.path.join(full_path)):
|
||||
logging.info(f"Config Error: {full_path} does not exist")
|
||||
logging.info("Config Error: %s does not exist" % full_path)
|
||||
return
|
||||
parse_files.append(full_path)
|
||||
|
||||
logging.info(f"Parsing files: {parse_files}")
|
||||
logging.info("Parsing files: %s" % 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.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)
|
||||
self.config.read(file)
|
||||
self.defined_config.read(file)
|
||||
|
||||
def separate_saved_config(self, config_path):
|
||||
user_def = []
|
||||
saved_def = []
|
||||
saved_def = None
|
||||
found_saved = False
|
||||
if not os.path.exists(config_path):
|
||||
return ["", None]
|
||||
if not path.exists(config_path):
|
||||
return [None, None]
|
||||
with open(config_path) as file:
|
||||
for line in file:
|
||||
line = line.replace('\n', '')
|
||||
@@ -381,42 +229,22 @@ class KlipperScreenConfig:
|
||||
continue
|
||||
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):])
|
||||
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 is None else "\n".join(saved_def)]
|
||||
|
||||
def get_config_file_location(self, file):
|
||||
# Passed config (-c) by default is ~/KlipperScreen.conf
|
||||
logging.info(f"Passed config (-c): {file}")
|
||||
if os.path.exists(file):
|
||||
return 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 = os.path.expanduser("~/") + "klipper_config/%s" % (self.configfile_name)
|
||||
if not path.exists(file):
|
||||
file = self.default_config_path
|
||||
|
||||
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
|
||||
logging.info("Found configuration file at: %s" % file)
|
||||
return file
|
||||
|
||||
def get_config(self):
|
||||
return self.config
|
||||
@@ -430,10 +258,13 @@ class KlipperScreenConfig:
|
||||
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 = f"{subsection} "
|
||||
index = f"menu {menu} {subsection}"
|
||||
subsection = subsection + " "
|
||||
index = "menu %s %s" % (menu, subsection)
|
||||
items = [i[len(index):] for i in self.config.sections() if i.startswith(index)]
|
||||
menu_items = []
|
||||
for item in items:
|
||||
@@ -444,29 +275,40 @@ class KlipperScreenConfig:
|
||||
return menu_items
|
||||
|
||||
def get_menu_name(self, menu="__main", subsection=""):
|
||||
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')
|
||||
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')
|
||||
|
||||
|
||||
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}
|
||||
|
||||
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}
|
||||
preheat_options = {}
|
||||
for item in items:
|
||||
preheat_options[item] = self._build_preheat_item(index + item)
|
||||
|
||||
return preheat_options
|
||||
|
||||
def get_printer_config(self, name):
|
||||
if not name.startswith("printer "):
|
||||
name = f"printer {name}"
|
||||
name = "printer %s" % name
|
||||
|
||||
return None if name not in self.config else self.config[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")
|
||||
|
||||
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:
|
||||
@@ -480,22 +322,21 @@ class KlipperScreenConfig:
|
||||
save_config.add_section(opt['section'])
|
||||
save_config.set(opt['section'], name, str(curval))
|
||||
|
||||
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)
|
||||
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 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))
|
||||
macro_sec in self.defined_config.sections() and
|
||||
self.defined_config[macro_sec].getboolean(item, fallback=True) is 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))
|
||||
|
||||
save_output = self._build_config_string(save_config).split("\n")
|
||||
for i in range(len(save_output)):
|
||||
save_output[i] = f"{self.do_not_edit_prefix} {save_output[i]}"
|
||||
save_output[i] = "%s %s" % (self.do_not_edit_prefix, save_output[i])
|
||||
|
||||
if self.config_path == self.default_config_path:
|
||||
user_def = ""
|
||||
@@ -503,31 +344,26 @@ class KlipperScreenConfig:
|
||||
else:
|
||||
user_def, saved_def = self.separate_saved_config(self.config_path)
|
||||
|
||||
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")
|
||||
extra_lb = "\n" if saved_def is not 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)
|
||||
|
||||
if self.config_path != self.default_config_path:
|
||||
filepath = self.config_path
|
||||
path = self.config_path
|
||||
else:
|
||||
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)
|
||||
path = os.path.expanduser("~/")
|
||||
if os.path.exists(path+"klipper_config/"):
|
||||
path = path + "klipper_config/KlipperScreen.conf"
|
||||
else:
|
||||
filepath = os.path.join(filepath, self.configfile_name)
|
||||
logging.info(f'Creating a new config file in {filepath}')
|
||||
path = path + "KlipperScreen.conf"
|
||||
|
||||
try:
|
||||
with open(filepath, 'w') as file:
|
||||
file.write(contents)
|
||||
except Exception as e:
|
||||
logging.error(f"Error writing configuration file in {filepath}:\n{e}")
|
||||
file = open(path, 'w')
|
||||
file.write(contents)
|
||||
file.close()
|
||||
except Exception:
|
||||
logging.error("Error writing configuration file in %s" % path)
|
||||
|
||||
def set(self, section, name, value):
|
||||
self.config.set(section, name, value)
|
||||
@@ -545,8 +381,7 @@ class KlipperScreenConfig:
|
||||
]
|
||||
logging.info("\n".join(lines))
|
||||
|
||||
@staticmethod
|
||||
def _build_config_string(config):
|
||||
def _build_config_string(self, config):
|
||||
sfile = StringIO()
|
||||
config.write(sfile)
|
||||
sfile.seek(0)
|
||||
@@ -558,13 +393,29 @@ class KlipperScreenConfig:
|
||||
cfg = self.config[name]
|
||||
item = {
|
||||
"name": cfg.get("name"),
|
||||
"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)
|
||||
"icon": cfg.get("icon"),
|
||||
"panel": cfg.get("panel", False),
|
||||
"method": cfg.get("method", False),
|
||||
"confirm": cfg.get("confirm", False),
|
||||
"enable": cfg.get("enable", True)
|
||||
}
|
||||
|
||||
try:
|
||||
item["params"] = json.loads(cfg.get("params", "{}"))
|
||||
except Exception:
|
||||
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),
|
||||
"gcode": cfg.get("gcode", None)
|
||||
}
|
||||
return item
|
||||
@@ -1,4 +1,6 @@
|
||||
[main]
|
||||
moonraker_host: 127.0.0.1
|
||||
moonraker_port: 7125
|
||||
|
||||
[preheat PLA]
|
||||
bed = 40
|
||||
@@ -8,82 +10,24 @@ 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 move]
|
||||
name: {{ gettext('Move') }}
|
||||
icon: move
|
||||
panel: move
|
||||
|
||||
[menu move homing homeall]
|
||||
name: {{ gettext('Home All') }}
|
||||
[menu __main homing]
|
||||
name: {{ gettext('Homing') }}
|
||||
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') }}
|
||||
[menu __main preheat]
|
||||
name: {{ gettext('Preheat') }}
|
||||
icon: heat-up
|
||||
panel: temperature
|
||||
enable: {{ (printer.temperature_devices.count > 0) or (printer.extruders.count > 0)}}
|
||||
panel: preheat
|
||||
|
||||
[menu __main extrude]
|
||||
name: {{ gettext('Extrude') }}
|
||||
icon: extrude
|
||||
panel: extrude
|
||||
enable: {{ printer.extruders.count > 0 }}
|
||||
[menu __main actions]
|
||||
name: {{ gettext('Actions') }}
|
||||
icon: move
|
||||
|
||||
[menu __main more]
|
||||
name: {{ gettext('More') }}
|
||||
[menu __main config]
|
||||
name: {{ gettext('Configuration') }}
|
||||
icon: settings
|
||||
|
||||
[menu __main print]
|
||||
@@ -91,100 +35,140 @@ name: {{ gettext('Print') }}
|
||||
icon: print
|
||||
panel: print
|
||||
|
||||
[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 homeall]
|
||||
name: {{ gettext('Home All') }}
|
||||
icon: home
|
||||
method: printer.gcode.script
|
||||
params: {"script":"G28"}
|
||||
|
||||
[menu __main more bedmesh]
|
||||
name: {{ gettext('Bed Mesh') }}
|
||||
icon: bed-mesh
|
||||
panel: bed_mesh
|
||||
enable: {{ printer.bed_mesh is defined }}
|
||||
[menu __main homing homex]
|
||||
name: {{ gettext('Home X') }}
|
||||
icon: home-x
|
||||
method: printer.gcode.script
|
||||
params: {"script":"G28 X"}
|
||||
|
||||
[menu __main more zoffset]
|
||||
name: {{ gettext('Z Calibrate') }}
|
||||
icon: z-farther
|
||||
panel: zcalibrate
|
||||
[menu __main homing homey]
|
||||
name: {{ gettext('Home Y') }}
|
||||
icon: home-y
|
||||
method: printer.gcode.script
|
||||
params: {"script":"G28 Y"}
|
||||
|
||||
[menu __main more limits]
|
||||
name: {{ gettext('Limits') }}
|
||||
icon: fine-tune
|
||||
panel: limits
|
||||
[menu __main homing homez]
|
||||
name: {{ gettext('Home Z') }}
|
||||
icon: home-z
|
||||
method: printer.gcode.script
|
||||
params: {"script":"G28 Z"}
|
||||
|
||||
[menu __main more retraction]
|
||||
name: {{ gettext('Retraction') }}
|
||||
icon: retract
|
||||
panel: retraction
|
||||
enable: {{ printer.firmware_retraction }}
|
||||
[menu __main homing homexy]
|
||||
name: {{ gettext('Home XY') }}
|
||||
icon: home
|
||||
method: printer.gcode.script
|
||||
params: {"script":"G28 X Y"}
|
||||
|
||||
[menu __main more fan]
|
||||
[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]
|
||||
name: {{ gettext('Fan') }}
|
||||
icon: fan
|
||||
panel: fan
|
||||
enable: {{ printer.fans.count > 0 }}
|
||||
|
||||
[menu __main more macros]
|
||||
[menu __main actions temperature]
|
||||
name: {{ gettext('Temperature') }}
|
||||
icon: heat-up
|
||||
panel: temperature
|
||||
|
||||
[menu __main actions macros]
|
||||
name: {{ gettext('Macros') }}
|
||||
icon: custom-script
|
||||
panel: gcode_macros
|
||||
enable: {{ printer.gcode_macros.count > 0 }}
|
||||
|
||||
[menu __main more pins]
|
||||
name: {{ gettext('Pins') }}
|
||||
icon: hashtag
|
||||
panel: pins
|
||||
enable: {{ printer.output_pins.count > 0 }}
|
||||
|
||||
[menu __main more power]
|
||||
[menu __main actions power]
|
||||
name: {{ gettext('Power') }}
|
||||
icon: shutdown
|
||||
panel: power
|
||||
enable: {{ printer.power_devices.count > 0 }}
|
||||
|
||||
[menu __main more camera]
|
||||
name: {{ gettext('Camera') }}
|
||||
icon: camera
|
||||
panel: camera
|
||||
enable: {{ camera_configured }}
|
||||
[menu __main actions disablemotors]
|
||||
name: {{ gettext('Disable Motors') }}
|
||||
icon: motor-off
|
||||
method: printer.gcode.script
|
||||
params: {"script":"M18"}
|
||||
|
||||
[menu __main more console]
|
||||
[menu __main actions console]
|
||||
name: {{ gettext('Console') }}
|
||||
icon: console
|
||||
panel: console
|
||||
|
||||
[menu __main more system]
|
||||
[menu __main config bedlevel]
|
||||
name: {{ gettext('Bed Level') }}
|
||||
icon: bed-level
|
||||
panel: bed_level
|
||||
|
||||
[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
|
||||
|
||||
[menu __main config limits]
|
||||
name: {{ gettext('Limits') }}
|
||||
icon: fine-tune
|
||||
panel: limits
|
||||
|
||||
[menu __main config network]
|
||||
name: {{ gettext('Network') }}
|
||||
icon: network
|
||||
panel: network
|
||||
|
||||
[menu __main config system]
|
||||
name: {{ gettext('System') }}
|
||||
icon: info
|
||||
panel: system
|
||||
|
||||
[menu __main more input_shaper]
|
||||
name: {{ gettext('Input Shaper') }}
|
||||
icon: move
|
||||
panel: input_shaper
|
||||
enable: {{ printer.input_shaper }}
|
||||
|
||||
[menu __main more save]
|
||||
[menu __main config 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 more settings]
|
||||
name: KlipperScreen
|
||||
[menu __main config settings]
|
||||
name: {{ gettext('Settings') }}
|
||||
icon: settings
|
||||
panel: settings
|
||||
|
||||
[menu __main more network]
|
||||
name: {{ gettext('Network') }}
|
||||
icon: network
|
||||
panel: network
|
||||
|
||||
[menu __print]
|
||||
name: {{ gettext('Print Control') }}
|
||||
|
||||
@@ -192,25 +176,17 @@ 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) and (printer.extruders.count > 0) }}
|
||||
enable: {{ printer.pause_resume.is_paused == True }}
|
||||
|
||||
[menu __print power]
|
||||
name: {{ gettext('Power') }}
|
||||
@@ -224,13 +200,6 @@ 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
|
||||
@@ -246,11 +215,10 @@ name: {{ gettext('Network') }}
|
||||
icon: network
|
||||
panel: network
|
||||
|
||||
[menu __print retraction]
|
||||
name: {{ gettext('Retraction') }}
|
||||
icon: retract
|
||||
panel: retraction
|
||||
enable: {{ printer.firmware_retraction }}
|
||||
[menu __print system]
|
||||
name: {{ gettext('System') }}
|
||||
icon: info
|
||||
panel: system
|
||||
|
||||
[menu __print settings]
|
||||
name: {{ gettext('Settings') }}
|
||||
@@ -275,9 +243,8 @@ panel: network
|
||||
name: {{ gettext('System') }}
|
||||
icon: info
|
||||
panel: system
|
||||
enable: {{ moonraker_connected }}
|
||||
|
||||
[menu __splashscreen settings]
|
||||
name: KlipperScreen
|
||||
name: {{ gettext('Settings') }}
|
||||
icon: settings
|
||||
panel: settings
|
||||
@@ -1,33 +1,36 @@
|
||||
import logging
|
||||
import json
|
||||
import os
|
||||
import base64
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gtk, Gdk, 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 = 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
|
||||
self.gcodes_path = vsd['path']
|
||||
logging.info("Gcodes path: %s" % self.gcodes_path)
|
||||
|
||||
def _callback(self, result, method, params):
|
||||
if method == "server.files.list":
|
||||
@@ -42,7 +45,7 @@ class KlippyFiles:
|
||||
newfiles.append(file)
|
||||
self.add_file(item, False)
|
||||
|
||||
if newfiles or len(deletedfiles) > 0:
|
||||
if len(newfiles) > 0 or len(deletedfiles) > 0:
|
||||
self.run_callbacks(newfiles, deletedfiles)
|
||||
|
||||
if len(deletedfiles) > 0:
|
||||
@@ -50,27 +53,27 @@ class KlippyFiles:
|
||||
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]
|
||||
dir = params['path'][7:] if params['path'].startswith('gcodes/') else params['path']
|
||||
if dir[-1] == '/':
|
||||
dir = dir[:-1]
|
||||
|
||||
newfiles = []
|
||||
for file in result['result']['files']:
|
||||
fullpath = f"{directory}/{file['filename']}"
|
||||
fullpath = "%s/%s" % (dir, file['filename'])
|
||||
if fullpath not in self.filelist:
|
||||
newfiles.append(fullpath)
|
||||
|
||||
if newfiles:
|
||||
if len(newfiles) > 0:
|
||||
self.run_callbacks(newfiles)
|
||||
elif method == "server.files.metadata":
|
||||
if "error" in result.keys():
|
||||
logging.debug(f"Error in getting metadata for {params['filename']}. Retrying in 6 seconds")
|
||||
logging.debug("Error in getting metadata for %s. Retrying in 6 seconds" % (params['filename']))
|
||||
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 y: y['size'], reverse=True)
|
||||
self.files[params['filename']]['thumbnails'].sort(key=lambda x: x['size'], reverse=True)
|
||||
|
||||
for thumbnail in self.files[params['filename']]['thumbnails']:
|
||||
thumbnail['local'] = False
|
||||
@@ -88,15 +91,14 @@ class KlippyFiles:
|
||||
|
||||
def add_file(self, item, notify=True):
|
||||
if 'filename' not in item and 'path' not in item:
|
||||
logging.info(f"Error adding item, unknown filename or path: {item}")
|
||||
logging.info("Error adding item, unknown filename or path: %s" % item)
|
||||
return
|
||||
|
||||
filename = item['path'] if "path" in item else item['filename']
|
||||
if filename in self.filelist:
|
||||
logging.info(f"File already exists: {filename}")
|
||||
logging.info("File already exists: %s" % filename)
|
||||
self.request_metadata(filename)
|
||||
args = None, None, [filename]
|
||||
GLib.idle_add(self.run_callbacks, *args)
|
||||
GLib.timeout_add(1000, self.run_callbacks, mods=[filename])
|
||||
return
|
||||
|
||||
self.filelist.append(filename)
|
||||
@@ -111,15 +113,15 @@ class KlippyFiles:
|
||||
def add_file_callback(self, callback):
|
||||
try:
|
||||
self.callbacks.append(callback)
|
||||
except Exception as e:
|
||||
logging.debug(f"Callback not found: {callback}:\n{e}")
|
||||
except Exception:
|
||||
logging.debug("Callback not found: %s" % callback)
|
||||
|
||||
def process_update(self, data):
|
||||
if 'item' in data and data['item']['root'] != 'gcodes':
|
||||
return
|
||||
|
||||
if data['action'] == "create_dir":
|
||||
self._screen._ws.klippy.get_file_dir(f"gcodes/{data['item']['path']}", self._callback)
|
||||
self._screen._ws.klippy.get_file_dir("gcodes/%s" % data['item']['path'], self._callback)
|
||||
elif data['action'] == "create_file":
|
||||
self.add_file(data['item'])
|
||||
elif data['action'] == "delete_file":
|
||||
@@ -130,26 +132,26 @@ class KlippyFiles:
|
||||
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 filename in self.filelist
|
||||
return True if filename in self.filelist else False
|
||||
|
||||
def file_metadata_exists(self, filename):
|
||||
if self.file_exists(filename):
|
||||
return "slicer" in self.files[filename]
|
||||
if not self.file_exists(filename):
|
||||
return False
|
||||
if "slicer" in self.files[filename]:
|
||||
return True
|
||||
return 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]
|
||||
def get_thumbnail_location(self, filename):
|
||||
if not self.has_thumbnail(filename):
|
||||
return None
|
||||
|
||||
thumb = self.files[filename]['thumbnails'][0]
|
||||
if thumb['local'] is False:
|
||||
return ['http', thumb['path']]
|
||||
return ['file', thumb['path']]
|
||||
@@ -166,7 +168,6 @@ 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:
|
||||
@@ -178,18 +179,17 @@ class KlippyFiles:
|
||||
if notify is True:
|
||||
self.run_callbacks(deletedfiles=[filename])
|
||||
|
||||
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 = []
|
||||
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=[]):
|
||||
if len(self.callbacks) <= 0:
|
||||
return False
|
||||
return
|
||||
|
||||
for cb in self.callbacks:
|
||||
args = newfiles, deletedfiles, mods
|
||||
GLib.idle_add(cb, *args)
|
||||
GLib.idle_add(cb, newfiles, deletedfiles, mods)
|
||||
|
||||
return False
|
||||
|
||||
def get_file_list(self):
|
||||
@@ -198,4 +198,5 @@ class KlippyFiles:
|
||||
def get_file_info(self, filename):
|
||||
if filename not in self.files:
|
||||
return {"path": None, "modified": 0, "size": 0}
|
||||
|
||||
return self.files[filename]
|
||||
@@ -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,17 +45,14 @@ try:
|
||||
state = struct.unpack('H', state_p.raw)[0]
|
||||
libXext.XCloseDisplay(display)
|
||||
return state
|
||||
|
||||
dpms_loaded = True
|
||||
except Exception as msg:
|
||||
logging.error(f"Couldn't load DPMS: {msg}")
|
||||
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
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)
|
||||
|
||||
@@ -67,19 +64,17 @@ def get_wireless_interfaces():
|
||||
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)
|
||||
except Exception:
|
||||
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])
|
||||
interfaces.append(match.group(1))
|
||||
|
||||
return interfaces
|
||||
|
||||
|
||||
def get_software_version():
|
||||
prog = ('git', '-C', os.path.dirname(__file__), 'describe', '--always',
|
||||
'--tags', '--long', '--dirty')
|
||||
@@ -99,7 +94,6 @@ 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
|
||||
@@ -117,18 +111,15 @@ def patch_threading_excepthook():
|
||||
raise
|
||||
except Exception:
|
||||
sys.excepthook(*sys.exc_info(), thread_identifier=threading.get_ident())
|
||||
|
||||
self.run = run_with_excepthook
|
||||
|
||||
threading.Thread.__init__ = new_init
|
||||
|
||||
|
||||
# Rotating file handler based on Klipper and Moonraker's implementation
|
||||
class KlipperScreenLoggingHandler(logging.handlers.RotatingFileHandler):
|
||||
# Timed rotating file handler based on Klipper and Moonraker's implementation
|
||||
class KlipperScreenLoggingHandler(logging.handlers.TimedRotatingFileHandler):
|
||||
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]
|
||||
@@ -144,7 +135,6 @@ class KlipperScreenLoggingHandler(logging.handlers.RotatingFileHandler):
|
||||
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()
|
||||
@@ -157,29 +147,23 @@ 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 = 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 = 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.setFormatter(formatter)
|
||||
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 = logging.handlers.QueueListener(
|
||||
queue, fh, stdout_hdlr)
|
||||
else:
|
||||
listener = logging.handlers.QueueListener(
|
||||
queue, stdout_hdlr)
|
||||
listener.start()
|
||||
|
||||
def logging_exception_handler(ex_type, value, tb, thread_identifier=None):
|
||||
def logging_exception_handler(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)]])
|
||||
)
|
||||
|
||||
"Uncaught exception %s: %s\nTraceback: %s" % (type, value, "\n".join(traceback.format_tb(tb))))
|
||||
sys.excepthook = logging_exception_handler
|
||||
logging.captureWarnings(True)
|
||||
|
||||
|
||||
@@ -8,15 +8,18 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-07-02 16:32-0300\n"
|
||||
"POT-Creation-Date: 2021-11-18 11:29-0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#, python-format
|
||||
msgid "%d Packages will be updated"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "%s will be updated to version"
|
||||
@@ -28,89 +31,39 @@ msgstr ""
|
||||
msgid "24 Hour Time"
|
||||
msgstr ""
|
||||
|
||||
msgid "A FIRMWARE_RESTART may fix the issue."
|
||||
msgstr ""
|
||||
|
||||
msgid "ADXL Not Configured"
|
||||
msgstr ""
|
||||
|
||||
msgid "Abort"
|
||||
msgstr ""
|
||||
|
||||
msgid "Acceleration:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add profile"
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apply"
|
||||
msgid "Add Printer"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Apply %s%.3f offset to Endstop?"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Apply %s%.3f offset to Probe?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure do you want to exclude the object?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure you want to run Emergency Stop?"
|
||||
msgid "Add bed mesh profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure you wish to cancel this print?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure you wish to disable motors?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure you wish to reboot the system?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure you wish to shutdown the system?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto-calibrate"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto-close notifications"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto-scroll"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bed Level"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bed Mesh"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bed screw configuration:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Calibrate"
|
||||
msgstr ""
|
||||
|
||||
msgid "Calibrated"
|
||||
msgstr ""
|
||||
|
||||
msgid "Calibrating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Camera"
|
||||
msgstr ""
|
||||
|
||||
msgid "Can't set above the maximum:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
@@ -123,19 +76,12 @@ msgstr ""
|
||||
msgid "Cancelling"
|
||||
msgstr ""
|
||||
|
||||
msgid "Cannot connect to Moonraker"
|
||||
msgstr ""
|
||||
|
||||
msgid "Channel"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check ADXL Wiring"
|
||||
msgstr ""
|
||||
|
||||
msgid "Checking for updates, please wait..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Clear"
|
||||
msgid ""
|
||||
"Check /tmp/KlipperScreen.log for more information.\n"
|
||||
"Please submit an issue on GitHub for help."
|
||||
msgstr ""
|
||||
|
||||
msgid "Close"
|
||||
@@ -144,7 +90,7 @@ msgstr ""
|
||||
msgid "Complete"
|
||||
msgstr ""
|
||||
|
||||
msgid "Confirm Emergency Stop"
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Connected"
|
||||
@@ -166,18 +112,24 @@ msgstr ""
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete Directory?"
|
||||
msgid "Decrease"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete File?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Deselect"
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable Motors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable XY"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disconnect"
|
||||
msgstr ""
|
||||
|
||||
msgid "Displayed Macros"
|
||||
msgstr ""
|
||||
|
||||
msgid "Distance (mm)"
|
||||
msgstr ""
|
||||
|
||||
@@ -185,6 +137,9 @@ msgstr ""
|
||||
msgid "Do you want to recover %s?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Duration Only"
|
||||
msgstr ""
|
||||
|
||||
msgid "Elapsed:"
|
||||
msgstr ""
|
||||
|
||||
@@ -194,12 +149,6 @@ msgstr ""
|
||||
msgid "Estimated Time Method"
|
||||
msgstr ""
|
||||
|
||||
msgid "Exclude Object"
|
||||
msgstr ""
|
||||
|
||||
msgid "Extra Large"
|
||||
msgstr ""
|
||||
|
||||
msgid "Extrude"
|
||||
msgstr ""
|
||||
|
||||
@@ -209,33 +158,15 @@ msgstr ""
|
||||
msgid "Extrusion -"
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed, adjust position first"
|
||||
msgstr ""
|
||||
|
||||
msgid "Fan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament Used"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament total:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament used:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Filament:"
|
||||
msgstr ""
|
||||
|
||||
msgid "File"
|
||||
msgstr ""
|
||||
|
||||
msgid "File:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Finding ADXL"
|
||||
msgstr ""
|
||||
|
||||
msgid "Fine Tuning"
|
||||
msgstr ""
|
||||
|
||||
@@ -245,39 +176,12 @@ msgstr ""
|
||||
msgid "Firmware Restart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Flow:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Flowrate:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Font Size"
|
||||
msgstr ""
|
||||
|
||||
msgid "Full Update"
|
||||
msgstr ""
|
||||
|
||||
msgid "Fullscreen"
|
||||
msgstr ""
|
||||
|
||||
msgid "Go Back"
|
||||
msgstr ""
|
||||
|
||||
msgid "Height:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hide"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hide sensors in Temp."
|
||||
msgstr ""
|
||||
|
||||
msgid "Hide temp."
|
||||
msgstr ""
|
||||
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
@@ -296,33 +200,36 @@ msgstr ""
|
||||
msgid "Home Z"
|
||||
msgstr ""
|
||||
|
||||
msgid "Host"
|
||||
msgid "Homing"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hostname"
|
||||
msgstr ""
|
||||
|
||||
msgid "IPv4"
|
||||
msgstr ""
|
||||
|
||||
msgid "IPv6"
|
||||
msgstr ""
|
||||
|
||||
msgid "Icon Theme"
|
||||
msgstr ""
|
||||
|
||||
msgid "Increase"
|
||||
msgstr ""
|
||||
|
||||
msgid "Initializing"
|
||||
msgstr ""
|
||||
|
||||
msgid "Initializing printer..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Initiate a PID calibration for:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Input Shaper"
|
||||
msgstr ""
|
||||
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
|
||||
msgid "Invalid"
|
||||
msgstr ""
|
||||
|
||||
msgid "Invalid password"
|
||||
msgstr ""
|
||||
|
||||
msgid "Invert X"
|
||||
msgstr ""
|
||||
|
||||
@@ -332,18 +239,28 @@ msgstr ""
|
||||
msgid "Invert Z"
|
||||
msgstr ""
|
||||
|
||||
msgid "It may take more than 5 minutes depending on the heater power."
|
||||
msgid "Klipper Restart"
|
||||
msgstr ""
|
||||
|
||||
msgid "Klipper Restart"
|
||||
msgid "Klipper Version"
|
||||
msgstr ""
|
||||
|
||||
msgid "Klipper has disconnected"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Klipper has encountered an error with the micro-controller.\n"
|
||||
"Please recompile and flash."
|
||||
msgstr ""
|
||||
|
||||
msgid "Klipper has encountered an error."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Klipper has encountered an error.\n"
|
||||
"Issue a FIRMWARE_RESTART to attempt fixing the issue."
|
||||
msgstr ""
|
||||
|
||||
msgid "Klipper has shutdown"
|
||||
msgstr ""
|
||||
|
||||
@@ -353,7 +270,7 @@ msgstr ""
|
||||
msgid "Klipper will reboot"
|
||||
msgstr ""
|
||||
|
||||
msgid "KlipperScreen will reboot"
|
||||
msgid "KlipperScreen Version"
|
||||
msgstr ""
|
||||
|
||||
msgid "Language"
|
||||
@@ -362,9 +279,6 @@ msgstr ""
|
||||
msgid "Large"
|
||||
msgstr ""
|
||||
|
||||
msgid "Layer:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Left:"
|
||||
msgstr ""
|
||||
|
||||
@@ -386,10 +300,7 @@ msgstr ""
|
||||
msgid "Main Menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "Max"
|
||||
msgstr ""
|
||||
|
||||
msgid "Max Acceleration"
|
||||
msgid "Max Accelation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Max Acceleration to Deceleration"
|
||||
@@ -398,102 +309,56 @@ msgstr ""
|
||||
msgid "Max Velocity"
|
||||
msgstr ""
|
||||
|
||||
msgid "Maximum"
|
||||
msgstr ""
|
||||
|
||||
msgid "Measure Both"
|
||||
msgstr ""
|
||||
|
||||
msgid "Measure X"
|
||||
msgstr ""
|
||||
|
||||
msgid "Measure Y"
|
||||
msgstr ""
|
||||
|
||||
msgid "Medium"
|
||||
msgstr ""
|
||||
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mesh calibrate"
|
||||
msgstr ""
|
||||
|
||||
msgid "Modified"
|
||||
msgstr ""
|
||||
|
||||
msgid "Moonraker: connected"
|
||||
msgstr ""
|
||||
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move Distance (mm)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move Speed (mm/s)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
msgid "Network"
|
||||
msgstr ""
|
||||
|
||||
msgid "Never"
|
||||
msgid "Number Pad"
|
||||
msgstr ""
|
||||
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Not supported for auto-detection, it needs to be configured in klipperscreen."
|
||||
"conf"
|
||||
msgstr ""
|
||||
|
||||
msgid "Nothing selected"
|
||||
msgid "Off"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Outdated by %d"
|
||||
msgid "Outdated by %d commits:"
|
||||
msgstr ""
|
||||
|
||||
msgid "PSK for"
|
||||
msgstr ""
|
||||
|
||||
msgid "Package will be updated"
|
||||
msgid_plural "Packages will be updated"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "Part Fan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Password saved"
|
||||
msgstr ""
|
||||
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
msgid "Paused"
|
||||
msgstr ""
|
||||
|
||||
msgid "Perform a full upgrade?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Pins"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please recompile and flash the micro-controller."
|
||||
msgstr ""
|
||||
|
||||
msgid "Power"
|
||||
msgstr ""
|
||||
|
||||
msgid "Power On Printer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Pressure Advance:"
|
||||
msgid "Preheat"
|
||||
msgstr ""
|
||||
|
||||
msgid "Print"
|
||||
@@ -505,51 +370,27 @@ msgstr ""
|
||||
msgid "Print Time"
|
||||
msgstr ""
|
||||
|
||||
msgid "Printer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Printer Connections"
|
||||
msgstr ""
|
||||
|
||||
msgid "Printer Select"
|
||||
msgstr ""
|
||||
|
||||
msgid "Printing"
|
||||
msgstr ""
|
||||
|
||||
msgid "Probe Offset"
|
||||
msgstr ""
|
||||
|
||||
msgid "Profile Name:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Provide KlipperScreen.log when asking for help.\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quad Gantry Level"
|
||||
msgstr ""
|
||||
|
||||
msgid "Raise Nozzle"
|
||||
msgstr ""
|
||||
|
||||
msgid "Recover"
|
||||
msgstr ""
|
||||
|
||||
msgid "Recover Hard"
|
||||
msgstr ""
|
||||
|
||||
msgid "Recover Soft"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reference"
|
||||
msgstr ""
|
||||
|
||||
msgid "Refresh"
|
||||
msgstr ""
|
||||
|
||||
msgid "Rename/Move:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart"
|
||||
msgstr ""
|
||||
|
||||
@@ -559,80 +400,37 @@ msgstr ""
|
||||
msgid "Retract"
|
||||
msgstr ""
|
||||
|
||||
msgid "Retraction"
|
||||
msgstr ""
|
||||
|
||||
msgid "Retraction Length"
|
||||
msgstr ""
|
||||
|
||||
msgid "Retraction Speed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Retry"
|
||||
msgstr ""
|
||||
|
||||
msgid "Retrying"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save Config"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save Z"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save configuration?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Saved"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Saved offset: %s"
|
||||
msgstr ""
|
||||
|
||||
msgid "Screen DPMS"
|
||||
msgid "Save configuration."
|
||||
msgstr ""
|
||||
|
||||
msgid "Screen Power Off Time"
|
||||
msgstr ""
|
||||
|
||||
msgid "Screen will show in less than one second"
|
||||
msgstr ""
|
||||
|
||||
msgid "Screws Adjust"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
msgid "Send"
|
||||
msgstr ""
|
||||
|
||||
msgid "Set Temp"
|
||||
msgstr ""
|
||||
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Heater Power"
|
||||
msgstr ""
|
||||
|
||||
msgid "Shutdown"
|
||||
msgstr ""
|
||||
|
||||
msgid "Size"
|
||||
msgstr ""
|
||||
|
||||
msgid "Slicer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Slicer:"
|
||||
msgid "Small"
|
||||
msgstr ""
|
||||
|
||||
msgid "Small"
|
||||
msgid "Sort by: "
|
||||
msgstr ""
|
||||
|
||||
msgid "Speed (mm/s)"
|
||||
@@ -644,16 +442,13 @@ msgstr ""
|
||||
msgid "Speed -"
|
||||
msgstr ""
|
||||
|
||||
msgid "Speed:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Square Corner Velocity"
|
||||
msgstr ""
|
||||
|
||||
msgid "Start"
|
||||
msgstr ""
|
||||
|
||||
msgid "Starting WiFi Association"
|
||||
msgid "Starting WiFi Re-association"
|
||||
msgstr ""
|
||||
|
||||
msgid "Starting recovery for"
|
||||
@@ -665,86 +460,73 @@ msgstr ""
|
||||
msgid "System"
|
||||
msgstr ""
|
||||
|
||||
msgid "System Restart"
|
||||
msgid ""
|
||||
"System\n"
|
||||
"Restart"
|
||||
msgstr ""
|
||||
|
||||
msgid "System Shutdown"
|
||||
msgstr ""
|
||||
|
||||
msgid "Temp (°C)"
|
||||
msgid ""
|
||||
"System\n"
|
||||
"Shutdown"
|
||||
msgstr ""
|
||||
|
||||
msgid "Temperature"
|
||||
msgstr ""
|
||||
|
||||
msgid "Total:"
|
||||
#, python-format
|
||||
msgid "To apply %s KlipperScreen needs to be restarted"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unknown Heater"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unknown screw position"
|
||||
msgid "Tool"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unload"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unretract Extra Length"
|
||||
msgstr ""
|
||||
|
||||
msgid "Unretract Speed"
|
||||
msgstr ""
|
||||
|
||||
msgid "Up To Date"
|
||||
msgstr ""
|
||||
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
|
||||
msgid "Updating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Uploaded"
|
||||
msgstr ""
|
||||
|
||||
msgid "XY Move Speed (mm/s)"
|
||||
msgid "View Mesh"
|
||||
msgstr ""
|
||||
|
||||
msgid "XY Speed (mm/s)"
|
||||
msgid "X+"
|
||||
msgstr ""
|
||||
|
||||
msgid "X-"
|
||||
msgstr ""
|
||||
|
||||
msgid "Y+"
|
||||
msgstr ""
|
||||
|
||||
msgid "Y-"
|
||||
msgstr ""
|
||||
|
||||
msgid "Z Calibrate"
|
||||
msgstr ""
|
||||
|
||||
msgid "Z Move Speed (mm/s)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Z Speed (mm/s)"
|
||||
msgid "Z Offset"
|
||||
msgstr ""
|
||||
|
||||
msgid "Z Tilt"
|
||||
msgstr ""
|
||||
|
||||
msgid "Z offset:"
|
||||
msgid "Z+"
|
||||
msgstr ""
|
||||
|
||||
msgid "commit"
|
||||
msgid_plural "commits"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgid "Z-"
|
||||
msgstr ""
|
||||
|
||||
msgid "dBm"
|
||||
msgstr ""
|
||||
|
||||
msgid "hour"
|
||||
msgid_plural "hours"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "minute"
|
||||
msgid_plural "minutes"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgid "minutes"
|
||||
msgstr ""
|
||||
|
||||
msgid "mm"
|
||||
msgstr ""
|
||||
@@ -752,8 +534,5 @@ msgstr ""
|
||||
msgid "mm/s"
|
||||
msgstr ""
|
||||
|
||||
msgid "mm/s²"
|
||||
msgstr ""
|
||||
|
||||
msgid "mm³/s"
|
||||
msgid "mm/s^2"
|
||||
msgstr ""
|
||||
@@ -1,791 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Czech\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-07-02 16:32-0300\n"
|
||||
"PO-Revision-Date: 2023-01-29 09:27-0600\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Jan Stanka (stanky@email.cz)\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n>=2 && n<=4 ? 1 : 2);\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
|
||||
#, python-format
|
||||
msgid "%s will be updated to version"
|
||||
msgstr "%s bude aktualizováno na verzi"
|
||||
|
||||
msgid "(default)"
|
||||
msgstr ""
|
||||
|
||||
msgid "24 Hour Time"
|
||||
msgstr "24 hod formát"
|
||||
|
||||
msgid "A FIRMWARE_RESTART may fix the issue."
|
||||
msgstr "FW restart může fixnout chyby."
|
||||
|
||||
msgid "ADXL Not Configured"
|
||||
msgstr "ADXL není nastaven"
|
||||
|
||||
msgid "Abort"
|
||||
msgstr "Zrušit"
|
||||
|
||||
msgid "Acceleration:"
|
||||
msgstr "Zrychlení:"
|
||||
|
||||
msgid "Accept"
|
||||
msgstr "Přijmout"
|
||||
|
||||
msgid "Add profile"
|
||||
msgstr "Přidat profil"
|
||||
|
||||
msgid "Apply"
|
||||
msgstr "Použít"
|
||||
|
||||
#, python-format
|
||||
msgid "Apply %s%.3f offset to Endstop?"
|
||||
msgstr ""
|
||||
|
||||
#, python-format
|
||||
msgid "Apply %s%.3f offset to Probe?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Are you sure do you want to exclude the object?"
|
||||
msgstr "Opravdu chceš vyjmout objekt?"
|
||||
|
||||
msgid "Are you sure you want to run Emergency Stop?"
|
||||
msgstr "Opravdu okamžitě zastavit?"
|
||||
|
||||
msgid "Are you sure you wish to cancel this print?"
|
||||
msgstr "Opravdu chcete zrušit tisk?"
|
||||
|
||||
msgid "Are you sure you wish to disable motors?"
|
||||
msgstr "Opravdu chcete uvolnit motory?"
|
||||
|
||||
msgid "Are you sure you wish to reboot the system?"
|
||||
msgstr "Opravdu chcete rebootovat systém?"
|
||||
|
||||
msgid "Are you sure you wish to shutdown the system?"
|
||||
msgstr "Opravdu chcete vypnout systém?"
|
||||
|
||||
msgid "Auto"
|
||||
msgstr "Auto"
|
||||
|
||||
msgid "Auto-calibrate"
|
||||
msgstr "Auto-kalibrace"
|
||||
|
||||
msgid "Auto-close notifications"
|
||||
msgstr "Automaticky zavřít upozornění"
|
||||
|
||||
msgid "Auto-scroll"
|
||||
msgstr "Auto posun"
|
||||
|
||||
msgid "Bed Level"
|
||||
msgstr "Vyrovnání podložky"
|
||||
|
||||
msgid "Bed Mesh"
|
||||
msgstr "Mapa podložky"
|
||||
|
||||
msgid "Bed screw configuration:"
|
||||
msgstr "Vyrovnání šroubů podložky:"
|
||||
|
||||
msgid "Calibrate"
|
||||
msgstr "Kalibrace"
|
||||
|
||||
msgid "Calibrated"
|
||||
msgstr "Zkalibrováno"
|
||||
|
||||
msgid "Calibrating"
|
||||
msgstr "Kalibruji"
|
||||
|
||||
msgid "Camera"
|
||||
msgstr ""
|
||||
|
||||
msgid "Can't set above the maximum:"
|
||||
msgstr "Nemohu nastavit víc než max:"
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr "Zrušit"
|
||||
|
||||
msgid "Cancel Print"
|
||||
msgstr "Zrušit tisk"
|
||||
|
||||
msgid "Cancelled"
|
||||
msgstr "Zrušeno"
|
||||
|
||||
msgid "Cancelling"
|
||||
msgstr "Ruším"
|
||||
|
||||
msgid "Cannot connect to Moonraker"
|
||||
msgstr "Nelze se připojit k Moonraker"
|
||||
|
||||
msgid "Channel"
|
||||
msgstr "Kanál"
|
||||
|
||||
msgid "Check ADXL Wiring"
|
||||
msgstr "Zkontroluj zapojení ADXL"
|
||||
|
||||
msgid "Checking for updates, please wait..."
|
||||
msgstr "Kontrola aktualizací, čekej ..."
|
||||
|
||||
msgid "Clear"
|
||||
msgstr "Vymaž"
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Zavřít"
|
||||
|
||||
msgid "Complete"
|
||||
msgstr "Hotovo"
|
||||
|
||||
msgid "Confirm Emergency Stop"
|
||||
msgstr "Potvrzovat Emergency Stop"
|
||||
|
||||
msgid "Connected"
|
||||
msgstr "Připojeno"
|
||||
|
||||
#, python-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Připojování k %s"
|
||||
|
||||
msgid "Console"
|
||||
msgstr "Konsole"
|
||||
|
||||
msgid "Continue"
|
||||
msgstr "Pokračuj"
|
||||
|
||||
msgid "Cooldown"
|
||||
msgstr "Zchladit"
|
||||
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
|
||||
msgid "Delete Directory?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delete File?"
|
||||
msgstr "Smazat soubor?"
|
||||
|
||||
msgid "Deselect"
|
||||
msgstr "Odznačit"
|
||||
|
||||
msgid "Disable Motors"
|
||||
msgstr "Uvolnit motory"
|
||||
|
||||
msgid "Distance (mm)"
|
||||
msgstr "Vzdálenost (mm)"
|
||||
|
||||
#, python-format
|
||||
msgid "Do you want to recover %s?"
|
||||
msgstr "Obnovit %s?"
|
||||
|
||||
msgid "Elapsed:"
|
||||
msgstr "Uplynulo:"
|
||||
|
||||
msgid "Error"
|
||||
msgstr "Chyba"
|
||||
|
||||
msgid "Estimated Time Method"
|
||||
msgstr "Výpočet doby tisku"
|
||||
|
||||
msgid "Exclude Object"
|
||||
msgstr "Vyloučit objekt"
|
||||
|
||||
msgid "Extra Large"
|
||||
msgstr "Extra velký"
|
||||
|
||||
msgid "Extrude"
|
||||
msgstr "Extruze"
|
||||
|
||||
msgid "Extrusion +"
|
||||
msgstr "Extruze +"
|
||||
|
||||
msgid "Extrusion -"
|
||||
msgstr "Extruze -"
|
||||
|
||||
msgid "Failed, adjust position first"
|
||||
msgstr "Chyba, nastav nejprve pozici"
|
||||
|
||||
msgid "Fan"
|
||||
msgstr "Větrák"
|
||||
|
||||
msgid "Filament Used"
|
||||
msgstr "Typ filamentu"
|
||||
|
||||
msgid "Filament total:"
|
||||
msgstr "Filament celkem:"
|
||||
|
||||
msgid "Filament used:"
|
||||
msgstr "Použitý filament:"
|
||||
|
||||
msgid "Filament:"
|
||||
msgstr "Filament:"
|
||||
|
||||
msgid "File"
|
||||
msgstr "Soubor"
|
||||
|
||||
msgid "File:"
|
||||
msgstr "Soubor:"
|
||||
|
||||
msgid "Finding ADXL"
|
||||
msgstr "Hledání ADXL"
|
||||
|
||||
msgid "Fine Tuning"
|
||||
msgstr "Ladění"
|
||||
|
||||
msgid "Finish"
|
||||
msgstr "Konec"
|
||||
|
||||
msgid "Firmware Restart"
|
||||
msgstr "Firmware Restart"
|
||||
|
||||
msgid "Flow:"
|
||||
msgstr "Tok:"
|
||||
|
||||
msgid "Flowrate:"
|
||||
msgstr "Rychlost toku:"
|
||||
|
||||
msgid "Font Size"
|
||||
msgstr "Velikost fontu"
|
||||
|
||||
msgid "Full Update"
|
||||
msgstr "Úplný update"
|
||||
|
||||
msgid "Fullscreen"
|
||||
msgstr ""
|
||||
|
||||
msgid "Go Back"
|
||||
msgstr "Zpět"
|
||||
|
||||
msgid "Height:"
|
||||
msgstr "Výška:"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Skrytý"
|
||||
|
||||
msgid "Hide"
|
||||
msgstr "Skrýt"
|
||||
|
||||
msgid "Hide sensors in Temp."
|
||||
msgstr "Skrýt senzory v Temp."
|
||||
|
||||
msgid "Hide temp."
|
||||
msgstr "Skrýt teplotu"
|
||||
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
msgid "Home All"
|
||||
msgstr "Zaparkovat XYZ"
|
||||
|
||||
msgid "Home X"
|
||||
msgstr "Zaparkovat X"
|
||||
|
||||
msgid "Home XY"
|
||||
msgstr "Zaparkovat XY"
|
||||
|
||||
msgid "Home Y"
|
||||
msgstr "Zaparkovat Y"
|
||||
|
||||
msgid "Home Z"
|
||||
msgstr "Zaparkovat Z"
|
||||
|
||||
msgid "Host"
|
||||
msgstr "Host"
|
||||
|
||||
msgid "Hostname"
|
||||
msgstr "Hostname"
|
||||
|
||||
msgid "Icon Theme"
|
||||
msgstr "Sada ikon"
|
||||
|
||||
msgid "Initializing printer..."
|
||||
msgstr "Startuji tiskárnu ..."
|
||||
|
||||
msgid "Initiate a PID calibration for:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Input Shaper"
|
||||
msgstr ""
|
||||
|
||||
msgid "Interface"
|
||||
msgstr "Rozhraní"
|
||||
|
||||
msgid "Invalid"
|
||||
msgstr "Špatně"
|
||||
|
||||
msgid "Invalid password"
|
||||
msgstr "Špatné heslo"
|
||||
|
||||
msgid "Invert X"
|
||||
msgstr "Otočit X"
|
||||
|
||||
msgid "Invert Y"
|
||||
msgstr "Otočit Y"
|
||||
|
||||
msgid "Invert Z"
|
||||
msgstr "Otočit Z"
|
||||
|
||||
msgid "It may take more than 5 minutes depending on the heater power."
|
||||
msgstr ""
|
||||
|
||||
msgid "Klipper Restart"
|
||||
msgstr "Klipper Restart"
|
||||
|
||||
msgid "Klipper has disconnected"
|
||||
msgstr "Klipper odpojen"
|
||||
|
||||
msgid "Klipper has encountered an error."
|
||||
msgstr "Klipper zaznamenal chybu."
|
||||
|
||||
msgid "Klipper has shutdown"
|
||||
msgstr "Klipper zastaven"
|
||||
|
||||
msgid "Klipper is attempting to start"
|
||||
msgstr "Klipper startuje"
|
||||
|
||||
msgid "Klipper will reboot"
|
||||
msgstr "Klipper se restartuje"
|
||||
|
||||
msgid "KlipperScreen will reboot"
|
||||
msgstr "KlipperScreen se restartuje"
|
||||
|
||||
msgid "Language"
|
||||
msgstr "Jazyk"
|
||||
|
||||
msgid "Large"
|
||||
msgstr "Velký"
|
||||
|
||||
msgid "Layer:"
|
||||
msgstr "Vrstva:"
|
||||
|
||||
msgid "Left:"
|
||||
msgstr "Zbývá:"
|
||||
|
||||
msgid "Limits"
|
||||
msgstr "Limity"
|
||||
|
||||
msgid "Load"
|
||||
msgstr "Zasuň"
|
||||
|
||||
msgid "Lower Nozzle"
|
||||
msgstr "Trysku níž"
|
||||
|
||||
msgid "Macro shortcut on sidebar"
|
||||
msgstr "Macro shortcut on sidebar"
|
||||
|
||||
msgid "Macros"
|
||||
msgstr "Makra"
|
||||
|
||||
msgid "Main Menu"
|
||||
msgstr "Hlavní menu"
|
||||
|
||||
msgid "Max"
|
||||
msgstr "Max"
|
||||
|
||||
msgid "Max Acceleration"
|
||||
msgstr "Max. zrychlení"
|
||||
|
||||
msgid "Max Acceleration to Deceleration"
|
||||
msgstr "Z max. zrychlení do zpomalení"
|
||||
|
||||
msgid "Max Velocity"
|
||||
msgstr "Max. rychlost"
|
||||
|
||||
msgid "Maximum"
|
||||
msgstr "Maximum"
|
||||
|
||||
msgid "Measure Both"
|
||||
msgstr "Změřit oboje"
|
||||
|
||||
msgid "Measure X"
|
||||
msgstr "Změřit X"
|
||||
|
||||
msgid "Measure Y"
|
||||
msgstr "Změřit Y"
|
||||
|
||||
msgid "Medium"
|
||||
msgstr "Střední"
|
||||
|
||||
msgid "Menu"
|
||||
msgstr "Menu"
|
||||
|
||||
msgid "Mesh calibrate"
|
||||
msgstr "Kalibrace sítě"
|
||||
|
||||
msgid "Modified"
|
||||
msgstr "Změněno"
|
||||
|
||||
msgid "Moonraker: connected"
|
||||
msgstr "Moonraker: připojen"
|
||||
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
|
||||
msgid "Move"
|
||||
msgstr "Posun"
|
||||
|
||||
msgid "Move Distance (mm)"
|
||||
msgstr "Vzdálenost posunu (mm)"
|
||||
|
||||
msgid "Name"
|
||||
msgstr "Jméno"
|
||||
|
||||
msgid "Network"
|
||||
msgstr "Síť"
|
||||
|
||||
msgid "Never"
|
||||
msgstr "Nikdy"
|
||||
|
||||
msgid "New"
|
||||
msgstr "Nový"
|
||||
|
||||
msgid ""
|
||||
"Not supported for auto-detection, it needs to be configured in klipperscreen."
|
||||
"conf"
|
||||
msgstr "Nepodporováno autodetekcí, nakonfiguruj v klipperscreen.conf"
|
||||
|
||||
msgid "Nothing selected"
|
||||
msgstr "Nevybráno nic"
|
||||
|
||||
#, python-format
|
||||
msgid "Outdated by %d"
|
||||
msgstr "Zastaralý %d"
|
||||
|
||||
msgid "PSK for"
|
||||
msgstr "PSK pro"
|
||||
|
||||
msgid "Package will be updated"
|
||||
msgid_plural "Packages will be updated"
|
||||
msgstr[0] "Balíček bude aktualizován"
|
||||
msgstr[1] "Balíčky budou aktualizovány"
|
||||
msgstr[2] ""
|
||||
|
||||
msgid "Part Fan"
|
||||
msgstr "Částečný ofuk"
|
||||
|
||||
msgid "Password saved"
|
||||
msgstr "Heslo uloženo"
|
||||
|
||||
msgid "Pause"
|
||||
msgstr "Pauza"
|
||||
|
||||
msgid "Paused"
|
||||
msgstr "Pozastaveno"
|
||||
|
||||
msgid "Perform a full upgrade?"
|
||||
msgstr "Úplně aktualizovat?"
|
||||
|
||||
msgid "Pins"
|
||||
msgstr "Piny"
|
||||
|
||||
msgid "Please recompile and flash the micro-controller."
|
||||
msgstr "Znovu přelož a flashni micro-controller."
|
||||
|
||||
msgid "Power"
|
||||
msgstr "Zdroj"
|
||||
|
||||
msgid "Power On Printer"
|
||||
msgstr "Zapni tiskárnu"
|
||||
|
||||
msgid "Pressure Advance:"
|
||||
msgstr "Pressure Advance:"
|
||||
|
||||
msgid "Print"
|
||||
msgstr "Tisk"
|
||||
|
||||
msgid "Print Control"
|
||||
msgstr "Nastavení tisku"
|
||||
|
||||
msgid "Print Time"
|
||||
msgstr "Čas tisku"
|
||||
|
||||
msgid "Printer"
|
||||
msgstr "Tiskárna"
|
||||
|
||||
msgid "Printer Connections"
|
||||
msgstr "Připojení"
|
||||
|
||||
msgid "Printer Select"
|
||||
msgstr "Výběr tiskárny"
|
||||
|
||||
msgid "Printing"
|
||||
msgstr "Probíhá tisk"
|
||||
|
||||
msgid "Probe Offset"
|
||||
msgstr "Offset sondy"
|
||||
|
||||
msgid "Profile Name:"
|
||||
msgstr "Jméno profilu:"
|
||||
|
||||
msgid "Provide KlipperScreen.log when asking for help.\n"
|
||||
msgstr "Provide KlipperScreen.log when asking for help.\n"
|
||||
|
||||
msgid "Quad Gantry Level"
|
||||
msgstr "Quad Gantry Level"
|
||||
|
||||
msgid "Raise Nozzle"
|
||||
msgstr "Zvedni trysku"
|
||||
|
||||
msgid "Recover"
|
||||
msgstr "Recover"
|
||||
|
||||
msgid "Recover Hard"
|
||||
msgstr "Recover Hard"
|
||||
|
||||
msgid "Recover Soft"
|
||||
msgstr "Recover Soft"
|
||||
|
||||
msgid "Reference"
|
||||
msgstr "Reference"
|
||||
|
||||
msgid "Refresh"
|
||||
msgstr "Obnovit"
|
||||
|
||||
msgid "Rename/Move:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart"
|
||||
msgstr "Restart"
|
||||
|
||||
msgid "Resume"
|
||||
msgstr "Pokračuj"
|
||||
|
||||
msgid "Retract"
|
||||
msgstr "Retrakce"
|
||||
|
||||
msgid "Retraction"
|
||||
msgstr "Retrakce"
|
||||
|
||||
msgid "Retraction Length"
|
||||
msgstr "Délka retrakce"
|
||||
|
||||
msgid "Retraction Speed"
|
||||
msgstr "Rychlost retrakce"
|
||||
|
||||
msgid "Retry"
|
||||
msgstr "Znovu"
|
||||
|
||||
msgid "Retrying"
|
||||
msgstr "Zkouším znovu"
|
||||
|
||||
msgid "Save"
|
||||
msgstr "Uložit"
|
||||
|
||||
msgid "Save Config"
|
||||
msgstr "Ulož nastavení"
|
||||
|
||||
msgid "Save Z"
|
||||
msgstr "Uložit Z"
|
||||
|
||||
msgid "Save configuration?"
|
||||
msgstr "Uložit nastavení?"
|
||||
|
||||
msgid "Saved"
|
||||
msgstr "Uloženo"
|
||||
|
||||
#, python-format
|
||||
msgid "Saved offset: %s"
|
||||
msgstr "Uložený offset: %s"
|
||||
|
||||
msgid "Screen DPMS"
|
||||
msgstr "Screen DPMS"
|
||||
|
||||
msgid "Screen Power Off Time"
|
||||
msgstr "Čas vypnutí displeje"
|
||||
|
||||
msgid "Screws Adjust"
|
||||
msgstr "Nastavit šrouby"
|
||||
|
||||
msgid "Select"
|
||||
msgstr "Vyber"
|
||||
|
||||
msgid "Send"
|
||||
msgstr "Odeslat"
|
||||
|
||||
msgid "Set Temp"
|
||||
msgstr "Nastav teplotu"
|
||||
|
||||
msgid "Settings"
|
||||
msgstr "Nastavení"
|
||||
|
||||
msgid "Show"
|
||||
msgstr "Ukaž"
|
||||
|
||||
msgid "Show Heater Power"
|
||||
msgstr "Ukaž odběr topení"
|
||||
|
||||
msgid "Shutdown"
|
||||
msgstr "Shutdown"
|
||||
|
||||
msgid "Size"
|
||||
msgstr "Velikost"
|
||||
|
||||
msgid "Slicer"
|
||||
msgstr "Slicer"
|
||||
|
||||
msgid "Slicer:"
|
||||
msgstr "Slicer:"
|
||||
|
||||
msgid "Small"
|
||||
msgstr "Malý"
|
||||
|
||||
msgid "Speed (mm/s)"
|
||||
msgstr "Rychlost (mm/s)"
|
||||
|
||||
msgid "Speed +"
|
||||
msgstr "Rychlost ₊"
|
||||
|
||||
msgid "Speed -"
|
||||
msgstr "Rychlost -"
|
||||
|
||||
msgid "Speed:"
|
||||
msgstr "Rychlost:"
|
||||
|
||||
msgid "Square Corner Velocity"
|
||||
msgstr ""
|
||||
|
||||
msgid "Start"
|
||||
msgstr "Start"
|
||||
|
||||
msgid "Starting WiFi Association"
|
||||
msgstr "Připojování k WiFi"
|
||||
|
||||
msgid "Starting recovery for"
|
||||
msgstr "Obnovuji"
|
||||
|
||||
msgid "Starting update for"
|
||||
msgstr "Aktualizuji"
|
||||
|
||||
msgid "System"
|
||||
msgstr "Systém"
|
||||
|
||||
msgid "System Restart"
|
||||
msgstr "Restart systému"
|
||||
|
||||
msgid "System Shutdown"
|
||||
msgstr "Vypnutí"
|
||||
|
||||
msgid "Temp (°C)"
|
||||
msgstr "Teplota (°C)"
|
||||
|
||||
msgid "Temperature"
|
||||
msgstr "Teplota"
|
||||
|
||||
msgid "Total:"
|
||||
msgstr "Total:"
|
||||
|
||||
msgid "Unknown Heater"
|
||||
msgstr "Neznámé topení"
|
||||
|
||||
msgid "Unknown screw position"
|
||||
msgstr "Neznámé nastavení šroubů"
|
||||
|
||||
msgid "Unload"
|
||||
msgstr "Vysuň"
|
||||
|
||||
msgid "Unretract Extra Length"
|
||||
msgstr "Vysuň extra délku"
|
||||
|
||||
msgid "Unretract Speed"
|
||||
msgstr "Vysunovací rychlost"
|
||||
|
||||
msgid "Up To Date"
|
||||
msgstr "Aktuální"
|
||||
|
||||
msgid "Update"
|
||||
msgstr "Aktualizuj"
|
||||
|
||||
msgid "Updating"
|
||||
msgstr "Aktualizuji"
|
||||
|
||||
msgid "Uploaded"
|
||||
msgstr "Nahrané"
|
||||
|
||||
msgid "XY Move Speed (mm/s)"
|
||||
msgstr "Rychlost pohybu XY (mm/s)"
|
||||
|
||||
msgid "XY Speed (mm/s)"
|
||||
msgstr "Rychlost XY (mm/s)"
|
||||
|
||||
msgid "Z Calibrate"
|
||||
msgstr "Kalibrace Z"
|
||||
|
||||
msgid "Z Move Speed (mm/s)"
|
||||
msgstr "Rychlost pohybu Z (mm/s)"
|
||||
|
||||
msgid "Z Speed (mm/s)"
|
||||
msgstr "Rychlost pohybu Z (mm/s)"
|
||||
|
||||
msgid "Z Tilt"
|
||||
msgstr "Z Tilt"
|
||||
|
||||
msgid "Z offset:"
|
||||
msgstr "Z offset:"
|
||||
|
||||
msgid "commit"
|
||||
msgid_plural "commits"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
|
||||
msgid "dBm"
|
||||
msgstr "dBm"
|
||||
|
||||
msgid "hour"
|
||||
msgid_plural "hours"
|
||||
msgstr[0] "hodina"
|
||||
msgstr[1] "hodiny"
|
||||
msgstr[2] "hodin"
|
||||
|
||||
msgid "minute"
|
||||
msgid_plural "minutes"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[2] ""
|
||||
|
||||
msgid "mm"
|
||||
msgstr "mm"
|
||||
|
||||
msgid "mm/s"
|
||||
msgstr "mm/s"
|
||||
|
||||
msgid "mm/s²"
|
||||
msgstr "mm/s²"
|
||||
|
||||
msgid "mm³/s"
|
||||
msgstr "mm³/s"
|
||||
|
||||
#~ msgid "Actions"
|
||||
#~ msgstr "Akce"
|
||||
|
||||
#~ msgid "Configuration"
|
||||
#~ msgstr "Konfigurace"
|
||||
|
||||
#~ msgid "Homing"
|
||||
#~ msgstr "Domů"
|
||||
|
||||
#~ msgid "Disable XY"
|
||||
#~ msgstr "Uvolnit XY"
|
||||
|
||||
#~ msgid "Slicer Time correction (%)"
|
||||
#~ msgstr "Časová korekce Sliceru (%)"
|
||||
|
||||
#~ msgid "Calibrated, save configuration to make it permanent"
|
||||
#~ msgstr "Zkalibrováno, uložit změny jako trvalé"
|
||||
|
||||
#~ msgid "Decrease"
|
||||
#~ msgstr "Snížit"
|
||||
|
||||
#~ msgid "Increase"
|
||||
#~ msgstr "Zvětšit"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Sending Power ON signal to: %s"
|
||||
#~ msgstr "Odeslat ZAP do %s"
|
||||