-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
feat(sensors_plus)!: Add support for platform timestamp in event #2506
Conversation
49f5dfd
to
ddc9a3c
Compare
I know this has been opened since January, I will see if I can get it merged. |
BREAKING CHANGE: Now all events have a `DateTime` property `timestamp` as constructor 4th constructor parameter
I carefully rebased on main but not test it |
I've added the timestamp value to the Barometer events. As well, updated the example project to use the provided timestamp to calculate the refresh interval. I did change the swift code, but I was on Linux so it is probably wrong, need to fix on my Mac. Overall, the feature looks good to me. I still want to test on iOS when possible. |
Ok, so my iPhone 12 Mini doesn't have a barometer sensor, but compilation works, so.... 🤷 let's go! |
Description
Add timestamp to events from plateform instead of using DateTime.now() at event arrival that can suffer from jitter.
This can be useful to make fft or signal analysis.
I would start this PR as a discussion about the usefulness of this feature or how to implement it
I will provide the iOS implementation in the next few days
Related Issues
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!
in the title as explained in Conventional Commits).UserAccelerometerEvent
)