Browse Source

perf: Set max commutation period directly for startup phase

main
Mathias Rasmussen 4 years ago
parent
commit
f4c918fae5
  1. 8
      Bluejay.asm

8
Bluejay.asm

@ -1748,9 +1748,9 @@ ENDIF
jz calc_next_comm_startup_no_X
; Extended byte is not zero, so commutation time is above 0xFFFF
mov Temp1, #0FFh
mov Temp2, #0FFh
sjmp calc_next_comm_startup_average
mov Comm_Period4x_L, #0FFh
mov Comm_Period4x_H, #0FFh
sjmp calc_new_wait_times_setup
calc_next_comm_startup_no_X:
; Extended byte = 0, so commutation time fits within two bytes
@ -1768,14 +1768,12 @@ calc_next_comm_startup_no_X:
subb A, Temp8
mov Temp2, A
calc_next_comm_startup_average:
mov Temp3, Comm_Period4x_L ; Comm_Period4x holds the time of 4 commutations
mov Temp4, Comm_Period4x_H
mov Temp7, #2
mov Temp8, #0
sjmp calc_next_comm_avg_period_div
calc_next_comm_normal:
; Prepare averaging by dividing Comm_Period4x and current commutation period (Temp2/1) according to speed.
mov Temp3, Comm_Period4x_L ; Comm_Period4x holds the time of 4 commutations

Loading…
Cancel
Save