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
All Methods Instance Methods Concrete Methods 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 Detail
-
AnalogOutput
public AnalogOutput(int channel)
Construct an analog output on a specified MXP channel.- Parameters:
channel
- The channel number to represent.
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
getChannel
public int getChannel()
Get the channel of this AnalogOutput.- Returns:
- The channel of this AnalogOutput.
-
setVoltage
public void setVoltage(double voltage)
-
getVoltage
public double getVoltage()
-
initSendable
public void initSendable(SendableBuilder builder)
Description copied from interface:Sendable
Initializes thisSendable
object.- Specified by:
initSendable
in interfaceSendable
- Parameters:
builder
- sendable builder
-
-