From 227b6b4b030be5f2226a119dc860dd46cc16ef06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 20 Feb 2022 12:28:40 +0000 Subject: [PATCH] Fix FINDA timer We want to set the FINDA state IF the timer has not expired. It is helpful to see why by looking at the commit which broke this https://github.com/prusa3d/Prusa-Firmware/pull/3365/commits/802b8860c862f1e8cca82146ab70c0a0cadf2629 Without this fix my FINDA sensor just shows N/A. But after this commit is works perfectly. --- Firmware/ultralcd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index c62292842..f0d3a9bc0 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3497,7 +3497,7 @@ static void lcd_show_sensors_state() uint8_t idler_state = STATE_NA; pinda_state = READ(Z_MIN_PIN); - if (mmu_enabled && mmu_last_finda_response.expired(1000)) + if (mmu_enabled && !mmu_last_finda_response.expired(1000)) { finda_state = mmu_finda; }