Skip to content

Commit

Permalink
Remove power limits after initial run phase is done
Browse files Browse the repository at this point in the history
Pwm_Limit_By_Rpm allowance removed from inital_run_phase_done to pwm limit by rpm will increase in set_pwm_limit function
  • Loading branch information
damosvil authored and damosvil committed Aug 22, 2023
1 parent afadcdc commit 09f1b32
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Bluejay.asm
Original file line number Diff line number Diff line change
Expand Up @@ -926,9 +926,6 @@ run6:
startup_phase_done:
; Clear startup phase flag & remove pwm limits
clr Flag_Startup_Phase
mov Pwm_Limit_By_Rpm, #255
mov Pwm_Limit, #255 ; Reset temperature level pwm limit
mov Temp_Pwm_Level_Setpoint, #255 ; Reset temperature level setpoint

initial_run_phase:
; If it is a direction change - branch
Expand All @@ -949,6 +946,16 @@ initial_run_phase:

initial_run_phase_done:
clr Flag_Initial_Run_Phase ; Clear initial run phase flag

; Lift startup power restrictions
; Temperature protection acts until this point
; as a max startup power limiter.
; This plus the power limits applied in set_pwm_limit function
; act as a startup power limiter to protect the esc and the motor
; during startup, jams produced after crashes and desyncs recovery
mov Pwm_Limit, #255 ; Reset temperature level pwm limit
mov Temp_Pwm_Level_Setpoint, #255 ; Reset temperature level setpoint

setb Flag_Motor_Started ; Set motor started
jmp run1 ; Continue with normal run

Expand Down

0 comments on commit 09f1b32

Please sign in to comment.