-
Notifications
You must be signed in to change notification settings - Fork 4
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
New Glacier Peak Harvester #87
Open
RyanOlney
wants to merge
7
commits into
Spartronics4915:master
Choose a base branch
from
RyanOlney:master
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
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3819095
Merge branch 'master' of https://github.com/Spartronics4915/2018-POWERUP
RyanOlney 44a32ce
Added Bling stuff to buttons
RyanOlney d10a5f5
Merge branch 'master' of https://github.com/Spartronics4915/2018-POWERUP
RyanOlney 4c5d82e
Merge branch 'master' of https://github.com/Spartronics4915/2018-POWERUP
RyanOlney 61b3d68
Merge branch 'master' of https://github.com/Spartronics4915/2018-POWERUP
RyanOlney 092e131
new harvester code
RyanOlney 51979f9
dded harvester code for additional pneumatics
RyanOlney 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ public class Constants extends ConstantsBase | |
public static final int kHarvesterLeftMotorId = kUseTestbedConstants ? 18 : 8; | ||
public static final int kHarvesterRightMotorId = kUseTestbedConstants ? 16 : 9; | ||
|
||
public static final int kNumTalons = 8; // total talon count on robot (not testbed) | ||
public static final int kNumTalons = 9; // total talon count on robot (not testbed) | ||
|
||
public static final int kNumPDPs = 1; // doesn't always show up in CANProbe | ||
public static final int kNumPCMs = 1; // Pressure control module (pneumatics) | ||
|
@@ -52,7 +52,8 @@ public class Constants extends ConstantsBase | |
public static final int kScissorBrakeSolenoidId = 2; //PCM 0 | ||
public static final int kGrabberSetupSolenoidId = 3; //PCM 0 | ||
public static final int kGrabberSolenoidId = 4; //PCM 0 | ||
public static final int kHarvesterSolenoidId = 5; //PCM 0 | ||
public static final int kHarvesterSolenoid1Id = 5; //PCM 0 | ||
public static final int kHarvesterSolenoid2Id = 8; //PCM 0 | ||
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. verify |
||
public static final int kClimberStabilizationSolenoidId1 = 6; //PCM 0 | ||
public static final int kClimberStabilizationSolenoidId2 = 7; //PCM 0 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,7 +268,10 @@ public void teleopInit() | |
|
||
mEnabledLooper.start(); // starts subsystem loopers. | ||
mDrive.setOpenLoop(DriveSignal.NEUTRAL); | ||
|
||
mLED.setVisionLampOn(); | ||
mLED.setBlingState(BlingState.SOLID); | ||
mLED.setBlingState(BlingState.BLUE); | ||
mLED.setVisionLampOff(); // Vision not used in teleop yet TODO | ||
mLED.setVisionLampOn(); // Vision not used in teleop yet TODO | ||
} | ||
catch (Throwable t) | ||
|
@@ -301,19 +304,22 @@ public void teleopPeriodic() | |
{ | ||
mLifter.setWantedState(ScissorLift.WantedState.OFF); | ||
mGrabber.setWantedState(ArticulatedGrabber.WantedState.TRANSPORT); | ||
mLED.setBlingState(BlingState.SCISSOR_OFF); | ||
mLED.setBlingState(BlingState.SOLID); | ||
mLED.setBlingState(BlingState.YELLOW); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.SCISSOR_SWITCH)) | ||
{ | ||
mLifter.setWantedState(ScissorLift.WantedState.SWITCH); | ||
mLED.setBlingState(BlingState.SCISSOR_SWITCH); | ||
mLED.setBlingState(BlingState.BLINK); | ||
mLED.setBlingState(BlingState.YELLOW); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.SCISSOR_SCALE)) | ||
{ | ||
mLifter.setWantedState(ScissorLift.WantedState.SCALE); | ||
mLED.setBlingState(BlingState.SCISSOR_SCALE); | ||
mLED.setBlingState(BlingState.FAST_BLINK); | ||
mLED.setBlingState(BlingState.YELLOW); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.GRABBER_DROP_CUBE)) | ||
|
@@ -328,37 +334,51 @@ public void teleopPeriodic() | |
else | ||
mGrabber.setWantedState(ArticulatedGrabber.WantedState.MANUAL_OPEN); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.HARVESTER_OPEN)) | ||
{ | ||
mHarvester.setWantedState(Harvester.WantedState.OPEN); | ||
mLED.setBlingState(BlingState.OPEN_HARVESTER); | ||
mHarvester.setWantedState(Harvester.WantedState.FULLOPEN); | ||
mLED.setBlingState(BlingState.SOLID); | ||
mLED.setBlingState(BlingState.BLUE); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.HARVESTER_CLOSE)) | ||
{ | ||
mHarvester.setWantedState(Harvester.WantedState.HARVEST); | ||
mLED.setBlingState(BlingState.CLOSE_HARVESTER); | ||
mLED.setBlingState(BlingState.BLINK); | ||
mLED.setBlingState(BlingState.BLUE); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.HARVESTER_PARTIALLY_CLOSE)) | ||
{ | ||
mHarvester.setWantedState(Harvester.WantedState.PARTIALLYCLOSE); | ||
mLED.setBlingState(BlingState.BLINK); | ||
mLED.setBlingState(BlingState.BLUE); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.HARVESTER_EJECT)) | ||
{ | ||
mHarvester.setWantedState(Harvester.WantedState.EJECT); | ||
mLED.setBlingState(BlingState.EJECT_HARVESTER); | ||
mLED.setBlingState(BlingState.FAST_BLINK); | ||
mLED.setBlingState(BlingState.BLUE); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.SUPERSTRUCTURE_CARRY_CUBE)) | ||
{ | ||
mSuperstructure.setWantedState(Superstructure.WantedState.TRANSFER_CUBE_TO_GRABBER); | ||
mLED.setBlingState(BlingState.CARRY_CUBE); | ||
mLED.setBlingState(BlingState.BLINK); | ||
mLED.setBlingState(BlingState.GREEN); | ||
} | ||
|
||
if (mControlBoard.readButton(Buttons.CLIMBER_TOGGLE)) | ||
{ | ||
mSuperstructure.setWantedState(Superstructure.WantedState.CLIMB); | ||
mLED.setBlingState(BlingState.SOLID); | ||
mLED.setBlingState(BlingState.RED); | ||
if (mClimber.getWantedState() == Climber.WantedState.CLIMB) | ||
{ | ||
mClimber.setWantedState(Climber.WantedState.HOLD); | ||
mLED.setBlingState(BlingState.STOP_CLIMBER); | ||
// mLED.setBlingState(BlingState.STOP_CLIMBER); | ||
} | ||
else | ||
{ | ||
|
@@ -369,6 +389,9 @@ public void teleopPeriodic() | |
|
||
if (mControlBoard.readButton(Buttons.GRABBER_FAST_OPEN)) | ||
{ | ||
mClimber.setWantedState(Climber.WantedState.HOLD); | ||
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. dont set climber state |
||
mLED.setBlingState(BlingState.BLINK); | ||
mLED.setBlingState(BlingState.RED); | ||
mGrabber.setWantedState(ArticulatedGrabber.WantedState.FAST_OPENED); | ||
} | ||
|
||
|
@@ -415,6 +438,7 @@ else if (SmartDashboard.getString("CameraView", "").equals("LiftCam")) | |
mGrabber.setWantedState(ArticulatedGrabber.WantedState.PREPARE_INTAKE); | ||
} | ||
|
||
|
||
// Drive control buttons | ||
if (mControlBoard.readButton(Buttons.VISION_CUBE_HARVEST)) | ||
{ | ||
|
@@ -428,14 +452,14 @@ else if (SmartDashboard.getString("CameraView", "").equals("LiftCam")) | |
} | ||
|
||
// Bling settings | ||
if (DriverStation.getInstance().getMatchTime() < kMatchDurationSeconds) | ||
/* if (DriverStation.getInstance().getMatchTime() < kMatchDurationSeconds) | ||
{ | ||
mLED.setBlingState(BlingState.TELEOP); | ||
} | ||
if (DriverStation.getInstance().getMatchTime() < kEndgameDurationSeconds) | ||
{ | ||
mLED.setBlingState(BlingState.ENDGAME); | ||
} | ||
} */ | ||
allButTestPeriodic(); | ||
} | ||
catch (Throwable t) | ||
|
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
Oops, something went wrong.
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.
verify