Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.

include M80 and M81 commands #62

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 63 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,53 @@ resources.
This is the main reason because I develop this X application to be executed
in my 3d printer.

## This version brings some major improvements and fixes:

### Improvements:
- Built-in DPMS control to disable screen blanking
- Status screen optimized, with larger and more visible progress bar and larger buttons
- New button has been added to the temperature controls, allowing to heat only the nozzle up, for example for filament changes
- Redesigned reboot / shutdown buttons in the system menu
- New confirmation dialog when pressing Stop print button

### Fixes:
- Mid-print freezing of the interface has been fixed
- Print/pause/stop buttons now work correctly
- Random appearance of splash screen after pressing pause / resume has been fixed

Installation
------------

### Dependencies
## Install the GUI context
First we need to make sure the GUI context is set up correctly and running on your TFT screen. For this, please follow the instructions, based on your specific installation:


### For Raspbian installation
If you first installed Raspbian, and then manually installed Octoprint:
```sh
sudo apt install lightdm
```
If you have previously attempted to install Octoprint-TFT, during the follwing GUI installation process you could be asked whether to use Lightdm or Octoprint-TFT as your default window manager. Please select Lightdm for now.
After installation is completed, reboot and make sure the GUI works on your TFT screen.
NOTE: if the screen remains blank, you should try reinstalling the TFT screen drivers (depending on your screen make and model).

### For Octopi installation
If you have installed Octopi directly. First you need to install GUI context:
```sh
sudo /home/pi/scripts/install-desktop
```
If you have previously attempted to install Octoprint-TFT, during the follwing GUI installation process you could be asked whether to use Lightdm or Octoprint-TFT as your default window manager. Please select Lightdm for now.
Answer 'yes' to all questions. After installation is completed, reboot and make sure the GUI works on your TFT screen.
NOTE: if the screen remains blank, you should try reinstalling the TFT screen drivers (depending on your screen make and model).

## Uninstall Lightdm window manager
Prior to Octoprint-TFT installation, we need to remove Lightdm window manager, as it could interefere with the successful installation of OctoPrint TFT. In order to do this without removing dependencies that are also required by Octoprint-TFT, run:

```sh
sudo dpkg -r --force-depends lightdm
```

## Dependencies

*OctoPrint-TFT* is based on [Golang](golang.org), usually this means that is
dependency-less, but in this case [GTK+3](https://developer.gnome.org/gtk3/3.0/gtk.html)
Expand All @@ -52,23 +95,35 @@ OctoPi does not come with graphical environment, additionally install:
```sh
sudo apt-get install xserver-xorg xinit
```
IMPORTANT!!! In order for the DPMS management to work correctly, you need to install:

```sh
sudo apt-get install x11-xserver-utils
```

### Installation on Raspbian/OctoPi (recommended)
## Installation using the Debian installer for Raspbian/OctoPi (recommended)

The recommended way to install *OctoPrint-TFT* is use the `.deb` packages
from the [Releases](https://github.com/mcuadros/OctoPrint-TFT/releases) page. The packages
from the [Releases](https://github.com/darksid3r/OctoPrint-TFT/releases) page. The packages
are available for Debian based distributions such as Raspbian and OctoPi for
versions `jessie` and `stretch`.
versions `Jessie` or `Stretch`.

In order to check which Debian version you have installed, run the following command:

```sh
cat /etc/os-release | grep PRETTY_NAME
```

For example, for a Raspbian Stretch, version 1.1:

For example for a Raspbian Jessie:
```sh
> wget https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.0/octoprint-tft_0.1.0-1.jessie_armhf.deb
> dpkg -i octoprint-tft_0.1.0-1.jessie_armhf.deb
> wget https://github.com/darksid3r/OctoPrint-TFT/releases/download/1.1/octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb
> sudo dpkg -i octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb
```
### Please note that in order to get the latest version of Octoprint-TFT for your specific Debian release, go to the "Releases" section of this page.


### Install from source
## Install from source

The compilation and packaging tasks are managed by the [`Makefile`](Makefile)
and backed on [Docker](Dockerfile). Docker is used to avoid installing any other
Expand Down
11 changes: 11 additions & 0 deletions debian/local/disablescreenblank.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

screen=${1:-0}

# wait 20s for the display manager service to start and attach to screen
sleep 20

/usr/bin/xset -display :$screen s off # deactivate screen saver
/usr/bin/xset -display :$screen -dpms # disable DPMS
/usr/bin/xset -display :$screen s noblank # disable screen blanking

5 changes: 3 additions & 2 deletions debian/octoprint-tft.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
debian/local/octoprint-tft-environment etc
debian/local/insserv.conf.d etc
debian/local/octoprint-tft-environment etc
debian/local/insserv.conf.d/octoprint-tft etc/insserv.conf.d
debian/local/disablescreenblank.sh etc
1 change: 1 addition & 0 deletions debian/octoprint-tft.postinst
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ if [ "$1" = configure ] && [ -d /etc/systemd/system/ ]; then
echo "Display manager service is masked" >&2
elif [ -e "$SERVICE" ]; then
ln -sf "$SERVICE" "$DEFAULT_SERVICE"
chmod +x /etc/disablescreenblank.sh
else
echo "WARNING: $SERVICE is the selected default display manager but does not exist" >&2
rm -f "$DEFAULT_SERVICE"
Expand Down
1 change: 1 addition & 0 deletions debian/octoprint-tft.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ After=systemd-user-sessions.service getty@tty7.service plymouth-quit.service
[Service]
EnvironmentFile=/etc/octoprint-tft-environment
ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
ExecStartPost=/etc/disablescreenblank.sh 0
StandardOutput=journal
Restart=always
RestartSec=1s
Expand Down
Empty file modified debian/rules
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion styles/default/images/back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions styles/default/images/bed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions styles/default/images/bed_off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions styles/default/images/calibrate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions styles/default/images/control.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading