Replies: 1 comment 2 replies
|
thx for your request... but different question. why couldn't creality just use the default hook/macro? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I’d like to suggest adding an optional configurable print-start hook/macro so Mainsail can call a user-defined G-code command instead of always using the standard print-start API.
I’m running a Creality K1 Max with Mainsail/Moonraker, and I’ve been tracing an issue where Creality’s native LiDAR / first-layer inspection path is skipped when starting prints through Mainsail.
We captured the Creality touchscreen start path and found that the stock UI uses a proprietary start command that triggers the full native sequence, including calibration and first-layer scanning.
To reproduce that behavior from Mainsail, I patched Mainsail’s normal startPrint() handler so instead of:
printer.print.start
it sends:
CREALITY_START FILE=""
That macro/helper then calls the verified native Creality start path.
This was physically tested and restored the full sequence:
homing → calibration → LiDAR/laser check → bed scan → first layer → cooldown → first-layer scan → resume/complete.
The issue reappeared after updating/reinstalling Mainsail because the frontend patch was removed. Reapplying the patch restored the known-good behavior.
The current patched handler is effectively:
this.$socket.emit('printer.gcode.script',{script:\CREALITY_START FILE="${e}"
},{action:'switchToDashboard'})I’m wondering whether Mainsail could support a configurable print-start hook/macro instead of always calling the standard print-start API. That would avoid hard-patching the frontend and could help other printers that need vendor-specific preflight/start logic.
I have the full logs, packet capture details, helper script, and before/after behavior if that would help.
All reactions