Package xbot.common.controls.actuators
Class XPWM
java.lang.Object
xbot.common.controls.actuators.XPWM
- All Implemented Interfaces:
XBaseIO
- Direct Known Subclasses:
MockPWM,PWMWPIAdapter
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintabstract intgetRaw()abstract doubleabstract doubleabstract voidsetRaw(int value) Sets the PWM duty cycleabstract voidsetSigned(double value) Sets the PWM duty cycleabstract voidsetUnsigned(double value) Sets the PWM duty cycle
-
Field Details
-
channel
protected int channel
-
-
Constructor Details
-
XPWM
-
-
Method Details
-
getChannel
public int getChannel()- Specified by:
getChannelin interfaceXBaseIO
-
setRaw
public abstract void setRaw(int value) Sets the PWM duty cycle- Parameters:
value- the value to set, in the range [0, 255]
-
getRaw
public abstract int getRaw() -
setSigned
public abstract void setSigned(double value) Sets the PWM duty cycle- Parameters:
value- the value to set, in the range [-1, 1]
-
getSigned
public abstract double getSigned() -
setUnsigned
public abstract void setUnsigned(double value) Sets the PWM duty cycle- Parameters:
value- the value to set, in the range [0, 1]
-
getUnsigned
public abstract double getUnsigned()
-