-
Notifications
You must be signed in to change notification settings - Fork 0
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
Indexer two motors (belt) #19
Open
aze12345
wants to merge
8
commits into
main
Choose a base branch
from
indexer-two-motors
base: main
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
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9d0057a
made indexer off command
amrrao 071ecd8
made indexer commands
amrrao 5c649ed
Added indexer off and on commands
amrrao 1161415
added on and off indexer commands
amrrao 7f09421
made requested changes to indexer commands
amrrao d1813bb
broken indexer
aze12345 ae1c8fc
fixed indexer two motor
aze12345 19103fa
added indexer reverse command
aze12345 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
43 changes: 0 additions & 43 deletions
43
src/main/java/org/usfirst/frc4904/robot/commands/ExampleCommand.java
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/main/java/org/usfirst/frc4904/robot/commands/indexer/IndexerOff.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,20 @@ | ||
package org.usfirst.frc4904.robot.commands.indexer; | ||
|
||
import org.usfirst.frc4904.robot.RobotMap; | ||
import org.usfirst.frc4904.standard.commands.motor.MotorIdle; | ||
|
||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; | ||
|
||
|
||
public class IndexerOff extends ParallelCommandGroup { | ||
|
||
/** | ||
* Set indexer motor speed to zero | ||
*/ | ||
public IndexerOff() { | ||
this.addCommands( | ||
new MotorIdle(RobotMap.Component.indexer.indexerMotor1), | ||
new MotorIdle(RobotMap.Component.indexer.indexerMotor2) | ||
); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/usfirst/frc4904/robot/commands/indexer/IndexerOn.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,9 @@ | ||
package org.usfirst.frc4904.robot.commands.indexer; | ||
|
||
import org.usfirst.frc4904.robot.subsystems.Indexer; | ||
|
||
public class IndexerOn extends IndexerSet { | ||
public IndexerOn() { | ||
super(Indexer.DEFAULT_INDEXER_SPEED, Indexer.DEFAULT_INDEXER_SPEED); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/usfirst/frc4904/robot/commands/indexer/IndexerSet.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,14 @@ | ||
package org.usfirst.frc4904.robot.commands.indexer; | ||
import org.usfirst.frc4904.robot.RobotMap; | ||
import org.usfirst.frc4904.standard.commands.motor.MotorConstant; | ||
import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; | ||
|
||
|
||
public class IndexerSet extends ParallelCommandGroup { | ||
public IndexerSet(double speed1, double speed2) { | ||
this.addCommands( | ||
new MotorConstant(RobotMap.Component.indexer.indexerMotor1, speed1), | ||
new MotorConstant(RobotMap.Component.indexer.indexerMotor2, speed2) | ||
); | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
src/main/java/org/usfirst/frc4904/robot/subsystems/ExampleSubsystem.java
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/main/java/org/usfirst/frc4904/robot/subsystems/Indexer.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,19 @@ | ||
// Copyright (c) FIRST and other WPILib contributors. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the WPILib BSD license file in the root directory of this project. | ||
|
||
package org.usfirst.frc4904.robot.subsystems; | ||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
import org.usfirst.frc4904.standard.subsystems.motor.Motor; | ||
|
||
|
||
public class Indexer extends SubsystemBase { | ||
|
||
public static final double DEFAULT_INDEXER_SPEED = .5; //TODO: Set value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
public final Motor indexerMotor1; | ||
public final Motor indexerMotor2; | ||
public Indexer(Motor indexerMotor1, Motor indexerMotor2) { | ||
this.indexerMotor1 = indexerMotor1; | ||
this.indexerMotor2 = indexerMotor2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check indentation here |
||
} | ||
} |
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.
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.
inconsistent indentation amount—4 spaces per tab is probably better here than two spaces per tab