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

Add Uptake Sensor #155

Closed
wants to merge 6 commits into from
Closed

Add Uptake Sensor #155

wants to merge 6 commits into from

Conversation

linglejack06
Copy link
Member

@linglejack06 linglejack06 commented Mar 7, 2024

Summary: add sensor to uptake to prevent intake from running with note already in. This will prevent tech fouls.

Changes:

  • add time of flight sensor library from playingWithFusion
  • add Time of Flight sensor to IntakeIOSparkMax class
  • add boolean supplier for intake to check if note in shooter deck
  • add check in idle mode (don't set intake action if note is sensed in uptake)
  • add check in reversing state for note in shooter deck (if so run belt backwards)

Resolves #149

@linglejack06 linglejack06 self-assigned this Mar 7, 2024
@honzikschenk
Copy link
Collaborator

@linglejack06 Could you please put the ToF sensor in the intake io instead of making a new sensor io?

This is my personal opinion though, what do you think @jkleiber?

@jkleiber
Copy link
Member

jkleiber commented Mar 7, 2024

I agree, let's put it in the Intake IO if possible

@linglejack06
Copy link
Member Author

Yeah I'll change that

@jkleiber
Copy link
Member

jkleiber commented Mar 9, 2024

@wrob3rts just fyi: if you figure out how to interface with the sensor, this is the relevant PR

@linglejack06 linglejack06 marked this pull request as ready for review March 11, 2024 22:38
@linglejack06 linglejack06 requested a review from jkleiber March 11, 2024 23:16
@jkleiber
Copy link
Member

@linglejack06 on Saturday we saw that the Time of Flight sensor was causing weird problems on the kit bot. Apparently other teams have seen it take 30+% more CPU usage when it is in use as well.

I think we are going to add a banner sensor or a beam break to the uptake. @PChild probably has more details, but let's create a separate branch for a PR that uses a banner sensor instead and keep this PR in our pocket in case the ToF sensor comes back in scope

@linglejack06
Copy link
Member Author

okay ill add that PR shortly.

@PChild
Copy link
Member

PChild commented Mar 13, 2024

We got one of the beam breaks installed today in the shooter deck for indexing, its working well and was drop in replace from the banner sensor. I think we can go ahead and close this PR and just go with #163

@PChild
Copy link
Member

PChild commented Mar 13, 2024

Closing this one in favor of #163 feel free to re-open if we need this for some reason.

@PChild PChild closed this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate note sensor in uptake and prevent multiple note intake
4 participants