Skip to content
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

Added base intake class #18

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions components/intake.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from magicbot import tunable


class Motor:
shoot_speed = tunable(1.0) # speed is tunable via NetworkTables

def __init__(self) -> None:
self.deployed = False

def deploy(self) -> None:
self.deployed = True

def is_ready(self) -> bool:
# Check if the motor is ready to shoot
return True

def is_note_present(self) -> bool:
# Check if the note is in the intake
return False

def is_fully_retracted(self) -> bool:
# Check if the intake is fully retracted
return True

def is_fully_deployed(self) -> bool:
# Check if the intake is fully deployed
return False

def execute(self) -> None:
if self.deployed:
# set the motor to the shoot_speed
pass
else:
# set the motor speed to 0
pass
self.deployed = False