Initial import of my Klipper macros, modules and scripts
Macros as they run on the printer (Voron 2.4 + AFC Box Turtle + Blobifier + Beacon + bd_pressure + bdwidth + iHeater), the Klipper modules they need (xy_drift, bdwidth_status, bdpressure_check), MCU firmware update scripts, install.sh with Moonraker update manager support, and READMEs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
6dbb4ca3fb
24 files changed
+3906
No files matched your search
Executable
+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