Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

[RFC][Do not merge] Fix keep alive rumble packet congestion #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CTCaer
Copy link

@CTCaer CTCaer commented Feb 6, 2018

Here's a simple way to fix the congestion from the keep alive x10 packets.

This is a reference. Not to be the real solution
The proper way, should have a unified solution that also does not send a real rumble packet in less than 15ms. i do not know how you want to implement it.

In my opinion, it's better to make a threaded SendRumble() that always run on the background and remove it from the Poll() thread. And it should do the following:

  • When amp is 0.0f, sends every 120ms.
  • When amp is >0.0f, sends every 15ms.
  • When amp changes from >0.0f to 0.0f, send it in 15ms from the previous packet and then switch to 120ms wait time.
  • Lastly, it should use one Stopwatch() timer for this job.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant