|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dexterind.gopigo.components.Encoders
public class Encoders
Implements the methods needed to set, read, enable or disable the encoders.
| Field Summary | |
|---|---|
private static Board |
board
The main object which handles the methods to get access to the resources connected to the board. |
private Debug |
debug
The debug object. |
private static Encoders |
instance
The instance of the current object. |
| Constructor Summary | |
|---|---|
Encoders()
|
|
| Method Summary | |
|---|---|
int |
disable()
Disables the encoders. |
int |
enable()
Enables the encoders. |
static Encoders |
getInstance()
Provides a global point of access to the Encoders instance. |
int |
read(int motor)
Reads the encoding value for the motor. |
int |
readStatus()
Reads the encoders status. |
int |
targeting(int m1,
int m2,
int target)
Sets the targeting for both the motors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Board board
private static Encoders instance
private Debug debug
| Constructor Detail |
|---|
public Encoders()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException| Method Detail |
|---|
public static Encoders getInstance()
throws java.io.IOException,
java.lang.InterruptedException
Encoders instance.
java.io.IOException
java.lang.InterruptedException
public int targeting(int m1,
int m2,
int target)
throws java.io.IOException
m1 - The value for the motor 1.m2 - The value for the motor 2.target - TODO: Find a nice description for the target
java.io.IOException
public int read(int motor)
throws java.io.IOException
motor - The motor id to read.
java.io.IOException
public int readStatus()
throws java.io.IOException
java.io.IOException
public int enable()
throws java.io.IOException
java.io.IOException
public int disable()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||