Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #84 from rh-robotics/teo-teleop-updates
Browse files Browse the repository at this point in the history
TeleOp Changes & RobotComponents Update to include servos
  • Loading branch information
DragonDev07 authored Feb 1, 2024
2 parents 36ca854 + 1d5a693 commit 61363ac
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 349 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.firstinspires.ftc.teamcode.auton;

import static java.lang.Thread.sleep;

import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;

Expand All @@ -10,7 +8,7 @@
/**
* Main Autonomous OpMode for the robot
*/
@Autonomous (name = "Sleepy")
@Autonomous(name = "Sleepy")
public class SimpleParkAuton extends OpMode {
HWC robot;
String color = "red";
Expand All @@ -36,8 +34,11 @@ public void init() {
@Override
public void init_loop() {
if (robot.currentGamepad1.a && !robot.previousGamepad1.a) {
if (color.equals("red")) { color = "blue"; }
else if (color.equals("blue")) { color = "red"; }
if (color.equals("red")) {
color = "blue";
} else if (color.equals("blue")) {
color = "red";
}
}

telemetry.addData("Status", "Initialized");
Expand All @@ -49,7 +50,7 @@ public void init_loop() {
public void start() {
robot.betterSleep(10000);

if(color.equals("red")) {
if (color.equals("red")) {
robot.leftFront.setPower(-2);
robot.leftRear.setPower(2);
robot.rightFront.setPower(-2);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.firstinspires.ftc.teamcode.auton;

import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;

import org.firstinspires.ftc.teamcode.subsystems.HWC;

@Autonomous
public class SlidesUpDown extends LinearOpMode {
HWC robot;

@Override
public void runOpMode() throws InterruptedException {
robot = new HWC(hardwareMap, telemetry);

waitForStart();
while (opModeIsActive()) {

robot.powerSlides(1);
robot.betterSleep(1750);
robot.powerSlides(-1);
robot.betterSleep(1750);
}
}
}
Loading

0 comments on commit 61363ac

Please sign in to comment.