From 30fbf477074d3283b9d1c2b04840768514c8395f Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Wed, 3 Feb 2021 02:48:16 +0100 Subject: [PATCH] fix: DShot commands could cause invalid direction settings --- Bluejay.asm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index ef4cf2f..2136b91 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -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 @@ -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