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

Consolidate sensor read cycle timing into a single variable/method #104

Open
ZavenArra opened this issue Oct 21, 2022 · 0 comments
Open
Assignees

Comments

@ZavenArra
Copy link
Contributor

ZavenArra commented Oct 21, 2022

Currently the Sensor base class exposes two functions involved in setting the length of the sensor read cycle:

virtual unsigned int millisecondsUntilNextReadingAvailable();

virtual unsigned int millisecondsUntilNextRequestedReading();

Instead, we want to consolidate this logic into a single function. The developer implementing the driver can determine if the read cycle length is an unchangeable parameter of the sensor itself (as in a digital sensor), or configurable by the user (as might be useful for an analog sensor). If the parameter is configurable by the user, then the developer implementing the driver is tasked with determining that the value requested is in a valid range.

@ZavenArra ZavenArra self-assigned this Oct 21, 2022
@ZavenArra ZavenArra moved this to Priority in RRIV General Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Priority
Development

No branches or pull requests

1 participant