Skip to content

macros: parameterize CC1/CC2 motion geometry, restore stock cut behavior - #362

Draft
pdscomp wants to merge 11 commits into
mainfrom
paul/cc2-macro
Draft

pdscomp wants to merge 11 commits into
mainfrom
paul/cc2-macro

Conversation

@pdscomp

@pdscomp pdscomp commented Sep 27, 2026

Copy link
Copy Markdown
Member

PR to make macros.cfg stock-faithful on both machines and parameterize the per-machine geometry instead of hardcoding CC1 values.

  1. Add [gcode_macro _MACHINE_VARS] to each machine.cfg holding tray/wipe/kick coordinates; every lookup in macros.cfg defaults to the exact CC1 constant, so CC1 behavior is byte-identical unless a machine overrides it
  2. CC2 values come from the vendor DSP-board config (printer_dsp_new.cfg), not the old-rev printer.cfg: tray X52 (left side), wipe X80, cutter corner park (245,25), ram X254.5 F3000, seat Y2.5 F600
  3. CC1 KICK now cuts at the stock location too: front-right corner, Y30 -> X255 -> Y3 F600 (Elegoo app change_filament.cpp). James's v-slot swipe variant (4025623) is retained commented-out in the file
  4. KICK unified across machines: axis-separated X-then-Y park approach with slow final 14mm, optional corner seat, optional post-cut Z shake (vendor CC2 shake_gcode: Z+2 hop then 20x +-0.5mm, CC2-only via kick_shake_times)
  5. Enable CC2 filament runout sensor on PB13 per vendor config; disable CC2 chamber temp sensor (vendor PH0/GPADC0, DSP mcu firmware lacks ADC support - shuts down on sampling), finding documented in comment
  6. Fix PURGE on main: 'global' was used without being defined, would throw at runtime

Testing: jinja-rendered every macro with klipper's real delimiters across three profiles (no _MACHINE_VARS, CC1 values, CC2 values) - CC1 output byte-identical to pre-change except the intentional KICK cut-location change; CC2 renders match printer_dsp_new.cfg moves exactly. Built the CC2 eMMC swu, flashed to hardware via the stock->cosmos swupdate path, klippy loads clean with zero config errors, runout sensor live in moonraker.

@pdscomp
pdscomp deployed to approval-given September 27, 2026 23:15 — with GitHub Actions Active
@pdscomp pdscomp self-assigned this Sep 27, 2026
@github-actions

Copy link
Copy Markdown

✅ Build Artifacts

Branch: paul/cc2-macro
Build: c538ef7 (merge into main)

Artifact Size
CC2 Firmware 202.03 MB
CC1 Firmware 89.81 MB

View workflow run

@pdscomp
pdscomp deployed to approval-given October 1, 2026 16:09 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

✅ Build Artifacts

Branch: paul/cc2-macro
Build: 947a306 (merge into main)

Artifact Size
centauri-carbon-2 Elegoo OTA 112.51 MB
centauri-carbon-1 Firmware 89.89 MB
centauri-carbon-2 Firmware 89.58 MB

View workflow run

This branch was successfully deployed

1 active deployment
approval-given — 947a306f Deployed Oct 1, 2026 by pdscomp via approve #746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant