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 Apr 30, 2021
1 parent bc95ca8 commit 78de110
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3622,6 +3622,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 @@ -3639,11 +3644,6 @@ input_high_check_3:
ljmp 1C00h ; Jump to bootloader

bootloader_done:
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
call beep_f1 ; Beep on signal loss
call beep_f2
Expand Down

0 comments on commit 78de110

Please sign in to comment.