Class MockCANMotorController
java.lang.Object
xbot.common.controls.actuators.XCANMotorController
xbot.common.controls.actuators.mock_adapters.MockCANMotorController
- All Implemented Interfaces:
DataFrameRefreshable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from class xbot.common.controls.actuators.XCANMotorController
XCANMotorController.MotorPidMode, XCANMotorController.XCANMotorControllerFactory
-
Field Summary
Modifier and TypeFieldDescriptiondouble
double
double
double
double
double
double
Fields inherited from class xbot.common.controls.actuators.XCANMotorController
akitName, busId, deviceId, firstPeriodicCall, inputs, propertyFactory, usesPropertySystem
-
Constructor Summary
ConstructorDescriptionMockCANMotorController
(CANMotorControllerInfo info, String owningSystemPrefix, PropertyFactory propertyFactory, DevicePolice police, String pidPropertyPrefix, XCANMotorControllerPIDProperties defaultPIDProperties) -
Method Summary
Modifier and TypeMethodDescriptiondouble
getPower()
boolean
void
setClosedLoopRampRates
(Time dutyCyclePeriod, Time voltagePeriod) void
setConfiguration
(CANMotorControllerOutputConfig outputConfig) void
setOpenLoopRampRates
(Time dutyCyclePeriod, Time voltagePeriod) void
setPidDirectly
(double p, double i, double d, double velocityFF, double gravityFF, int slot) void
setPosition
(Angle position) void
setPositionTarget
(Angle position, XCANMotorController.MotorPidMode mode, int slot) void
setPower
(double power) void
setPowerRange
(double minPower, double maxPower) void
setTrapezoidalProfileAcceleration
(AngularAcceleration acceleration) void
void
setVelocityTarget
(AngularVelocity velocity, XCANMotorController.MotorPidMode mode, int slot) protected void
Methods inherited from class xbot.common.controls.actuators.XCANMotorController
getCurrent, getVoltage, periodic, refreshDataFrame, setPidDirectly, setPidDirectly, setPositionTarget, setVelocityTarget, setVelocityTarget
-
Field Details
-
p
public double p -
i
public double i -
d
public double d -
f
public double f -
g
public double g -
maxPower
public double maxPower -
minPower
public double minPower
-
-
Constructor Details
-
MockCANMotorController
@AssistedInject public MockCANMotorController(@Assisted("info") CANMotorControllerInfo info, @Assisted("owningSystemPrefix") String owningSystemPrefix, PropertyFactory propertyFactory, DevicePolice police, @Assisted("pidPropertyPrefix") String pidPropertyPrefix, @Assisted("defaultPIDProperties") XCANMotorControllerPIDProperties defaultPIDProperties)
-
-
Method Details
-
setConfiguration
- Specified by:
setConfiguration
in classXCANMotorController
-
setOpenLoopRampRates
- Specified by:
setOpenLoopRampRates
in classXCANMotorController
-
setClosedLoopRampRates
- Specified by:
setClosedLoopRampRates
in classXCANMotorController
-
setTrapezoidalProfileAcceleration
- Specified by:
setTrapezoidalProfileAcceleration
in classXCANMotorController
-
setTrapezoidalProfileJerk
- Specified by:
setTrapezoidalProfileJerk
in classXCANMotorController
-
setPidDirectly
public void setPidDirectly(double p, double i, double d, double velocityFF, double gravityFF, int slot) - Specified by:
setPidDirectly
in classXCANMotorController
-
setPower
public void setPower(double power) - Specified by:
setPower
in classXCANMotorController
-
getPower
public double getPower()- Specified by:
getPower
in classXCANMotorController
-
setPowerRange
public void setPowerRange(double minPower, double maxPower) - Specified by:
setPowerRange
in classXCANMotorController
-
getPosition
- Overrides:
getPosition
in classXCANMotorController
-
setPosition
- Overrides:
setPosition
in classXCANMotorController
-
setPositionTarget
- Specified by:
setPositionTarget
in classXCANMotorController
-
getVelocity
- Overrides:
getVelocity
in classXCANMotorController
-
setVelocityTarget
public void setVelocityTarget(AngularVelocity velocity, XCANMotorController.MotorPidMode mode, int slot) - Specified by:
setVelocityTarget
in classXCANMotorController
-
isInverted
public boolean isInverted()- Specified by:
isInverted
in classXCANMotorController
-
updateInputs
- Specified by:
updateInputs
in classXCANMotorController
-