Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gcl8a committed Jan 10, 2022
1 parent 19ba21b commit 11712df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Romi32U4Motors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ void Romi32U4Motor::setTargetSpeed(int16_t target)

if(ctrlMode != CTRL_SPEED)
{
//when new target speeds are set, reset the error integral
// Reset the error integral if we are switching from another mode
// Otherwise, the robot may jump due to residual integral
pidCtrl.resetSum();
}

Expand Down

0 comments on commit 11712df

Please sign in to comment.