čtvrtek 21. prosince 2017

ActiveDots (Connect IQ)

Říká se, že největší radost udělají vlastnoručně vytvořené dárky. Jako ne příliš šikovný "ajťák" jsem však v této oblasti ve značné nevýhodě. Co ale takhle darovat mnou vytvořenou aplikaci (téma) pro hodinky Garmin podporující platformu Connect IQ? Protože žádný z existujících témat neumožňoval, co jsem si představoval, napadlo mě, proč si nenaprogramovat vlastní? Téma jsem nazval ActiveDots a jako takový mini vánoční dárek běžecké komunitě je zdarma ke stažení na platformě Connect IQ. Tento článek pak v angličtině popisuje vlastnosti tohoto tématu. 

Active Dots: Motivation 

Most Garmin watches support inactivity notification, which is triggered after one hour of sitting (or not moving enough). Problem is, that you never know, how long you have been sitting until it is already too late. In that case, the watch will notify you about inactivity and the event is also logged on the Garmin Connect platform. The main motivation of ActiveDots watchface is to show you, how long you are inactive. This is done with 15 dots in the middle of the screen - they are gradually turning gray as you are inactive (they will turn gray completely just a minute before the Garmin inactivity alert is triggered - after one hour). Additionally, they can change colors as you are inactive for longer and longer time (colors can be configured in setting). 

Description

The watchface displays current date, time, battery charge in percent, daily distance walked, daily step goal in percent, and daily steps walked. The fields are explained on the next picture:
Fields description
The middle dots are displaying various information, depending on the mode, the watchface is. The watchface supports four modes:
  1. Active mode - activity is detected (you are moving), watch will use green color by default and the middle dots show step goal progress (0 - 100%). 
  2. Sitting mode - no activity is detected for more than 4 minutes. The watchface will change colors with disappearing dots. Every 4 minutes, one dot will disappear, so after one hour it will reach zero (4 * 15 = 60). 
  3. Inactive mode - inactivity alert managed by Garmin logic was triggered, the dots are showing the level of the alert. Because Garmin supports 5 levels, each level is represented by three dots (maximum level: 5 * 3 = 15). 
  4. Sleep mode - in the night, watchface will stop drawing dots to save some power.  

Active mode
Sitting mode
Inactive mode
Sleep mode

Functionality

Inactivity detection 

Unfortunately, there is no way, how to find out, how is Garmin detecting inactivity. For this reason, the watchface use only approximation. This is done by setting the number of steps, you have to walk in one minute, or the number of steps you have to walk in two minutes, before the timer is reset (activity dots will be recharged to 15). The default setting is: 
  • Number of steps in one minute: 65
  • Number of steps in two minutes: 100
You can configure these number in the watchface setting. These numbers work perfectly for me, but it can vary with your "walking style". If you often reach zero activity dots and the Garmin inactivity alert is not triggered, your setting of steps is too high (lower it). On the other hand, if you normally still have some activity dots remaining and Garmin inactivity alert is triggered, your setting is too low (set it higher). The goal is to "match" Garmin's algorithm as much as possible. Just remember, that the active dots will get reset by completing either one of these goals. 

Supported settings

With hidden fields
In the watchface setting, you can currently configure the following:
  • Show percent (on/off)
  • Show details (on/off) 
  • Required steps per minute (30 - 150)
  • Required steps per two minutes (50 - 200) 
  • Active color
  • 4 sitting colors
  • Inactive (Garmin alert) color  

Limitations

There is no way (or at least not that I am aware of), how to save persistent data in the watchface. That means, that if you change the watch screen (scroll to a widget, launch an application, or training, receive a notification), the watchface content will be erased. That means, that the active dots will get reset and therefore not show correct time until the Garmin inactivity alert. But don't worry, if you walk for one minute, it will show correctly again. Alternatively, if the Garmin inactivity is triggered, it will show it as well.

Another limitation is in night mode detection. The responsible function does not work anymore in the current API, so the watch will detect this mode manually with one hour delay. The night mode is canceled by completing one / two minutes step goal.    

Download

Currently, the watchface supports the following watches:
  • Forerunner 230
  • Forerunner 235
  • Forerunner 630
  • Forerunner 735XT
You can download the application on the Garmin Connect IQ here, or on the following link:


The full source code of the application is available on GitHub.

Have a merry Christmas and happy new year ;)

Žádné komentáře:

Okomentovat

Poznámka: Komentáře mohou přidávat pouze členové tohoto blogu.