From b5e323e67c6b5303a0e7040db96289af4093cbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 12 Mar 2023 13:18:17 +0000 Subject: [PATCH] PFW-1504 rename length_step_mm to mm_per_pixel Its more descriptive --- Firmware/mmu2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index 7e604f738..f6f23b1e5 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -255,7 +255,7 @@ bool MMU2::VerifyFilamentEnteredPTFE() { // available to get length per pixel. // Finally subtract the step length by the precision set above to allow some // error introduced by CPU execution delays - const float length_step_mm = ( (2 * delta_mm) / LCD_WIDTH) - float_precision; + const float mm_per_pixel = ( (2 * delta_mm) / LCD_WIDTH) - float_precision; float last_position = stepper_get_machine_position_E_mm(); TryLoadUnloadProgressbarInit(); @@ -286,7 +286,7 @@ bool MMU2::VerifyFilamentEnteredPTFE() { // Fetch the position once, to ensure last_position will be correct float current_mm = stepper_get_machine_position_E_mm(); - if (fabs(current_mm - last_position) > length_step_mm) { + if (fabs(current_mm - last_position) > mm_per_pixel) { last_position = current_mm; if (pixel > (LCD_WIDTH - 1)) pixel = LCD_WIDTH - 1; TryLoadUnloadProgressbar(pixel++, fsensorStateLCD);