Skip to content

Commit

Permalink
Fixed pwm resolution error
Browse files Browse the repository at this point in the history
  • Loading branch information
mptei authored and ytai committed Jul 8, 2015
1 parent 0884b1e commit 4e9e524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/IOIOLib/src/ioio/lib/impl/PwmImpl.java
Expand Up @@ -93,7 +93,7 @@ synchronized private void setPulseWidthInClocks(float p)
fraction = 0;
} else {
pw = (int) p;
fraction = ((int) p * 4) & 0x03;
fraction = (int)(p * 4) & 0x03;
}
try {
ioio_.protocol_.setPwmDutyCycle(pwm_.id, pw, fraction);
Expand Down

0 comments on commit 4e9e524

Please sign in to comment.