Skip to content

Commit

Permalink
added option of using local clone of common code
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-bahr committed Jan 4, 2018
1 parent 7a2d9a3 commit 5f251ae
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void runOpMode() throws InterruptedException {

columnKey = vuforia.getCurrentVisibleRelic();

while(columnKey == RelicRecoveryVuMark.UNKNOWN) {
while (columnKey == RelicRecoveryVuMark.UNKNOWN) {
columnKey = vuforia.getCurrentVisibleRelic();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Created by wingertj01 on 11/21/17.
*/

@Autonomous (name = "Red 2", group = OpModeGroups.MAIN)
@Autonomous(name = "Red 2", group = OpModeGroups.MAIN)
public class RedTwo extends LinearOpMode {

private MecanumEncoderDrive drive;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void extendArmAndDetectColor() {
jewelColorDetector.process(vuforia.getImage());
analysis = jewelColorDetector.getAnalysis();

while(analysis.leftJewelColor == null && linearOpMode.opModeIsActive()) {
while (analysis.leftJewelColor == null && linearOpMode.opModeIsActive()) {
jewelColorDetector.process(vuforia.getImage());
analysis = jewelColorDetector.getAnalysis();
}
Expand All @@ -108,12 +108,12 @@ public void knockOffJewel() {
case BLUE_ONE:
switch (analysis.leftJewelColor) {
case RED:
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
break;
case BLUE:
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
break;
default:

Expand All @@ -122,12 +122,12 @@ public void knockOffJewel() {
case BLUE_TWO:
switch (analysis.leftJewelColor) {
case RED:
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
break;
case BLUE:
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
break;
default:

Expand All @@ -136,12 +136,12 @@ public void knockOffJewel() {
case RED_ONE:
switch (analysis.leftJewelColor) {
case RED:
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
break;
case BLUE:
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
break;
default:

Expand All @@ -150,12 +150,12 @@ public void knockOffJewel() {
case RED_TWO:
switch (analysis.leftJewelColor) {
case RED:
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
break;
case BLUE:
drive.moveInches(Direction.BACKWARD,6,0.5);
drive.moveInches(Direction.FORWARD,6,0.5);
drive.moveInches(Direction.BACKWARD, 6, 0.5);
drive.moveInches(Direction.FORWARD, 6, 0.5);
break;
default:

Expand Down Expand Up @@ -200,7 +200,7 @@ public void moveToColumn() {

switch (vuMark) {
case LEFT:
drive.moveInches(Direction.RIGHT, 10,1);
drive.moveInches(Direction.RIGHT, 10, 1);
break;
case CENTER:
drive.moveInches(Direction.RIGHT, 26, 1);
Expand Down Expand Up @@ -243,7 +243,7 @@ public void moveToColumn() {

switch (vuMark) {
case LEFT:
drive.moveInches(Direction.RIGHT, 10,1);
drive.moveInches(Direction.RIGHT, 10, 1);
break;
case CENTER:
drive.moveInches(Direction.RIGHT, 26, 1);
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

Expand Down
10 changes: 9 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
include ':TeamCode'
include ':TeamCode'

if (false) {
includeBuild('../Common-Code') {
dependencySubstitution {
substitute module('com.github.Pattonville-Robotics:Common-Code') with project(':library')
}
}
}

0 comments on commit 5f251ae

Please sign in to comment.