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

Make time provider independent of PWM abstraction #133

Merged

Conversation

jandelgado
Copy link
Owner

@jandelgado jandelgado commented Jan 2, 2025

move time providing function to separate class.

Since a platform can have multiple PWM-HALs (e.g. the one provided by
the platform, and additional ones like e.g. a PCA9685 HAL), but only
a single time provider, the code was split.

Each platform now has it's own time providing class, like e.g.
class ArduinoClock. An implementation consists of a
single static method: static uint32_t millis() that returns the
current time in millis.

This introduces a breaking change when client code uses a custom HAL.

Since a platform can have multiple PWM-HALs (e.g. the one provided by
the platform, and additional ones like e.g. a PCA9685 HAL), but only
a single time provider, the code was split.

Each platform now has it's own time providing class, like e.g.
`class ArduinoClock`. An implementation consists of a
single static method: `static uint32_t millis()` that returns the
current time in millis.
@jandelgado jandelgado changed the base branch from master to version_5_rc0 January 2, 2025 17:18
@jandelgado jandelgado force-pushed the make_time_provider_independent_of_pwm_abstraction branch from f24cdb2 to de5d87b Compare January 2, 2025 17:26
@jandelgado jandelgado merged commit 394e176 into version_5_rc0 Jan 2, 2025
3 checks passed
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