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

Fix right wrist assignment in mibandservice.cpp #89

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

threepistons
Copy link
Contributor

@threepistons threepistons commented Sep 18, 2019

Whilst perusing the code to try to figure out why my Band 2's heart rate data is no longer appearing in the app, I spotted that the switch allowing the user to specify which wrist they wear their watch on specified the left wrist twice. So I fixed it, assuming that I read the keys in the correct order. The app builds and runs on my Xperia XA2 running SFOS 3.1.0.11.

@piggz
Copy link
Owner

piggz commented Sep 18, 2019

does it sync the data and not show it, or does sync fail? one user had a problem with a corrupt database for example.

another issue is that the last sync time can become wrong...

do
dconf read /uk/co/piggz/amazfish/device/lastactivitysyncmillis

if you convert that to seconds, then a time since epoch, you will find out when it is syncing from

if that doesnt change after doing a sync in app, then add an hour or so to it, 1 hr = 3600000

the problem occurs when timezone changes, eg, going on holiday. i need to investigate a proper fix by seeing how gadgetbride sends time to the watch.

@threepistons
Copy link
Contributor Author

[nemo@Sailfish harbour-amazfish]$ dconf read /uk/co/piggz/amazfish/device/lastactivitysyncmillis
int64 1564787820000

Wed, 18 Sep 2019 10:48:53 GMT according to the epoch converter I found.

Yet,

sqlite> select max(timestamp_dt) from mi_band_activity ;
max(timestamp_dt)
2019-08-02T23:16:00

@piggz piggz merged commit 2d1a5aa into piggz:master Oct 30, 2019
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.

2 participants