From 76ad06f02c90fd2e27609efbec2334592a5ec4e7 Mon Sep 17 00:00:00 2001 From: Fred18295 Date: Sat, 19 Jan 2019 10:51:05 -0700 Subject: [PATCH] VisionAlign Created no functionality yet --- .gradle/5.0/fileChanges/last-build.bin | Bin 0 -> 1 bytes .gradle/5.0/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .gradle/5.0/gc.properties | 0 .gradle/5.0/taskHistory/taskHistory.bin | Bin 0 -> 18733 bytes .gradle/5.0/taskHistory/taskHistory.lock | Bin 0 -> 17 bytes .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .gradle/buildOutputCleanup/cache.properties | 2 + .gradle/vcs-1/gc.properties | 0 2019robot/build.gradle | 2 +- .../frc4388/robot/commands/VisionAlign.java | 41 ++++++++++++++++++ 10 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .gradle/5.0/fileChanges/last-build.bin create mode 100644 .gradle/5.0/fileHashes/fileHashes.lock create mode 100644 .gradle/5.0/gc.properties create mode 100644 .gradle/5.0/taskHistory/taskHistory.bin create mode 100644 .gradle/5.0/taskHistory/taskHistory.lock create mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 .gradle/buildOutputCleanup/cache.properties create mode 100644 .gradle/vcs-1/gc.properties create mode 100644 2019robot/src/main/java/org/usfirst/frc4388/robot/commands/VisionAlign.java diff --git a/.gradle/5.0/fileChanges/last-build.bin b/.gradle/5.0/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/.gradle/5.0/fileHashes/fileHashes.lock b/.gradle/5.0/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..59d89bbc59d71c7975fc12f54507d020d7e3ae64 GIT binary patch literal 17 TcmZQR9d17Jhat~)1}FdkF?Ivu literal 0 HcmV?d00001 diff --git a/.gradle/5.0/gc.properties b/.gradle/5.0/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/5.0/taskHistory/taskHistory.bin b/.gradle/5.0/taskHistory/taskHistory.bin new file mode 100644 index 0000000000000000000000000000000000000000..c40e8de8416788f1a95f69da8d98caaafa47184a GIT binary patch literal 18733 zcmeI%O-chX6u|Kr5d5k`M6??hC3ezrK2wtE)SI|);{{yl1-j5n zxOC&rtvgK}OHUw({2wHFBq6-_+otPzt>))Xc+1#Yrep{pfB*srAb!mps*7Fix%JuCCK8d6VWxx} z$D))rwIYmVRA^hqLn{s@aTXpHRcv&TtD-zrV{OVacW=;DLv3WK!e(dCdu(r3PbZDF Q`-eMw?El)!-^IUu0S6j#G5`Po literal 0 HcmV?d00001 diff --git a/.gradle/5.0/taskHistory/taskHistory.lock b/.gradle/5.0/taskHistory/taskHistory.lock new file mode 100644 index 0000000000000000000000000000000000000000..ac5c713c7628f762cf27f7ef516b8a6f78a8b650 GIT binary patch literal 17 TcmZRsKUB}Jo}6dJ00C?OC%6L( literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..10b54f3f45c272df6976a9c27b410dd711a72ce3 GIT binary patch literal 17 UcmZQJ-C_AX=+Xum1_)pT05ZS?5&!@I literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..0d6be3d --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Fri Jan 18 19:42:27 MST 2019 +gradle.version=5.0 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/2019robot/build.gradle b/2019robot/build.gradle index f15e84c..01830a7 100644 --- a/2019robot/build.gradle +++ b/2019robot/build.gradle @@ -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') diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/VisionAlign.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/VisionAlign.java new file mode 100644 index 0000000..1cf201d --- /dev/null +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/VisionAlign.java @@ -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(); + } +} \ No newline at end of file