Skip to content

Fix CANVAS Resume channel after selecting already-loaded filament (1.4.49) - #117

Draft
demshin wants to merge 1 commit into
OpenCentauri:mainfrom
demshin:fix/cc1-canvas-resume-current-channel
Draft

demshin wants to merge 1 commit into
OpenCentauri:mainfrom
demshin:fix/cc1-canvas-resume-current-channel

Conversation

@demshin

@demshin demshin commented Nov 11, 2026

Copy link
Copy Markdown

Summary

Fix stale CANVAS channel state after M6211 selects filament that is already loaded. That early return skips the current-channel setter, so a later RESUME can send MULTICOLOR_RESUME CHANNEL_ID=<previous channel>.

 if selected_physical_channel == active_physical_channel:
+    state.set_current_print_channel_id(selected_physical_channel)
     log_already_loaded()
     return

Adds a guarded ARM patch for stock 1.4.49, the baseline used by OpenCentauri v0.5.0. One conditional branch calls the existing setter through a 24-byte trampoline and returns to the original fast path. Enabled in the patched edition; cave allocation and reproduction steps are documented. This targets stale channel selection, not purge-temperature policy.

Evidence

  • Before: replaying the real ARM M6211/Resume blocks reproduces 64 stale/uninitialized already-loaded channel states across a 320-case matrix.
    After: all 320 cases select the correct physical channel, both with the isolated patch and the final full-chain app. The isolated tests also pass against the released v0.5.0 app.
  • Eight incompatible, modified, occupied-cave and repeated-patch inputs are refused; exact binary write scope is checked.
  • patch_planner.py 1.4.49 --dry-run passes. The complete 23-patch firmware build, repacking and manifest generation pass on Ubuntu 24.04 ARM64. The rootfs retains the stock device node. For the macOS-hosted container only, the bootlogo image is updated with mtools in a temporary patch-tree copy instead of loop-mounting; bitmap readback matches upstream.
  • Independent assembly matches all 24 trampoline bytes. Final hook/caves disassembled; all four existing cave allocations match released v0.5.0.

Draft pending a physical CC1/CANVAS pause/resume test. Emulation substitutes external helpers and stops before physical loading; heaters, sensors and printing have not been validated on hardware. No printer was flashed.

Merge Danger

Door: two-way

The source change can be reverted and the firmware rebuilt.

Blast Radius: CANVAS

Changes the already-loaded branch of M6211 on firmware 1.4.49. Binary guards reject incompatible code or cave collisions. Hardware validation remains required before treating this as a confirmed physical-print fix.

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