From f7b88684e278eab8ed5cd353b7173b9b64f8d220 Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Wed, 21 Apr 2021 20:50:19 +0200 Subject: [PATCH] refactor: Change motor start RCP glitch check --- Bluejay.asm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index ebd84e9..8227122 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -3817,15 +3817,13 @@ wait_for_power_on_not_missing: sjmp wait_for_power_on_not_missing ; Check DShot command again, in case it needs to be received multiple times wait_for_power_on_nonzero: - call wait100ms ; Wait to see if start pulse was only a glitch - mov DShot_Cmd, #0 ; Reset DShot command mov DShot_Cmd_Cnt, #0 - mov A, Rcp_Timeout_Cntd ; Load RC pulse timeout counter value - jnz init_start ; If it is not zero - proceed + call wait100ms ; Wait to see if start pulse was glitch - ljmp init_no_signal ; If it is zero (pulses missing) - go back to detect input signal + ; If Rcp returned to stop - start over + jb Flag_Rcp_Stop, wait_for_power_on_loop ;**** **** **** **** **** **** **** **** **** **** **** **** ****