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

Add support for the Current Time Service #28

Merged
merged 1 commit into from
May 17, 2024

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented May 17, 2024

Add support for the Current Time Service

♻️ Current situation & Problem

The current time service is expoed by peripherals that have a sense of time (e.g., to display to the user or to, e.g., include the current timestamp within measurements). For example, Omron blood pressure cuffs implement the Current Time Service with a writeable Current Time characteristic. Only if you write to the peripherals current time, it would be able to include the timestamp of a blood pressure measurement.

⚙️ Release Notes

  • Add initial support for the Current Time Service
  • Add CurrentTime characteristic.
  • Add ExactTime256 characteristic.
  • Add DayDateTime characteristic.
  • Add DayOfWeek characteristic.

📚 Documentation

DocC bundle structure was updated to reflect these latest changes.

✅ Testing

Unit tests were added for new functionality.

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing; thank you @Supereg!

Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 90.04975% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 76.76%. Comparing base (4b193cd) to head (1097255).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   76.71%   76.76%   +0.05%     
==========================================
  Files          79       84       +5     
  Lines        4096     4297     +201     
==========================================
+ Hits         3142     3298     +156     
- Misses        954      999      +45     
Files Coverage Δ
...es/BluetoothServices/Services/BatteryService.swift 100.00% <ø> (ø)
...etoothServices/Services/BloodPressureService.swift 100.00% <ø> (ø)
...luetoothServices/Services/CurrentTimeService.swift 100.00% <100.00%> (ø)
...toothServices/Characteristics/Time/DayOfWeek.swift 91.67% <91.67%> (ø)
...othServices/Characteristics/Time/CurrentTime.swift 92.86% <92.86%> (ø)
...etoothServices/Characteristics/Time/DateTime.swift 92.86% <91.12%> (ø)
...othServices/Characteristics/Time/DayDateTime.swift 92.86% <92.86%> (ø)
...thServices/Characteristics/Time/ExactTime256.swift 84.75% <84.75%> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b193cd...1097255. Read the comment docs.

@Supereg Supereg merged commit 8e94fc7 into main May 17, 2024
9 checks passed
@Supereg Supereg deleted the feature/current-time-service branch May 17, 2024 23:52
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.

None yet

2 participants