|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orc.Motor
public class Motor
Basic class for controlling a motor.
Constructor Summary | |
---|---|
Motor(Orc orc,
int port,
boolean invert)
Create a new Motor. |
Method Summary | |
---|---|
void |
clearFault()
|
double |
getCurrent()
|
double |
getCurrent(OrcStatus status)
Returns an instantaneous estimate of the current magnitude (in Amps). |
double |
getCurrentFiltered()
|
double |
getCurrentFiltered(OrcStatus status)
Returns an instantaneous estimate of the current magnitude (in Amps). |
double |
getPWM()
|
double |
getPWM(OrcStatus status)
Get the instantaneous PWM output of the board, accounting for slew rate limits. |
void |
idle()
Disconnects the motor output. |
boolean |
isFault()
Is the motor in a fault state? |
boolean |
isFault(OrcStatus status)
Is the motor in a fault state? |
static void |
setMultiplePWM(Motor[] ms,
double[] vs)
Motors must belong to same Orc object. |
void |
setPWM(double v)
Enable the motor and set an output PWM. |
void |
setSlewSeconds(double seconds)
Set the amount of time required for the motor to transition from -1 to +1, in seconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Motor(Orc orc, int port, boolean invert)
port
- [0,2]invert
- If true, the direction of the will be inverted.Method Detail |
---|
public void idle()
public void setPWM(double v)
v
- [-1, 1]public double getPWM(OrcStatus status)
public double getPWM()
public double getCurrent(OrcStatus status)
public double getCurrent()
public double getCurrentFiltered(OrcStatus status)
public double getCurrentFiltered()
public void setSlewSeconds(double seconds)
seconds
- [0.001, 120]. Values less than 0.001 are
accepted, but increased to 0.001public static void setMultiplePWM(Motor[] ms, double[] vs)
public boolean isFault()
public boolean isFault(OrcStatus status)
public void clearFault()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |