UTC Digital: a Garmin Connect IQ watch face

I built a watch face.

Following up on a previous post about my initial thoughts on Garmin’s Connect IQ, I dove in and started playing around with watch faces. Garmin’s Connect IQ SDK includes an example analog watch face and the Eclipse plug-in for Connect IQ will setup a simple, working digital watch face when you create a new watch face project.

Working with Connect IQ is remarkably easy. As advertised, the language Garmin created, Monkey C, is a procedural programming language that will be familiar to any C, C++ or Java programmer. It’s simply a matter of learning what classes/methods give you access to what functionality.

A watch face is the most simple of the project types you can build; watch faces have only a single view (typically), don’t interact with any keys or actions and don’t have access to any sensors.

A simple digital watch face might start out like this:

using Toybox.Application as App;
using Toybox.WatchUi as WatchUi;
using Toybox.Graphics as Graphics;

class SimpleDigitalApp extends App.AppBase {
    function initialize() {
        App.AppBase.initialize();
    }

    function getInitialView() {
        return [ new SimpleDigitalView() ];
    }
}
class SimpleDigitalView extends WatchUi.WatchFace {
    function initialize() {
        WatchFace.initialize();
    }

    function onUpdate(dc) {
        var timeInfo = Time.Gregorian.info(Toybox.Time.now(), Time.FORMAT_SHORT);
        var timeStr = timeInfo.hour + ":" + timeInfo.min.format("%02d");
        dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
        dc.drawText(dc.getWidth()/2, dc.getHeight()/2-dc.getFontHeight(Graphics.FONT_NUMBER_MEDIUM)/2, Graphics.FONT_NUMBER_MEDIUM, timeStr, Graphics.TEXT_JUSTIFY_CENTER);
    }
}

But because a watch face is running all the time the underlying watch OS only calls the onUpdate() method once per minute so as to ensure that battery life is maximized. However, when the watch senses the motion of a user lifting up the watch to look at it, the watch enters “high power” mode, whereby the onUpdate() method is called once per second for a maximum of 8 seconds or whenever the user looks away from the watch, whichever happens first. This then allows you do display the seconds or display other secondary information.

There are a large number of third-party watch faces available on the Connect IQ store; it depends on the watch model but for the D2 Bravo there are 692 of them. Most are okay in that they function but don’t add much value beyond the fancy background (team sport or whatever). Some of the watch faces are fantastic, offering up a neat, at-a-quick-glance view of all the other information available, such as daily steps, distance, calories expended, etc. But with that added functionality comes more complex code, which typically results in slower response when switching to or from the watch face. And sadly, it seems as most of the available watch faces are built with looks in mind and little consideration for code efficiency.

So while watch faces are simple to create, the best ones are the ones that manage to find a nice balance between information displayed and responsiveness. Or, the watch face fills a niche. And it’s the niche category that my watch face fits into.

64b24906-9032-455a-858b-34000b433ea2The D2 Bravo has analog and digital watch faces built-in and both allow for some customization of the background and extra information displayed. One of the extra fields is UTC (commonly referred to as GMT or Zulu time). However, UTC is always rendered in a small font and when I’m in pilot-mode all times are referenced in UTC. I don’t depart at 10:24am local Calgary time, I depart at 1724 UTC (or 1624 UTC when in Daylight Saving Time). So from the time I start planning my flight(s) and filing my flight plans through departure and until some point shortly after arrival all I’m really interested in seeing on my watch in terms of time is UTC.

And that primary interest in UTC is what my watch face “UTC Digital” provides. The large, easy to read at a casual glance font is displayed UTC time, with the UTC date (which could be tomorrow’s date) right above it. And in case a passenger is asking about it, local time is presented in the smaller font right below UTC. For me, it’s the perfect “pilot doing pilot things” watch face.

If you have a Garmin watch capable of running Connect IQ apps you can download the watch face at the Connect IQ Store: https://apps.garmin.com/en-US/apps/9abeafd5-f46f-4363-998a-6f2535784f5a

And if you’re interested in more details about the functionality of the watch face, including the changelog, you can read more on the page dedicated to UTC Digital that I’ve created.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s