Skip to content
Closed

sync #273

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
2 changes: 1 addition & 1 deletion meta-opencentauri/conf/distro/cosmos.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require conf/distro/poky.conf

DISTRO = "cosmos"
DISTRO_NAME = "OpenCentauri Cosmos"
DISTRO_VERSION = "0.0.7"
DISTRO_VERSION = "26.07.0"

MAINTAINER = "James Turton <james.turton@gmx.com>"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -----
# PLEASE DO NOT EDIT THIS FILE. EDIT grumpyscreen.cfg INSTEAD.
# UPDATES WILL RESET THIS FILE. YOUR EDITS WILL BE LOST WHEN UPDATING.
# -----

[default_macros]
cooldown: TURN_OFF_HEATERS
extrude: _GUPPYSCREEN_EXTRUDE EXTRUDER_TEMP={} EXTRUDE_LEN={} SPEED={}
Expand Down
39 changes: 37 additions & 2 deletions meta-opencentauri/recipes-apps/grumyscreen/files/grumpyscreen.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,48 @@

GRUMPYSCREEN_EXEC=/usr/bin/grumpyscreen
PIDFILE=/var/run/gui.pid
CONFIG_FILE="/etc/klipper/config/grumpyscreen-readonly/grumpyscreen.cfg"
CONFIG_OVERRIDE_FILE="/etc/klipper/config/grumpyscreen.cfg"
CONFIG_VERSION="20260518"
CONFIG_VERSION_FILE="/etc/grumpyscreen-config.ver"
CONFIG_BACKUP_DIR="/etc/klipper/config/config-backups"

export CONFIG_FILE=/etc/klipper/config/grumpyscreen.cfg
export CONFIG_FILE
export CONFIG_OVERRIDE_FILE

ensure_grumpyscreen_config_version() {
current_version=""

if [ -f "$CONFIG_VERSION_FILE" ]; then
current_version="$(tr -d '[:space:]' < "$CONFIG_VERSION_FILE" 2>/dev/null)"
else
current_version="" #reset configs
echo "$current_version" > "$CONFIG_VERSION_FILE" || return 1
fi

if [ "$current_version" = "$CONFIG_VERSION" ]; then
return 0
fi

if [ -f "$CONFIG_OVERRIDE_FILE" ]; then
backup_timestamp="$(date +%Y%m%d_%H%M%S)" || return 1
backup_file="$CONFIG_BACKUP_DIR/grumpyscreen-$backup_timestamp.cfg"

mkdir -p "$CONFIG_BACKUP_DIR" || return 1
cp "$CONFIG_OVERRIDE_FILE" "$backup_file" || return 1
echo "# Add other extra configuration here.\n" > "$CONFIG_OVERRIDE_FILE"
fi

printf '%s\n' "$CONFIG_VERSION" > "$CONFIG_VERSION_FILE" || return 1
}

case "$1" in
start)
echo "Starting grumpyscreen..."
# Start grumpyscreen in the background
if ! ensure_grumpyscreen_config_version; then
echo "Failed to update Grumpyscreen config version state"
exit 1
fi
start-stop-daemon -S -b -m -p "$PIDFILE" -x "$GRUMPYSCREEN_EXEC"
;;
stop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ do_install() {

install -d ${D}${sysconfdir}/klipper
install -d ${D}${sysconfdir}/klipper/config
install -m 0644 ${WORKDIR}/grumpyscreen.cfg ${D}${sysconfdir}/klipper/config/
echo "# Add other extra configuration here.\n" > ${D}${sysconfdir}/klipper/config/grumpyscreen.cfg

install -d ${D}${sysconfdir}/klipper/config/grumpyscreen-readonly
install -m 0644 ${WORKDIR}/grumpyscreen.cfg ${D}${sysconfdir}/klipper/config/grumpyscreen-readonly/

install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/grumpyscreen.init ${D}${sysconfdir}/init.d/grumpyscreen
Expand All @@ -97,7 +100,11 @@ FILES:${PN} = " \
${bindir}/grumpyscreen \
${datadir}/grumpyscreen \
${sysconfdir}/klipper/config/grumpyscreen.cfg \
${sysconfdir}/klipper/config/grumpyscreen-readonly/grumpyscreen.cfg \
${sysconfdir}/init.d/grumpyscreen \
"

CONFFILES:${PN} = "${sysconfdir}/klipper/config/grumpyscreen.cfg"
CONFFILES:${PN} = " \
${sysconfdir}/klipper/config/grumpyscreen.cfg \
${sysconfdir}/klipper/config/grumpyscreen-readonly/grumpyscreen.cfg \
"
3 changes: 3 additions & 0 deletions meta-opencentauri/recipes-apps/klipper/files/calibration.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ gcode:
RUN_SHELL_COMMAND CMD=GUI_STOP
G28
M400
# Wake the accelerometer up before we try reading data from it
ACCELEROMETER_DEBUG_READ CHIP=lis2dw REG=0x0F
G4 P500
SHAPER_CALIBRATE AXIS=X FORCE_SHAPER=mzv
G4 P1000
SHAPER_CALIBRATE AXIS=Y FORCE_SHAPER=mzv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ case "$1" in
exit 0
else
echo "Firmware version mismatch or not installed, flashing firmware..."
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG Flashing bed. DO NOT POWER OFF"
if update; then
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG "
exit 0
else
echo "Attempting bootloader upgrade..."
Expand All @@ -61,6 +63,7 @@ case "$1" in
echo "Cannot update bootloader."
fi
fi
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG "
fi
;;
stop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ case "$1" in
exit 0
else
echo "Firmware version mismatch or not installed, flashing firmware..."
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG Flashing toolhead. DO NOT POWER OFF"
if update; then
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG "
exit 0
else
echo "Attempting bootloader upgrade..."
Expand All @@ -59,6 +61,7 @@ case "$1" in
echo "Cannot update bootloader."
fi
fi
PSPLASH_FIFO_DIR="/var/psplash" psplash-write "MSG "
fi
;;
stop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

KLIPPY_EXEC="/usr/bin/python3"
KLIPPER_PRINTER_CONFIG="/etc/klipper/config/printer.cfg"
KLIPPY_ARGS="-O /usr/share/klipper/klippy/klippy.py $KLIPPER_PRINTER_CONFIG -l /board-resource/klippy.log -a /run/klippy.sock"
KLIPPY_ARGS="-X no_debug_ranges /usr/share/klipper/klippy/klippy.py $KLIPPER_PRINTER_CONFIG -l /board-resource/klippy.log -a /run/klippy.sock"
PIDFILE="/var/run/klipper.pid"
KLIPPER_VAR_CONFIG_BUILDER="/usr/bin/build-klipper-var-config"
KLIPPER_CONFIG_VERSION="0.0.8-2"
Expand Down
14 changes: 9 additions & 5 deletions meta-opencentauri/recipes-apps/klipper/files/machine.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ horizontal_z_clearance: 0.4

[load_cell_probe]
sensor_type: hx711s
sdo_pins: bed:PB14, bed:PC8, bed:PB15, bed:PA8
sclk_pins: bed:PB13, bed:PC7, bed:PC6, bed:PC9
dout_pins: bed:PB14, bed:PC8, bed:PB15, bed:PA8
sclk_pins: bed:PB13, bed:PC7, bed:PC6, bed:PC9
sensor_orientation: inverted
sample_rate: 80
gain: A-128
Expand All @@ -241,21 +241,25 @@ reference_tare_counts: 71000, 71000, 71000, 71000
z_offset: 0.0
pullback_distance: 0.4
pullback_speed: 1.0
samples_tolerance: 0.05
samples_tolerance_retries: 3

[filament_switch_sensor filament_sensor]
switch_pin: PC0
pause_on_runout: false
debounce_delay: 1
runout_distance: 770
smart: true
runout_gcode:
RESPOND MSG="Refill filament"
PAUSE STATE=runout
{% if not printer["filament_switch_sensor filament_sensor"].filament_detected %}
RESPOND MSG="Refill filament"
PAUSE STATE=runout
{% endif %}
immediate_runout_gcode:
RESPOND MSG="Ran out of filament, using remaining filament in PTFE"
insert_gcode:
RESPOND MSG="Filament is inserted"


[led case]
white_pin: PG15
initial_WHITE: 1
Expand Down
18 changes: 6 additions & 12 deletions meta-opencentauri/recipes-apps/klipper/files/macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ gcode:
M109 S{global.extruder_temp.probing}
SET_DISPLAY_TEXT MSG="Creating adaptive bed mesh"
SET_GCODE_OFFSET Z=0
LOAD_CELL_CALIBRATE TARE=TRUE
BED_MESH_CALIBRATE_BASE ADAPTIVE=1
{% else %}
{% if "default" in printer.bed_mesh.profiles %}
Expand Down Expand Up @@ -524,7 +523,8 @@ gcode:
{% for _ in range(2) %}
G90
G1 X120 Y-1 F9000
PROBE HOME=Z SAMPLES=3 SAMPLES_TOLERANCE=0.05 BAD_PROBE_RETRIES=3 BAD_PROBE_STRATEGY=RETRY ; Cleaning passes
G4 P500
PROBE HOME=Z SAMPLES=3 ; Cleaning passes
G91
G0 X4 F600
G0 Z0.8 F300 ; Using pressure of bending the build plate to squish filament
Expand All @@ -534,14 +534,15 @@ gcode:
G4 P300
G0 Z1 F300
{% endfor %}
G0 Z4 F600
{% endfor %}

G91
G0 Z4 F600 ; Move down a Z to get some clearance
G90
G1 X128 Y128 F9000

PROBE HOME=Z SAMPLES=3 SAMPLES_TOLERANCE=0.05 BAD_PROBE_STRATEGY=RETRY ; Pass 3, final pass
G4 P500
PROBE HOME=Z SAMPLES=3 ; Pass 3, final pass

G91
G0 Z5 F600
Expand Down Expand Up @@ -583,7 +584,7 @@ gcode:
BED_MESH_CLEAR
G90
G1 X128 Y128 F9000
PROBE HOME=Z SAMPLES=3 SAMPLES_TOLERANCE=0.05 BAD_PROBE_STRATEGY=RETRY ; Pass 3, final pass
PROBE HOME=Z SAMPLES=3 ; Pass 3, final pass
M400
_SAVE_Z_OFFSET
G91
Expand All @@ -607,19 +608,12 @@ gcode:

M109 S{global.extruder_temp.probing}
TURN_OFF_FANS
LOAD_CELL_CALIBRATE TARE=TRUE
BED_MESH_CALIBRATE_BASE {rawparams}

{% if not nozzle_z_homing %}
CALIBRATE_Z_OFFSET
{% endif %}

[gcode_macro PROBE]
rename_existing: PROBE_BASE
gcode:
LOAD_CELL_CALIBRATE TARE=TRUE
PROBE_BASE {rawparams}

[gcode_macro SCREWS_TILT_CALCULATE]
rename_existing: SCREWS_TILT_CALCULATE_BASE
gcode:
Expand Down
2 changes: 1 addition & 1 deletion meta-opencentauri/recipes-apps/klipper/files/shell.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ gcode:
[delayed_gcode check_for_updates_startup]
initial_duration: 60
gcode:
{% if printer.idle_timeout.state == "Ready" and printer.print_stats.state == "standby" %}
{% if printer.idle_timeout.state in ["Idle", "Ready"] and printer.print_stats.state == "standby" %}
RUN_SHELL_COMMAND CMD=CHECK_FOR_UPDATES
{% endif %}
6 changes: 3 additions & 3 deletions meta-opencentauri/recipes-apps/klipper/kalico_2026.02.00.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI = "git://github.com/OpenCentauri/kalico.git;protocol=https;branch=hx711s-new \
SRC_URI = "git://github.com/OpenCentauri/kalico.git;protocol=https;branch=hx711s-new2 \
file://0001-remove-save-config-subfile-check.patch \
file://0002-reduce-calibration-difference-tolerance.patch \
file://0001-Reduce-log-rotate-threshold.patch \
Expand All @@ -13,9 +13,9 @@ SRC_URI = "git://github.com/OpenCentauri/kalico.git;protocol=https;branch=hx711s
file://0001-probe-home-z-includes-z-offset.patch \
file://0001-force-specific-input-shaper.patch \
"
SRCREV = "413e9e3886463d42b5c3fad678969962dac1ab0f"
SRCREV = "3f166182f82f95584112571b4f7b2258922be60d"

PR = "r8"
PR = "r9"

S = "${WORKDIR}/git"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### END INIT INFO

MOONRAKER_EXEC="/usr/bin/python3"
MOONRAKER_ARGS="-m moonraker.moonraker -d /etc/klipper -l /board-resource/moonraker.log -u /run/moonraker.sock"
MOONRAKER_ARGS="-X no_debug_ranges -m moonraker.moonraker -d /etc/klipper -l /board-resource/moonraker.log -u /run/moonraker.sock"
PIDFILE="/var/run/moonraker.pid"

export PYTHONPATH="/usr/share/moonraker"
Expand Down
Loading