Update docs and add theming section (#296)
This commit is contained in:
1 parent
5f5e6336c0
commit
e54c7dcbb3
9 files changed
+139
-122
No files matched your search
+4
-20
@@ -4,24 +4,18 @@ The configuration options are outlined below:
|
||||
|
||||
KlipperScreen will search for a configuration file in the following order:
|
||||
|
||||
1. _${HOME}/KlipperScreen.conf_
|
||||
1. _~/KlipperScreen.conf_
|
||||
2. _${KlipperScreen_Directory}/KlipperScreen.conf_
|
||||
3. _${HOME}/klipper_config/KlipperScreen.conf_
|
||||
3. _~/klipper_config/KlipperScreen.conf_
|
||||
|
||||
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)
|
||||
|
||||
[ks_includes/KlipperScreen.conf](/ks_includes/default.conf)
|
||||
_${KlipperScreen_Directory}/ks_includes/default.conf_
|
||||
|
||||
If no config file is found then a new configuration file will be created in:
|
||||
|
||||
_${HOME}/klipper_config/KlipperScreen.conf_
|
||||
|
||||
if _klipper_config_ isn't available then:
|
||||
|
||||
_${HOME}/KlipperScreen.conf_
|
||||
_~/klipper_config/KlipperScreen.conf_ Or _~/KlipperScreen.conf_
|
||||
|
||||
## Include files
|
||||
```
|
||||
@@ -51,16 +45,6 @@ language: en
|
||||
|
||||
# Allows the cursor to be displayed on the screen
|
||||
show_cursor: False
|
||||
|
||||
#
|
||||
# The following main options are deprecated and will be removed in the near future
|
||||
#
|
||||
|
||||
# Define the moonraker host/port if different from 127.0.0.1 and 7125
|
||||
moonraker_host: 127.0.0.1
|
||||
moonraker_port: 7125
|
||||
# Moonraker API key if this is not connecting from a trusted client IP
|
||||
moonraker_api_key: False
|
||||
```
|
||||
|
||||
## Printer Options
|
||||
|
||||
+74
-19
@@ -1,26 +1,81 @@
|
||||
# Hardware
|
||||
|
||||
KlipperScreen should run on any touchscreen that you can connect to a computer. The required video driver may
|
||||
be slightly different depending on what model you get. I am developing on a 1024x600 resolution screen. Due to this,
|
||||
other resolutions may not be scaled properly at this moment. UI scaling is a future development item.
|
||||
There are no recommended screens, but here are some guidelines:
|
||||
|
||||
#### Configure Hardware
|
||||
|
||||
Add the following to _/boot/config.txt_. You can alter the hdmi_cvt to your screen specifications. This example is setup
|
||||
for a resolution of 1024x600 and a refresh rate of 60hz.
|
||||
```
|
||||
hdmi_cvt=1024 600 60 6 0 0 0
|
||||
hdmi_group=2
|
||||
hdmi_mode=87
|
||||
hdmi_drive=2
|
||||
```
|
||||
* Development has been using 1024x600 for a screen resolution. Other resolutions may have issues currently
|
||||
|
||||
After changing _/boot/config.txt_ you must reboot your raspberry pi. Please also ensure you followed setting up your screen via the screen instructions. This will likely have a xorg.conf.d file for input from the touchscreen that you need to create.
|
||||
* There is no support for vertical/portrait mode, only widescreen
|
||||
* Minimum resolution of 480x320
|
||||
|
||||
#### Hardware known to work
|
||||
|
||||
[Click here](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35) to go to a post on the Klipper discourse server for known hardware or see the below list.
|
||||
* [BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part)
|
||||
* [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/hardware-known-to-work-with-klipperscreen/35/8)
|
||||
* [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)
|
||||
|
||||
[BTT PI TFT50](https://www.biqu.equipment/collections/lcd/products/bigtreetech-pi-tft50-v1-0-tft-display-for-raspberry-pi-3d-printer-part)
|
||||
[Raspberry PI 7" Touchscreen](https://www.raspberrypi.org/products/raspberry-pi-touch-display/)
|
||||
* [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35)
|
||||
|
||||
#### Configuration
|
||||
|
||||
Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then  KlipperScreen, if you are having troubles refer to the  for further information.
|
||||
|
||||
#### Touchscreen Calibration
|
||||
Most people don't need to calibrate, but if you do need to calibrate your touchscreen, follow the below steps.
|
||||
|
||||
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>
|
||||
```
|
||||
|
||||
#### 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. 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°: `-1 0 1 0 -1 1 0 0 1`
|
||||
|
||||
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"`
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
ACTION=="add", ATTRS{name}=="<screen name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
|
||||
```
|
||||
+14
-69
@@ -1,17 +1,19 @@
|
||||
# Installation
|
||||
|
||||
#### Setup Raspberry Pi
|
||||
This install process is meant for Raspbian non-desktop version. If you have installed it on the GUI version, use
|
||||
`sudo raspi-config` to set boot to console by choosing the following options in order:
|
||||
This install process is meant for Raspbian non-desktop version aka Raspbian Lite.
|
||||
|
||||
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:
|
||||
|
||||
* 1 System Options
|
||||
* S5 Boot / Auto Login
|
||||
* B1 Console
|
||||
* S5 Boot / Auto Login
|
||||
* B1 Console
|
||||
|
||||
#### Klipper and Moonraker Installation
|
||||
|
||||
Follow the instructions to install klipper and moonraker.
|
||||
klipper: https://github.com/KevinOConnor/klipper/
|
||||
moonraker: https://github.com/Arksine/moonraker
|
||||
Follow the instructions to install Klipper and Moonraker.
|
||||
* klipper: https://www.klipper3d.org/Installation.html
|
||||
* moonraker: https://moonraker.readthedocs.io/en/latest/installation/
|
||||
|
||||
Ensure that 127.0.0.1 is a trusted client for moonraker, such as in this example:
|
||||
```
|
||||
@@ -19,11 +21,12 @@ Ensure that 127.0.0.1 is a trusted client for moonraker, such as in this example
|
||||
trusted_clients:
|
||||
127.0.0.1
|
||||
```
|
||||
Warning: `force_logins: true` is not supported
|
||||
|
||||
If you wish to use the update manager feature of moonraker for KlipperScreen, add the following block into the moonraker
|
||||
configuration:
|
||||
```
|
||||
[update_manager client KlipperScreen]
|
||||
[update_manager KlipperScreen]
|
||||
type: git_repo
|
||||
path: ~/KlipperScreen
|
||||
origin: https://github.com/jordanruthe/KlipperScreen.git
|
||||
@@ -33,7 +36,7 @@ install_script: scripts/KlipperScreen-install.sh
|
||||
```
|
||||
|
||||
#### KlipperScreen Installation
|
||||
To clone and install execute the following commands:
|
||||
Execute the following commands:
|
||||
```
|
||||
cd ~/
|
||||
git clone https://github.com/jordanruthe/KlipperScreen.git
|
||||
@@ -42,67 +45,9 @@ cd ~/KlipperScreen
|
||||
```
|
||||
|
||||
This script will install packages that are listed under manual install, create a python virtual environment at
|
||||
${HOME}/.KlipperScreen-env and install a systemd service file.
|
||||
|
||||
KlipperScreen will create a log file output at `/tmp/KlipperScreen.log`. If you are having issues and KlipperScreen has
|
||||
not gotten to the point where the log file has been created. Run `journalctl -xe -u KlipperScreen` to view the ouput and
|
||||
see any issues that may be happening.
|
||||
|
||||
As an option to do development or interact with KlipperScreen from your computer, you may install tigervnc-scraping-server and VNC to your pi instance. Follow tigervnc server setup procedures for details on how to do that.
|
||||
~/.KlipperScreen-env and install a systemd service file.
|
||||
|
||||
If you need a custom location for the configuration file, you can add -c or --configfile to the systemd file and specify
|
||||
the location of your configuration file.
|
||||
|
||||
#### Touchscreen Calibration
|
||||
Most people don't need to calibrate, but if you do need to calibrate your touchscreen, follow the below steps.
|
||||
|
||||
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>
|
||||
```
|
||||
|
||||
#### 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. 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°: `-1 0 1 0 -1 1 0 0 1`
|
||||
|
||||
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"`
|
||||
|
||||
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 put the following line in:
|
||||
```
|
||||
ACTION=="add", ATTRS{name}=="<screen name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
|
||||
```
|
||||
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
|
||||
@@ -0,0 +1,33 @@
|
||||
# Theming
|
||||
|
||||
To create a custom theme, create a folder in: _${KlipperScreen_Directory}/styles/_
|
||||
|
||||
The folder name will be the theme name, in that folder create another folder named `images` this is where the icons should be placed. The icons must be SVG files and they need to have specific names that are defined in the code, use the default theme as a reference for the names or check the code.
|
||||
|
||||
To edit colors and styles, create a css file named `style.css` you can use the contents of another theme as a reference.
|
||||
|
||||
### Example 1
|
||||
|
||||
```
|
||||
cd ~/KlipperScreen/styles
|
||||
mkdir -p mytheme/images
|
||||
cd mytheme
|
||||
cp ../z-bolt/images/* images/
|
||||
echo "window { background-color: red;}" > style.css
|
||||
sudo service KlipperScreen restart
|
||||
```
|
||||
|
||||
At this point `mytheme` should be on the list of themes, and when you select it the background should be red.
|
||||
|
||||
|
||||
### Example 2
|
||||
|
||||
Creating a custom background from Mainsail sidebar and this css using Z-bolt icons
|
||||
|
||||
```
|
||||
window { background-image: url("/home/pi/mainsail/img/background.svg");}
|
||||
button {background-color: rgba(0,0,0,0); border-radius:2em;}
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -42,3 +42,7 @@ Run the command `cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf | grep /dev/fb`.
|
||||
previous command (i.e. `/dev/fb1`).
|
||||
|
||||
Once you have saved that file, restart KlipperScreen and it should show up on your display.
|
||||
|
||||
#### Screen is all white or blank
|
||||
|
||||
Improperly installed screen, follow the manufacturer instructions on how to physically connect the screen and install the proper drivers.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
+7
-12
@@ -1,19 +1,12 @@
|
||||
# KlipperScreen
|
||||
|
||||
KlipperScreen is touchscreen GUI for Klipper based 3D printers. KlipperScreen interfaces with [Klipper](https://github.com/kevinOConnor/klipper) via [Moonraker](https://github.com/arksine/moonraker).
|
||||
|
||||
Multiple printers update is here! Please check the configuration information for specifying several printers.
|
||||
|
||||
|
||||
[Changelog](changelog.md)
|
||||
KlipperScreen is a touchscreen GUI that interfaces with [Klipper](https://github.com/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 computer. The required video driver may be
|
||||
slightly different depending on what model you get. KlipperScreen will scale to the resolution of the screen being used.
|
||||
However, three resolutions are tested during development: 1024x600, 800x480, 480x320.
|
||||
|
||||
There are no recommended screens, but there are several screens that work with KlipperScreen. They include screens that
|
||||
use HDMI/USB, Raspberry Pi GPIO, or the Rapsberry Pi DSI (ribbon cable) port.
|
||||
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, 
|
||||
|
||||
### Sample Panels
|
||||
|
||||
@@ -26,4 +19,6 @@ Job Status
|
||||
|
||||
### Inspiration
|
||||
KlipperScreen was inspired by [OctoScreen](https://github.com/Z-Bolt/OctoScreen/) and the need for a touchscreen GUI that
|
||||
will natively work with [Klipper](https://github.com/kevinOConnor/klipper) and [Moonraker](https://github.com/arksine/moonraker).
|
||||
will natively work with [Klipper](https://github.com/klipper3d/klipper) and [Moonraker](https://github.com/arksine/moonraker).
|
||||
|
||||
[Changelog](changelog.md)
|
||||
+2
-2
@@ -12,8 +12,8 @@ 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://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#bed_screws)
|
||||
* [screws_tilt_adjust](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#screws_tilt_adjust)
|
||||
* [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._
|
||||
|
||||
@@ -3,6 +3,7 @@ nav:
|
||||
- Hardware.md
|
||||
- Installation.md
|
||||
- Configuration.md
|
||||
- Theming.md
|
||||
- Troubleshooting.md
|
||||
- changelog.md
|
||||
- panels.md
|
||||
|
||||
Reference in new issue
Block a user