mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-08 16:18:02 -06:00
VisionAlign Created
no functionality yet
This commit is contained in:
Binary file not shown.
Binary file not shown.
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
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user