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

feat(sensors_plus): Add support for platform timestamp in event #2506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ortes
Copy link

@Ortes Ortes commented Jan 4, 2024

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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (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?

  • [~] Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.
  • The API change but most sensor streams users won't need to change anything (if you don't create events like UserAccelerometerEvent)

@Ortes Ortes changed the title Add support for timestamp in event Android feat(sensors_plus): Add support for timestamp in event Android Jan 4, 2024
@Ortes Ortes marked this pull request as draft January 4, 2024 15:02
@Ortes Ortes changed the title feat(sensors_plus): Add support for timestamp in event Android feat(sensors_plus): Add support for platform timestamp in event Jan 9, 2024
@Ortes Ortes force-pushed the main branch 2 times, most recently from 49f5dfd to ddc9a3c Compare January 9, 2024 22:41
@Ortes Ortes marked this pull request as ready for review January 9, 2024 22:47
BREAKING CHANGE: Now all events have a `DateTime` property `timestamp` as constructor 4th constructor parameter
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.

Consider adding timestamps to sensor events
1 participant