Skip to content

Stage 1A Solution CTRE#34

Open
Spaceman113138 wants to merge 11 commits into
frcsoftware:mainfrom
Spaceman113138:Stage1A-CTRE
Open

Stage 1A Solution CTRE#34
Spaceman113138 wants to merge 11 commits into
frcsoftware:mainfrom
Spaceman113138:Stage1A-CTRE

Conversation

@Spaceman113138

Copy link
Copy Markdown

For #29

Solution for Stage 1A - Mostly a copy of #24 but with formating added and replacing any rev motors with ctre.

Comment thread stage1/ctre/solution/src/main/java/first/robot/Robot.java Outdated
@Spaceman113138

Copy link
Copy Markdown
Author

@ArchdukeTim is this what you were looking for as far as using timer?

*/
@Override
public void periodic() {
if (!autoTimer.hasElapsed(4.0)) { // Drive for 4 seconds after the start of auto

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah this is better. It might read better if you invert the if statement:

if (hasElapsed(4) {
  stop the drivetrain
} else {
  drive forward
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yeah that reads better

@DylanB5402 DylanB5402 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For CTRE, we should use their Sim API directly. You can look at my 2026 version of this PR for reference: #8

I rolled a custom sim impl for REV because their sim is broken right now, but CTRE's should be working

@DylanB5402

DylanB5402 commented Jun 19, 2026

Copy link
Copy Markdown
Member

@Spaceman113138 we're going to update #24 to be a little more accurate to the actual kitbot - I'll work that out in my PR and we can port them over here after

@DylanB5402

Copy link
Copy Markdown
Member

@Spaceman113138

Can you make the same updates I did in #24 here? rename the mechanisms and update the teleop controls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants