-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
270 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
RobotLibrary/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":-1,"enabled":true,"outputFile":"RobotLibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.technototes.library","split":""}}] | ||
{ | ||
"version": 1, | ||
"applicationId": "com.technototes.library", | ||
"variantType": "LIBRARY", | ||
"elements": [ | ||
{ | ||
"outputType": { | ||
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS" | ||
}, | ||
"apkData": { | ||
"type": "MAIN", | ||
"splits": [], | ||
"versionCode": -1, | ||
"outputFile": "RobotLibrary-debug.aar", | ||
"fullName": "debug", | ||
"baseName": "debug", | ||
"dirName": "" | ||
}, | ||
"path": "AndroidManifest.xml", | ||
"properties": { | ||
"packageId": "com.technototes.library", | ||
"split": "" | ||
} | ||
} | ||
] | ||
} |
Binary file modified
BIN
-42.8 KB
(76%)
RobotLibrary/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
...Library/build/intermediates/incremental/packageDebugResources/compile-file-map.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#Sun Sep 27 16:10:54 PDT 2020 | ||
#Sat Oct 03 11:46:02 PDT 2020 |
Binary file modified
BIN
-142 Bytes
(83%)
...Library/build/intermediates/javac/debug/classes/com/technototes/library/BuildConfig.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ibrary/build/intermediates/javac/debug/classes/com/technototes/library/RobotLibrary.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...y/build/intermediates/javac/debug/classes/com/technototes/library/command/Command$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ermediates/javac/debug/classes/com/technototes/library/command/Command$CommandState.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ild/intermediates/javac/debug/classes/com/technototes/library/command/Command$State.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...uild/intermediates/javac/debug/classes/com/technototes/library/command/Command$Type.class
Binary file not shown.
Binary file modified
BIN
-232 Bytes
(93%)
...ary/build/intermediates/javac/debug/classes/com/technototes/library/command/Command.class
Binary file not shown.
Binary file modified
BIN
+1.13 KB
(130%)
.../intermediates/javac/debug/classes/com/technototes/library/command/CommandScheduler.class
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
...ntermediates/javac/debug/classes/com/technototes/library/command/ConditionalCommand.class
Binary file not shown.
Binary file modified
BIN
+114 Bytes
(120%)
...ary/build/intermediates/javac/debug/classes/com/technototes/library/control/Trigger.class
Binary file not shown.
Binary file modified
BIN
+1.23 KB
(130%)
.../javac/debug/classes/com/technototes/library/control/gamepad/ButtonGamepadComponent.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
.../intermediates/javac/debug/classes/com/technototes/library/hardware/PID$ControlType.class
Binary file not shown.
Binary file modified
BIN
-161 Bytes
(64%)
...ibrary/build/intermediates/javac/debug/classes/com/technototes/library/hardware/PID.class
Binary file not shown.
Binary file modified
BIN
-69 Bytes
(99%)
...termediates/javac/debug/classes/com/technototes/library/hardware/motor/EncodedMotor.class
Binary file not shown.
Binary file modified
BIN
+168 Bytes
(110%)
...diates/javac/debug/classes/com/technototes/library/hardware/motor/EncodedMotorGroup.class
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(100%)
...uild/intermediates/javac/debug/classes/com/technototes/library/hardware/motor/Motor.class
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(110%)
...ermediates/javac/debug/classes/com/technototes/library/hardware/sensor/AnalogSensor.class
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(110%)
...rmediates/javac/debug/classes/com/technototes/library/hardware/sensor/DigitalSensor.class
Binary file not shown.
Binary file modified
BIN
-194 Bytes
(94%)
...build/intermediates/javac/debug/classes/com/technototes/library/hardware/sensor/IMU.class
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(100%)
...termediates/javac/debug/classes/com/technototes/library/hardware/sensor/RangeSensor.class
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(100%)
...ac/debug/classes/com/technototes/library/hardware/sensor/encoder/MotorEncoderSensor.class
Binary file not shown.
Binary file modified
BIN
-146 Bytes
(97%)
...uild/intermediates/javac/debug/classes/com/technototes/library/hardware/servo/Servo.class
Binary file not shown.
Binary file modified
BIN
+174 Bytes
(110%)
...intermediates/javac/debug/classes/com/technototes/library/hardware/servo/ServoGroup.class
Binary file not shown.
Binary file modified
BIN
+7.51 KB
(2600%)
...rary/build/intermediates/javac/debug/classes/com/technototes/library/logging/Logger.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...tes/javac/debug/classes/com/technototes/library/structure/CommandOpMode$OpModeState.class
Binary file not shown.
Binary file modified
BIN
+1.17 KB
(160%)
...d/intermediates/javac/debug/classes/com/technototes/library/structure/CommandOpMode.class
Binary file not shown.
Binary file modified
BIN
-58 Bytes
(91%)
...ry/build/intermediates/javac/debug/classes/com/technototes/library/structure/OIBase.class
Binary file not shown.
Binary file modified
BIN
-322 Bytes
(50%)
...build/intermediates/javac/debug/classes/com/technototes/library/structure/RobotBase.class
Binary file not shown.
Binary file modified
BIN
-47 Bytes
(98%)
...asses/com/technototes/library/subsystem/drivebase/OmnidirectionalDrivebaseSubsystem.class
Binary file not shown.
Binary file modified
BIN
+114 Bytes
(110%)
...ac/debug/classes/com/technototes/library/subsystem/drivebase/TankDrivebaseSubsystem.class
Binary file not shown.
Binary file modified
BIN
-67 Bytes
(97%)
...s/javac/debug/classes/com/technototes/library/subsystem/motor/EncodedMotorSubsystem.class
Binary file not shown.
Binary file modified
BIN
-105 Bytes
(80%)
...javac/debug/classes/com/technototes/library/subsystem/sensor/DigitalSensorSubsystem.class
Binary file not shown.
Binary file modified
BIN
-60 Bytes
(97%)
...mediates/javac/debug/classes/com/technototes/library/subsystem/servo/ServoSubsystem.class
Binary file not shown.
Binary file modified
BIN
+118 Bytes
(110%)
...rary/build/intermediates/javac/debug/classes/com/technototes/library/util/MathUtils.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
RobotLibrary/build/intermediates/merged_manifests/debug/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
[{"outputType":{"type":"MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":-1,"enabled":true,"outputFile":"RobotLibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"..\\..\\library_manifest\\debug\\AndroidManifest.xml","properties":{"packageId":"com.technototes.library","split":""}}] | ||
{ | ||
"version": 1, | ||
"applicationId": "com.technototes.library", | ||
"variantType": "LIBRARY", | ||
"elements": [ | ||
{ | ||
"outputType": { | ||
"type": "MERGED_MANIFESTS" | ||
}, | ||
"apkData": { | ||
"type": "MAIN", | ||
"splits": [], | ||
"versionCode": -1, | ||
"outputFile": "RobotLibrary-debug.aar", | ||
"fullName": "debug", | ||
"baseName": "debug", | ||
"dirName": "" | ||
}, | ||
"path": "../../library_manifest/debug/AndroidManifest.xml", | ||
"properties": { | ||
"packageId": "com.technototes.library", | ||
"split": "" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
RobotLibrary/src/main/java/com/technototes/library/measurement/unit/DistanceUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.technototes.library.measurement.unit; | ||
|
||
public class DistanceUnit extends Unit<DistanceUnit.DistanceUnitType> { | ||
|
||
public enum DistanceUnitType { | ||
CENTIMETERS(100), METERS(1), INCHES(39.37008), FEET(3.28084); | ||
public double relation; | ||
|
||
DistanceUnitType(double d) { | ||
relation = d; | ||
} | ||
} | ||
public DistanceUnit(double v, DistanceUnitType t){ | ||
super(v, t); | ||
} | ||
|
||
@Override | ||
public double to(DistanceUnitType type) { | ||
return get()*type.relation; | ||
} | ||
|
||
@Override | ||
public double get() { | ||
return (value/((DistanceUnitType)unitType).relation); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
RobotLibrary/src/main/java/com/technototes/library/measurement/unit/RotationUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.technototes.library.measurement.unit; | ||
|
||
public class RotationUnit extends Unit<RotationUnit.RotationUnitType> { | ||
|
||
public enum RotationUnitType { | ||
RADIANS(2 * Math.PI), DEGREES(360), ROTATIONS(1); | ||
public double relation; | ||
|
||
RotationUnitType(double d) { | ||
relation = d; | ||
} | ||
} | ||
public RotationUnit(double v, RotationUnitType t){ | ||
super(v, t); | ||
} | ||
|
||
@Override | ||
public double to(RotationUnitType type) { | ||
return get()*type.relation; | ||
} | ||
|
||
@Override | ||
public double get() { | ||
return (value/((RotationUnitType)unitType).relation); | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
RobotLibrary/src/main/java/com/technototes/library/measurement/unit/TimeUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.technototes.library.measurement.unit; | ||
|
||
public class TimeUnit extends Unit<TimeUnit.TimeUnitType> { | ||
|
||
public enum TimeUnitType { | ||
SECONDS(1), MILLISECONDS(1000), MINUTES(60), HOUR(3600); | ||
public double relation; | ||
|
||
TimeUnitType(double d) { | ||
relation = d; | ||
} | ||
} | ||
public TimeUnit(double v, TimeUnitType t){ | ||
super(v, t); | ||
} | ||
|
||
@Override | ||
public double to(TimeUnitType type) { | ||
return get()*type.relation; | ||
} | ||
|
||
@Override | ||
public double get() { | ||
return (value/((TimeUnitType)unitType).relation); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
RobotLibrary/src/main/java/com/technototes/library/measurement/unit/Unit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.technototes.library.measurement.unit; | ||
|
||
public abstract class Unit<D extends Enum<D>> { | ||
public Enum<D> unitType; | ||
public double value; | ||
public Unit(double v, Enum<D> e){ | ||
unitType = e; | ||
value = v; | ||
} | ||
public abstract double to(D d); | ||
public abstract double get(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/strafer/Hardware.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.firstinspires.ftc.teamcode.strafer; | ||
|
||
import com.qualcomm.robotcore.hardware.DcMotor; | ||
import com.qualcomm.robotcore.hardware.HardwareMap; | ||
import com.technototes.library.hardware.motor.Motor; | ||
import com.technototes.library.hardware.sensor.IMU; | ||
import com.technototes.library.logging.Loggable; | ||
import com.technototes.library.structure.HardwareBase; | ||
|
||
public class Hardware extends HardwareBase implements Loggable { | ||
//drive motors | ||
public Motor<DcMotor> flMotor; | ||
public Motor<DcMotor> frMotor; | ||
public Motor<DcMotor> rlMotor; | ||
public Motor<DcMotor> rrMotor; | ||
|
||
public IMU imu; | ||
|
||
public Hardware(HardwareMap hmap){ | ||
flMotor = new Motor<DcMotor>("fl"); | ||
frMotor = new Motor<DcMotor>("fr"); | ||
rlMotor = new Motor<DcMotor>("rl"); | ||
rrMotor = new Motor<DcMotor>("rr"); | ||
|
||
imu = new IMU("imu1"); | ||
|
||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/strafer/OI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.firstinspires.ftc.teamcode.strafer; | ||
|
||
import com.technototes.library.command.CommandScheduler; | ||
import com.technototes.library.command.simple.MecanumDriveCommand; | ||
import com.technototes.library.control.gamepad.CommandGamepad; | ||
import com.technototes.library.structure.OIBase; | ||
import com.technototes.library.subsystem.drivebase.DrivebaseSubsystem; | ||
|
||
public class OI extends OIBase { | ||
|
||
public Robot robot; | ||
|
||
public OI(CommandGamepad g1, CommandGamepad g2, Robot r) { | ||
super(g1, g2); | ||
robot = r; | ||
setDriverControls(); | ||
} | ||
|
||
public void setDriverControls() { | ||
CommandScheduler.getRunInstance().schedule(new MecanumDriveCommand( | ||
robot.drivebaseSubsystem, driverGamepad.leftStick, driverGamepad.rightStick).setFieldCentric(robot.hardware.imu).addRequirements(robot.drivebaseSubsystem)); | ||
driverGamepad.y.toggleWhenActivated(() -> robot.drivebaseSubsystem.setDriveSpeed(DrivebaseSubsystem.Speed.TURBO)) | ||
.toggleWhenDeactivated(() -> robot.drivebaseSubsystem.setDriveSpeed(DrivebaseSubsystem.Speed.TURBO)); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/strafer/Robot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.firstinspires.ftc.teamcode.strafer; | ||
|
||
import com.qualcomm.robotcore.hardware.HardwareMap; | ||
import com.technototes.library.logging.Loggable; | ||
import com.technototes.library.structure.RobotBase; | ||
|
||
import org.firstinspires.ftc.robotcore.external.Telemetry; | ||
import org.firstinspires.ftc.teamcode.newcode.Hardware; | ||
import org.firstinspires.ftc.teamcode.strafer.subsystems.DrivebaseSubsystem; | ||
|
||
public class Robot extends RobotBase implements Loggable { | ||
|
||
public Hardware hardware; | ||
|
||
public DrivebaseSubsystem drivebaseSubsystem; | ||
|
||
|
||
public Robot(HardwareMap h, Telemetry t){ | ||
hardware = new Hardware(h); | ||
drivebaseSubsystem = new DrivebaseSubsystem(hardware.flMotor, hardware.frMotor, hardware.rlMotor, hardware.rrMotor); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/strafer/opmodes/StraferTeleOp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.firstinspires.ftc.teamcode.strafer.opmodes; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | ||
import com.technototes.library.command.simple.MecanumDriveCommand; | ||
import com.technototes.library.logging.Loggable; | ||
import com.technototes.library.structure.TeleOpCommandOpMode; | ||
|
||
import org.firstinspires.ftc.teamcode.strafer.OI; | ||
import org.firstinspires.ftc.teamcode.strafer.Robot; | ||
|
||
|
||
@TeleOp(name = "Strafer TeleOp") | ||
public class StraferTeleOp extends TeleOpCommandOpMode implements Loggable { | ||
public OI oi; | ||
|
||
public Robot robot; | ||
|
||
@Override | ||
public void beginInit() { | ||
robot = new Robot(hardwareMap, telemetry); | ||
oi = new OI(driverGamepad, codriverGamepad, robot); | ||
} | ||
|
||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...e/src/main/java/org/firstinspires/ftc/teamcode/strafer/subsystems/DrivebaseSubsystem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.firstinspires.ftc.teamcode.strafer.subsystems; | ||
|
||
import com.qualcomm.robotcore.hardware.DcMotor; | ||
import com.technototes.library.hardware.motor.Motor; | ||
import com.technototes.library.subsystem.drivebase.MecanumDrivebaseSubsystem; | ||
|
||
public class DrivebaseSubsystem extends MecanumDrivebaseSubsystem { | ||
public DrivebaseSubsystem(Motor flMotor, Motor frMotor, Motor rlMotor, Motor rrMotor) { | ||
super(flMotor, frMotor, rlMotor, rrMotor); | ||
} | ||
} |