This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* starting intake because nothing else for me to do * starting intake because nothing else for me to do * updating Pipfile.lock * adding encoders * added intaking command * beginings of pid * fixing SwerveControllerCommand * buttons work now * added commands and update incase we aren't quick enough when building to not relie sololy on pid * fixed isse with crashing when pressinng button * updating pipenv to be congruent with main * fixing black formating * adding the limit switches to the intake to allow intake only when its not * put intake on network tables * add pyproject.toml * fix conversion factor * add debug statements to intakesuck command * run the command correctly >:( * typing in intake suck @\kredcool * log intake limit switch * make intake invert correctly and move correctly * intake works well**** * moving the intake works * Update rio/constants.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update rio/subsystems/intake.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update rio/subsystems/intake.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * updating makefile to not have skips --------- Co-authored-by: kredcool <[email protected]> Co-authored-by: dublUayaychtee <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9b5326e
commit 821a6a4
Showing
11 changed files
with
265 additions
and
19 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,27 @@ | ||
import commands2 | ||
|
||
from subsystems.intake import IntakeSubsystem | ||
|
||
|
||
class IntakeRotationMAN(commands2.Command): | ||
def __init__(self, angle: float, subsystem): | ||
""" | ||
allows people to rotate the intake | ||
""" | ||
super().__init__() | ||
|
||
# local subsystem instance | ||
self.intakeSubsystem = subsystem | ||
|
||
# requested speed | ||
self.angle = angle | ||
|
||
# TODO change current limit later in amps | ||
self.intakeSubsystem.liftCurrentLimit(1) | ||
|
||
def execute(self): | ||
self.intakeSubsystem.manualLift(self.angle) | ||
|
||
def end(self, interrupted: bool): | ||
self.intakeSubsystem.manualLift(0) | ||
return True |
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,29 @@ | ||
import commands2 | ||
|
||
from subsystems.intake import IntakeSubsystem | ||
|
||
|
||
class IntakeRotationPID(commands2.Command): | ||
def __init__(self, angle, subsystem): | ||
""" | ||
rotates the intake | ||
supposed to be used with | ||
presets | ||
""" | ||
super().__init__() | ||
|
||
# local subsystem instance | ||
self.intakeSubsystem = subsystem | ||
|
||
# requested speed | ||
self.angle = angle | ||
|
||
# TODO change current limit later in amps | ||
self.intakeSubsystem.liftCurrentLimit(1) | ||
|
||
def initialize(self): | ||
self.intakeSubsystem.lift(self.angle) | ||
|
||
def end(self, interrupted: bool): | ||
self.intakeSubsystem.lift(0) | ||
return True |
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,27 @@ | ||
import commands2 | ||
|
||
from subsystems.intake import IntakeSubsystem | ||
|
||
|
||
class IntakeSuck(commands2.Command): | ||
def __init__(self, speed: float, subsystem: IntakeSubsystem): | ||
""" | ||
takes in the rings | ||
""" | ||
super().__init__() | ||
|
||
# local subsystem instance | ||
self.intakeSubsystem = subsystem | ||
|
||
# requested speed | ||
self.speed = speed | ||
|
||
# TODO change current limit later in amps | ||
self.intakeSubsystem.intakeCurrentLimit(30) | ||
|
||
def execute(self): | ||
self.intakeSubsystem.intake(self.speed) | ||
|
||
def end(self, interrupted: bool): | ||
self.intakeSubsystem.intake(0) | ||
return True |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Use this configuration file to control what RobotPy packages are installed | ||
# on your RoboRIO | ||
# | ||
|
||
[tool.robotpy] | ||
|
||
# Version of robotpy this project depends on | ||
robotpy_version = "2024.2.1.1" | ||
|
||
# Which extra RobotPy components should be installed | ||
# -> equivalent to `pip install robotpy[extra1, ...] | ||
robotpy_extras = [ | ||
# "all", | ||
# "apriltag", | ||
"commands2", | ||
"cscore", | ||
"navx", | ||
# "pathplannerlib", | ||
# "phoenix5", | ||
# "phoenix6", | ||
# "playingwithfusion", | ||
"rev", | ||
# "romi", | ||
# "sim", | ||
# "xrp", | ||
] | ||
|
||
# Other pip packages to install | ||
requires = [] |
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
Oops, something went wrong.