Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Create custom DriveEncoder class #5

Open
michaelvdow opened this issue Jan 10, 2017 · 0 comments
Open

Create custom DriveEncoder class #5

michaelvdow opened this issue Jan 10, 2017 · 0 comments

Comments

@michaelvdow
Copy link
Contributor

The DriveEncoder class should extend Encoder. It needs to implement the constructor with two ints for ports, a boolean for direction, and an EncodingType.

In the constructor, it needs to call several methods:

  • setMaxPeriod()
  • setMinRate()
  • setDistancePerPulse()
    These will have parameters that you will have to create in the ConstantsMap. For calculating encoder distance per pulse, you will need the wheel size and the pulses per revolution (1028).

You also need to run this method:

  • setPIDSourceType(PIDSourceType.kDisplacement)

Check out the ExampleRobot repository for an example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant