-
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
Feat/intake #16
Feat/intake #16
Conversation
Initialize intake subsystem file.
subsystem/intake.py
Outdated
def get_no_grab_cube_detected(self): | ||
avg_voltage = self.lower_back_dist_sensor.getVoltage() | ||
return 0.3 < avg_voltage |
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.
Probably dont need this
subsystem/intake.py
Outdated
def eject_piece(self): | ||
self.set_lower_output(-self.intake_speed) | ||
self.set_upper_output(-self.intake_speed) | ||
|
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.
need both
eject_cone(self):...
and
eject_cube(self):...
due to them requiring different methods of ejection.
subsystem/intake.py
Outdated
self.lower_intake_motor.set_raw_output(speed) | ||
|
||
def grab_cube(self): | ||
self.set_lower_output(self.intake_speed) |
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.
this is fine for now, but just know you might need to include that upper motor to control. I would refer to the videos i sent you.
subsystem/intake.py
Outdated
|
||
def get_cube_detected(self): | ||
avg_voltage = self.lower_back_dist_sensor.getVoltage() | ||
return 0.7 < avg_voltage |
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.
make sure to take the distance sensor values and put them into the config file
command/intake.py
Outdated
|
||
|
||
class SetIntake(SubsystemCommand[Intake]): | ||
def __init__(self, subsystem: Intake, intake_active: bool, go_cube: bool, go_cone: bool): |
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.
Instead of go_cube
and go_cone
, use a dictionary like
game_piece
and in constants:
game_piece = { 'cone':0 'cube':1 }
then use this inside the command
command/intake.py
Outdated
|
||
|
||
class SetIntake(SubsystemCommand[Intake]): | ||
def __init__(self, subsystem: Intake, intake_active: bool, go_cube: bool, go_cone: bool): |
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.
also when you implement the wrist functionality, make sure to add it to this command and not create a new one, since we can only run one command per subsystem at a time
No description provided.