From 7a8236340bb32d1165418e65610d1a9e6f8e1e1a Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Wed, 30 Sep 2020 04:15:46 +0200 Subject: [PATCH] refactor: Update telemetry timing --- Bluejay.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bluejay.asm b/Bluejay.asm index c96dc73..9d57043 100644 --- a/Bluejay.asm +++ b/Bluejay.asm @@ -391,11 +391,11 @@ Eep_Name: DB " " ; Name tag (16 Bytes) IF MCU_48MHZ == 1 DSHOT_TLM_CLOCK EQU 49000000 ; 49MHz DSHOT_TLM_START_DELAY EQU -(8 * 49 / 4) ; Start telemetry after 8us (~30us after receiving DShot cmd) - DSHOT_TLM_PREDELAY EQU 833 * 49 / 4 / 1000 ; 10 ticks (~833ns) inherent delay + DSHOT_TLM_PREDELAY EQU 8 ; 8 timer 0 ticks inherent delay ELSE DSHOT_TLM_CLOCK EQU 24500000 ; 24.5MHz DSHOT_TLM_START_DELAY EQU -1 ; Start telemetry after 1 tick (~37us after receiving DShot cmd) - DSHOT_TLM_PREDELAY EQU 1249 * 245 / 4 / 10000 ; 7 ticks (~1249ns) inherent delay + DSHOT_TLM_PREDELAY EQU 6 ; 6 timer 0 ticks inherent delay ENDIF Set_DShot_Tlm_Bitrate MACRO rate