-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
…FF mode if Autofire is enabled
} 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 |
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.
"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 |
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.
I think you meant "We only want to use the rumble timer if Autofire is not active. ..."
I should also ask, as this was part of the app side PR to go along with this:
How so? It doesn't seem as if these changes even touches solenoid values for rumble FF. |
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) |
Closing in favor of #13 |
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)