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.
This commit is contained in:
Yuri D'Elia 2020-02-05 22:05:24 +01:00
parent 1eddc40ed4
commit 3af35844e1

View file

@ -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