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

Enable Rumble FF Autofire #12

Closed
wants to merge 2 commits into from

Conversation

lemmingDev
Copy link
Contributor

Rumble works exactly as before except for the addition of a new Rumble FF Autofire feature.

If Autofire is disabled, nothing changes. If you are pointing at the screen, a single pulse is sent to the rumble motor on trigger pull that lasts for a specified duration at a specified strength

If Autofire is enabled however, and you are pointing on screen, the motor will activate and the specified strength until you release the trigger.

This feature was added to make games that use Autofire mode much more enjoyable when Rumble FF is used (if you don't have a solenoid, or you simply want quieter feedback as not to annoy those around you)

} else if(rumbleHappened) { // If rumble has happened,
rumbleHappened = false; // well we're clear now that we've stopped holding.

// If Rumble FF is enabled and Autofire is enabled, the motor needs to be disabled when the trigger is released. Otherwiseallow RumbleActivation to deal with the activation timer
Copy link
Member

Choose a reason for hiding this comment

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

"Otherwiseallow?" I think your typing was on autofire for a bit there.

digitalWrite(SamcoPreferences::pins.oRumble, LOW); // Make sure the rumble is OFF.
rumbleHappening = false; // This rumble command is done now.
rumbleHappened = true; // And just to make sure, to prevent holding == repeat rumble commands.
if(!SamcoPreferences::toggles.autofireActive) { // We only want to use the rumble timer is Autofire is not active. Otherwise, keep it going
Copy link
Member

Choose a reason for hiding this comment

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

I think you meant "We only want to use the rumble timer if Autofire is not active. ..."

@SeongGino
Copy link
Member

I should also ask, as this was part of the app side PR to go along with this:

Solenoid timings are respected, so adjusting those adjust the rumble motor behaviour.

How so? It doesn't seem as if these changes even touches solenoid values for rumble FF.

@lemmingDev
Copy link
Contributor Author

My bad - I wrote that when I first thought of how it would work (option 1) before deciding to go with another method (option 2)
Will submit a new one

@SeongGino
Copy link
Member

Closing in favor of #13

@SeongGino SeongGino closed this Jul 4, 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.

2 participants