Group macros by topic, add Blobifier, fix first tool change
- Split the macro files into folders by topic (print, heating, afc, pressure_advance, spoolman, leds, sensors); klipper-macros.cfg is the one file printer.cfg includes. Macros moved unchanged; the effective config is identical apart from the paths of the PA shell scripts. - Add the modified Blobifier (Turtleblobifier for AFC) and define [save_variables] once in save_variables.cfg instead of in both blobifier.cfg and the PA macros (same file, bd_pa_variables.cfg). - PRINT_WARMUP: heat to the loaded lane's temperature before the first tool change. AFC skips heating when the loaded lane's tool number is not in the print file's temperature list, and the unload then failed below min_extrude_temp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6dbb4ca3fb
commit
eaf9c82617
27 files changed
+1366
-340
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
SPOOL_ID=$1
|
||||
BASE_URL=$2
|
||||
FIELD=$3
|
||||
PA_VALUE=$4
|
||||
CURRENT=$(curl -sf "${BASE_URL}/api/v1/spool/${SPOOL_ID}" 2>/dev/null)
|
||||
EXTRA=$(echo "$CURRENT" | python3 -c "
|
||||
import sys, json
|
||||
try:
|
||||
d = json.load(sys.stdin)
|
||||
e = d.get('extra', {})
|
||||
e['$FIELD'] = '$PA_VALUE'
|
||||
print(json.dumps(e))
|
||||
except Exception:
|
||||
print(json.dumps({'$FIELD': '$PA_VALUE'}))
|
||||
" 2>/dev/null)
|
||||
if [ -z "$EXTRA" ]; then
|
||||
EXTRA="{\"$FIELD\": \"$PA_VALUE\"}"
|
||||
fi
|
||||
curl -sf -X PATCH "${BASE_URL}/api/v1/spool/${SPOOL_ID}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"extra\": $EXTRA}" > /tmp/pa_spoolman_write_result 2>&1
|
||||
Reference in new issue
Block a user