gbip / drs_0x01_driver

A Rust driver for the Dongbu Robot servomotor Herkulex DRS-0101 and DRS-0201
Apache License 2.0
4 stars 3 forks source link

Support Clockwise and CounterClockwise rotation #3

Open gbip opened 6 years ago

gbip commented 6 years ago

When sending a speed command to the servomotor you can specify the direction of the rotation.

There is a bit that you need to set in order to force the servomotor to go in reverse direction. Take a look at the position bitfield from the datasheet :

screenshot from 2018-11-28 09-47-00

In order to implement this, you need to :

  1. Create a new enum to represent this parameter
  2. Add it as a parameter in the sjog and ijog method from the builder pattern
  3. Write some tests and document your code
gbip commented 6 years ago

cc @Terae