From 8c9b2bc01277d29c717f113e8a9da524618f078c Mon Sep 17 00:00:00 2001 From: sherlock Date: Wed, 29 Oct 2025 12:28:30 +0530 Subject: [PATCH] proj --- ES/Project/code.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ES/Project/code.c b/ES/Project/code.c index 00703d2..978b7f2 100644 --- a/ES/Project/code.c +++ b/ES/Project/code.c @@ -425,6 +425,12 @@ int main(void) { result_displayed = 0; display_status(); } + + // Reset debounce after operator is processed + stable = 0; + last_key = 0xFF; + delay(500000); // Delay to let user release the key + } else { // DIGIT INPUT MODE if(is_valid_digit(key)) { @@ -435,10 +441,10 @@ int main(void) { if(input_num < -32768) input_num = -32768; display_status(); + + stable = 5; // Prevent repeated triggers } } - - stable = 5; // Prevent repeated triggers } // ===== STATE MACHINE DISPLAY ON 7-SEGMENT =====