Package edu.wpi.first.wpilibj
Class AnalogOutput
java.lang.Object
edu.wpi.first.wpilibj.AnalogOutput
- All Implemented Interfaces:
Sendable
,AutoCloseable
public class AnalogOutput extends Object implements Sendable, AutoCloseable
Analog output class.
-
Constructor Summary
Constructors Constructor Description AnalogOutput(int channel)
Construct an analog output on a specified MXP channel. -
Method Summary
Modifier and Type Method Description void
close()
int
getChannel()
Get the channel of this AnalogOutput.double
getVoltage()
void
initSendable(SendableBuilder builder)
Initializes thisSendable
object.void
setVoltage(double voltage)
-
Constructor Details
-
AnalogOutput
Construct an analog output on a specified MXP channel.- Parameters:
channel
- The channel number to represent.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
-
getChannel
Get the channel of this AnalogOutput.- Returns:
- The channel of this AnalogOutput.
-
setVoltage
-
getVoltage
-
initSendable
Description copied from interface:Sendable
Initializes thisSendable
object.- Specified by:
initSendable
in interfaceSendable
- Parameters:
builder
- sendable builder
-