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

Feat/intake #16

Merged
merged 11 commits into from
Sep 17, 2023
Merged

Feat/intake #16

merged 11 commits into from
Sep 17, 2023

Conversation

Inspirol
Copy link
Contributor

No description provided.

@Inspirol Inspirol added the enhancement New feature or request label Jul 29, 2023
@Inspirol Inspirol requested a review from gmsong06 July 29, 2023 23:17
This was linked to issues Jul 29, 2023
Comment on lines 35 to 37
def get_no_grab_cube_detected(self):
avg_voltage = self.lower_back_dist_sensor.getVoltage()
return 0.3 < avg_voltage
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably dont need this

Comment on lines 64 to 67
def eject_piece(self):
self.set_lower_output(-self.intake_speed)
self.set_upper_output(-self.intake_speed)

Copy link
Contributor Author

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.

self.lower_intake_motor.set_raw_output(speed)

def grab_cube(self):
self.set_lower_output(self.intake_speed)
Copy link
Contributor Author

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.


def get_cube_detected(self):
avg_voltage = self.lower_back_dist_sensor.getVoltage()
return 0.7 < avg_voltage
Copy link
Contributor Author

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



class SetIntake(SubsystemCommand[Intake]):
def __init__(self, subsystem: Intake, intake_active: bool, go_cube: bool, go_cone: bool):
Copy link
Contributor Author

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



class SetIntake(SubsystemCommand[Intake]):
def __init__(self, subsystem: Intake, intake_active: bool, go_cube: bool, go_cone: bool):
Copy link
Contributor Author

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

@Inspirol Inspirol marked this pull request as ready for review September 17, 2023 18:50
@Inspirol Inspirol merged commit 52e07c1 into dev Sep 17, 2023
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

testing intake subsystem structure intake subsystem
3 participants