-
Notifications
You must be signed in to change notification settings - Fork 56
health integration #54
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
base: master
Are you sure you want to change the base?
Conversation
|
Would this handle a user switching between two watches throughout the day? |
|
Not yet no, and some of the discussion on discord suggests some of my initial assumptions were incorrect on how the data storage works on the watch. This solution works but some steps I'm taking are unnecessary and could impact battery life. |
|
It might be relevant to have the Unit Distance (Miles/Kilometers) setting in the health integration of the mobileapp, if it is not already the case in this PR |
|
I recognize I might be going overboard with this one so lemme know if you folks want me to scale it back at all @sjp4 |
I added this in the health settings panel but it doesn't seem to immediately update on the watch. |
Great! Can you split out the UI vs non-UI parts into separate PRs? This one is pretty huge to review in one go |
|
@sjp4 I've got some time today so I can take a crack at it. Mind if I leave some UI in the debug settings? |
That's fine - thanks! |
|
@sjp4 Finished the separation of UI and did a little clean up. This PR now only contains watch syncing logic. I've tested it and everything works as expected, it's now ready for your review. |
sjp4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass - didn't go into detail on all the parsing code etc yet. A few specific comments, for generally it would be great if you could fix the formatting changes (unod changes for existing code, use 4-space indentation instead of 8 for new code); makes it kinda hard to read the changes 😬
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/connection/LibPebble.kt
Outdated
Show resolved
Hide resolved
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/connection/LibPebble.kt
Outdated
Show resolved
Hide resolved
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/di/LibPebbleModule.kt
Outdated
Show resolved
Hide resolved
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/di/LibPebbleModule.kt
Outdated
Show resolved
Hide resolved
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/datalogging/Datalogging.kt
Show resolved
Hide resolved
libpebble3/src/commonMain/kotlin/io/rebble/libpebblecommon/datalogging/Datalogging.kt
Outdated
Show resolved
Hide resolved
|
Ah I did a local review using Gemini which for some reason tweaks the formatting at random. I'll go through and lint it. |
|
@sjp4 went through and fixed the formatting and invocations. Also caught a bug along the way. Ready for your re-review. |




this is pretty early. all it does is pull the health data from the watch, and push the averages to it.
I'm thinking it's probably best to add this and do any UI changes in a separate PR: In it I would probably add:
TODOs: