Skip to content

Commit

Permalink
Merge of upstream master
Browse files Browse the repository at this point in the history
  • Loading branch information
moggieuk committed Jun 9, 2024
2 parents 95bb1b8 + 5552634 commit 61a48b7
Show file tree
Hide file tree
Showing 114 changed files with 4,100 additions and 1,695 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ __pycache__/
dist/
build/
venv/
.venv/
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,9 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

OctoScreen: A OctoPrint touch interface for TFT touch modules
Copyright (C) 2018 Máximo Cuadros Ortiz
KlipperScreen: A Klipper touch interface for touchscreens
Copyright (C) 2020-2021 Jordan Ruthe
Copyright (C) 2021-2024 Alfredo Monclus

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
15 changes: 8 additions & 7 deletions config/main_menu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ icon: settings
[menu __main print]
name: {{ gettext('Print') }}
icon: printer
panel: print
panel: gcodes
enable: {{ printer.extruders.count > 0 }}

[menu __main gcodes]
name: {{ gettext('Gcodes') }}
icon: files
panel: gcodes
enable: {{ printer.extruders.count == 0 }}

[menu __main more bedlevel]
name: {{ gettext('Bed Level') }}
Expand All @@ -53,12 +60,6 @@ name: {{ gettext('Limits') }}
icon: fine-tune
panel: limits

[menu __main more retraction]
name: {{ gettext('Retraction') }}
icon: retract
panel: retraction
enable: {{ 'firmware_retraction' in printer.config_sections }}

[menu __main more fan]
name: {{ gettext('Fan') }}
icon: fan
Expand Down
6 changes: 0 additions & 6 deletions config/print_menu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ name: {{ gettext('Network') }}
icon: network
panel: network

[menu __print retraction]
name: {{ gettext('Retraction') }}
icon: retract
panel: retraction
enable: {{ 'firmware_retraction' in printer.config_sections }}

[menu __print settings]
name: KlipperScreen
icon: settings
Expand Down
3 changes: 3 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Breaking changes will be listed here.

#### [2024_05_24](https://github.com/KlipperScreen/KlipperScreen/commit/524aa0e7dc2b27c93534d356ba19963b793f38d8)
* Drop python 3.7 support, last version for it is v0.4.1: `git reset --hard v0.4.1`

#### [2024_01_26](https://github.com/KlipperScreen/KlipperScreen/commit/9d0e4b841f905f0034a7c6fefefcf041e38b90a3)
* Deprecated old ~/klipper_config folder users need to place the configfile
in ~/printer_data/config, ~/.config/KlipperScreen, or directly in the repo
Expand Down
4 changes: 2 additions & 2 deletions docs/Developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ See [scripts/system-dependencies.json](https://github.com/KlipperScreen/KlipperS
## Create a virtual environment
For example:
```bash
virtualenv -p /usr/bin/python3 ~/.KlipperScreen-env
source ~/.KlipperScreen-env/bin/activate
cd ~/KlipperScreen
python3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/klipperscreen-requirements.txt
```
# Set configurations
Expand Down
44 changes: 32 additions & 12 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
Got it. Here’s the updated FAQ with the necessary modifications:

# Frequently Asked Questions

## What is the minimum Python version required?

The minimum version is Python 3.8, this is checked during install.
The minimum required version of Python is 3.8. This requirement is checked during installation.

## OctoPrint?
??? "Using Older Python Versions"
If you need to use Python 3.7, you can do so with KlipperScreen v0.4.1 by running:
```sh
git reset --hard v0.4.1
```

KlipperScreen was not designed to work with OctoPrint and there are no plans to make it compatible.
## Does KlipperScreen work with OctoPrint?

## Can i use KlipperScreen as a desktop application?
KlipperScreen is not designed to work with OctoPrint, and there are no plans to make it compatible.

Yes, First disable the service:
## Can I use KlipperScreen as a desktop application?

```shell
Yes, you can use KlipperScreen as a desktop application. During installation, do not install it as a service. If you have already installed it as a service, you can disable it by running:
```sh
sudo systemctl disable KlipperScreen
```
Then, you can open the application via the menu when needed. You can also find the shortcut in `KlipperScreen/scripts/KlipperScreen.desktop`.

## Why did the title bar turn red and display CPU and RAM usage?

The red title bar indicating high CPU and RAM usage is a warning system. High resource usage can lead to issues, such as "timer too close" errors in Klipper. If this warning appears during an update or maintenance process, it is generally not an issue—just avoid starting a print job until the warning clears. You can use htop or similar tools from an SSH connection to check what’s consuming the resources.

## How can I switch between multiple printers?

KlipperScreen supports multiple printers. You can switch between them by configuring each printer's IP address in the KlipperScreen settings. This allows you to manage all your printers from a single interface, even if they are running on different hosts.

## Can I customize the KlipperScreen interface?

Yes, you can customize the KlipperScreen interface by editing the configuration files. Detailed instructions and options for customization can be found in the [documentation](https://klipperscreen.github.io/KlipperScreen/).

and open the application via the menu when you need it.
## What should I do if my touchscreen is not responding correctly?

If your touchscreen is not responding or has touch accuracy issues, check the [Touch Issues section](Troubleshooting/Touch_issues.md) in the troubleshooting guide. You may need to calibrate the touch settings or adjust the touch matrix.

you can also find the shortcut in `KlipperScreen/scripts/KlipperScreen.desktop`
## How do I update KlipperScreen?

## Titlebar turned red and says CPU and RAM
To update KlipperScreen, follow the instructions in the [updating guide](Updating.md).

It's the high resource warning system, having your printer with very high usage of CPU or RAM will lead to issues,
usually involving timer too close in klipper, if it appears during an update or some maintanance process, it should not be an issue,
just don't start printing until it clears.
## What if I sometimes see the desktop instead of KlipperScreen?

If you sometimes see the desktop instead of KlipperScreen, and you only want to see KlipperScreen, you may have installed a distro with a full desktop environment. [Check these instructions](Troubleshooting/Desktop.md) on how to properly switch.
22 changes: 11 additions & 11 deletions docs/Hardware.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Hardware

There are no recommended screens, but the minimum supported resolution is 480x320.
KlipperScreen supports a variety of screens, with a minimum supported resolution of 480x320. Generally, if a device can display a GNU/Linux desktop, it should be compatible with KlipperScreen.

In general, if the device can show a GNU/Linux desktop, then KlipperScreen should work too.
## Supported Hardware

#### Hardware known to work
The following screens are known to work with KlipperScreen:

* [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)
Expand All @@ -16,17 +16,17 @@ In general, if the device can show a GNU/Linux desktop, then KlipperScreen shoul
* [WAVESHARE 4.3 inch DSI LCD](https://www.waveshare.com/4.3inch-dsi-lcd.htm)
* [Android phone](Android.md)

For more hardware known to work with KlipperScreen, visit the [Klipper Discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35).

* [More known hardware in the klipper discourse](https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35)
### Install

### Configuration
1. **Install Your Screen**: Follow the manufacturer’s instructions for installing your screen. If you see a white screen, it indicates that the installation was not successful. Ensure that you can at least see a console.
2. **Install KlipperScreen**: Once the screen is properly installed and functioning, proceed to [install KlipperScreen](Installation.md).

Follow the manufacturer instructions on how to install your screen. In general if you see a white screen, then it's not properly installed, ensure that you at least see a console, Then [install](Installation.md) KlipperScreen, if you are having troubles refer to the [troubleshooting page](Troubleshooting.md) for further information.
## Screen Rotation

## Screen rotation
For information on screen rotation, refer to the [Rotation section](Troubleshooting/Rotation.md) in the troubleshooting guide.

[Moved to Rotation](Troubleshooting/Rotation.md)
## Touchscreen Touch Rotation

## Touchscreen touch rotation

[Moved to Touch issues](Troubleshooting/Touch_issues.md#touch-rotation-and-matrix)
For touchscreen rotation and matrix issues, see the [Touch Issues section](Troubleshooting/Touch_issues.md#touch-rotation-and-matrix) in the troubleshooting guide.
87 changes: 40 additions & 47 deletions docs/Installation.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,67 @@
# Installation

## First steps
## First Steps

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 RaspberryOS, Ubuntu or any distro you like.
Once you have established that the screen is working, then proceed installing KlipperScreen.
1. **Install the Screen**: Follow the manufacturer’s instructions for installing your screen. Some screens may require additional software, while others might not.
2. **Test the Screen**: Ensure your hardware is functioning correctly by testing it with RaspberryOS, Ubuntu, or your preferred distribution.
3. **Proceed to Install KlipperScreen**: Once you’ve confirmed that the screen is working, you can proceed with installing KlipperScreen.

## Setup

The installation script is meant for RaspberryOS Lite, but it should work on other debian derivatives.
The installation script is designed for RaspberryOS Lite, but it should work on other Debian derivatives as well.

## Auto install
## Auto Install

[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
[KIAUH](https://github.com/dw-0/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.

![Screenshot](img/install/KIAUH.png)

You can visit [KIAUH on GitHub](https://github.com/th33xitus/kiauh) to learn more and view its documentation.
![KIAUH Screenshot](img/install/KIAUH.png)

Visit [KIAUH on GitHub](https://github.com/dw-0/kiauh) to learn more and view its documentation.

## Manual Install

Execute the following commands:
Follow these steps to manually install KlipperScreen:

Clone the KlipperScreen repository and run the installation script:
```sh
cd ~/
git clone https://github.com/KlipperScreen/KlipperScreen.git
./KlipperScreen/scripts/KlipperScreen-install.sh
```
This script will install the necessary packages, create a Python virtual environment at `~/.KlipperScreen-env`, and install a systemd service file.

This script will install the necessary packages, create a python virtual environment at
`~/.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.

## Moonraker configuration

In moonraker.conf ensure that the IP of the device is a trusted client:

```ini title="moonraker.conf"
[authorization]
trusted_clients:
127.0.0.1
```

Or add the [moonraker api key](https://moonraker.readthedocs.io/en/latest/installation/#retrieving-the-api-key) to [KlipperScreen.conf](Configuration.md)

If you wish to use the update manager feature of moonraker for KlipperScreen, add the following block to `moonraker.conf`:

```ini title="moonraker.conf"
[update_manager KlipperScreen]
type: git_repo
path: ~/KlipperScreen
origin: https://github.com/KlipperScreen/KlipperScreen.git
virtualenv: ~/.KlipperScreen-env
requirements: scripts/KlipperScreen-requirements.txt
system_dependencies: scripts/system-dependencies.json
managed_services: KlipperScreen
```
!!! tip
If you see warnings in other UIs ignore them until KlipperScreen finishes installing, and Moonraker is restarted.
If you need a custom location for the configuration file, you can add the `-c` or `--configfile` option to the systemd file and specify the desired location.

## Moonraker Configuration

1. Ensure that the IP of the device is a trusted client in `moonraker.conf`:
```ini
[authorization]
trusted_clients:
127.0.0.1
```
Alternatively, add the [Moonraker API key](https://moonraker.readthedocs.io/en/latest/installation/#retrieving-the-api-key) to `KlipperScreen.conf`.

2. To use the update manager feature of Moonraker for KlipperScreen, add the following block to `moonraker.conf`:
```ini
[update_manager KlipperScreen]
type: git_repo
path: ~/KlipperScreen
origin: https://github.com/KlipperScreen/KlipperScreen.git
virtualenv: ~/.KlipperScreen-env
requirements: scripts/KlipperScreen-requirements.txt
system_dependencies: scripts/system-dependencies.json
managed_services: KlipperScreen
```

!!! tip
If you see warnings in other UIs, ignore them until KlipperScreen finishes installing and Moonraker is restarted.

## Printer Configuration

Some basic configuration needs to be applied for correct functionality.

```ini title="printer.cfg"
Add the following basic configurations to your `printer.cfg` file for correct functionality:
```ini
[virtual_sdcard]
path: ~/printer_data/gcodes
[display_status]
Expand All @@ -77,4 +70,4 @@ path: ~/printer_data/gcodes

## Macros

You may need some macros for the printer to function as you expected, [read more in the macros page](macros.md)
You may need additional macros for the printer to function as expected. For more information, [read the macros page](macros.md).
6 changes: 3 additions & 3 deletions docs/Panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ panel: power
```
![Power](img/panels/power.png)

### Print
### Gcodes / Print
```py
panel: print
panel: gcodes
```
![Print Panel](img/panels/print.png)
![Gcodes Panel](img/panels/gcodes.png)

### Retraction
```py
Expand Down
Loading

0 comments on commit 61a48b7

Please sign in to comment.