From 3af35844e11c95147befa708c3f75f7546ef90dd Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Wed, 5 Feb 2020 22:05:24 +0100 Subject: [PATCH] Remove redundant check (always trigger the fsensor isr) Since fsensor_st_block_chunk is already called on fsensor_chunk_size boundaries, there's no need to check a second time. --- Firmware/fsensor.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Firmware/fsensor.cpp b/Firmware/fsensor.cpp index 2cf336a6e..41d9a5065 100755 --- a/Firmware/fsensor.cpp +++ b/Firmware/fsensor.cpp @@ -563,12 +563,10 @@ void fsensor_st_block_chunk(int cnt) { if (!fsensor_enabled) return; fsensor_st_cnt += cnt; - if (abs(fsensor_st_cnt) >= fsensor_chunk_len) - { -// !!! bit toggling (PINxn <- 1) (for PinChangeInterrupt) does not work for some MCU pins - if (PIN_GET(FSENSOR_INT_PIN)) {PIN_VAL(FSENSOR_INT_PIN, LOW);} - else {PIN_VAL(FSENSOR_INT_PIN, HIGH);} - } + + // !!! bit toggling (PINxn <- 1) (for PinChangeInterrupt) does not work for some MCU pins + if (PIN_GET(FSENSOR_INT_PIN)) {PIN_VAL(FSENSOR_INT_PIN, LOW);} + else {PIN_VAL(FSENSOR_INT_PIN, HIGH);} } #endif //PAT9125