Skip to content

Commit

Permalink
fix: DShot commands could cause invalid direction settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasvr committed Feb 3, 2021
1 parent 11b816e commit 30fbf47
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,9 @@ dshot_cmd_direction_bidir_off:
clr C
mov Temp1, #Pgm_Direction
mov A, @Temp1
subb A, #2
dec A
clr ACC.1
inc A
mov @Temp1, A
clr Flag_Pgm_Bidir

Expand All @@ -2626,7 +2628,9 @@ dshot_cmd_direction_bidir_on:

mov Temp1, #Pgm_Direction
mov A, @Temp1
add A, #2
dec A
setb ACC.1
inc A
mov @Temp1, A
setb Flag_Pgm_Bidir

Expand Down

0 comments on commit 30fbf47

Please sign in to comment.