Skip to content

Commit

Permalink
feat: Send telemetry for each DShot packet when off
Browse files Browse the repository at this point in the history
Simplify RCP start check and DShot command handling
  • Loading branch information
mathiasvr committed Apr 30, 2021
1 parent 512f8e6 commit 90ae235
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3787,9 +3787,7 @@ beep_delay_set:
call beacon_beep

wait_for_start_no_beep:
call wait10ms
jb Flag_Telemetry_Pending, wait_for_start_check_rcp
setb Flag_Timer3_Pending ; Set flag to avoid early return
call dshot_tlm_create_packet ; Create telemetry packet (0 rpm)

wait_for_start_check_rcp:
Expand All @@ -3798,11 +3796,9 @@ wait_for_start_check_rcp:
mov A, Rcp_Timeout_Cntd ; Load RC pulse timeout counter value
ljz init_no_signal ; If pulses are missing - go back to detect input signal

mov A, DShot_Cmd
jz wait_for_start_loop ; Check DShot command if not zero, otherwise wait for power
call dshot_cmd_check ; Check and process DShot command

call dshot_cmd_check
sjmp wait_for_start_check_rcp ; Check DShot command again, in case it needs to be received multiple times
sjmp wait_for_start_loop ; Go back to beginning of wait loop

wait_for_start_nonzero:
mov DShot_Cmd, #0 ; Reset DShot command
Expand Down

0 comments on commit 90ae235

Please sign in to comment.