libhal-google / libhal-soft

Library for generic soft drivers officially supported by libhal
Apache License 2.0
1 stars 6 forks source link

Add `hal::soft::offset_servo` implementation #24

Open kammce opened 1 year ago

kammce commented 1 year ago

Take a servo implementation and remap the definition of it position values. For example, take a servo that can move from 0 degs to 90 degs. If an application needs to control a servo from -45 deg to +45 deg, then the offset_servo implementation simply maps 0 to -45 degs and 90 to 45 deg. Making zero 45 degrees. This implementation should be done with addition only as to not distort the range of the input servo.

Coreyboy1820 commented 1 year ago

.take