Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1447299
Add advanced 3D bed mesh visualization with interactive controls
prestonbrown Oct 7, 2025
d64b1a8
Add build instructions for ke-advanced-3d-bedmesh branch
May 24, 2026
62dc656
README: document full fork lineage and probielodan changes vs ballaswag
May 24, 2026
b3d1d87
scripts: adapt installer-deb.sh and release.sh for coreflake1 fork
May 24, 2026
4c0f335
README: update build instructions and install/uninstall for coreflake…
May 24, 2026
78d8556
installer/README: pre-install safety pass
May 24, 2026
ae4a270
installer.sh: pin to coreflake1 v0.1.0-ke-bedmesh, add guppyconfig.js…
May 24, 2026
89e13f7
installer.sh: add uninstall mode, backup printer.cfg before modify, f…
May 24, 2026
09c334c
docs: add dev-notes with hardware, installer, and build discoveries
May 24, 2026
3ef8b4b
docs: fill in confirmed on-device facts from SSH inspection
May 25, 2026
8bed38d
fix: set display_rotate=2 default for KE upside-down screen mount
May 25, 2026
14d3585
fix: reduce LV_FONT_DEFAULT to montserrat_12 on GUPPY_SMALL_SCREEN
May 25, 2026
a042f6e
fix: invalidate screen on wake to prevent white screen after sleep
May 25, 2026
a9b543a
fix: disable fbdev_blank on sleep — Ingenic X2000 DSI unrecoverable
May 25, 2026
88131d2
ui: 480x272 layout + global font pass for KE small screen
May 26, 2026
57b165f
feat: gate panels behind print state; swap LED and Fine Tune
May 27, 2026
d234497
feat: redesign bed mesh panel — table default, 3D fullscreen
May 27, 2026
925211a
fix: small-screen readout/layout tweaks; default MCU temp sensor
May 27, 2026
9169a81
docs: record the 2026-05-26 GUI/functional pass
May 27, 2026
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
184 changes: 154 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
# GuppyScreen — ke-advanced-3d-bedmesh branch

> **This is a custom branch** for the **Creality Ender-3 V3 KE**, adding an advanced interactive 3D bed mesh visualization.

## Fork lineage

```
ballaswag/guppyscreen (original)
└── probielodan/guppyscreen (KE-focused fork, adds features below)
└── coreflake1/guppyscreen ← this repo
└── ke-advanced-3d-bedmesh ← this branch (adds 3D bed mesh)
```

### What probielodan added over ballaswag

- **Major UI rework** — prompt panel, sensor/slider containers, file panel, homing panel, print panel, and more, all reworked for reliability and the KE's display
- **Better print status** — improved information display during a print
- **Auto-reload file list** — file list refreshes automatically
- **Absolute positioning display** — shows absolute axis coordinates
- **Invert Z direction** option
- **WiFi disconnect and forget-network buttons**
- **Chamber temperature** shown on the print screen
- **Default extruder temperatures** configurable
- **Android support dropped** (the KE runs on a dedicated MIPS/ARM SoC, not Android)

### What this branch adds on top

- 3D feature cherry-picked from [prestonbrown/guppyscreen](https://github.com/prestonbrown/guppyscreen) (commit `bced7f7`)

## What's different on this branch

- Real-time 3D rendered mesh surface with colour-gradient height map
- Interactive rotation, zoom (Z-scale and FOV), and pan via touch or mouse
- Toggle between 2D and 3D views with a single button
- Multitouch gesture support

**Changed files vs base:**
- `src/bedmesh_panel.cpp` — full 3D rendering engine
- `src/bedmesh_panel.h` — new structs (`Point3D`, `Vertex3D`, `Quad3D`) and method declarations
- `src/button_container.cpp` — added `get_label()` and `set_text()` helpers
- `src/button_container.h` — corresponding declarations

## Building from source

### 1. Clone with submodules

```bash
git clone --recurse-submodules https://github.com/coreflake1/guppyscreen.git
cd guppyscreen
git checkout ke-advanced-3d-bedmesh
```

### 2. Build bundled libraries

```bash
make libhv.a
make libspdlog.a
make wpaclient
```

### 3a. Simulator build (Linux desktop, for testing)

Install SDL2 dev headers:
```bash
# Fedora / Nobara
sudo dnf install sdl2-compat-devel

# Debian / Ubuntu / Raspbian
sudo apt install libsdl2-dev
```

Build:
```bash
make -j$(nproc) \
CFLAGS="-O3 -g0 -MD -MP -I./ -I./lvgl/ -I/usr/include/SDL2 -D_GNU_SOURCE=1 -Wno-incompatible-pointer-types" \
LDFLAGS="-lm -Llibhv/lib -Lspdlog/build -l:libhv.a -latomic -lpthread -Lwpa_supplicant/wpa_supplicant/ -l:libwpa_client.a -lstdc++fs -l:libspdlog.a"
```

> The `-Wno-incompatible-pointer-types` flag is required on GCC 14+ due to a pre-existing upstream
> strictness issue in `lv_touch_calibration`. It is unrelated to this branch's changes.

Binary: `build/bin/guppyscreen`

### 3b. Cross-compile for Ender-3 V3 KE (MIPS target hardware)

The Ender-3 V3 KE runs an **Ingenic XBurst2 X2000 SoC (MIPS, mipsel little-endian, kernel 4.4.94)**.
The `ballaswag/guppydev` Docker image contains the required `mipsel-linux-` musl toolchain.

Use the provided script (handles library rebuilds automatically):

```bash
bash scripts/build-mips.sh
```

Binary: `build/bin/guppyscreen` — verified as `ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked`.

> **Note**: `installer-deb.sh` targets aarch64/systemd/Debian and will immediately exit with
> `"Found arch mips / Terminating"` on this printer. The correct installer for the KE is
> `installer.sh` (K1/MIPS/BusyBox init path).

**Package a release tarball** (creates `guppyscreen-smallscreen.tar.gz`):
```bash
GUPPYSCREEN_VERSION=0.1.0-ke-bedmesh GUPPY_THEME=blue bash scripts/release.sh guppyscreen-smallscreen
```

---

# Guppy Screen for Klipper

Guppy Screen is a touch UI for Klipper using APIs exposed by Moonraker. It builds on LVGL as a standalone executable, has no dependency on any display servers such as X/Wayland.
Expand All @@ -20,45 +127,62 @@ Guppy Screen is a touch UI for Klipper using APIs exposed by Moonraker. It build
</p>

## Installation / Update
Run the following interactive script via SSH on your K1/Max/CR-10 SE/Ender 3 V3 KE/Nebula Pad to install Guppy Screen.

#### Material Design Theme
```
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer.sh)"
```
> **Hardware**: Ender-3 V3 KE — Ingenic XBurst2 X2000, MIPS (mipsel), kernel 4.4.94.
> This installer targets the K1/MIPS/BusyBox-init path. It is **untested on hardware** as
> of this writing. **Back up your printer config before proceeding.**

#### Z-Bolt Theme (Only for the K1/Max)
```
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer.sh)" -s zbolt
```
SSH into your Ender-3 V3 KE and run:

### Install on a PI (Debian/Raspbian)
Tested on a BTT Pad 7. Please install with care and make sure you're okay with resetting your setup if things break.
```
wget -O - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer-deb.sh | bash
```sh
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/coreflake1/guppyscreen/ke-advanced-3d-bedmesh/scripts/installer.sh)"
```

### Nightly Builds
#### Material (Nightly)
```
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer.sh)" -s nightly
```
> **Do not use `installer-deb.sh`** — it targets aarch64/systemd/Debian and will immediately
> exit with `"Found arch mips / Terminating"` on the Ender-3 V3 KE.
>
> **Do not use probielodan's installer** — it downloads from probielodan's
> releases and does not include the 3D bed mesh feature.

The installer downloads release `v0.1.0-ke-bedmesh` (pinned tag — not `latest`).

**What the installer changes on your printer:**

| Change | Rolled back by uninstall? |
|---|---|
| Extracts `/usr/data/guppyscreen/` | Optional (prompts) |
| Installs `/etc/init.d/S99guppyscreen` | Yes — removed |
| Replaces `S50dropbear` SSH init script¹ | **No** — original saved to `/usr/data/guppyify-backup/` |
| Moves `S12boot_display` to backup (disables boot display) | Partially — restored from backup |
| Backs up + removes `S99start_app` (optional, prompted) | Partially — restored from backup |
| Renames `Monitor` + `display-server` to `.disable` (if Creality kept) | **No** — restore manually |
| Adds `[include GuppyScreen/*.cfg]` to `printer.cfg` (after `gcode_macro` include) | Yes — line removed |
| Creates `printer_data/config/GuppyScreen/` | Yes — directory removed |
| Skips `gcode_shell_command.py` (already present on KE) | — |
| Overwrites `calibrate_shaper_config.py` in Klipper extras | **No** — original saved to backup |
| Symlinks `guppy_module_loader.py`, `guppy_config_helper.py`, `tmcstatus.py` | Yes — removed |
| Replaces `ft2font.so` (matplotlib 2.2.3 confirmed installed on KE) | Partially — original moved to backup |

> ¹ The KE's stock `S50dropbear` has the `start` call **commented out**, so SSH does not
> auto-start on a clean reboot. The guppy version fixes this — SSH will auto-start after install.

Backup files are saved to `/usr/data/guppyify-backup/` before any destructive change,
including a copy of `printer.cfg` taken **before** the include line is added.

#### Z-Bolt (Nightly)
```
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer.sh)" -s zbolt nightly
```
## Uninstall

#### Raspbian Variant (Nightly)
```
wget -O - https://raw.githubusercontent.com/probielodan/guppyscreen/main/scripts/installer-deb.sh | bash -s nightly
```sh
sh -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/coreflake1/guppyscreen/ke-advanced-3d-bedmesh/scripts/installer.sh)" uninstall
```

## Uninstall
ssh into your K1/Max and run the following command:
```
/usr/data/guppyscreen/reinstall-creality.sh
```
Uninstall stops GuppyScreen, removes `/etc/init.d/S99guppyscreen`, restores
`S12boot_display` and `S99start_app` from backup, removes `[include GuppyScreen/*.cfg]`
from `printer.cfg`, removes the GuppyScreen config directory, and removes Klipper symlinks.
Things **not** automatically restored:
- `gcode_shell_command.py` and `calibrate_shaper_config.py` in Klipper extras
- `Monitor` / `display-server` if renamed to `.disable` (restore manually)
- `S50dropbear` (guppy version stays; original is in `/usr/data/guppyify-backup/`)
- Reboot required to restore display services

## Features
:white_check_mark: Console/Macro Shell\
Expand Down
2 changes: 1 addition & 1 deletion debian/guppyconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"default_printer": "default_printer",
"display_rotate": 0,
"display_rotate": 2,
"log_path": "<PRINTER_DATA_DIR>/logs/guppyscreen.log",
"printers": {
"default_printer": {
Expand Down
Loading
Loading