forked from acmerobotics/road-runner-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
origin/drive_testing #1
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
Open
brendafink
wants to merge
12
commits into
master
Choose a base branch
from
drive_testing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
whitehml
reviewed
Dec 1, 2025
whitehml
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick 5 min look, just a few comments, not an exhaustive review.
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
Outdated
Show resolved
Hide resolved
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
Outdated
Show resolved
Hide resolved
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
Outdated
Show resolved
Hide resolved
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
Thanks, Michael. And yes, we do have a native 1800 5-turn servo per Jeff.
He gave it to me and it's on our cart to be installed.
Brenda
…On Monday, December 1, 2025, Michael Whitehurst ***@***.***> wrote:
***@***.**** commented on this pull request.
Took a quick 5 min look, just a few comments, not an exhaustive review.
------------------------------
In TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
<#1 (comment)>
:
> + double RampUpTimer = 0;
+ boolean ShooterFlag = false;
convention would be to use lower-case to start variables, i.e. rampUpTimer
& shooterFlag. Starting with upper-case is reserved for classes, like MecanumDrive,
Servo, DCMotor, Pose2d, etc.
------------------------------
In TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
<#1 (comment)>
:
> + }
+//------------------CODE FOR WHEN THE TRIGGERS ARE PRESSED----------------------------------
+
+ if ((gamepad2.left_trigger > 0.25) && (gamepad2.right_trigger < .01)) {
+ if (ShooterFlag == false) {
+ ShooterFlag = true;
+ RampUpTimer = getRuntime() + 2;//set a timer to the length of time the op has been running + 2 seconds
+ shooter.setPower(.6);//ramp up the shooter
+ }
+ //check to see if the shooter has ramped up for the required number of seconds.
+ //if so, reapply power, advance carousel, engage teardrop, reset teardrop,
+ //and count how many times the carousel has advanced (at 3, reset it to original position)
+ if (ShooterFlag == true) {
+ if (getRuntime() > RampUpTimer) {
+ if (carouselCounter < 5) {
+ shooter.setPower(.6);
If this line is needed, which i'm not 100% sure it is, you'd want it to
happen every cycle (i.e. between if (shooterFlag == true) { & if
(getRuntime() > rampUpTimer) {)
------------------------------
In TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
<#1 (comment)>
:
> + ShooterFlag = true;
+ RampUpTimer = getRuntime() + 2;//set a timer to the length of time the op has been running + 2 seconds
+ shooter.setPower(.6);//ramp up the shooter
+ }
+ //check to see if the shooter has ramped up for the required number of seconds.
+ //if so, reapply power, advance carousel, engage teardrop, reset teardrop,
+ //and count how many times the carousel has advanced (at 3, reset it to original position)
+ if (ShooterFlag == true) {
+ if (getRuntime() > RampUpTimer) {
+ if (carouselCounter < 5) {
+ shooter.setPower(.6);
+ //add code to advance carousel by 120 degrees
+
+ //carousel.flipShooterServo();
+ //carousel.unflipShooterServo();
+ carouselCounter++;
The shooterFlag needs to be reset at some point or carouselCounter will
blow past 5 in the first few miliseconds of rampUpTimer being exceeded.
------------------------------
In TeamCode/src/main/java/org/firstinspires/ftc/teamcode/SpiritTeleop.java
<#1 (comment)>
:
> + if (getRuntime() > RampUpTimer) {
+ if (carouselCounter < 5) {
+ shooter.setPower(.6);
+ //add code to advance carousel by 120 degrees
+
+ //carousel.flipShooterServo();
+ //carousel.unflipShooterServo();
+ carouselCounter++;
+ } else {
+ //add code to reset carousel to original position
+ }
+//this is a loop to make the code "wait" until the require number of seconds has passed (if statement cannot be empty so we gave it a task to do
+ // else {
+ // i = i++;
+ }else {
+ i=i++;
i++ is already shorthand for i = i + 1
—
Reply to this email directly, view it on GitHub
<#1 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDNALE5QYYM2HXFSJTCYSQL37RSVXAVCNFSM6AAAAACNUHKOZCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTKMRVGY3TAMJXGE>
.
You are receiving this because you authored the thread.Message ID:
<Mars-Robotics-Association/Spirit-quickstart/pull/1/review/3525670171@
github.com>
--
Brenda Fink
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before issuing a pull request, please see the contributing page.