Skip to content

Commit

Permalink
SysID: fixed motor override bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbeanton committed Feb 9, 2024
1 parent 4790e10 commit 046b638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drivers/src/motors.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,12 @@ void motorsSetRatio(uint32_t id, uint16_t ithrust)

uint16_t ratio = ithrust;

// Override ratio in case of motorSetEnable
if (motorSetEnable == 2)
{
ratio = motorPowerSet[MOTOR_M1];
}
else
else if (motorSetEnable == 1)
{
ratio = motorPowerSet[id];
}
Expand Down

0 comments on commit 046b638

Please sign in to comment.