From 7cf6a9368c63a263a5c41ca2fbb47c40fee3ecb0 Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Thu, 7 Jan 2021 15:24:49 +0100 Subject: [PATCH] refactor: DShot detection with no outside range pulses --- Bluejay.asm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index 6960d87..15ed49e 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -3355,12 +3355,10 @@ ENDIF mov Rcp_Outside_Range_Cnt, #10 ; Set out of range counter call wait100ms ; Wait for new RC pulse mov DShot_Pwm_Thr, #16 ; Load DShot regular pwm threshold - clr C mov A, Rcp_Outside_Range_Cnt ; Check if pulses were accepted - subb A, #10 mov DShot_Cmd, #0 mov DShot_Cmd_Cnt, #0 - jc arming_begin + jz arming_begin ; Setup variables for DShot600 IF MCU_48MHZ == 1 @@ -3378,12 +3376,10 @@ ENDIF mov Rcp_Outside_Range_Cnt, #10 ; Set out of range counter call wait100ms ; Wait for new RC pulse mov DShot_Pwm_Thr, #8 ; Load DShot regular pwm threshold - clr C mov A, Rcp_Outside_Range_Cnt ; Check if pulses were accepted - subb A, #10 mov DShot_Cmd, #0 mov DShot_Cmd_Cnt, #0 - jc arming_begin + jz arming_begin ajmp init_no_signal