Skip to content

Commit

Permalink
Remove unnecessary optimized I2C workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrott committed Oct 20, 2019
1 parent cca8571 commit 2d1afc4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 95 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package org.firstinspires.ftc.teamcode.drive.mecanum;

import android.support.annotation.NonNull;
import static org.firstinspires.ftc.teamcode.drive.DriveConstants.encoderTicksToInches;

import android.support.annotation.NonNull;
import com.acmerobotics.roadrunner.control.PIDCoefficients;
import com.qualcomm.hardware.bosch.BNO055IMU;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.PIDFCoefficients;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.firstinspires.ftc.teamcode.util.LynxModuleUtil;
import org.firstinspires.ftc.teamcode.util.LynxOptimizedI2cFactory;
import org.openftc.revextensions2.ExpansionHubEx;
import org.openftc.revextensions2.ExpansionHubMotor;
import org.openftc.revextensions2.RevBulkData;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static org.firstinspires.ftc.teamcode.drive.DriveConstants.encoderTicksToInches;

/*
* Optimized mecanum drive implementation for REV ExHs. The time savings may significantly improve
* trajectory following performance with moderate additional complexity.
Expand All @@ -40,7 +36,7 @@ public SampleMecanumDriveREVOptimized(HardwareMap hardwareMap) {
// if your motors are split between hubs, **you will need to add another bulk read**
hub = hardwareMap.get(ExpansionHubEx.class, "hub");

imu = LynxOptimizedI2cFactory.createLynxEmbeddedImu(hub.getStandardModule(), 0);
imu = hardwareMap.get(BNO055IMU.class, "imu");
BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();
parameters.angleUnit = BNO055IMU.AngleUnit.RADIANS;
imu.initialize(parameters);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
package org.firstinspires.ftc.teamcode.drive.tank;

import android.support.annotation.NonNull;
import static org.firstinspires.ftc.teamcode.drive.DriveConstants.encoderTicksToInches;

import android.support.annotation.NonNull;
import com.acmerobotics.roadrunner.control.PIDCoefficients;
import com.qualcomm.hardware.bosch.BNO055IMU;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.PIDFCoefficients;

import java.util.Arrays;
import java.util.List;
import org.firstinspires.ftc.teamcode.util.LynxModuleUtil;
import org.firstinspires.ftc.teamcode.util.LynxOptimizedI2cFactory;
import org.openftc.revextensions2.ExpansionHubEx;
import org.openftc.revextensions2.ExpansionHubMotor;
import org.openftc.revextensions2.RevBulkData;

import java.util.Arrays;
import java.util.List;

import static org.firstinspires.ftc.teamcode.drive.DriveConstants.encoderTicksToInches;

/*
* Optimized tank drive implementation for REV ExHs. The time savings may significantly improve
* trajectory following performance with moderate additional complexity.
Expand All @@ -39,7 +35,7 @@ public SampleTankDriveREVOptimized(HardwareMap hardwareMap) {
// if your motors are split between hubs, **you will need to add another bulk read**
hub = hardwareMap.get(ExpansionHubEx.class, "hub");

imu = LynxOptimizedI2cFactory.createLynxEmbeddedImu(hub.getStandardModule(), 0);
imu = hardwareMap.get(BNO055IMU.class, "imu");
BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();
parameters.angleUnit = BNO055IMU.AngleUnit.RADIANS;
imu.initialize(parameters);
Expand Down

This file was deleted.

0 comments on commit 2d1afc4

Please sign in to comment.