Skip to content

Update FIRST libraries #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}

Expand Down
2 changes: 1 addition & 1 deletion ftc-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
android {
Expand Down
Binary file added ftc-library/libs/Blocks-release-sources.jar
Binary file not shown.
Binary file added ftc-library/libs/Blocks-release.aar
Binary file not shown.
Binary file added ftc-library/libs/FtcCommon-release-sources.jar
Binary file not shown.
Binary file modified ftc-library/libs/FtcCommon-release.aar
Binary file not shown.
Binary file added ftc-library/libs/Hardware-release-sources.jar
Binary file not shown.
Binary file modified ftc-library/libs/Hardware-release.aar
Binary file not shown.
Binary file added ftc-library/libs/Inspection-release.aar
Binary file not shown.
Binary file added ftc-library/libs/RobotCore-release-sources.jar
Binary file not shown.
Binary file modified ftc-library/libs/RobotCore-release.aar
Binary file not shown.
Binary file added ftc-library/libs/Vuforia.jar
Binary file not shown.
Binary file added ftc-library/libs/armeabi-v7a/libVuforia.so
Binary file not shown.
Binary file added ftc-library/libs/ftc.debug.keystore
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void reset() {
* @return The offset gyroscope rotation in degrees per second
*/
public double getRate() {
return gyroSensor.getRotation() - offset;
return gyroSensor.getHeading() - offset;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorController;
import com.qualcomm.robotcore.hardware.DcMotorImpl;

/**
* Drive encoder support
*/
public class EncodedMotor extends DcMotor {
public class EncodedMotor extends DcMotorImpl {
private boolean isEncoderEnabled = true;
private boolean encodersResetting = false;
private int encoderOffset = 0;
Expand Down Expand Up @@ -65,14 +66,14 @@ public boolean hasReachedPosition(double position) {

public void enableEncoder() {
//This command requires (at least ?) one execution loop to reset the encoders
super.setMode(DcMotorController.RunMode.RUN_USING_ENCODERS);
super.setMode(RunMode.RUN_WITHOUT_ENCODER);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@buggy213 Is this supposed to be RUN_WITH_ENCODER?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, good catch


isEncoderEnabled = true;
}

public void disableEncoder() {
//This command requires (at least ?) one execution loop to reset the encoders
super.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);
super.setMode(RunMode.RUN_WITHOUT_ENCODER);

isEncoderEnabled = false;
}
Expand All @@ -97,7 +98,7 @@ public void resetEncoder() {
return;

//This command requires (at least ?) one execution loop to reset the encoders
super.setMode(DcMotorController.RunMode.RESET_ENCODERS);
super.setMode(RunMode.RESET_ENCODERS);

encodersResetting = true;
encoderOffset = -super.getCurrentPosition();
Expand Down