Class PixelArmImpl
java.lang.Object
org.firstinspires.ftc.teamcode.fy23.robot.subsystems.normalimpl.PixelArmImpl
- All Implemented Interfaces:
PixelArm
Deprecated.
A normal implementation of
PixelArm
featuring
acceleration control and hard and soft safety limits.
Note that this now uses velocity, not power, under the hood, so motor behavior may be just a bit different (and
hopefully better) than what you're used to.
A bug currently exists in either this or AccelLimiter such that maxAccel seems to be divided by 10.
Workaround: If your max. velocity should be 800 t/s, set 8000 t/s in the AccelLimiters.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firstinspires.ftc.teamcode.fy23.robot.subsystems.PixelArm
PixelArm.Parameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.Get the current position of the elevator motor.double
Deprecated.Get the current power of the elevator motor.double
Deprecated.Get the current velocity of the elevator motor.int
Deprecated.Get the current position of the pivot motor.double
Deprecated.Get the current power of the pivot motor.double
Deprecated.Get the current velocity of the pivot motor.void
setElevatorDistance
(double distance) Deprecated.Set the target position of the elevator motor to a distance from the fully retracted position.void
setElevatorLowerLimit
(int i) Deprecated.void
setElevatorPower
(double power) Deprecated.Set the power of the elevator motor.void
setElevatorUpperLimit
(int i) Deprecated.void
setElevatorVelocity
(int velocity) Deprecated.Set the velocity of the elevator motor in ticks per second.void
setPivotAngle
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit unit, double angle) Deprecated.Set the target position of the pivot motor to an angle.void
setPivotPower
(double power) Deprecated.Set the power of the pivot motor.void
setPivotVelocity
(int velocity) Deprecated.Set the velocity of the pivot motor in ticks per second.void
update()
Deprecated.Called by robot.update().
-
Constructor Details
-
PixelArmImpl
Deprecated.
-
-
Method Details
-
setPivotPower
public void setPivotPower(double power) Deprecated.Description copied from interface:PixelArm
Set the power of the pivot motor. Important when setting an angle - this works like setPower() does on a normal motor in RUN_TO_POSITION mode. This does not actually set power anymore - this sets the velocity to the max. velocity multiplied by your requested power.- Specified by:
setPivotPower
in interfacePixelArm
- Parameters:
power
- from -1 to 1 just like setPower() on a normal motor
-
getPivotPower
public double getPivotPower()Deprecated.Description copied from interface:PixelArm
Get the current power of the pivot motor.- Specified by:
getPivotPower
in interfacePixelArm
-
setPivotVelocity
public void setPivotVelocity(int velocity) Deprecated.Description copied from interface:PixelArm
Set the velocity of the pivot motor in ticks per second.- Specified by:
setPivotVelocity
in interfacePixelArm
- Parameters:
velocity
- The velocity to set, in ticks per second
-
getPivotVelocity
public double getPivotVelocity()Deprecated.Description copied from interface:PixelArm
Get the current velocity of the pivot motor.- Specified by:
getPivotVelocity
in interfacePixelArm
-
getPivotPosition
public int getPivotPosition()Deprecated.Description copied from interface:PixelArm
Get the current position of the pivot motor.- Specified by:
getPivotPosition
in interfacePixelArm
-
setElevatorDistance
public void setElevatorDistance(double distance) Deprecated.Description copied from interface:PixelArm
Set the target position of the elevator motor to a distance from the fully retracted position.- Specified by:
setElevatorDistance
in interfacePixelArm
- Parameters:
distance
- in millimeters
-
setElevatorPower
public void setElevatorPower(double power) Deprecated.Description copied from interface:PixelArm
Set the power of the elevator motor. Important when setting a distance - this works like setPower() does on a normal motor in RUN_TO_POSITION mode.- Specified by:
setElevatorPower
in interfacePixelArm
- Parameters:
power
- from -1 to 1, just like setPower() on a normal motor
-
getElevatorPower
public double getElevatorPower()Deprecated.Description copied from interface:PixelArm
Get the current power of the elevator motor.- Specified by:
getElevatorPower
in interfacePixelArm
-
setElevatorVelocity
public void setElevatorVelocity(int velocity) Deprecated.Description copied from interface:PixelArm
Set the velocity of the elevator motor in ticks per second.- Specified by:
setElevatorVelocity
in interfacePixelArm
- Parameters:
velocity
- The velocity to set, in ticks per second
-
getElevatorVelocity
public double getElevatorVelocity()Deprecated.Description copied from interface:PixelArm
Get the current velocity of the elevator motor.- Specified by:
getElevatorVelocity
in interfacePixelArm
-
getElevatorPosition
public int getElevatorPosition()Deprecated.Description copied from interface:PixelArm
Get the current position of the elevator motor.- Specified by:
getElevatorPosition
in interfacePixelArm
-
update
public void update()Deprecated.Description copied from interface:PixelArm
Called by robot.update(). You do not need to call this method. -
setElevatorUpperLimit
public void setElevatorUpperLimit(int i) Deprecated. -
setElevatorLowerLimit
public void setElevatorLowerLimit(int i) Deprecated.