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

Insteon: Self Adjusting Hop Count #62

Merged
merged 5 commits into from
Feb 15, 2013
Merged

Conversation

krkeegan
Copy link
Collaborator

@krkeegan krkeegan commented Feb 8, 2013

This tracks the number of hops required for the last 10 messages and uses the highest hop count of those 10 as the default_hop_count.

If a message requires resending, the hop count is immediately increased by 1, that increased hop count is tossed into the array and will last for 10 subsequent messages.

I have found this and all of my other corruption corrections to result in a very reliable system.

Add hop_history function which adds a hop count to an array of a maximum length of 10.  Then takes the highest hop value from the history and sets it as the default_hop_count.

In addition, anytime a message needs to be resent, the default hop count is immediately bumped up by 1.  Previously if default_hops was at 2 it required 2 failures before bumping the hop count to 3.  The default hop count is bumped up by adding a hop count of that value to the hop history.

This results in the value of default_hop as being the highest hop count needed for the last 10 sent or received messages.
Oops, hop_tracking is not enabled for PLM
No need to have a seperate function for this.

The array system seems to work very well.
krkeegan added a commit that referenced this pull request Feb 15, 2013
Insteon: Self Adjusting Hop Count
@krkeegan krkeegan merged commit 875a262 into hollie:master Feb 15, 2013
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.

1 participant