Skip to content

Conversation

@jasoncalabrese
Copy link
Member

Continuing from #13 and #14

From @ELUTE / @YYGIRL:

  • Implemented UI design from Kate F
  • New battery indicator from Jon M
  • Bigger fonts in general, especially for time
  • New special value icons instead of special value numbers (??? instead of "10")
  • Switched black and white backgrounds, to improve readability
  • New space for T1D name
  • Made JS faster based on inputs from John C and Christine D, to help with reliability and refresh problems
  • Time and date are from system, so always up to date and watch can function like a watch
  • More descriptive error messages
  • Commented code in much greater detail
  • Will publish FAQ to quickly identify problems and address faster

Also:

  • The time will now update independently of the network
  • When we can't read data a clear message is displayed and the trend arrow and BG are removed

YYGIRL and others added 10 commits July 29, 2014 11:29
* Implemented UI design from Kate F
* New battery indicator from Jon M
* Bigger fonts in general, especially for time
* New special value icons instead of special value numbers (??? instead
of "10")
* Switched black and white backgrounds, to improve readability
* New space for T1D name
* Made JS faster based on inputs from John C and Christine D, to help
with reliability and refresh problems
* New "two time" fix, to quickly diagnose refresh problem (when pebble
app has crashed or gotten lost)
* Time and date are from system, so always up to date and watch can
function like a watch
* More descriptive error messages
* Implemented bug fixes, especially for Rajat build users
* Commented code in much greater detail
* Will publish FAQ to quickly identify problems and address faster
UI changes (Kate F), New Features, Other Fixes
…ld and the directionToTrand mapping; some reformatting
@jasoncalabrese
Copy link
Member Author

@ELUTE / @YYGIRL, I think a have most things working after bringing directionToTrend back and removing the isRajat detection. Seems like I somehow broke the logo, too late too figure it out now.

Something else really strange that it says "X mins ago", but the code should be displaying "X min ago", I can't figure out where that extra "s" is coming from. Because of that the extra clock gets truncated and shows ...
png

I'll leave this on my watch for now, and see if I notice anything else.

@jasoncalabrese
Copy link
Member Author

Some relevant discussion from nightscout/android-uploader#7

@ELUTE:

I suggest an icon that only shows up when the times do not match then. users need to know when there is a failure. There are many people (especially pairing the pebble to the uploader) who find that it gets stuck on 3 minutes ago etc.

Just because it does not happen on all watches does not mean that it does not happen.

@jasoncalabrese:

thats exactly what I've been thinking, if we can use the pebble tick timer service, the clock on the bottom will always update no matter what happens with connection to the phone or network. Then we can continue updating X ago so that it's always accurate, even when offline. Add a strike through or something to the BG and use a different icon for the trend arrow, but this doesn't all have to happen in 1 shot.

@jasoncalabrese
Copy link
Member Author

In addition to the 2nd clock the other issue that we need to consider is backwards compatibility.

Because of the way Pebble has to bundle the applications' JS with the iOS pebble app we need the new c code to work with the old js code for some period of time. This means that we can't require the message sent by the js is different than what we're getting right now.

We should be ok now just need to make sure the c code doesn't fail if the battlevel or t1dname isn't sent.

@jasoncalabrese
Copy link
Member Author

I got the TickTimerService to work, the clock on the bottom will always be correct now.

https://www.dropbox.com/s/14u09scjghsfg40/tick-timer-service.mov

@hackingtype1
Copy link
Contributor

Thanks for everyone's hard work on this.
Jason - is their a point in the process where the JS and C code are known
to get out of sync? If so, I can work with Pebble to help mitigate or fix
this.

For future changes/backward compatibility concerns, and apologies if this
is a retread of a conversation I missed, how do we plan to handle
versioning of the Nightscout API (or basic endpoints) to prevent future
issues? Suggested best practices seem all over the map, but perhaps there
has been better guidance on this more recently. I'm also happy to help form
any plans to move as much of the pebble JS logic to the API (or as a stored
JS in mongodb, which may be less burden on the Nightscout server), too.
This could also help for future backward compatibility.

On Thu, Jul 31, 2014 at 8:02 PM, Jason Calabrese [email protected]
wrote:

In addition to the 2nd clock the other issue that we need to consider is
backwards compatibility.

Because of the way Pebble has to bundle the applications' JS with the iOS
pebble app we need the new c code to work with the old js code for some
period of time. This means that we can't require the message sent by the js
is different than what we're getting right now.

We should be ok now just need to make sure the c code doesn't fail if the
battlevel or t1dname isn't sent.


Reply to this email directly or view it on GitHub
#16 (comment).

@jasoncalabrese
Copy link
Member Author

@hackingtype1 currently the pebble app isn't using the api, but I'm sure it will. The api is version in the url, so for right now the base uri is passphrase@http://host.example.com/api/v1

The js and c code can get out of sync when the face is published to the app store and they're waiting get a new version of the iOS app published and accepted into the apple app store. It's only an iOS problem. During that time new version of the app is available, but the new version of the js isn't bundled.

@hackingtype1
Copy link
Contributor

Thanks for the pebble store js/c clarification (and the pebble endpoint v.
api details).

If we look to simplify the Pebble JS to GET, parse JSON, and send message,
we can manage backward compatibility at the API version level - unless we
eliminate properties, we won't have to worry about the JS getting out of
sync. The c code should not have any issue if portions of the message are
not sent from the JS, whatever value they are initialized as (in c) should
persist.

On Thu, Jul 31, 2014 at 11:42 PM, Jason Calabrese [email protected]
wrote:

@hackingtype1 https://github.com/hackingtype1 currently the pebble app
isn't using the api, but I'm sure it will. The api is version in the url,
so for right now the base uri is passphrase@http://host.example.com/api/v1

The js and c code can get out of sync when the face is published to the
app store and they're waiting get a new version of the iOS app published
and accepted into the apple app store. It's only an iOS problem. During
that time new version of the app is available, but the new version of the
js isn't bundled.


Reply to this email directly or view it on GitHub
#16 (comment).

@jasoncalabrese
Copy link
Member Author

Trying to update the X min ago in the c code for each clock tick, need to send the read timestamp to the c code and calc the difference. Also my watch is picking up the old js (version 5), can't figure out how to fix that.

@jasoncalabrese
Copy link
Member Author

Added Pebble setting for the name on the bottom, calling it custom label

pebble-screenshot_2014-08-02_00-56-47
2014-08-02 00 57 35

@jasoncalabrese
Copy link
Member Author

Just want to do it update the X ago label on the tick based on last reading, then I'll be happy

@bewest
Copy link
Member

bewest commented Aug 2, 2014

Super excited about this.

…ide the value so it's clear that the data isn't current
@jasoncalabrese
Copy link
Member Author

Unless I can get some help in the c code, propose that we stop here and merge.

My last sticking point was handling the last read timestamp and build the time ago label, to get around that I just clear those values when the pebble can't get fresh data.

@jasoncalabrese
Copy link
Member Author

I found what seems like a bug in the c code, but I'm not sure how to work with the data types to fix it.

For some reason 266 gets converted to 10 and then the ??? icon is displayed, I think it's something with the conversion from cstring to a uint8_t or the comparison of that.

@hackingtype1 @YYGIRL any ideas? Would it be better to compare the cstring?

        strncpy(last_bg, new_tuple->value->cstring, 124);
        current_bg = atoi(last_bg);
//...
        } else if (current_bg == QUESTION_MARKS_VALUE) { //QUESTION_MARKS_VALUE == 10
             text_layer_set_text(bg_layer, "");
             specialvalue_bitmap = gbitmap_create_with_resource(SPECIAL_VALUE_ICONS[4]);
             bitmap_layer_set_bitmap(icon_layer, specialvalue_bitmap);
        } else {
//...

@jasoncalabrese
Copy link
Member Author

The 338a382 commit fixes the issue, but I'm sure there is a better way than this hack.

… info on the pebble, not perfect, but better
@jasoncalabrese
Copy link
Member Author

I'm going to merge this to develop and then create a release branch. From the release branch I'll build a 2 new pbw's with new guids for a beta version and a beta-slot2 version. I'll wait till they are available on iOS before announcing anything.

jasoncalabrese added a commit that referenced this pull request Aug 6, 2014
UI changes (Kate F), New Features, Other Fixes
@jasoncalabrese jasoncalabrese merged commit ef45700 into develop Aug 6, 2014
@ELUTE
Copy link
Contributor

ELUTE commented Aug 6, 2014

Did you get the time ago working?

Sent from my iPhone

On Aug 6, 2014, at 1:22 AM, Jason Calabrese [email protected] wrote:

I'm going to merge this to develop and then create a release branch. From the release branch I'll build a 2 new pbw's with new guids for a beta version and a beta-slot2 version. I'll wait till they are available on iOS before announcing anything.


Reply to this email directly or view it on GitHub.

@jasoncalabrese
Copy link
Member Author

No, I'll need some help with that. This was only merged to the develop branch, it won't be merged to master till the release is accepted by the community.

To make testing easier a beta and beta 2 watchface were published to the pebble app store with new uuids. The primary/old version wasn't effected. This will let people safely test the new version while still keeping the old version in place.

@GrantKY
Copy link

GrantKY commented Aug 8, 2014

Hi Jason. I have been testing Beta2 watch face from pebble store. There are a couple of things that I have noticed that I thought I should flag up.

  1. Had a few problems getting it to connect to the azure website. Phone has to be restarted and then I need to re-intialise pebble connection. This happened a few times. I am running the latest community web site and did not encounter this issue under previous version.
  2. Today the pebble connection appeared fine but the value displayed was not the latest bg value (my wife is running the old version on old website during this testing phase so I was able to get updated data from her). I checked the /pebble link on the azure site (new version) and that was updating correctly. There is no indication of an error on the pebble it gives a value and states says "3 mins ago".However whilst the time is updating it remains stuck on 3 mins ago even when there has been two other readings displayed on the website and the /pebble link. It did update ok when I moved off and then back on the watchface.
    I hope I have explained issues clearly but if you need me to clarify anything or want me to try something to better diagnose issue then let me know.
    Grant

@jasoncalabrese
Copy link
Member Author

@GrantKY if you get a chance can you add this comment to the release PR, this one has already been merged to develop branch and I don't want you comment to be missed.

#19

The issue you mention is the primary reason we released this as a beta. I know what fix we need to make, but need some help with the C code to get it working. Did you notice the pebble vibrate even when the display didn't update?

@ELUTE
Copy link
Contributor

ELUTE commented Aug 8, 2014

Jason, this issue is exactly why we had the second time.

Sent from my iPhone

On Aug 8, 2014, at 1:16 PM, GrantKY [email protected] wrote:

Hi Jason. I have been testing Beta2 watch face from pebble store. There are a couple of things that I have noticed that I thought I should flag up.

  1. Had a few problems getting it to connect to the azure website. Phone has to be restarted and then I need to re-intialise pebble connection. This happened a few times. I am running the latest community web site and did not encounter this issue under previous version.

Today the pebble connection appeared fine but the value displayed was not the latest bg value (my wife is running the old version on old website during this testing phase so I was able to get updated data from her). I checked the /pebble link on the azure site (new version) and that was updating correctly. There is no indication of an error on the pebble it gives a value and states says "3 mins ago".However whilst the time is updating it remains stuck on 3 mins ago even when there has been two other readings displayed on the website and the /pebble link. It did update ok when I moved off and then back on the watchface. I hope I have explained issues clearly but if you need me to clarify anything or want me to try something to better diagnose issue then let me know. Grant

Reply to this email directly or view it on GitHub.

@GrantKY
Copy link

GrantKY commented Aug 8, 2014

No pebble did not vibrate.
Also just reconnected to pebble watch in "manage connection" in pebble app seems to be working again.

@jasoncalabrese jasoncalabrese deleted the wip/ui-refresh branch September 12, 2014 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants