mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Addresses some rounding errors on current servo angle. #179

Closed EAGrahamJr closed 1 year ago

EAGrahamJr commented 1 year ago

Addresses #178 and now getAngle matches what was set in more cases.

mattjlewis commented 1 year ago

Awesome - thanks for spotting and fixing.

EAGrahamJr commented 1 year ago

This wasn't a complete fix -- there's still some discrepancies. I'll re-open the bug.

mattjlewis commented 1 year ago

There are some other occurrences of Math.floor - need to double check implication of changing to Math.round - should be safe...