VisionAlign Created

no functionality yet
This commit is contained in:
Fred18295
2019-01-19 10:51:05 -07:00
parent caa182fa28
commit 76ad06f02c
10 changed files with 44 additions and 1 deletions
Binary file not shown.
Binary file not shown.
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
#Fri Jan 18 19:42:27 MST 2019
gradle.version=5.0
View File
+1 -1
View File
@@ -50,7 +50,7 @@ dependencies {
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
testCompile 'junit:junit:4.12'
compile pathfinder()
//compile pathfinder()
}
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
@@ -0,0 +1,41 @@
package main.java.org.usfirst.frc4388.robot.commands;
public class VisionAlign extends Command{
protected int target_x;
protected int target_y;
protected float targetHeight;
protected float armProtrusion;
private int targetSelect;
public VisionAlign(String targetCoordinates, int positionSelect){ //activate on button press
//add requires for drive, arm, end effector
target_x = Integer.parseInt(targetCoordinates.substring(0, 3)); //x coordinate of target in pixels from lower left corner
target_y = Integer.parseInt(targetCoordinates.substirng(3)); //y coordinate of target in pixels from lower left corner
targetSelect = positionSelect; //selector value for init
}
protected void Initialize(){
if(targetSelect == 1){}//target height set to lowest rocket bay, set arm protrusion
else if (positionselect == 2){}//middle rocket bay, set arm protrusion
else if (positionselect == 3){}//top rocket bay, set arm protrusion
else if (positionselect == 4){}//rover bay, set arm protrusion
else{ end(); }
//check front clearance then move arm to position if safe, else move back then move arm.
//move robot forward to [frontClearance-armProtrusion], release hatch, move back and end
}
protected void execute(){
}
protected boolean isFinished(){
}
protected void end(){ //Return control to drivers
}
protected void interrupted(){
end();
}
}