forked from julianschill/klipper-led_effect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
129 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[mcu] | ||
serial: /opt/printer_data/run/klipper_host_mcu.tty | ||
|
||
[printer] | ||
kinematics: none | ||
max_velocity: 300 | ||
max_accel: 3000 | ||
|
||
[gcode_macro] | ||
|
||
[led_effect sb_logo_busy] | ||
autostart: false | ||
frame_rate: 24 | ||
leds: | ||
layers: | ||
breathing 3 1 top (1,0,0) | ||
|
||
[led_effect sb_logo_cleaning] | ||
autostart: false | ||
frame_rate: 24 | ||
leds: | ||
layers: | ||
breathing 3 1 top (0.0, 0.02, 0.5) | ||
|
||
[led_effect sb_logo_calibrating_z] | ||
autostart: false | ||
frame_rate: 24 | ||
leds: | ||
layers: | ||
breathing 3 1 top (0.0, 0.0, 0.35) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
services: | ||
klipper: | ||
image: mkuf/klipper:latest | ||
privileged: true | ||
entrypoint: | ||
- tail | ||
- -f | ||
- /dev/null | ||
volumes: | ||
- /dev:/dev | ||
- ../../:/app | ||
- ./config:/opt/printer_data/config | ||
- log:/opt/printer_data/logs | ||
- run:/opt/printer_data/run | ||
hostmcu: | ||
image: mkuf/klipper:latest-hostmcu | ||
privileged: true | ||
volumes: | ||
- /dev:/dev | ||
- run:/opt/printer_data/run | ||
log: | ||
image: busybox | ||
volumes: | ||
- log:/opt/printer_data/logs | ||
- run:/opt/printer_data/run | ||
entrypoint: | ||
- /bin/sh | ||
- -c | ||
- | | ||
while true; do | ||
tail -f /opt/printer_data/logs/klippy.log || true; | ||
sleep 1; | ||
done | ||
volumes: | ||
run: | ||
driver_opts: | ||
type: tmpfs | ||
device: tmpfs | ||
log: | ||
driver_opts: | ||
type: tmpfs | ||
device: tmpfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
trap destroy EXIT | ||
|
||
destroy() { | ||
docker-compose down -t0 || true | ||
} | ||
|
||
run() { | ||
docker-compose up -d | ||
docker-compose exec -T klipper bash -c ' | ||
cd /app | ||
./install-led_effect.sh -k /opt/klipper/ | ||
cd /opt | ||
/opt/venv/bin/python klipper/klippy/klippy.py \ | ||
-v \ | ||
-I printer_data/run/klipper.tty \ | ||
-a printer_data/run/klipper.sock \ | ||
printer_data/config/printer.cfg \ | ||
-l printer_data/logs/klippy.log | ||
' & | ||
sleep 5 | ||
set +e | ||
! docker-compose logs log 2>&1 | tee /dev/stderr | grep -q "Config error" | ||
} | ||
|
||
|
||
|
||
run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from . import led_effect | ||
|
||
def load_config(config): | ||
return led_effect.load_config(config) | ||
|
||
def load_config_prefix(config): | ||
return led_effect.load_config_prefix(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/app/packages/led_effect/src/ |