[Watch Face] Trekkie


#1

#2

MAKE IT SO. <3

EDIT: Data loves it too.

#3

I will stop using my self-created watchface for this one!!



#4

Date AND day of the week AND time AND Star Trek theme???



I thought it would take longer for the perfect watch face to be created.

#5

Forked!


https://github.com/stough/trekkie

The month number has been added to the date line, I’ve removed the leading 0 when in 12h time, and I added a little am/pm below the time as appropriate.



#6

Thanks Zach, I’m currently using this watchface. Any chance of updating the .pbw on mypebblefaces.com?


A suggestion if you get round to it: The month could perhaps be displayed (as a word rather than number) instead of the word pebble on the top left?

Also, it seems nobody has yet worked out how to do the battery indicator. I think it could look great on this watchface.

#7

Battery info hasn’t been exposed in the api yet.


#8

Thanks for the lovely feedback everyone! <3


@Timothy Stough – Nice!! Do you mind sending that in as a pull request? It looks great.

@Fabrizio Zincone – The .pbw should be up on My Pebble Faces. It’s under Trekkie, by me. Also, showing the month is an awesome idea! I think I’ll add that. :slight_smile: Finally, I’d love to add battery, and I will when it gets exposed from the SDK.

#9

And for complete authenticity, how about the date as a star date?


#10
Looseunit said:
And for complete authenticity, how about the date as a star date?

How did I not think of this?! This is a perfect idea. Implementing now.


#11

Zach,


Pull Request sent (I think). I’ve been using git on other projects for a while, but this is my first fork on GitHub. I look forward to the stardate update.

Cheers,
Tim

#12

Pull request received and merged! :slight_smile: Thanks a ton.


Also, the stardate update may be delayed… all I’ve managed to do so far is crash my Pebble. :stuck_out_tongue: This is my first time writing C, so I’m not quite a pro. One thing missing (and a known issue) is sprintf(), which I need to convert the calculated stardate into a string. I’ll keep working on it and see if I can get anything.

#13

Can you commit the code that computes the stardate but comment out the line that’s causing the crash? I can take a shot at getting the text from the stardate (int or float? doesn’t matter).


My idea (if you want to give it a spin) would be to convert the stardate to an int (fixed point shifted if you need a few decimal places), then use log10 to get access to each digit in the star date. You can then add the int digit to the ACSII ‘0’ and that will give you digit strings. Stack those together into the string that you put in the text layer and you have a simple formatter.

Thoughts?
Tim.

#14

I’m actually not sure what line of code is causing the crash, but here’s the code I have so far: https://github.com/remixz/trekkie/tree/stardate I implemented a custom itoa function, but I’m not sure if this is the best solution. Thanks for the help!


#15

Hi, if the star date is of type int the following should do it: (remeber to copy the resulting string, since it is put into a static buffer and will be overwritten each call.)


#define INT_DIGITS 11

char *itoa(i)
int i;
{
static char buf[INT_DIGITS + 2];
char *p = buf + INT_DIGITS + 1;
if (i >= 0) {
do {
*–p = ‘0’ + (i % 10);
i /= 10;
} while (i != 0);
return p;
}
return p;
}


#16

I’ve looked into stardate and don’t see a good way to get one since the beginning of the epoch is in the future. That means that our current stardate is negative. Sure, we could make something up that uses 1000/s of a year and fraction of a day, but what’s the point…


We could but swatch beat internet time on a line and tell people its a stardate… :wink:

- TIm

#17

The definition of stardate has changed over the various Star Trek shows. However per https://en.wikipedia.org/wiki/Stardate

According to Roberto Orci, stardates were revised again for the 2009 film so that the first four digits correspond to the year, while the remainder was intended to stand for the day of the year.] For example, stardate 2258.42 would be February 11, 2258. The 2013 sequel, Star Trek Into Darkness, begins on stardate 2259.55, or February 24, 2259.

So by these rules today April 14, 2013 would be 2013.104


#18

Is this watchface available on iPhone? If yes, how do I get it please?


#19
Gaetan Fontaine said:
Is this watchface available on iPhone? If yes, how do I get it please?

There is a pending iOS app that will allow loading of the custom faces. There are other methods listed here in the forums but if you are not really comfortable with a computer and the command line. I would wait for the update.


Eric stated in another thread it was submitted over 2 weeks ago. So hopefully it will get approved soon.

#20
Woohoo! I've just updated the watch face with the Stardate. I based it off the 2009 Star Trek format, as it's easy to implement + current, if we're to follow lore. I also adjusted the formatting so more useful information is on screen. It may not have flashy bars that update every second, but hey, you save a little battery with this! ;-)