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

Usb task delta time #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dewhisna
Copy link

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:

  1. Calculation issues when the millis() clock rolls over to 0, which previously caused the comparison between delay and millis() to yield incorrect results.
  2. Long USB I/O delays caused when Task() isn't called sufficiently often enough.

This change is in conjunction with the discussion for issue #2.

bbx10 and others added 2 commits February 13, 2016 10:10
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().
@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ dewhisna
❌ bbx10
You have signed the CLA already but the status is still pending? Let us recheck it.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants