From ff8a1249e3bc946570a2441e773632558cd13899 Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Fri, 6 Nov 2020 21:58:08 +0100 Subject: [PATCH] refactor: Remove redundant RCP stop count reset --- Bluejay.asm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index 20ee9a7..6375a67 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -919,17 +919,8 @@ ENDIF jz ($+4) ; Yes - do not decrement dec Rcp_Timeout_Cntd ; No decrement - ; Check RC pulse against stop value - jb Flag_RCP_STOP, t2_int_rcp_stop; Check if pulse is below stop value - - ; RC pulse higher than stop value, reset stop counter - mov Rcp_Stop_Cnt, #0 ; Reset rcp stop counter - - sjmp t2_int_exit - -t2_int_rcp_stop: - ; RC pulse less than stop value - inc Rcp_Stop_Cnt ; Increment stop counter + jnb Flag_RCP_STOP, t2_int_exit ; Exit if pulse is above stop value + inc Rcp_Stop_Cnt ; Otherwise, increment stop counter mov A, Rcp_Stop_Cnt jnz ($+4) ; Branch if counter has not wrapped