Skip to content

Commit abb930e

Browse files
committed
fix: add layer_gcode G92 E0 for relative E + wrap p2pp in xvfb-run
1 parent e384176 commit abb930e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎profiles/prusaslicer/Palette3-cli.ini‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ use_relative_e_distances = 1
6969
# and those directives would make p2pp attempt network I/O.
7070
start_gcode = G28 ; home all axes\nG1 Z5 F5000\n;P2PP PALETTE3_PRO\n;P2PP PRINTERPROFILE=0123456789abcdef\n;P2PP LINEARPINGLENGTH=350\n;P2PP SPLICEOFFSET=30\n;P2PP MINSTARTSPLICE=100\n;P2PP MINSPLICE=70\n;P2PP EXTRAENDFILAMENT=200\n;P2PP MATERIAL_DEFAULT_0_0_0\n;P2PP MATERIAL_PLA_PLA_2_1_2
7171

72+
# Required for use_relative_e_distances=1: reset extruder position each layer
73+
layer_gcode = G92 E0
74+
7275
# p2pp/psconfig.py:127 parses this block to recover the wipe tower position.
7376
end_gcode = ; EXTRA_CONFIG_VARIABLES\n; wipe_tower_x = {wipe_tower_x}\n; wipe_tower_y = {wipe_tower_y}\nM104 S0 ; turn off temperature\nM140 S0\nG28 X0\nM84

‎scripts/e2e_pipeline.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ echo " tool changes in raw G-code: ${TOOLCHANGES}"
5050
# --- stage 2: p2pp ----------------------------------------------------------
5151
# NOTE: P2PP.py takes positional args (p2pp/main.py:100-104). There is no -i flag.
5252
echo "==> [2/4] Post-processing with p2pp"
53-
XVFB=""
54-
command -v xvfb-run >/dev/null 2>&1 && XVFB="xvfb-run -a"
53+
# p2pp imports GUI modules that use Xlib; wrap in xvfb-run in CI
54+
XVFB2=""
55+
command -v xvfb-run >/dev/null 2>&1 && XVFB2="xvfb-run -a"
5556
QT_QPA_PLATFORM="${QT_QPA_PLATFORM:-offscreen}" \
56-
${XVFB} python3 "${REPO_ROOT}/P2PP.py" "${RAW}" "${PROCESSED}"
57+
${XVFB2} python3 "${REPO_ROOT}/P2PP.py" "${RAW}" "${PROCESSED}"
5758
[ -s "${PROCESSED}" ] || { echo "FAIL: p2pp produced no output" >&2; exit 1; }
5859

5960
# --- stage 3: lint ----------------------------------------------------------

0 commit comments

Comments
 (0)