From 9145c8f59f3c7ba7b7e5326fe7125110f5193130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 11 Mar 2023 16:22:53 +0000 Subject: [PATCH] PFW-1504 too much? I'm not happy with the current solution, I think we can improve it by using the fact that this is a triangle wave. Need to think about it. --- Firmware/mmu2.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index 5eb607e30..46da201ac 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -249,6 +249,25 @@ bool MMU2::VerifyFilamentEnteredPTFE() { TryLoadUnloadProgressbarInit(); + /* The position is basically a triangle wave + // current position is not zero, so it is an offset + // y(x) + // ▲ + // │ + // │ ^◄────────── delta_mm - current_position + // │ / \ + // │ / \ + // │ / \ + // machine │ / \ + // position (mm)│ / \ + // │ / \ + // │ / \ + // │/ \◄───────current_position + // └───────────────────► x + // 0 19 + // pixel # + */ + MoveE(delta_mm, MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE); MoveE(-delta_mm, MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE);