Usb task delta time - #8
Open
dewhisna wants to merge 2 commits into
Open
Conversation
0x00 CTRL-@ through 0x1F CTRL-_ Also return ASCII codes for keys: ESCAPE, DELETE, TAB, and BACKSPACE keys. Return correct code for ENTER and keypad ENTER keys.
… the absolute time from millis(). Changed the definition of "delay" to be the remaining milliseconds to delay rather than the absolute time of the end of the delay. This fixes timer wrapping issues caused when millis() wraps back to 0. And it allows the Task() function to not have be continually called as often when higher priority tasks need to supercede it, and prevents restart delays after an extended period of missed calls to Task().
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix changes the delay time calculations in USBHost::Task() to use a delta time rather than the absolute time from millis(), changing the definition of the 'delay' variable to be the number of milliseconds remaining rather than an absolute time "on the clock".
This resolves two issues:
This change is in conjunction with the discussion for issue #2.