Skip to content

Commit

Permalink
Merge pull request #43 from ftc16072/armControl
Browse files Browse the repository at this point in the history
Arm control
  • Loading branch information
alanwong9664 authored Jan 6, 2024
2 parents 52fdedd + f370cfe commit 45eed2c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public void setManipulatorPosition(LiftPositions manipulatorPosition) {




public enum LiftPositions{
FLOOR_POSITION,
LOW_POSITION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public Robot() {

mechanisms = Arrays.asList(
mecanumDrive,
controlHub,
intake,
controlHub
//intake,
//cameraBack,
//cameraFront,
//holdingCell,
lift,
arm,
placement
//lift,
//arm,
//placement
// lineDetector
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.firstinspires.ftc.teamcode.ftc16072.Util;

import org.firstinspires.ftc.teamcode.ftc16072.Mechanisms.Arm;
import org.firstinspires.ftc.teamcode.ftc16072.Mechanisms.Lift;
import org.firstinspires.ftc.teamcode.ftc16072.Robot;

public class ArmControl {
Arm arm;
Lift lift;
public int safePosition; //TODO
public ArmControl (Robot robot){ //TODO call this function in QQOpmode
arm = robot.arm;
lift = robot.lift;
}
public void updateArm (){
if (lift.currentPosition() > safePosition){
arm.goToPlacingPosition();
} else{
arm.goToIntakePosition();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.firstinspires.ftc.teamcode.ftc16072.Mechanisms.Lift;
import org.firstinspires.ftc.teamcode.ftc16072.Robot;

public class LiftControl {
public class LiftControl {
Lift.LiftPositions manipulatorPosition;
Lift lift;

Expand Down

0 comments on commit 45eed2c

Please sign in to comment.