|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.PWM
edu.wpi.first.wpilibj.SafePWM
public class SafePWM
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.PWM |
---|
PWM.PeriodMultiplier |
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.PWM |
---|
kDefaultMinPwmHigh, kDefaultPwmPeriod, kPwmDisabled |
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Fields inherited from interface edu.wpi.first.wpilibj.MotorSafety |
---|
DEFAULT_SAFETY_EXPIRATION |
Constructor Summary | |
---|---|
SafePWM(int channel)
Constructor for a SafePWM object taking a channel number |
|
SafePWM(int slot,
int channel)
Constructor for a SafePWM object taking channel and slot numbers. |
Method Summary | |
---|---|
void |
disable()
|
void |
Feed()
Feed the MotorSafety timer. |
String |
getDescription()
|
double |
getExpiration()
Return the expiration time for the PWM object. |
boolean |
isAlive()
Check if the PWM object is currently alive or stopped due to a timeout. |
boolean |
isSafetyEnabled()
Check if motor safety is enabled for this object |
void |
setExpiration(double timeout)
|
void |
setSafetyEnabled(boolean enabled)
|
void |
stopMotor()
Stop the motor associated with this PWM object. |
Methods inherited from class edu.wpi.first.wpilibj.PWM |
---|
enableDeadbandElimination, free, getChannel, getModuleNumber, getPosition, getRaw, getSmartDashboardType, getSpeed, getTable, initTable, setBounds, setPeriodMultiplier, setPosition, setRaw, startLiveWindowMode, stopLiveWindowMode, updateTable |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SafePWM(int channel)
channel
- The channel number to be used for the underlying PWM objectpublic SafePWM(int slot, int channel)
slot
- The slot number of the digital module for this PWM objectchannel
- The channel number in the module for this PWM objectMethod Detail |
---|
public void setExpiration(double timeout)
setExpiration
in interface MotorSafety
public double getExpiration()
getExpiration
in interface MotorSafety
public boolean isAlive()
isAlive
in interface MotorSafety
public void stopMotor()
stopMotor
in interface MotorSafety
public boolean isSafetyEnabled()
isSafetyEnabled
in interface MotorSafety
public void Feed()
public void setSafetyEnabled(boolean enabled)
setSafetyEnabled
in interface MotorSafety
public String getDescription()
getDescription
in interface MotorSafety
public void disable()
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |