Skip to content

Commit

Permalink
Merge pull request #501 from blurfl/Address-issue-#500
Browse files Browse the repository at this point in the history
Avoid PWM value 255 for TLE5206
  • Loading branch information
MaslowCommunityGardenRobot authored May 23, 2019
2 parents 2f47f1e + 813ecec commit e7ae77d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cnc_ctrl_v1/Motor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void Motor::write(int speed, bool force){
}
}
else { // TLE5206
speed = constrain(speed, 0, 254); // avoid issue when PWM value is 255
if (forward) {
if (speed > 0) {
if (usePin2) {
Expand Down

0 comments on commit e7ae77d

Please sign in to comment.