Skip to content

Commit

Permalink
fix: Switch power off earlier during signal detection
Browse files Browse the repository at this point in the history
Ensure FETs are off when beeping
  • Loading branch information
mathiasvr committed May 4, 2021
1 parent 9a6c8d0 commit 52e60ea
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3650,6 +3650,11 @@ init_no_signal:
clr IE_EA ; Disable interrupts explicitly
mov Flash_Key_1, #0 ; Initialize flash keys to invalid values
mov Flash_Key_2, #0
call switch_power_off

IF MCU_48MHZ == 1
Set_MCU_Clk_24MHz ; Set clock frequency
ENDIF

mov Temp1, #9 ; Check if input signal is high for ~150ms
input_high_check_1:
Expand All @@ -3667,12 +3672,6 @@ input_high_check_3:
ljmp 1C00h ; Jump to bootloader

bootloader_done:
call decode_settings
call switch_power_off
IF MCU_48MHZ == 1
Set_MCU_Clk_24MHz ; Set clock frequency
ENDIF

jnb Flag_Had_Signal, setup_dshot ; Check if DShot signal was lost (or stalled)
call beep_f1 ; Beep on signal loss
call beep_f2
Expand Down

0 comments on commit 52e60ea

Please sign in to comment.