Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

SubSys_Arm

FunkyChicken edited this page Mar 7, 2023 · 4 revisions

Used for controlling the robots Arm as well as the calculations to stop the robot from moving outside of bounds

Methods

RotateArm()

Rotates the arm

Inputs:

  • lockedMode (Int):

    0: Does not stop, Ignores boundaries

    1: Accepts positive percentOutput values, not negative

    2: Accepts negative percentOutput values, not positive

  • percentOutput (Double):

    -1.0 -> 1.0: How fast the arm should rotate in percent of the max motor speed

Usage Example:

package frc.robot.Example; //Define package
import frc.robot.ChargedUp.Arm.SubSys_Arm; //Import Subsystem

public class ExampleClass() {

SubSys_Arm.RotateArm(0, 1.0); //Roate the arm at 100% speed, ignoring boundaries

}

RotateArm_InBounds()

Rotates the arm inside of the maximum bounds of the robot

Inputs:

  • percentOutput (Double):

    -1.0 -> 1.0: How fast the arm should rotate in percent of the max motor speed

Usage Example:

package frc.robot.Example; //Define package
import frc.robot.ChargedUp.Arm.SubSys_Arm; //Import Subsystem

public class ExampleClass() {

SubSys_Arm.RotateArm_InBounds(1.0); //Roate the arm at 100% speed, staying inside boundaries

}

ExtendArm()

Extends the arm

Inputs:

  • lockedMode (Int):

    0: Does not stop, Ignores boundaries

    1: Accepts positive percentOutput values (extending), not negative (retracting)

    2: Accepts negative percentOutput values (retracting), not positive (extending)

    3: Move fast while percentOutput is positive (extending), but moves at a slower speed when percentOutput is negative (retracting)

  • percentOutput (Double):

    -1.0 -> 1.0: How fast the arm should extend in percent of the max motor speed

Usage Example:

package frc.robot.Example; //Define package
import frc.robot.ChargedUp.Arm.SubSys_Arm; //Import Subsystem

public class ExampleClass() {

SubSys_Arm.ExtendArm(0, 1.0); //Extend the arm at 100% speed, ignoring boundaries

}

ExtendArm_InBounds()

Extends the arm inside of the maximum bounds of the robot

Inputs:

  • percentOutput (Double):

    -1.0 -> 1.0: How fast the arm should extend in percent of the max motor speed

Usage Example:

package frc.robot.Example; //Define package
import frc.robot.ChargedUp.Arm.SubSys_Arm; //Import Subsystem

public class ExampleClass() {

SubSys_Arm.ExtendArm_InBounds(0, 1.0); //Extend the arm at 100% speed, staying inside boundaries

}

Dependencies

  • None

Refrences

Clone this wiki locally