From a1118d9a827f583b881e59e841d367cc5b859f89 Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Sun, 8 Sep 2019 20:13:06 +0200 Subject: [PATCH 1/8] Updated to Digital5Reloaded Renamed Digital5 to Digital5Reloaded. Updated readme.md --- .project | 2 +- README.md | 42 ++++++++++++++++++------------- manifest.xml | 2 +- monkey.jungle | 1 + resources-deu/strings/strings.xml | 2 +- resources-eng/strings/strings.xml | 2 +- resources-fre/strings/strings.xml | 2 +- resources-hun/strings/strings.xml | 2 +- resources-spa/strings/strings.xml | 2 +- resources/resources.xml | 2 +- resources/strings/strings.xml | 2 +- source/Digital5App.mc | 2 +- 12 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.project b/.project index 6f256d7..59d3f31 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded diff --git a/README.md b/README.md index 7baa557..84f6845 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ -# Garmin Connect IQ fenix 5 watch face: Digital 5 +# Garmin Connect IQ fenix 5 watch face: Digital 5 Reloaded -ATTENTION: THIS WATCH FACE WON’T BE UPDATED ANY LONGER!!! +**History** -![Overview](https://www.dropbox.com/s/9uc7ojnt97x7otv/Digital5Overview.png) +Digital5 was a Garmin Connect IQ watch face, created for the fenix 5 range. Its developer, [Gerrit Grunwald](https://twitter.com/hansolo_), discontinued working on this watch face earlier this year. I still think it was one of the better faces, striking a balance between number of "data" fields, and readability. + +I've decided to take over the project, and call it "Digital5Reloaded" - of course this is with the permission of Gerrit. Thanks! + +**Overview** A simple digital watch face for the Garmin fenix 5x which shows the following data: - date @@ -14,7 +18,7 @@ A simple digital watch face for the Garmin fenix 5x which shows the following da - steps - steps needed to reach daily goal - calories burned -- active calories burned (calcluated after Mifflin-St.Jeor Formula (1990)) +- active calories burned ([calculated after Mifflin-St.Jeor Formula (1990)](https://www.ncbi.nlm.nih.gov/pubmed/2305711)) - distance - move bar - last measured heart rate @@ -25,9 +29,7 @@ A simple digital watch face for the Garmin fenix 5x which shows the following da - active time of the last week - active time of today - sunrise and sunset ([calculated after Sunrise/Sunset Algorithm](http://williams.best.vwh.net/sunrise_sunset_algorithm.htm)) -- weather - -([Powered by Dark Sky](https://darksky.net/poweredby/)) +- weather ([Powered by Dark Sky](https://darksky.net/poweredby/), requires Dark Sky API key (free)) The LCD background can be switched off and the heart rate zone could be visualized by colors. On the left side it will show the daily step goal in a colored bar (is the bar green then the daily stepgoal is reached). On the right side it shows the burned calories where the bar is blue as long as you have not reached your daily base calorie consumption, it will turn green when the burned calories are higher than your daily base calorie consumption. Are the burned calories more than 2x the base calorie consumption the bar will turn pink. @@ -59,25 +61,29 @@ All segments pink = 3x base calories burned The sunrise/sunset is calculated by an algorithm found at http://williams.best.vwh.net/sunrise_sunset_algorithm.htm. To be able to calculate the sunrise/sunset you have to put in the current location (latitude, longitude) and the current -timezone you are in. If you have daylight saving time in your current timezone please check the "Daylight saving time (current location)" checkbox. +time zone you are in. If you have daylight saving time in your current time zone please check the "Daylight saving time (current location)" checkbox. + + -ATTENTION: -Instead of giving negative reviews please file an issue at the [github issuetracker](https://github.com/HanSolo/digital5/issues) when you encounter problems. -By using the issue tracker you can describe your problem and I can try to reproduce and fix it, thanks. +**Weather** To make use of the Weather feature you need your own Dark Sky API key, to get one please follow the steps below: -1) Go to the [DarkSky website](https://darksky.net/dev/) +1. Go to the [DarkSky website](https://darksky.net/dev/) -2) Create your own account and you'll see a 32 character key +2. Create your own account and you'll see a 32 character key -3) This key you need to put in the watch face settings either on your phone or via Garmin Express. +3. This key you need to put in the watch face settings either on your phone or via Garmin Express. -4) Make sure you have the coordinates of your current location (latitude, longitude) put in the settings +4. Make sure you have the coordinates of your current location (latitude, longitude) put in the settings At the moment the weather update is done every 15 minutes. -You can choose between daily or current weather information where the daily weather will show you an icon for -today and the min and max temperature for today. The current weather information will show you an icon for the -current weather and the current temperature. + +You can choose between daily or current weather information where the daily weather will show you an icon for today and the min and max temperature for today. The current weather information will show you an icon for the current weather and the current temperature. + + + +**Reporting issues** +Please use the [github issuetracker](https://github.com/erikvb/Digital5Reloaded/issues) when you encounter problems. By using the issue tracker you can describe your problem and I can try to reproduce and fix it, thanks. \ No newline at end of file diff --git a/manifest.xml b/manifest.xml index 8dfd5ec..d2547b9 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,5 +1,5 @@ - + diff --git a/monkey.jungle b/monkey.jungle index d420965..171bb16 100644 --- a/monkey.jungle +++ b/monkey.jungle @@ -1,6 +1,7 @@ project.manifest = manifest.xml + vivoactive3.sourcePath = source;source-vivoactive3 vivoactive3m.sourcePath = source;source-vivoactive3m fr935.sourcePath = source;source-fr935 diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index c76528c..9ceb6d4 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded Geschlecht Weiblich diff --git a/resources-eng/strings/strings.xml b/resources-eng/strings/strings.xml index 8c5656a..8fc218f 100644 --- a/resources-eng/strings/strings.xml +++ b/resources-eng/strings/strings.xml @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded Gender Female diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index faf09e7..e7ac163 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded Sexe Femme diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index 9940b42..d1f87b4 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded Nem diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 02ffdd4..40b6756 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -1,6 +1,6 @@ - Digital5 + Digital5Reloaded Género     Femenino diff --git a/resources/resources.xml b/resources/resources.xml index f405868..abca48d 100644 --- a/resources/resources.xml +++ b/resources/resources.xml @@ -1,5 +1,5 @@ - Digital5 + Digital5Reloaded 000000 diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index 8efef0d..0a1d493 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -1,6 +1,6 @@ - + Gender Female diff --git a/source/Digital5App.mc b/source/Digital5App.mc index edee2be..44a3935 100644 --- a/source/Digital5App.mc +++ b/source/Digital5App.mc @@ -5,7 +5,7 @@ using Toybox.System; using Toybox.Time; using Toybox.Time.Gregorian; -class Digital5App extends App.AppBase { +class Digital5ReloadedApp extends App.AppBase { hidden var view; hidden var sunRiseSet; From 37fe17713468596d78b505ea406a2ee61e7b9b7c Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Mon, 9 Sep 2019 06:15:22 +0200 Subject: [PATCH 2/8] Update Manifest Id --- manifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.xml b/manifest.xml index d2547b9..8fab6ac 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,5 +1,5 @@ - + From c984feec1fb8186df1a51594fd10fb8b6279800f Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Tue, 31 Dec 2019 03:14:11 +0100 Subject: [PATCH 3/8] major cleanup and support for resizing Added support for resizing, which impacted all code. Also did a major cleanup, removed configurations that were no longer needed, and added support for new watches. --- barrels.jungle | 7 - manifest.xml | 25 + monkey.jungle | 9 - resources-d2charlie/ciqbuild.xml | 7 - resources-d2charlie/drawables/drawables.xml | 3 - .../drawables/launcher_icon.png | Bin 1856 -> 0 bytes resources-d2charlie/resources.xml | 3 - resources-d2charlie/strings/strings.xml | 3 - resources-deu/strings/strings.xml | 1 + resources-eng/strings/strings.xml | 1 + resources-fenix5/ciqbuild.xml | 8 - resources-fenix5/drawables/drawables.xml | 3 - resources-fenix5/drawables/launcher_icon.png | Bin 1856 -> 0 bytes resources-fenix5/resources.xml | 3 - resources-fenix5/strings/strings.xml | 3 - resources-fenix5x/ciqbuild.xml | 8 - resources-fenix5x/drawables/drawables.xml | 3 - resources-fenix5x/drawables/launcher_icon.png | Bin 1856 -> 0 bytes resources-fenix5x/resources.xml | 3 - resources-fenix5x/strings/strings.xml | 3 - resources-fenix5xplus/ciqbuild.xml | 8 - resources-fenix5xplus/drawables/drawables.xml | 3 - .../drawables/launcher_icon.png | Bin 1856 -> 0 bytes resources-fenix5xplus/resources.xml | 3 - resources-fenix5xplus/strings/strings.xml | 3 - resources-fr935/ciqbuild.xml | 8 - resources-fr935/drawables/drawables.xml | 3 - resources-fr935/drawables/launcher_icon.png | Bin 1856 -> 0 bytes resources-fr935/resources.xml | 3 - resources-fr935/strings/strings.xml | 3 - resources-hun/strings/strings.xml | 1 + resources-vivoactive3/ciqbuild.xml | 8 - resources-vivoactive3/drawables/drawables.xml | 3 - .../drawables/launcher_icon.png | Bin 2318 -> 0 bytes resources-vivoactive3/resources.xml | 3 - resources-vivoactive3/strings/strings.xml | 3 - resources-vivoactive3m/ciqbuild.xml | 8 - .../drawables/drawables.xml | 3 - .../drawables/launcher_icon.png | Bin 2318 -> 0 bytes resources-vivoactive3m/resources.xml | 3 - resources-vivoactive3m/strings/strings.xml | 3 - resources/buildDefault.xml | 3 - resources/drawables/launcher_icon.png | Bin 1856 -> 4587 bytes resources/settings/properties.xml | 13 +- resources/settings/settings.xml | 17 +- resources/strings/strings.xml | 5 +- source/Digital5View.mc | 1148 +++++++++-------- 47 files changed, 671 insertions(+), 677 deletions(-) delete mode 100644 resources-d2charlie/ciqbuild.xml delete mode 100644 resources-d2charlie/drawables/drawables.xml delete mode 100644 resources-d2charlie/drawables/launcher_icon.png delete mode 100644 resources-d2charlie/resources.xml delete mode 100644 resources-d2charlie/strings/strings.xml delete mode 100644 resources-fenix5/ciqbuild.xml delete mode 100644 resources-fenix5/drawables/drawables.xml delete mode 100644 resources-fenix5/drawables/launcher_icon.png delete mode 100644 resources-fenix5/resources.xml delete mode 100644 resources-fenix5/strings/strings.xml delete mode 100644 resources-fenix5x/ciqbuild.xml delete mode 100644 resources-fenix5x/drawables/drawables.xml delete mode 100644 resources-fenix5x/drawables/launcher_icon.png delete mode 100644 resources-fenix5x/resources.xml delete mode 100644 resources-fenix5x/strings/strings.xml delete mode 100644 resources-fenix5xplus/ciqbuild.xml delete mode 100644 resources-fenix5xplus/drawables/drawables.xml delete mode 100644 resources-fenix5xplus/drawables/launcher_icon.png delete mode 100644 resources-fenix5xplus/resources.xml delete mode 100644 resources-fenix5xplus/strings/strings.xml delete mode 100644 resources-fr935/ciqbuild.xml delete mode 100644 resources-fr935/drawables/drawables.xml delete mode 100644 resources-fr935/drawables/launcher_icon.png delete mode 100644 resources-fr935/resources.xml delete mode 100644 resources-fr935/strings/strings.xml delete mode 100644 resources-vivoactive3/ciqbuild.xml delete mode 100644 resources-vivoactive3/drawables/drawables.xml delete mode 100644 resources-vivoactive3/drawables/launcher_icon.png delete mode 100644 resources-vivoactive3/resources.xml delete mode 100644 resources-vivoactive3/strings/strings.xml delete mode 100644 resources-vivoactive3m/ciqbuild.xml delete mode 100644 resources-vivoactive3m/drawables/drawables.xml delete mode 100644 resources-vivoactive3m/drawables/launcher_icon.png delete mode 100644 resources-vivoactive3m/resources.xml delete mode 100644 resources-vivoactive3m/strings/strings.xml delete mode 100644 resources/buildDefault.xml diff --git a/barrels.jungle b/barrels.jungle index d651239..c8f30d1 100644 --- a/barrels.jungle +++ b/barrels.jungle @@ -1,10 +1,3 @@ # Do not hand edit this file. To make changes right click # on the project and select "Configure Monkey Barrels". -fr935.excludeAnnotations = d2charlie;fenix5;fenix5x;fenix5xplus;vivoactive3;vivoactive3m -d2charlie.excludeAnnotations = fr935;fenix5;fenix5x;fenix5xplus;vivoactive3;vivoactive3m -fenix5.excludeAnnotations = fr935;d2charlie;fenix5x;fenix5xplus;vivoactive3;vivoactive3m -fenix5x.excludeAnnotations = fr935;d2charlie;fenix5;fenix5xplus;vivoactive3;vivoactive3m -fenix5xplus.excludeAnnotations = fr935;d2charlie;fenix5;fenix5x;vivoactive3;vivoactive3m -vivoactive3.excludeAnnotations = fr935;d2charlie;fenix5;fenix5x;fenix5xplus;vivoactive3m -vivoactive3m.excludeAnnotations = fr935;d2charlie;fenix5;fenix5x;fenix5xplus;vivoactive3 \ No newline at end of file diff --git a/manifest.xml b/manifest.xml index 8fab6ac..d80e3ee 100644 --- a/manifest.xml +++ b/manifest.xml @@ -2,13 +2,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/monkey.jungle b/monkey.jungle index 171bb16..45c1bf8 100644 --- a/monkey.jungle +++ b/monkey.jungle @@ -1,11 +1,2 @@ project.manifest = manifest.xml - - -vivoactive3.sourcePath = source;source-vivoactive3 -vivoactive3m.sourcePath = source;source-vivoactive3m -fr935.sourcePath = source;source-fr935 -d2charlie.sourcePath = source;source-d2charlie -fenix5.sourcePath = source;source-fenix5 -fenix5x.sourcePath = source;source-fenix5x -fenix5xplus.sourcePath = source;source-fenix5xplus diff --git a/resources-d2charlie/ciqbuild.xml b/resources-d2charlie/ciqbuild.xml deleted file mode 100644 index 39e0cc3..0000000 --- a/resources-d2charlie/ciqbuild.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/resources-d2charlie/drawables/drawables.xml b/resources-d2charlie/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-d2charlie/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-d2charlie/drawables/launcher_icon.png b/resources-d2charlie/drawables/launcher_icon.png deleted file mode 100644 index 9e5e332086e13b84076be319b5e83531e6f077f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmV-G2fz4dbVG7wVRUJ4ZXi@?ZDjyCFEKDLF*i2o>dOEC2AN4j zK~z|U&6saU)B7IBU%#m}T;lB1wrUcRqT(VmA4Hc#FaUmqGW@RO&EV_eR~GRJV!D+k>EE!-@0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KQra;q5s90000 - d2charlie - \ No newline at end of file diff --git a/resources-d2charlie/strings/strings.xml b/resources-d2charlie/strings/strings.xml deleted file mode 100644 index 93e4adc..0000000 --- a/resources-d2charlie/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - D2 Charlie - \ No newline at end of file diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index 9ceb6d4..a27084b 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -46,6 +46,7 @@ Sommerzeit Heimat Zeitzone anzeigen + Heimat Datum anzeigen Heimat Zeitzone diff --git a/resources-eng/strings/strings.xml b/resources-eng/strings/strings.xml index 8fc218f..bf09c2b 100644 --- a/resources-eng/strings/strings.xml +++ b/resources-eng/strings/strings.xml @@ -46,6 +46,7 @@ Daylight Saving Time (home location) Show Home Timezone + Show Home Date Timezone (home location) diff --git a/resources-fenix5/ciqbuild.xml b/resources-fenix5/ciqbuild.xml deleted file mode 100644 index 2a21f16..0000000 --- a/resources-fenix5/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-fenix5/drawables/drawables.xml b/resources-fenix5/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-fenix5/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-fenix5/drawables/launcher_icon.png b/resources-fenix5/drawables/launcher_icon.png deleted file mode 100644 index 9e5e332086e13b84076be319b5e83531e6f077f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmV-G2fz4dbVG7wVRUJ4ZXi@?ZDjyCFEKDLF*i2o>dOEC2AN4j zK~z|U&6saU)B7IBU%#m}T;lB1wrUcRqT(VmA4Hc#FaUmqGW@RO&EV_eR~GRJV!D+k>EE!-@0JIBcHWaOrAp6X*Hf2h-nCH~-}ElyCU5 z-|zeV{CR&rpWpY-XA)~e2Jjc)uRs}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xml deleted file mode 100644 index 0d53546..0000000 --- a/resources-fenix5/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Fenix 5 - \ No newline at end of file diff --git a/resources-fenix5x/ciqbuild.xml b/resources-fenix5x/ciqbuild.xml deleted file mode 100644 index ad7221b..0000000 --- a/resources-fenix5x/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-fenix5x/drawables/drawables.xml b/resources-fenix5x/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-fenix5x/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-fenix5x/drawables/launcher_icon.png b/resources-fenix5x/drawables/launcher_icon.png deleted file mode 100644 index 9e5e332086e13b84076be319b5e83531e6f077f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmV-G2fz4dbVG7wVRUJ4ZXi@?ZDjyCFEKDLF*i2o>dOEC2AN4j zK~z|U&6saU)B7IBU%#m}T;lB1wrUcRqT(VmA4Hc#FaUmqGW@RO&EV_eR~GRJV!D+k>EE!-@0JIBcHWaOrAp6X*Hf2h-nCH~-}ElyCU5 z-|zeV{CR&rpWpY-XA)~e2Jjc)uRs}42xtM-?D!<$2Zn*4f&T*k1E$yLZ`H^L{sD{u z;tSi@tZx3FL2M`R5QwjV*y0wSwY77-$Ta|;)`8gK_G#AknxO=K`V)vPZa>ZX`XXcl zyVBtvfo_7LnAZsz}0|ySs&m$uv zjE;_?R4OScDUti%zkkon%#8f5)9Ki?YnS}~?%lg2TW+_T$;rvZ?mh!Wz^{u39;TX+ z&1MseQC(dv1_uWh^o7G=k(QPw08w3CoupG)St;({zn|2vQmIl!@!=dP#q4iB@cm-O z00$2q#OL!NNfMHj2>7vM$GCa(CI*86Ns_p8=ME~Bip({bQ zd3iYiMMXua++~M z)6@9FI;Fq_Ttv)}LM)~#D?+O$djE&)QJ5b=1N?(S}m9z9BHYb#owWHLn*03MI0MF@e@>EztG zb4k~#j~_qca=AEv{yep{wE)=db~$o$6IczbRx4-DoWX9lvw#17*-kVXrK_upcsz~} z0*}Yj0`qE;=g*(}cFiv$)_~#R#D-8klu2+A= z@WjLf0BW`R4-qUYE2~dA(AnAfV17Y!`SNA4Z{I$Vot-V7JbAL9*s+9=(?CI(G zWqw4QPA8#IC}}ctAH2iiz~ypbx7(9sGBY!=+wEAb)&>26KmfPfO+`foTeohdqM`zT zo}Qjx>g(%&T#_I_Z*Om@)9L&K(B9roWo0E6i-nq+nv_w`$;kmoS(hl4N@{Cs*7G=z=H= z4GoF9x;l}QlOq}%8%1MdqsYn05p{KSVrXb6DQaiWo)srgo)qD5_&1Bi@?a(ZD;Dcd zpFaJ!TCM)i%*@QOrlux!Mn=Yh@v*TnMn^~Scs!`pYGSb%pFe-5va%9`!N9g{+ZM=| zmX;z((ywpcys2txYBI9|mP~OfbaZqa&CARC`{Bcf_hx5j%erp2JEi>mzcoUkkZ?F0 z10Ij3rMbEJqtP^Iwc0a!y}oeAjvd)rtu|xx=FI?1O-vA u_z?2>e8Yaf|6hSX;GZUwDfy6J0sjXhYKQra;q5s90000 - fenix5x - \ No newline at end of file diff --git a/resources-fenix5x/strings/strings.xml b/resources-fenix5x/strings/strings.xml deleted file mode 100644 index e8a9a31..0000000 --- a/resources-fenix5x/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Fenix 5x - \ No newline at end of file diff --git a/resources-fenix5xplus/ciqbuild.xml b/resources-fenix5xplus/ciqbuild.xml deleted file mode 100644 index b237384..0000000 --- a/resources-fenix5xplus/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-fenix5xplus/drawables/drawables.xml b/resources-fenix5xplus/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-fenix5xplus/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-fenix5xplus/drawables/launcher_icon.png b/resources-fenix5xplus/drawables/launcher_icon.png deleted file mode 100644 index 9e5e332086e13b84076be319b5e83531e6f077f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmV-G2fz4dbVG7wVRUJ4ZXi@?ZDjyCFEKDLF*i2o>dOEC2AN4j zK~z|U&6saU)B7IBU%#m}T;lB1wrUcRqT(VmA4Hc#FaUmqGW@RO&EV_eR~GRJV!D+k>EE!-@0JIBcHWaOrAp6X*Hf2h-nCH~-}ElyCU5 z-|zeV{CR&rpWpY-XA)~e2Jjc)uRs}42xtM-?D!<$2Zn*4f&T*k1E$yLZ`H^L{sD{u z;tSi@tZx3FL2M`R5QwjV*y0wSwY77-$Ta|;)`8gK_G#AknxO=K`V)vPZa>ZX`XXcl zyVBtvfo_7LnAZsz}0|ySs&m$uv zjE;_?R4OScDUti%zkkon%#8f5)9Ki?YnS}~?%lg2TW+_T$;rvZ?mh!Wz^{u39;TX+ z&1MseQC(dv1_uWh^o7G=k(QPw08w3CoupG)St;({zn|2vQmIl!@!=dP#q4iB@cm-O z00$2q#OL!NNfMHj2>7vM$GCa(CI*86Ns_p8=ME~Bip({bQ zd3iYiMMXua++~M z)6@9FI;Fq_Ttv)}LM)~#D?+O$djE&)QJ5b=1N?(S}m9z9BHYb#owWHLn*03MI0MF@e@>EztG zb4k~#j~_qca=AEv{yep{wE)=db~$o$6IczbRx4-DoWX9lvw#17*-kVXrK_upcsz~} z0*}Yj0`qE;=g*(}cFiv$)_~#R#D-8klu2+A= z@WjLf0BW`R4-qUYE2~dA(AnAfV17Y!`SNA4Z{I$Vot-V7JbAL9*s+9=(?CI(G zWqw4QPA8#IC}}ctAH2iiz~ypbx7(9sGBY!=+wEAb)&>26KmfPfO+`foTeohdqM`zT zo}Qjx>g(%&T#_I_Z*Om@)9L&K(B9roWo0E6i-nq+nv_w`$;kmoS(hl4N@{Cs*7G=z=H= z4GoF9x;l}QlOq}%8%1MdqsYn05p{KSVrXb6DQaiWo)srgo)qD5_&1Bi@?a(ZD;Dcd zpFaJ!TCM)i%*@QOrlux!Mn=Yh@v*TnMn^~Scs!`pYGSb%pFe-5va%9`!N9g{+ZM=| zmX;z((ywpcys2txYBI9|mP~OfbaZqa&CARC`{Bcf_hx5j%erp2JEi>mzcoUkkZ?F0 z10Ij3rMbEJqtP^Iwc0a!y}oeAjvd)rtu|xx=FI?1O-vA u_z?2>e8Yaf|6hSX;GZUwDfy6J0sjXhYKQra;q5s90000 - fenix5xplus - \ No newline at end of file diff --git a/resources-fenix5xplus/strings/strings.xml b/resources-fenix5xplus/strings/strings.xml deleted file mode 100644 index ebccc5c..0000000 --- a/resources-fenix5xplus/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Fenix 5 Plus - \ No newline at end of file diff --git a/resources-fr935/ciqbuild.xml b/resources-fr935/ciqbuild.xml deleted file mode 100644 index 78bcbe7..0000000 --- a/resources-fr935/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-fr935/drawables/drawables.xml b/resources-fr935/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-fr935/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-fr935/drawables/launcher_icon.png b/resources-fr935/drawables/launcher_icon.png deleted file mode 100644 index 9e5e332086e13b84076be319b5e83531e6f077f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmV-G2fz4dbVG7wVRUJ4ZXi@?ZDjyCFEKDLF*i2o>dOEC2AN4j zK~z|U&6saU)B7IBU%#m}T;lB1wrUcRqT(VmA4Hc#FaUmqGW@RO&EV_eR~GRJV!D+k>EE!-@0JIBcHWaOrAp6X*Hf2h-nCH~-}ElyCU5 z-|zeV{CR&rpWpY-XA)~e2Jjc)uRs}42xtM-?D!<$2Zn*4f&T*k1E$yLZ`H^L{sD{u z;tSi@tZx3FL2M`R5QwjV*y0wSwY77-$Ta|;)`8gK_G#AknxO=K`V)vPZa>ZX`XXcl zyVBtvfo_7LnAZsz}0|ySs&m$uv zjE;_?R4OScDUti%zkkon%#8f5)9Ki?YnS}~?%lg2TW+_T$;rvZ?mh!Wz^{u39;TX+ z&1MseQC(dv1_uWh^o7G=k(QPw08w3CoupG)St;({zn|2vQmIl!@!=dP#q4iB@cm-O z00$2q#OL!NNfMHj2>7vM$GCa(CI*86Ns_p8=ME~Bip({bQ zd3iYiMMXua++~M z)6@9FI;Fq_Ttv)}LM)~#D?+O$djE&)QJ5b=1N?(S}m9z9BHYb#owWHLn*03MI0MF@e@>EztG zb4k~#j~_qca=AEv{yep{wE)=db~$o$6IczbRx4-DoWX9lvw#17*-kVXrK_upcsz~} z0*}Yj0`qE;=g*(}cFiv$)_~#R#D-8klu2+A= z@WjLf0BW`R4-qUYE2~dA(AnAfV17Y!`SNA4Z{I$Vot-V7JbAL9*s+9=(?CI(G zWqw4QPA8#IC}}ctAH2iiz~ypbx7(9sGBY!=+wEAb)&>26KmfPfO+`foTeohdqM`zT zo}Qjx>g(%&T#_I_Z*Om@)9L&K(B9roWo0E6i-nq+nv_w`$;kmoS(hl4N@{Cs*7G=z=H= z4GoF9x;l}QlOq}%8%1MdqsYn05p{KSVrXb6DQaiWo)srgo)qD5_&1Bi@?a(ZD;Dcd zpFaJ!TCM)i%*@QOrlux!Mn=Yh@v*TnMn^~Scs!`pYGSb%pFe-5va%9`!N9g{+ZM=| zmX;z((ywpcys2txYBI9|mP~OfbaZqa&CARC`{Bcf_hx5j%erp2JEi>mzcoUkkZ?F0 z10Ij3rMbEJqtP^Iwc0a!y}oeAjvd)rtu|xx=FI?1O-vA u_z?2>e8Yaf|6hSX;GZUwDfy6J0sjXhYKQra;q5s90000 - fr935 - \ No newline at end of file diff --git a/resources-fr935/strings/strings.xml b/resources-fr935/strings/strings.xml deleted file mode 100644 index 0a6cb3d..0000000 --- a/resources-fr935/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - fr935 - \ No newline at end of file diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index d1f87b4..a33eeef 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -46,6 +46,7 @@ Nyári időszámítás Otthoni időzóna mutatása + Az otthoni dátum megjelenítése Otthoni időzóna diff --git a/resources-vivoactive3/ciqbuild.xml b/resources-vivoactive3/ciqbuild.xml deleted file mode 100644 index 126bb74..0000000 --- a/resources-vivoactive3/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-vivoactive3/drawables/drawables.xml b/resources-vivoactive3/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-vivoactive3/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-vivoactive3/drawables/launcher_icon.png b/resources-vivoactive3/drawables/launcher_icon.png deleted file mode 100644 index a25cdb49ec8b1ed479a6bb01dbf051a641c7f3b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2318 zcmV+p3Gw!cP)000W>0fLJSS^xk56?8>dbVG7wVRUJ4ZXi@?ZDjyCFEKDL zF*i2o>dOEC0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#R*V-X4vJ#Skn949=H`yffZgcuVXQIoJ#l0}O*$c1n z8W*+~zSoi5=$*;c7!%PM?;X1N#<;P&1iWOcFt){x1qR4gMh1nI(ysI$=lt#q3xV1T zbJ2Uh$uDi6^E|)b=lp)pdCv1x5fPT8C<+g#GT>=oJFpd~1KfZL7{Cm06Bq#g4O{@` z*K@j(WmV&nJ%Fl!_kr8MED#4$z+w(ea-WO2_IR$}?cBJk^#Jqj*8m;`hI2vXAuOI7 zfAqHotO5Q3L>>|>-y%7GHNOR*AL#mx!1Apt=l`Jrw*cpUC%7d$my7e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n)R zP9zfT-+c4Usg5>x4PI-W|UGMP+9*LB@k38U+}k;!EAR4SE8r_=F7A~AL0!iCGn zk00N;mj6P4>z25X+S}W!N=r-s?Dcy8SY2IRTU}jU;&eLIrH#bg+?){#g%Y7qXmo07 o>R+)~?8K2HM<&+uTPR8Y0o=&3$J}SF$^ZZW07*qoM6N<$f)2}wxc~qF diff --git a/resources-vivoactive3/resources.xml b/resources-vivoactive3/resources.xml deleted file mode 100644 index a1ae17f..0000000 --- a/resources-vivoactive3/resources.xml +++ /dev/null @@ -1,3 +0,0 @@ - - vivoactive3 - \ No newline at end of file diff --git a/resources-vivoactive3/strings/strings.xml b/resources-vivoactive3/strings/strings.xml deleted file mode 100644 index b3f513e..0000000 --- a/resources-vivoactive3/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Vivoactive 3 - \ No newline at end of file diff --git a/resources-vivoactive3m/ciqbuild.xml b/resources-vivoactive3m/ciqbuild.xml deleted file mode 100644 index 46f98aa..0000000 --- a/resources-vivoactive3m/ciqbuild.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources-vivoactive3m/drawables/drawables.xml b/resources-vivoactive3m/drawables/drawables.xml deleted file mode 100644 index c89904c..0000000 --- a/resources-vivoactive3m/drawables/drawables.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 000000FFFFFF - \ No newline at end of file diff --git a/resources-vivoactive3m/drawables/launcher_icon.png b/resources-vivoactive3m/drawables/launcher_icon.png deleted file mode 100644 index a25cdb49ec8b1ed479a6bb01dbf051a641c7f3b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2318 zcmV+p3Gw!cP)000W>0fLJSS^xk56?8>dbVG7wVRUJ4ZXi@?ZDjyCFEKDL zF*i2o>dOEC0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#R*V-X4vJ#Skn949=H`yffZgcuVXQIoJ#l0}O*$c1n z8W*+~zSoi5=$*;c7!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gT-C3#vU0h^E|+Whh5;N72ai1R2tz|dY}vAf%F0SC77M+-y?pS&2R!xEQ!Fkn zPFO6KBZm$hx>0cA{5DJEc)p^d;%{cNxjK`{pePElSZw)vAP}IetPHEwip63f zo6S;EQi9vCTzo)vo8i&Jy*=%NHWQ5VtQ8Y~pm6etK<=uDRUEco{D)E|t z0A8>6<+{4MBR-$6+39pHFV-Tm{P2hfnM`JR?OQ63$z;OeaF9$UnVXx#Fbq^xC7n)R zP9zfT-+c4Usg5>x4PI-W|UGMP+9*LB@k38U+}k;!EAR4SE8r_=F7A~AL0!iCGn zk00N;mj6P4>z25X+S}W!N=r-s?Dcy8SY2IRTU}jU;&eLIrH#bg+?){#g%Y7qXmo07 o>R+)~?8K2HM<&+uTPR8Y0o=&3$J}SF$^ZZW07*qoM6N<$f)2}wxc~qF diff --git a/resources-vivoactive3m/resources.xml b/resources-vivoactive3m/resources.xml deleted file mode 100644 index 5a4bc00..0000000 --- a/resources-vivoactive3m/resources.xml +++ /dev/null @@ -1,3 +0,0 @@ - - vivoactive3m - \ No newline at end of file diff --git a/resources-vivoactive3m/strings/strings.xml b/resources-vivoactive3m/strings/strings.xml deleted file mode 100644 index 5caa48e..0000000 --- a/resources-vivoactive3m/strings/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Vivoactive 3 Music - \ No newline at end of file diff --git a/resources/buildDefault.xml b/resources/buildDefault.xml deleted file mode 100644 index f1edbc7..0000000 --- a/resources/buildDefault.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/drawables/launcher_icon.png b/resources/drawables/launcher_icon.png index 9e5e332086e13b84076be319b5e83531e6f077f0..a3dd353a28fe7ad0f3bebb05fb40bd0f8a25e405 100644 GIT binary patch literal 4587 zcmcIo3piBi8yEdu)0MJOjgbnCIdj7dLo$k(TpBT<9B0mq!OR&mqZxFUE-o!yY${Sz zBs7KEO69UCu~EX7rSNRJ(5^N-Z2Zq4wf$?i|Lr`_nRCwf{=W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LM)~#D?+O$djE&)QJ5b=1N?(S}m9z9BHYb#owWHLn*03MI0MF@e@>EztG zb4k~#j~_qca=AEv{yep{wE)=db~$o$6IczbRx4-DoWX9lvw#17*-kVXrK_upcsz~} z0*}Yj0`qE;=g*(}cFiv$)_~#R#D-8klu2+A= z@WjLf0BW`R4-qUYE2~dA(AnAfV17Y!`SNA4Z{I$Vot-V7JbAL9*s+9=(?CI(G zWqw4QPA8#IC}}ctAH2iiz~ypbx7(9sGBY!=+wEAb)&>26KmfPfO+`foTeohdqM`zT zo}Qjx>g(%&T#_I_Z*Om@)9L&K(B9roWo0E6i-nq+nv_w`$;kmoS(hl4N@{Cs*7G=z=H= z4GoF9x;l}QlOq}%8%1MdqsYn05p{KSVrXb6DQaiWo)srgo)qD5_&1Bi@?a(ZD;Dcd zpFaJ!TCM)i%*@QOrlux!Mn=Yh@v*TnMn^~Scs!`pYGSb%pFe-5va%9`!N9g{+ZM=| zmX;z((ywpcys2txYBI9|mP~OfbaZqa&CARC`{Bcf_hx5j%erp2JEi>mzcoUkkZ?F0 z10Ij3rMbEJqtP^Iwc0a!y}oeAjvd)rtu|xx=FI?1O-vA u_z?2>e8Yaf|6hSX;GZUwDfy6J0sjXhYKQra;q5s9000047 false - - true - - true - + true - - true - + + false false - 3600 + true 0 diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 4eb9397..4532efd 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -65,14 +65,6 @@ - - - - - - - - @@ -80,6 +72,10 @@ + + + + @@ -264,11 +260,12 @@ - @Strings.Calories + @Strings.Steps + @Strings.Calories @Strings.ActiveCalories @Strings.HeartRate @Strings.Distance - @Strings.Altitude + @Strings.Altitude @Strings.Pressure @Strings.ActiveTimeDay @Strings.ActiveTimeWeek diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index 0a1d493..2f10d88 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -43,9 +43,10 @@ Bigger battery font - Daylight Saving Time + Daylight Saving Time (home location) - Show Home Timezone + Show Home Time + Show Home Date Timezone (home location) diff --git a/source/Digital5View.mc b/source/Digital5View.mc index 5936a86..e8fdf2d 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -15,18 +15,40 @@ using Toybox.SensorHistory as Sensor; class Digital5View extends Ui.WatchFace { + var debug = false; var is24Hour; var secondsAlwaysOn; - var lcdFont; - var lcdFontDataFields; var showLeadingZero; var clockTime; var sunRiseSet; - enum { WOMAN, MEN } - enum { UPPER_LEFT, UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT, BOTTOM_FIELD } - enum { M, I, K, B, C, F, T } - enum { KCAL, ACTIVE_KCAL, ACTIVE_KCAL_REACHED } + enum { + WOMAN = 0, + MEN = 1 + } + + enum { + UPPER_LEFT = 0, + UPPER_RIGHT = 1, + LOWER_LEFT = 2, + LOWER_RIGHT = 3, + BOTTOM_FIELD = 4 + } + + enum { + M = 0, + I = 1, + K = 2, + B = 3, + C = 4, + F = 5, + T = 6 + } + enum { + KCAL = 0, + ACTIVE_KCAL = 1, + ACTIVE_KCAL_REACHED = 2 + } const BRIGHT_BLUE = 0x0055ff; const BRIGHT_GREEN = 0x55ff00; const BRIGHT_RED = 0xff0055; @@ -42,9 +64,12 @@ class Digital5View extends Ui.WatchFace { var currentWeather; var digitalUpright72, digitalUpright26, digitalUpright24, digitalUpright20, digitalUpright16; var burnedIcon, burnedIconWhite, stepsIcon, stepsIconWhite; - + var alarmIcon, alarmIconWhite; var width, height; var centerX, centerY; + var upperFieldHeightPercentage, fieldHeightPercentage; + var dataFieldsTop, dataFieldsTopPadding; + var fieldHeight; var midnightInfo; var nowinfo; var actinfo; @@ -55,13 +80,16 @@ class Digital5View extends Ui.WatchFace { var bpm, showBpmZones, maxBpm, currentZone; var distanceUnit, distance; var tempUnit; - var altUnit; - var coloredStepText; + var batteryIconOffsetX; + var coloredCalorieText; var upperLeftField, upperRightField, lowerLeftField, lowerRightField, bottomField; var darkUpperBackground, upperBackgroundColor, upperForegroundColor; var darkFieldBackground, fieldBackgroundColor, fieldForegroundColor; - var deviceName, apiKey; + var apiKey; + var secondsFont = 0; + var secondsYPosition = 0; + function initialize() { WatchFace.initialize(); @@ -73,30 +101,45 @@ class Digital5View extends Ui.WatchFace { digitalUpright24 = Ui.loadResource(Rez.Fonts.digitalUpright24); digitalUpright20 = Ui.loadResource(Rez.Fonts.digitalUpright20); digitalUpright16 = Ui.loadResource(Rez.Fonts.digitalUpright16); - burnedIcon = Ui.loadResource(Rez.Drawables.burned); - burnedIconWhite = Ui.loadResource(Rez.Drawables.burnedWhite); - stepsIcon = Ui.loadResource(Rez.Drawables.steps); - stepsIconWhite = Ui.loadResource(Rez.Drawables.stepsWhite); - weekdays[0] = Ui.loadResource(Rez.Strings.Sun); - weekdays[1] = Ui.loadResource(Rez.Strings.Mon); - weekdays[2] = Ui.loadResource(Rez.Strings.Tue); - weekdays[3] = Ui.loadResource(Rez.Strings.Wed); - weekdays[4] = Ui.loadResource(Rez.Strings.Thu); - weekdays[5] = Ui.loadResource(Rez.Strings.Fri); - weekdays[6] = Ui.loadResource(Rez.Strings.Sat); - months[0] = Ui.loadResource(Rez.Strings.Jan); - months[1] = Ui.loadResource(Rez.Strings.Feb); - months[2] = Ui.loadResource(Rez.Strings.Mar); - months[3] = Ui.loadResource(Rez.Strings.Apr); - months[4] = Ui.loadResource(Rez.Strings.May); - months[5] = Ui.loadResource(Rez.Strings.Jun); - months[6] = Ui.loadResource(Rez.Strings.Jul); - months[7] = Ui.loadResource(Rez.Strings.Aug); - months[8] = Ui.loadResource(Rez.Strings.Sep); - months[9] = Ui.loadResource(Rez.Strings.Oct); - months[10] = Ui.loadResource(Rez.Strings.Nov); - months[11] = Ui.loadResource(Rez.Strings.Dec); - deviceName = getDeviceName(); + burnedIcon = Ui.loadResource(Rez.Drawables.burned); + burnedIconWhite = Ui.loadResource(Rez.Drawables.burnedWhite); + stepsIcon = Ui.loadResource(Rez.Drawables.steps); + stepsIconWhite = Ui.loadResource(Rez.Drawables.stepsWhite); + weekdays[0] = Ui.loadResource(Rez.Strings.Sun); + weekdays[1] = Ui.loadResource(Rez.Strings.Mon); + weekdays[2] = Ui.loadResource(Rez.Strings.Tue); + weekdays[3] = Ui.loadResource(Rez.Strings.Wed); + weekdays[4] = Ui.loadResource(Rez.Strings.Thu); + weekdays[5] = Ui.loadResource(Rez.Strings.Fri); + weekdays[6] = Ui.loadResource(Rez.Strings.Sat); + months[0] = Ui.loadResource(Rez.Strings.Jan); + months[1] = Ui.loadResource(Rez.Strings.Feb); + months[2] = Ui.loadResource(Rez.Strings.Mar); + months[3] = Ui.loadResource(Rez.Strings.Apr); + months[4] = Ui.loadResource(Rez.Strings.May); + months[5] = Ui.loadResource(Rez.Strings.Jun); + months[6] = Ui.loadResource(Rez.Strings.Jul); + months[7] = Ui.loadResource(Rez.Strings.Aug); + months[8] = Ui.loadResource(Rez.Strings.Sep); + months[9] = Ui.loadResource(Rez.Strings.Oct); + months[10] = Ui.loadResource(Rez.Strings.Nov); + months[11] = Ui.loadResource(Rez.Strings.Dec); + + width = dc.getWidth(); + height = dc.getHeight(); + centerX = width * 0.5; + centerY = height * 0.5; + batteryIconOffsetX = 0; + upperFieldHeightPercentage = 0.625; + dataFieldsTop = height * upperFieldHeightPercentage; + dataFieldsTopPadding = 7; + fieldHeightPercentage = 0.125; + fieldHeight = fieldHeightPercentage * height; + + distanceUnit = Sys.getDeviceSettings().distanceUnits; + + if (debug) {System.println("width: " + width + ", height: " + height);} + } function onUpdate(dc) { @@ -106,19 +149,29 @@ class Digital5View extends Ui.WatchFace { is24Hour = Sys.getDeviceSettings().is24Hour; secondsAlwaysOn = App.getApp().getProperty("SecondsAlwaysOn"); - lcdFont = App.getApp().getProperty("LcdFont"); - lcdFontDataFields = App.getApp().getProperty("LcdFontDataFields"); showLeadingZero = App.getApp().getProperty("ShowLeadingZero"); + tempUnit = App.getApp().getProperty("TempUnit"); + coloredCalorieText = App.getApp().getProperty("ColorizeCalorieText"); + upperLeftField = App.getApp().getProperty("UpperLeftField").toNumber(); + upperRightField = App.getApp().getProperty("UpperRightField").toNumber(); + lowerLeftField = App.getApp().getProperty("LowerLeftField").toNumber(); + lowerRightField = App.getApp().getProperty("LowerRightField").toNumber(); + bottomField = App.getApp().getProperty("BottomField").toNumber(); + darkUpperBackground = App.getApp().getProperty("DarkUpperBackground"); + upperBackgroundColor = darkUpperBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE; + upperForegroundColor = darkUpperBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK; + darkFieldBackground = App.getApp().getProperty("DarkFieldBackground"); + fieldBackgroundColor = darkFieldBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE; + fieldForegroundColor = darkFieldBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK; + apiKey = App.getApp().getProperty("DarkSkyApiKey"); + showBpmZones = App.getApp().getProperty("BpmZones"); clockTime = Sys.getClockTime(); sunRiseSet = new SunRiseSunSet(); currentWeather = App.getApp().getProperty("CurrentWeather"); + var showMoveBar = App.getApp().getProperty("ShowMoveBar"); // General - width = dc.getWidth(); - height = dc.getHeight(); - centerX = width * 0.5; - centerY = height * 0.5; midnightInfo = Greg.info(Time.today(), Time.FORMAT_SHORT); nowinfo = Greg.info(Time.now(), Time.FORMAT_SHORT); actinfo = Act.getInfo(); @@ -131,53 +184,28 @@ class Digital5View extends Ui.WatchFace { stepsReached = steps.toDouble() / stepGoal; kcal = actinfo.calories; bpm = (hr.heartRate != Act.INVALID_HR_SAMPLE && hr.heartRate > 0) ? hr.heartRate : 0; - showBpmZones = App.getApp().getProperty("BpmZones"); - distanceUnit = Sys.getDeviceSettings().distanceUnits; - tempUnit = App.getApp().getProperty("TempUnit"); - altUnit = App.getApp().getProperty("AltUnit"); distance = distanceUnit == 0 ? actinfo.distance * 0.00001 : actinfo.distance * 0.00001 * 0.621371; - coloredStepText = App.getApp().getProperty("ColorizeStepText"); - coloredCalorieText = App.getApp().getProperty("ColorizeCalorieText"); - upperLeftField = App.getApp().getProperty("UpperLeftField").toNumber(); - upperRightField = App.getApp().getProperty("UpperRightField").toNumber(); - lowerLeftField = App.getApp().getProperty("LowerLeftField").toNumber(); - lowerRightField = App.getApp().getProperty("LowerRightField").toNumber(); - bottomField = App.getApp().getProperty("BottomField").toNumber(); - darkUpperBackground = App.getApp().getProperty("DarkUpperBackground"); - upperBackgroundColor = darkUpperBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE; - upperForegroundColor = darkUpperBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK; - darkFieldBackground = App.getApp().getProperty("DarkFieldBackground"); - fieldBackgroundColor = darkFieldBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE; - fieldForegroundColor = darkFieldBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK; - apiKey = App.getApp().getProperty("DarkSkyApiKey"); - var charge = systemStats.battery + 0.5; - var showChargePercentage = App.getApp().getProperty("ShowChargePercentage"); - var showPercentageUnder20 = App.getApp().getProperty("ShowPercentageUnder20"); - var dayOfWeek = nowinfo.day_of_week; var lcdBackgroundVisible = App.getApp().getProperty("LcdBackground"); - var connected = Sys.getDeviceSettings().phoneConnected; var profile = UserProfile.getProfile(); - var notificationCount = Sys.getDeviceSettings().notificationCount; var alarmCount = Sys.getDeviceSettings().alarmCount; var dst = App.getApp().getProperty("DST"); var timezoneOffset = clockTime.timeZoneOffset; var showHomeTimezone = App.getApp().getProperty("ShowHomeTimezone"); var homeTimezoneOffset = dst ? App.getApp().getProperty("HomeTimezoneOffset") + 3600 : App.getApp().getProperty("HomeTimezoneOffset"); - var onTravel = timezoneOffset != homeTimezoneOffset; + var onTravel = (timezoneOffset != homeTimezoneOffset) && showHomeTimezone; + var dayOfWeek = nowinfo.day_of_week; var dayMonth = App.getApp().getProperty("DateFormat") == 0; var dateFormat = dayMonth ? "$1$.$2$" : "$2$/$1$"; var monthAsText = App.getApp().getProperty("MonthAsText"); var showCalendarWeek = App.getApp().getProperty("ShowCalendarWeek"); - var showMoveBar = App.getApp().getProperty("ShowMoveBar"); var showStepBar = App.getApp().getProperty("ShowStepBar"); var showCalorieBar = App.getApp().getProperty("ShowCalorieBar"); var hourColor = App.getApp().getProperty("HourColor").toNumber(); var minuteColor = App.getApp().getProperty("MinuteColor").toNumber(); - var coloredBattery = App.getApp().getProperty("ColoredBattery"); var showSunriseSunset = App.getApp().getProperty("SunriseSunset"); var activeKcalGoal = App.getApp().getProperty("ActiveKcalGoal").toNumber(); - var biggerBatteryFont = App.getApp().getProperty("BiggerBatteryFont"); + var gender; var userWeight; var userHeight; @@ -227,72 +255,74 @@ class Digital5View extends Ui.WatchFace { // Draw Background dc.setPenWidth(1); dc.setColor(upperBackgroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 0, width, 151); + dc.fillRectangle(0, 0, width, dataFieldsTop + 1); if (darkFieldBackground) { dc.setColor(fieldBackgroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 151, width, 89); + dc.fillRectangle(0, dataFieldsTop + 1, width, 3 * fieldHeight); dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 151, width, 2); - dc.fillRectangle(0, 180, width, 2); - dc.fillRectangle(0, 211, width, 2); - dc.fillRectangle(119, 151, 2, 60); + dc.fillRectangle(0, dataFieldsTop + 1, width, 2); // top separator line + dc.fillRectangle(0, dataFieldsTop + fieldHeight, width, 2); // middle separator line + dc.fillRectangle(0, dataFieldsTop + 2 * fieldHeight, width, 2); // bottom separator line + dc.fillRectangle(centerX - 1, dataFieldsTop + 1, 2, 2 * fieldHeight); // vertical separator line } else { dc.setColor(fieldBackgroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 151, width, 89); + dc.fillRectangle(0, dataFieldsTop + 1, width, 3 * fieldHeight); dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 149, width, 2); + dc.fillRectangle(0, dataFieldsTop - 1, width, 2); // top separator line dc.setColor(Gfx.COLOR_DK_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 151, width, 151); + dc.drawLine(0, dataFieldsTop + 1, width, dataFieldsTop + 1); // top separator line dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 152, width, 152); + dc.drawLine(0, dataFieldsTop + 2, width, dataFieldsTop + 2); // top separator line shadow dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 179, width, 2); + dc.fillRectangle(0, dataFieldsTop + fieldHeight - 1, width, 2); // middle separator line dc.setColor(Gfx.COLOR_DK_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 181, width, 181); + dc.drawLine(0, dataFieldsTop + fieldHeight + 1, width, dataFieldsTop + fieldHeight + 1); // middle separator line dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 182, width, 182); + dc.drawLine(0, dataFieldsTop + fieldHeight + 2, width, dataFieldsTop + fieldHeight + 2); // middle separator line shadow dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(0, 210, width, 2); + dc.fillRectangle(0, dataFieldsTop + 2 * fieldHeight, width, 2); dc.setColor(Gfx.COLOR_DK_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 212, width, 212); + dc.drawLine(0, dataFieldsTop + 2 * fieldHeight + 2, width, dataFieldsTop + 2 * fieldHeight + 2); dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT); - dc.drawLine(0, 213, width, 213); + dc.drawLine(0, dataFieldsTop + 2 * fieldHeight + 3, width, dataFieldsTop + 2 * fieldHeight + 3); dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); - dc.fillRectangle(119, 150, 2, 60); - } + dc.fillRectangle(centerX - 1, dataFieldsTop, 2, 2 * fieldHeight); // bottom field + } - if (showPercentageUnder20 and charge < 20) { showChargePercentage = true; } + // draw Battery + var biggerBatteryFont = App.getApp().getProperty("BiggerBatteryFont"); + var showChargePercentage = App.getApp().getProperty("ShowChargePercentage"); + var showPercentageUnder20 = App.getApp().getProperty("ShowPercentageUnder20"); + var charge = systemStats.battery + 0.5; + var coloredBattery = App.getApp().getProperty("ColoredBattery"); + showChargePercentage = showPercentageUnder20 && charge < 20; + + if (debug) {System.println("charge: " + charge + ", showPercentageUnder20: " + showPercentageUnder20 + ", showChargePercentage: " + showChargePercentage);} - var iconOffsetX; - // Battery if (showChargePercentage) { - iconOffsetX = charge < 100 ? (lcdFont ? 4 : 5) : 0; + batteryIconOffsetX = 7; // Charge Text dc.setColor(upperForegroundColor, upperBackgroundColor); - if (lcdFont) { - dc.drawText(140 - iconOffsetX, 1, digitalUpright20, charge.toNumber(), Gfx.TEXT_JUSTIFY_RIGHT); - } else { - dc.drawText(140 - iconOffsetX, -2, Graphics.FONT_XTINY, charge.toNumber(), Gfx.TEXT_JUSTIFY_RIGHT); - } + dc.drawText(centerX, 1, digitalUpright20, charge.toNumber(), Gfx.TEXT_JUSTIFY_CENTER); // Percentage Sign - dc.drawLine(142 - iconOffsetX, 16, 148 - iconOffsetX, 6); - dc.drawRectangle(142 - iconOffsetX, 7, 3, 3); - dc.drawRectangle(145 - iconOffsetX, 14, 3, 3); + dc.drawLine(centerX + 20 - batteryIconOffsetX, 16, centerX + 28 - batteryIconOffsetX, 6); + dc.drawRectangle(centerX + 20 - batteryIconOffsetX, 7, 3, 3); + dc.drawRectangle(centerX + 26 - batteryIconOffsetX, 14, 3, 3); // Vertical Battery dc.setColor(upperForegroundColor, upperBackgroundColor); - dc.drawRectangle(98 + iconOffsetX, 4, 8, 16); - dc.fillRectangle(100 + iconOffsetX, 3, 4, 1); + dc.drawRectangle(centerX - 27 + batteryIconOffsetX, 4, 8, 16); + dc.fillRectangle(centerX - 25 + batteryIconOffsetX, 3, 4, 1); if (coloredBattery) { setBatteryColor(charge, dc); @@ -300,71 +330,69 @@ class Digital5View extends Ui.WatchFace { dc.setColor(charge < 20 ? BRIGHT_RED : upperForegroundColor, upperBackgroundColor); } var chargeHeight = clamp(1, 12, 12.0 * charge / 100.0).toNumber(); - dc.fillRectangle(100 + iconOffsetX, clamp(6, 18, 18 - chargeHeight), 4, chargeHeight); + dc.fillRectangle(centerX - 25 + batteryIconOffsetX, clamp(6, 18, 18 - chargeHeight), 4, chargeHeight); } else { - iconOffsetX = lcdFont ? 4 : 5; + batteryIconOffsetX = 4; // Horizontal Battery dc.setColor(upperForegroundColor, upperBackgroundColor); - dc.drawRectangle(106, 8, 28, 11); - dc.fillRectangle(134, 11, 2, 5); + dc.drawRectangle(centerX - 14, 8, 28, 11); + dc.fillRectangle(centerX + 14, 11, 2, 5); if (coloredBattery) { setBatteryColor(charge, dc); } else { dc.setColor(charge < 20 ? BRIGHT_RED : upperForegroundColor, upperBackgroundColor); } - dc.fillRectangle(108, 10 , clamp (1, 24, 24.0 * charge / 100.0), 7); - } + dc.fillRectangle(centerX - 12, 10 , clamp (1, 24, 24.0 * charge / 100.0), 7); + } - // Notification + // draw notification + var notificationCount = Sys.getDeviceSettings().notificationCount; if (notificationCount > 0) { + var startX = centerX - 55 - batteryIconOffsetX; + var startY = 18; + + if (debug) {System.println("startX: " + startX + ", startY: " + startY);} + dc.setColor(darkUpperBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK, upperBackgroundColor); - dc.fillRectangle(58, 18, 18, 11); + dc.fillRectangle(startX, startY, 18, 11); dc.setColor(darkUpperBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE, upperBackgroundColor); - dc.drawLine(59, 18, 67, 26); - dc.drawLine(74, 18, 66, 26); - dc.drawLine(58, 29, 64, 23); - dc.drawLine(75, 29, 69, 23); + dc.drawLine(startX + 1, startY, startX + 9, startY + 8); + dc.drawLine(startX + 16, startY, startX + 8, startY + 8); + dc.drawLine(startX, startY + 11, startX + 6, startY + 5); + dc.drawLine(startX + 17, startY + 11, startX + 11, startY + 5); } - // BLE + // draw bluetooth + var connected = Sys.getDeviceSettings().phoneConnected; + if (connected) { + var startX = centerX - 30 - batteryIconOffsetX; + var startY = 12; dc.setColor(upperForegroundColor, upperBackgroundColor); - dc.drawLine(83 + iconOffsetX, 12, 90 + iconOffsetX, 19); - dc.drawLine(90 + iconOffsetX, 19, 86 + iconOffsetX, 23); - dc.drawLine(86 + iconOffsetX, 23, 86 + iconOffsetX, 10); - dc.drawLine(86 + iconOffsetX, 10, 90 + iconOffsetX, 14); - dc.drawLine(90 + iconOffsetX, 14, 82 + iconOffsetX, 22); - } - + dc.drawLine(startX, startY, startX + 7, startY + 7); + dc.drawLine(startX + 7, 19, startX + 3, startY + 11); + dc.drawLine(startX + 3, 23, startX + 3, startY - 2); + dc.drawLine(startX + 3, startY - 2, startX + 7, startY + 2); + dc.drawLine(startX + 7, startY + 2, startX -1, startY + 10); + } + + // Draw Do not disturb dc.setColor(upperForegroundColor, upperBackgroundColor); - - // Do not disturb if (System.getDeviceSettings().doNotDisturb) { - dc.drawCircle(161 - iconOffsetX, 17, 7); - dc.fillRectangle(158 - iconOffsetX, 16, 7, 3); + var noDisturbX = centerX + 28 + batteryIconOffsetX; + dc.drawCircle(noDisturbX, 17, 7); + dc.fillRectangle(noDisturbX - 3, 16, 7, 3); } - // Alarm + // Draw Alarm if (alarmCount > 0) { - dc.fillPolygon([[178, 17], [180, 19], [181, 21], [182, 25], [183, 26], [183, 27], [172, 27], [172, 26], [173, 25], [174, 21], [175, 19]]); - dc.fillPolygon([[176, 28], [178, 30], [180, 28]]); + var alarmX = centerX + 42 + batteryIconOffsetX; + dc.fillPolygon([[alarmX + 6, 17], [alarmX + 9, 21], [alarmX + 10, 25], [alarmX + 11, 26], [alarmX + 11, 27], [alarmX, 27], [alarmX, 26], [alarmX + 1, 25], [alarmX + 2, 21], [alarmX + 3, 19]]); + dc.fillPolygon([[alarmX + 4, 28], [alarmX + 6, 30], [alarmX + 8, 28]]); } - // Sunrise/Sunset - if (showSunriseSunset) { - calcSunriseSunset(); - dc.fillPolygon([[45, 50], [57, 50], [50, 44]]); // upIcon - dc.fillPolygon([[184, 44], [194, 44], [188, 49]]); // downIcon - if (lcdFont) { - dc.drawText(59, 36, digitalUpright16, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); - dc.drawText(181, 36, digitalUpright16, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); - } else { - var y = (deviceName.equals("vivoactive3") || deviceName.equals("vivoactive3m")) ? 32 : 28; - dc.drawText(57, y, Graphics.FONT_XTINY, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); - dc.drawText(182, y, Graphics.FONT_XTINY, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); - } - } + var arcRadius = centerX - 3; // Step Bar background if (showStepBar) { @@ -372,7 +400,7 @@ class Digital5View extends Ui.WatchFace { dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); for(var i = 0; i < 10 ; i++) { var startAngleLeft = 130 + (i * 6); - dc.drawArc(centerX, centerY, 117, 0, startAngleLeft, startAngleLeft + 5); + dc.drawArc(centerX, centerY, arcRadius, 0, startAngleLeft, startAngleLeft + 5); } // Step Goal Bar @@ -387,7 +415,7 @@ class Digital5View extends Ui.WatchFace { } for(var i = 0; i < endIndex ; i++) { var startAngleLeft = 184 - (i * 6); - dc.drawArc(centerX, centerY, 117, 0, startAngleLeft, startAngleLeft + 5); + dc.drawArc(centerX, centerY, arcRadius, 0, startAngleLeft, startAngleLeft + 5); } } @@ -404,7 +432,7 @@ class Digital5View extends Ui.WatchFace { } for(var i = 0; i < 10 ; i++) { var startAngleRight = -10 + (i * 6); - dc.drawArc(centerX, centerY, 117, 0, startAngleRight, startAngleRight + 5); + dc.drawArc(centerX, centerY, arcRadius, 0, startAngleRight, startAngleRight + 5); } // KCal Goal Bar @@ -428,217 +456,195 @@ class Digital5View extends Ui.WatchFace { } } - // Move Bar + // draw Move Bar if (showMoveBar) { var moveBarLevel = actinfo.moveBarLevel; + + var moveBarLength = .75 * width; + var moveBarLeft = (width - moveBarLength) / 2; + var moveBarLeftPart = moveBarLength * 0.388888889; + var moveBarRightStart = moveBarLeftPart + moveBarLeft + 2; + var moveBarRightPart = moveBarLength * 0.138888889; + var moveBarX = dataFieldsTop - 6; + + if (debug) {System.println("moveBarLength: " + moveBarLength + "moveBarLeft: " + moveBarLeft + "moveBarLeftPart: " + moveBarLeftPart + "moveBarRightStart: " + moveBarRightStart + "moveBarRightPart: " + moveBarRightPart + "moveBarX: " + moveBarX);} + dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); - dc.fillRectangle(29, 144, 73, 4); - for (var i = 0 ; i < 4 ; i++) { dc.fillRectangle(104 + (i * 27), 144, 25, 4); } - if (moveBarLevel > Act.MOVE_BAR_LEVEL_MIN) { dc.setColor(Gfx.COLOR_RED, upperBackgroundColor); } - dc.fillRectangle(29, 144, 73, 4); - for (var i = 0 ; i < (moveBarLevel - 1) ; i++) { dc.fillRectangle(104 + (i * 27), 144, 25, 4); } - } - - - // ******************** TIME ****************************************** - if (lcdBackgroundVisible && lcdFont) { + dc.fillRectangle(moveBarLeft, moveBarX, moveBarLeftPart, 4); + for (var i = 0 ; i < 4 ; i++) { + dc.fillRectangle(moveBarRightStart + (i * (moveBarRightPart + 2)), moveBarX, moveBarRightPart, 4); + } + + if (moveBarLevel > Act.MOVE_BAR_LEVEL_MIN) { + dc.setColor(Gfx.COLOR_RED, upperBackgroundColor); + } + + dc.fillRectangle(moveBarLeft, moveBarX, moveBarLeftPart, 4); + + for (var i = 0 ; i < (moveBarLevel - 1) ; i++) { + dc.fillRectangle(moveBarRightStart + (i * (moveBarRightPart + 2)), moveBarX, moveBarRightPart, 4); + } + } + + // Date and home timezone + dc.setColor(upperForegroundColor, upperBackgroundColor); + var dateTimeFont = digitalUpright26; + var dateTimefontSize = Graphics.getFontHeight(dateTimeFont); + var dateYPosition = dataFieldsTop - 9 - dateTimefontSize; + var dateXPosition = centerX - 99; + var dateTimeText = calcHomeDateTime(); + + // draw Time + var timeFont = digitalUpright72 ; + var timeFontSize = Graphics.getFontHeight(timeFont); + var timeYPosition = dateYPosition - timeFontSize + 10; + secondsFont = digitalUpright20; + secondsYPosition = dateYPosition - Graphics.getFontHeight(secondsFont); + + if (lcdBackgroundVisible) { dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); if (showLeadingZero) { - dc.drawText(centerX, 51, digitalUpright72, "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, digitalUpright72, "88:88", Gfx.TEXT_JUSTIFY_CENTER); } else { if (is24Hour) { - dc.drawText(centerX, 51, digitalUpright72, clockTime.hour < 10 ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, digitalUpright72, clockTime.hour < 10 ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); } else { - dc.drawText(centerX, 51, digitalUpright72, (clockTime.hour < 10 || clockTime.hour > 12) ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, digitalUpright72, (clockTime.hour < 10 || clockTime.hour > 12) ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); } } } - if (is24Hour) { - drawTime(hourColor, minuteColor, lcdFont ? digitalUpright72 : Graphics.FONT_NUMBER_HOT, dc); - } else { + drawTime(hourColor, minuteColor, timeFont, dc, timeYPosition); + if (!is24Hour) { var amPm = clockTime.hour < 12 ? "am" : "pm"; - if (lcdFont) { - drawTime(hourColor, minuteColor, digitalUpright72, dc); - dc.drawText(195, 93, digitalUpright20, amPm, Gfx.TEXT_JUSTIFY_LEFT); - } else { - drawTime(hourColor, minuteColor, Graphics.FONT_NUMBER_HOT, dc); - dc.drawText(191, 87, Graphics.FONT_XTINY, amPm, Gfx.TEXT_JUSTIFY_LEFT); - } + dc.drawText(195, 93, digitalUpright20, amPm, Gfx.TEXT_JUSTIFY_LEFT); } + // draw Date + if (onTravel) { + dc.drawText(dateXPosition, dateYPosition, dateTimeFont, dateTimeText[0], Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(width - dateXPosition, dateYPosition, dateTimeFont, dateTimeText[1], Gfx.TEXT_JUSTIFY_RIGHT); + } + else { + dc.drawText(centerX, dateYPosition, dateTimeFont, dateTimeText[0], Gfx.TEXT_JUSTIFY_CENTER); + } - // ******************** DATE ****************************************** - // KW + // draw Calendar Week if (showCalendarWeek) { var calendarWeekText = Ui.loadResource(Rez.Strings.CalendarWeek); - dc.drawText((lcdFont ? 43 : 50), (lcdFont ? 71 : 66), lcdFont ? digitalUpright20 : Graphics.FONT_XTINY, (calendarWeekText), Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText((lcdFont ? 43 : 50), (lcdFont ? 93 : 87), lcdFont ? digitalUpright20 : Graphics.FONT_XTINY, (getWeekOfYear(nowinfo)), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 77, secondsYPosition - Graphics.getFontHeight(digitalUpright20), digitalUpright20, (calendarWeekText), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 77, secondsYPosition, digitalUpright20, (getWeekOfYear(nowinfo)), Gfx.TEXT_JUSTIFY_RIGHT); } - // Date and home timezone - dc.setColor(upperForegroundColor, upperBackgroundColor); - var dateYPosition = showMoveBar ? 116 : 119; - dateYPosition = lcdFont ? dateYPosition : dateYPosition - 2; - if (onTravel && showHomeTimezone) { - var homeDayOfWeek = dayOfWeek - 1; - var homeDay = nowinfo.day; - var homeMonth = nowinfo.month; - var currentSeconds = clockTime.hour * 3600 + clockTime.min * 60 + clockTime.sec; - var utcSeconds = currentSeconds - clockTime.timeZoneOffset;// - (dst ? 3600 : 0); - var homeSeconds = utcSeconds + homeTimezoneOffset; - if (dst) { homeSeconds = homeTimezoneOffset > 0 ? homeSeconds : homeSeconds - 3600; } - var homeHour = ((homeSeconds / 3600)).toNumber() % 24l; - var homeMinute = ((homeSeconds - (homeHour.abs() * 3600)) / 60) % 60; - if (homeHour < 0) { - homeHour += 24; - homeDay--; - if (homeDay == 0) { - homeMonth--; - if (homeMonth == 0) { homeMonth = 12; } - homeDay = daysOfMonth(homeMonth); - } - homeDayOfWeek--; - if (homeDayOfWeek < 0) { homeDayOfWeek = 6; } - } - if (homeMinute < 0) { homeMinute += 60; } - var ampm = is24Hour ? "" : homeHour < 12 ? "A" : "P"; - homeHour = is24Hour ? homeHour : (homeHour == 12) ? homeHour : (homeHour % 12); - var weekdayText = weekdays[homeDayOfWeek]; - var dateText = dayMonth ? nowinfo.day.format(showLeadingZero ? "%02d" : "%01d") + " " + months[homeMonth - 1] : months[homeMonth - 1] + " " + nowinfo.day.format(showLeadingZero ? "%02d" : "%01d"); - var dateNumberText = Lang.format(dateFormat, [homeDay.format(showLeadingZero ? "%02d" : "%01d"), homeMonth.format(showLeadingZero ? "%02d" : "%01d")]); - var timeText = Lang.format("$1$:$2$", [homeHour.format(showLeadingZero ? "%02d" : "%01d"), homeMinute.format("%02d")]) + ampm; - dc.drawText(28, dateYPosition, lcdFont ? digitalUpright26 : Graphics.FONT_XTINY, weekdayText + (monthAsText ? dateText : dateNumberText), Gfx.TEXT_JUSTIFY_LEFT); - dc.drawText(216, dateYPosition, lcdFont ? digitalUpright26 : Graphics.FONT_XTINY, timeText, Gfx.TEXT_JUSTIFY_RIGHT); - } else { - var weekdayText = weekdays[dayOfWeek - 1]; - var dateText = dayMonth ? nowinfo.day.format(showLeadingZero ? "%02d" : "%01d") + " " + months[nowinfo.month - 1] : months[nowinfo.month - 1] + " " + nowinfo.day.format(showLeadingZero ? "%02d" : "%01d"); - var dateNumberText = Lang.format(dateFormat, [nowinfo.day.format(showLeadingZero ? "%02d" : "%01d"), nowinfo.month.format(showLeadingZero ? "%02d" : "%01d")]); - dc.drawText(centerX, dateYPosition, lcdFont ? digitalUpright26 : Graphics.FONT_XTINY, weekdayText + (monthAsText ? dateText : dateNumberText), Gfx.TEXT_JUSTIFY_CENTER); + // draw Sunrise/Sunset + if (showSunriseSunset) { + var notificationsBottomY = 30; + var sunRiseY = (timeYPosition - notificationsBottomY) / 2 + notificationsBottomY; + calcSunriseSunset(); + drawArrow(dc, centerX - 70, sunRiseY, 0); + drawArrow(dc, centerX + 60, sunRiseY, 1); + dc.drawText(centerX - 50, sunRiseY - 5, digitalUpright16, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(centerX + 55 , sunRiseY - 5, digitalUpright16, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); } // ******************** DATA FIELDS *********************************** + var xyPositions = getXYPositions(UPPER_LEFT); // UpperLeft switch(upperLeftField) { - case 0: drawSteps(getXYPositions(UPPER_LEFT), dc, false); break; - case 1: drawCalories(getXYPositions(UPPER_LEFT), dc, KCAL, UPPER_LEFT); break; - case 2: drawCalories(getXYPositions(UPPER_LEFT), dc, ACTIVE_KCAL, UPPER_LEFT); break; - case 3: drawHeartRate(getXYPositions(UPPER_LEFT), dc, UPPER_LEFT); break; - case 4: drawDistance(getXYPositions(UPPER_LEFT), dc); break; - case 5: drawWithUnit(getXYPositions(UPPER_LEFT), dc, 5, UPPER_LEFT); break; - case 6: drawWithUnit(getXYPositions(UPPER_LEFT), dc, 6, UPPER_LEFT); break; - case 7: drawActiveTime(getXYPositions(UPPER_LEFT), dc, true, UPPER_LEFT); break; - case 8: drawActiveTime(getXYPositions(UPPER_LEFT), dc, false, UPPER_LEFT); break; - case 9: drawFloors(getXYPositions(UPPER_LEFT), dc, UPPER_LEFT); break; - case 10: drawMeters(getXYPositions(UPPER_LEFT), dc, UPPER_LEFT); break; - case 11: drawActKcalAvg(getXYPositions(UPPER_LEFT), dc, UPPER_LEFT); break; - case 12: drawSteps(getXYPositions(UPPER_LEFT), dc, true); break; - case 13: drawWithUnit(getXYPositions(UPPER_LEFT), dc, 13, UPPER_LEFT); break; - case 14: drawCalories(getXYPositions(UPPER_LEFT), dc, ACTIVE_KCAL_REACHED, UPPER_LEFT); break; + case 0: drawSteps(xyPositions, dc, false, UPPER_LEFT); break; + case 1: drawCalories(xyPositions, dc, KCAL, UPPER_LEFT); break; + case 2: drawCalories(xyPositions, dc, ACTIVE_KCAL, UPPER_LEFT); break; + case 3: drawHeartRate(xyPositions, dc, UPPER_LEFT); break; + case 4: drawWithUnit(xyPositions, dc, 4, UPPER_LEFT); break; + case 5: drawWithUnit(xyPositions, dc, 5, UPPER_LEFT); break; + case 6: drawWithUnit(xyPositions, dc, 6, UPPER_LEFT); break; + case 7: drawActiveTime(xyPositions, dc, true, UPPER_LEFT); break; + case 8: drawActiveTime(xyPositions, dc, false, UPPER_LEFT); break; + case 9: drawFloors(xyPositions, dc, UPPER_LEFT); break; + case 10: drawMeters(xyPositions, dc, UPPER_LEFT); break; + case 11: drawActKcalAvg(xyPositions, dc, UPPER_LEFT); break; + case 12: drawSteps(xyPositions, dc, true); break; + case 13: drawWithUnit(xyPositions, dc, 13, UPPER_LEFT); break; + case 14: drawCalories(xyPositions, dc, ACTIVE_KCAL_REACHED, UPPER_LEFT); break; } + xyPositions = getXYPositions(UPPER_RIGHT); // UpperRight switch(upperRightField) { - case 0: drawSteps(getXYPositions(UPPER_RIGHT), dc, false); break; - case 1: drawCalories(getXYPositions(UPPER_RIGHT), dc, KCAL, UPPER_RIGHT); break; - case 2: drawCalories(getXYPositions(UPPER_RIGHT), dc, ACTIVE_KCAL, UPPER_RIGHT); break; - case 3: drawHeartRate(getXYPositions(UPPER_RIGHT), dc, UPPER_RIGHT); break; - case 4: drawDistance(getXYPositions(UPPER_RIGHT), dc); break; - case 5: drawWithUnit(getXYPositions(UPPER_RIGHT), dc, 5, UPPER_RIGHT); break; - case 6: drawWithUnit(getXYPositions(UPPER_RIGHT), dc, 6, UPPER_RIGHT); break; - case 7: drawActiveTime(getXYPositions(UPPER_RIGHT), dc, true, UPPER_RIGHT); break; - case 8: drawActiveTime(getXYPositions(UPPER_RIGHT), dc, false, UPPER_RIGHT); break; - case 9: drawFloors(getXYPositions(UPPER_RIGHT), dc, UPPER_RIGHT); break; - case 10: drawMeters(getXYPositions(UPPER_RIGHT), dc, UPPER_RIGHT); break; - case 11: drawActKcalAvg(getXYPositions(UPPER_RIGHT), dc, UPPER_RIGHT); break; - case 12: drawSteps(getXYPositions(UPPER_RIGHT), dc, true); break; - case 13: drawWithUnit(getXYPositions(UPPER_RIGHT), dc, 13, UPPER_RIGHT); break; - case 14: drawCalories(getXYPositions(UPPER_RIGHT), dc, ACTIVE_KCAL_REACHED, UPPER_RIGHT); break; + case 0: drawSteps(xyPositions, dc, false, UPPER_LEFT); break; + case 1: drawCalories(xyPositions, dc, KCAL, UPPER_RIGHT); break; + case 2: drawCalories(xyPositions, dc, ACTIVE_KCAL, UPPER_RIGHT); break; + case 3: drawHeartRate(xyPositions, dc, UPPER_RIGHT); break; + case 4: drawWithUnit(xyPositions, dc, 4, UPPER_RIGHT); break; + case 5: drawWithUnit(xyPositions, dc, 5, UPPER_RIGHT); break; + case 6: drawWithUnit(xyPositions, dc, 6, UPPER_RIGHT); break; + case 7: drawActiveTime(xyPositions, dc, true, UPPER_RIGHT); break; + case 8: drawActiveTime(xyPositions, dc, false, UPPER_RIGHT); break; + case 9: drawFloors(xyPositions, dc, UPPER_RIGHT); break; + case 10: drawMeters(xyPositions, dc, UPPER_RIGHT); break; + case 11: drawActKcalAvg(xyPositions, dc, UPPER_RIGHT); break; + case 12: drawSteps(xyPositions, dc, true); break; + case 13: drawWithUnit(xyPositions, dc, 13, UPPER_RIGHT); break; + case 14: drawCalories(xyPositions, dc, ACTIVE_KCAL_REACHED, UPPER_RIGHT); break; } + xyPositions = getXYPositions(LOWER_LEFT); // LowerLeft switch(lowerLeftField) { - case 0: drawSteps(getXYPositions(LOWER_LEFT), dc, false); break; - case 1: drawCalories(getXYPositions(LOWER_LEFT), dc, KCAL, LOWER_LEFT); break; - case 2: drawCalories(getXYPositions(LOWER_LEFT), dc, ACTIVE_KCAL, LOWER_LEFT); break; - case 3: drawHeartRate(getXYPositions(LOWER_LEFT), dc, LOWER_LEFT); break; - case 4: drawDistance(getXYPositions(LOWER_LEFT), dc); break; - case 7: drawActiveTime(getXYPositions(LOWER_LEFT), dc, true, LOWER_LEFT); break; - case 8: drawActiveTime(getXYPositions(LOWER_LEFT), dc, false, LOWER_LEFT); break; - case 9: drawFloors(getXYPositions(LOWER_LEFT), dc, LOWER_LEFT); break; - case 14: drawCalories(getXYPositions(LOWER_LEFT), dc, ACTIVE_KCAL_REACHED, LOWER_LEFT); break; + case 0: drawSteps(xyPositions, dc, false, UPPER_LEFT); break; + case 1: drawCalories(xyPositions, dc, KCAL, LOWER_LEFT); break; + case 2: drawCalories(xyPositions, dc, ACTIVE_KCAL, LOWER_LEFT); break; + case 3: drawHeartRate(xyPositions, dc, LOWER_LEFT); break; + case 4: drawWithUnit(xyPositions, dc, 4, LOWER_LEFT); break; + case 6: drawWithUnit(xyPositions, dc, 6, LOWER_LEFT); break; + case 7: drawActiveTime(xyPositions, dc, true, LOWER_LEFT); break; + case 8: drawActiveTime(xyPositions, dc, false, LOWER_LEFT); break; + case 9: drawFloors(xyPositions, dc, LOWER_LEFT); break; + case 14: drawCalories(xyPositions, dc, ACTIVE_KCAL_REACHED, LOWER_LEFT); break; } + xyPositions = getXYPositions(LOWER_RIGHT); // LowerRight switch(lowerRightField) { - case 0: drawSteps(getXYPositions(LOWER_RIGHT), dc, false); break; - case 1: drawCalories(getXYPositions(LOWER_RIGHT), dc, KCAL, LOWER_RIGHT); break; - case 2: drawCalories(getXYPositions(LOWER_RIGHT), dc, ACTIVE_KCAL, LOWER_RIGHT); break; - case 3: drawHeartRate(getXYPositions(LOWER_RIGHT), dc, LOWER_RIGHT); break; - case 4: drawDistance(getXYPositions(LOWER_RIGHT), dc); break; - case 7: drawActiveTime(getXYPositions(LOWER_RIGHT), dc, true, LOWER_RIGHT); break; - case 8: drawActiveTime(getXYPositions(LOWER_RIGHT), dc, false, LOWER_RIGHT); break; - case 9: drawFloors(getXYPositions(LOWER_RIGHT), dc, LOWER_RIGHT); break; - case 14: drawCalories(getXYPositions(LOWER_RIGHT), dc, ACTIVE_KCAL_REACHED, LOWER_RIGHT); break; + case 0: drawSteps(xyPositions, dc, false, UPPER_LEFT); break; + case 1: drawCalories(xyPositions, dc, KCAL, LOWER_RIGHT); break; + case 2: drawCalories(xyPositions, dc, ACTIVE_KCAL, LOWER_RIGHT); break; + case 3: drawHeartRate(xyPositions, dc, LOWER_RIGHT); break; + case 4: drawWithUnit(xyPositions, dc, 4, LOWER_RIGHT); break; + case 6: drawWithUnit(xyPositions, dc, 6, LOWER_RIGHT); break; + case 7: drawActiveTime(xyPositions, dc, true, LOWER_RIGHT); break; + case 8: drawActiveTime(xyPositions, dc, false, LOWER_RIGHT); break; + case 9: drawFloors(xyPositions, dc, LOWER_RIGHT); break; + case 14: drawCalories(xyPositions, dc, ACTIVE_KCAL_REACHED, LOWER_RIGHT); break; } // Bottom field dc.setColor(fieldForegroundColor, fieldBackgroundColor); + xyPositions = getXYPositions(BOTTOM_FIELD); switch(bottomField) { - case 1: drawCalories(getXYPositions(BOTTOM_FIELD), dc, KCAL, BOTTOM_FIELD); break; - case 2: drawCalories(getXYPositions(BOTTOM_FIELD), dc, ACTIVE_KCAL, BOTTOM_FIELD); break; - case 3: drawHeartRate(getXYPositions(BOTTOM_FIELD), dc, BOTTOM_FIELD); break; - case 4: - drawWithUnit(getXYPositions(BOTTOM_FIELD), dc, 4, BOTTOM_FIELD); - if (distanceUnit == 0) { - drawCharacter(dc, K, 0); - drawCharacter(dc, M, 6); - } else { - drawCharacter(dc, M, 0); - drawCharacter(dc, I, 0); - } - break; - case 5: - drawWithUnit(getXYPositions(BOTTOM_FIELD), dc, 5, BOTTOM_FIELD); - if (altUnit == 0) { - drawCharacter(dc, M, 0); - } else { - drawCharacter(dc, F, 0); - drawCharacter(dc, T, 0); - } - break; - case 6: - drawWithUnit(getXYPositions(BOTTOM_FIELD), dc, 6, BOTTOM_FIELD); - drawCharacter(dc, M, 0); - drawCharacter(dc, B, 0); - break; - case 7: dc.drawText(120, 213, lcdFontDataFields ? digitalUpright20 : Graphics.FONT_XTINY, getActiveTimeText(true), Gfx.TEXT_JUSTIFY_CENTER); break; - case 8: dc.drawText(120, 213, lcdFontDataFields ? digitalUpright20 : Graphics.FONT_XTINY, getActiveTimeText(false), Gfx.TEXT_JUSTIFY_CENTER); break; - case 9: - drawFloors(getXYPositions(BOTTOM_FIELD), dc, BOTTOM_FIELD); - dc.fillPolygon([[63, 221], [75, 221], [68, 215]]); // up - dc.fillPolygon([[170, 216], [180, 216], [175, 221]]); // down - break; - case 10: - drawMeters(getXYPositions(BOTTOM_FIELD), dc, BOTTOM_FIELD); - dc.fillPolygon([[63, 221], [75, 221], [68, 215]]); // up - dc.fillPolygon([[170, 216], [180, 216], [175, 221]]); // down - break; + case 0: drawSteps(xyPositions, dc, false, BOTTOM_FIELD); break; + case 1: drawCalories(xyPositions, dc, KCAL, BOTTOM_FIELD); break; + case 2: drawCalories(xyPositions, dc, ACTIVE_KCAL, BOTTOM_FIELD); break; + case 3: drawHeartRate(xyPositions, dc, BOTTOM_FIELD); break; + case 4: drawWithUnit(xyPositions, dc, 4, BOTTOM_FIELD); break; + case 5: drawWithUnit(xyPositions, dc, 5, BOTTOM_FIELD); break; + case 6: drawWithUnit(xyPositions, dc, 6, BOTTOM_FIELD); break; + case 7: drawActiveTime(xyPositions, dc, true, BOTTOM_FIELD); break; + case 8: drawActiveTime(xyPositions, dc, false, BOTTOM_FIELD); break; + case 9: drawFloors(xyPositions, dc, BOTTOM_FIELD); break; + case 10: drawMeters(xyPositions, dc, BOTTOM_FIELD); break; case 11: - drawActKcalAvg(getXYPositions(BOTTOM_FIELD), dc, BOTTOM_FIELD); + drawActKcalAvg(xyPositions, dc, BOTTOM_FIELD); dc.setPenWidth(2); dc.drawCircle(69, 220, 4); dc.drawLine(65, 224, 74, 215); break; - case 13: - drawWithUnit(getXYPositions(BOTTOM_FIELD), dc, 13, BOTTOM_FIELD); - drawCharacter(dc, tempUnit == 0 ? C : F, 0); - break; - case 14: drawCalories(getXYPositions(BOTTOM_FIELD), dc, ACTIVE_KCAL_REACHED, BOTTOM_FIELD); break; + case 13: drawWithUnit(xyPositions, dc, 13, BOTTOM_FIELD); break; + case 14: drawCalories(xyPositions, dc, ACTIVE_KCAL_REACHED, BOTTOM_FIELD); break; } onPartialUpdate(dc); updateLocation(); @@ -647,30 +653,21 @@ class Digital5View extends Ui.WatchFace { // ******************** DRAWING FUNCTIONS ********************************* function drawSeconds(dc) { + var xBase = centerX + 70 + 3; var clockTime = Sys.getClockTime(); dc.setColor(upperBackgroundColor, upperBackgroundColor); if (is24Hour) { - if (lcdFont) { - dc.fillRectangle(195, 96, 25, 15); - dc.setClip(195, 96, 25, 15); - } else { - dc.fillRectangle(191, 93, 21, 17); - dc.setClip(191, 93, 21, 17); - } + dc.fillRectangle(xBase, secondsYPosition, 25, Graphics.getFontHeight(secondsFont)); + dc.setClip(xBase, secondsYPosition, 25, Graphics.getFontHeight(secondsFont)); dc.setColor(upperForegroundColor, upperBackgroundColor); - dc.drawText((lcdFont ? 195 : 191), (lcdFont ? 93 : 87), lcdFont ? digitalUpright20 : Graphics.FONT_XTINY, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); - } else { - if (lcdFont) { - dc.fillRectangle(195, 75, 25, 15); - dc.setClip(195, 75, 25, 15); - } else { - dc.fillRectangle(191, 74, 21, 17); - dc.setClip(191, 74, 21, 17); - } + dc.drawText(xBase, secondsYPosition, secondsFont, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); + } + else { + dc.fillRectangle(xBase, 75, 25, Graphics.getFontHeight(secondsFont)); + dc.setClip(xBase, 75, 25, Graphics.getFontHeight(secondsFont)); dc.setColor(upperForegroundColor, upperBackgroundColor); - dc.drawText((lcdFont ? 195 : 191), (lcdFont ? 71 : 68), lcdFont ? digitalUpright20 : Graphics.FONT_XTINY, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(xBase, secondsYPosition, secondsFont, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); } - //dc.clearClip(); // does not work here, instead clear clip at the beginning on onUpdate() } function daysOfMonth(month) { @@ -700,30 +697,32 @@ class Digital5View extends Ui.WatchFace { } } - function drawSteps(xyPositions, dc, showDeltaSteps) { + function drawSteps(xyPositions, dc, showDeltaSteps, field) { var bmpX = xyPositions[0]; var bmpY = xyPositions[1]; var textX = xyPositions[2]; var textY = xyPositions[3]; + var coloredStepText = App.getApp().getProperty("ColorizeStepText"); dc.drawBitmap(bmpX, bmpY, darkFieldBackground ? stepsIconWhite : stepsIcon); if (showDeltaSteps) { - dc.setColor(deltaSteps > 0 ? BRIGHT_RED : Gfx.COLOR_BLACK, fieldBackgroundColor); + dc.setColor(deltaSteps > 0 ? BRIGHT_RED : fieldForegroundColor, fieldBackgroundColor); } else { if (coloredStepText) { stepsReached = stepsReached > 1.0 ? 1.0 : stepsReached; var endIndex = (10.0 * stepsReached).toNumber(); - if (darkUpperBackground) { - dc.setColor(endIndex > 0 ? STEP_COLORS[endIndex - 1] : Gfx.COLOR_BLACK, fieldBackgroundColor); + if (darkFieldBackground) { + dc.setColor(endIndex > 0 ? STEP_COLORS[endIndex - 1] : fieldForegroundColor, fieldBackgroundColor); } else { - dc.setColor(endIndex > 0 ? DARK_STEP_COLORS[endIndex - 1] : Gfx.COLOR_BLACK, fieldBackgroundColor); + dc.setColor(endIndex > 0 ? DARK_STEP_COLORS[endIndex - 1] : fieldForegroundColor, fieldBackgroundColor); } } else { dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); } } - dc.drawText(textX, textY, lcdFontDataFields ? digitalUpright24 : Graphics.FONT_XTINY, (showDeltaSteps ? deltaSteps * -1 : steps), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(textX, textY, GetFieldFont(field, false), (showDeltaSteps ? deltaSteps * -1 : steps), Gfx.TEXT_JUSTIFY_RIGHT); } + function drawCalories(xyPositions, dc, kcalType, field) { var bmpX = xyPositions[0]; var bmpY = xyPositions[1]; @@ -757,12 +756,9 @@ class Digital5View extends Ui.WatchFace { fieldText = activeKcalReached.toString(); break; } - if (lcdFontDataFields) { - dc.drawText(field < 4 ? textX : textX + 13, textY, field < 4 ? digitalUpright24 : digitalUpright20, fieldText, Gfx.TEXT_JUSTIFY_RIGHT); - } else { - dc.drawText(field < 4 ? textX :textX + 4, textY, Graphics.FONT_XTINY, fieldText, Gfx.TEXT_JUSTIFY_RIGHT); - } + dc.drawText(field != BOTTOM_FIELD ? textX : textX + 13, textY, GetFieldFont(field, false), fieldText, Gfx.TEXT_JUSTIFY_RIGHT); } + function drawHeartRate(xyPositions, dc, field) { var bmpX = xyPositions[0]; var bmpY = xyPositions[1]; @@ -776,36 +772,16 @@ class Digital5View extends Ui.WatchFace { dc.fillPolygon([[bmpX + 2, bmpY + 9], [bmpX + 10, bmpY + 5], [bmpX + 18, bmpY + 9], [bmpX + 17, bmpY + 12], [bmpX + 10, bmpY + 18], [bmpX + 5, bmpY + 12]]); if (bpm >= maxBpm) { - dc.setColor(darkFieldBackground ? Gfx.COLOR_BLACK : Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT); + dc.setColor(fieldForegroundColor, Gfx.COLOR_TRANSPARENT); dc.fillRectangle(bmpX + 10, bmpY + 5, 2, 5); dc.fillRectangle(bmpX + 10, bmpY + 12, 2, 2); } - dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, field < 4 ? digitalUpright24 : digitalUpright20, (bpm > 0 ? bpm.toString() : ""), Gfx.TEXT_JUSTIFY_RIGHT); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, (bpm > 0 ? bpm.toString() : ""), Gfx.TEXT_JUSTIFY_RIGHT); - } - } - function drawDistance(xyPositions, dc) { - var bmpX = xyPositions[0]; - var bmpY = xyPositions[1]; - var textX = xyPositions[2]; - var textY = xyPositions[3]; - var unitLcdX = xyPositions[4]; - var unitLcdY = xyPositions[5]; - var unitX = xyPositions[6]; - var unitY = xyPositions[7]; - dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, digitalUpright24, distance > 99.99 ? distance.format("%.0f") : distance.format("%.1f"), Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText(unitLcdX, unitLcdY, digitalUpright16, distanceUnit == 0 ? "km" : "mi", Gfx.TEXT_JUSTIFY_LEFT); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, distance > 99.99 ? distance.format("%.0f") : distance.format("%.1f"), Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText(unitX, unitY, Graphics.FONT_XTINY, distanceUnit == 0 ? "km" : "mi", Gfx.TEXT_JUSTIFY_LEFT); - } + dc.setColor(fieldForegroundColor, fieldBackgroundColor); + dc.drawText(textX, textY, GetFieldFont(field, false), (bpm > 0 ? bpm.toString() : ""), Gfx.TEXT_JUSTIFY_RIGHT); + } + function drawWithUnit(xyPositions, dc, sensor, field) { var textX = xyPositions[2]; var textY = xyPositions[3]; @@ -815,6 +791,7 @@ class Digital5View extends Ui.WatchFace { var unitY = xyPositions[7]; var fieldText; var unitText = ""; + switch(sensor) { case 4: // Distance fieldText = distance > 99.99 ? distance.format("%.0f") : distance.format("%.1f"); @@ -827,13 +804,13 @@ class Digital5View extends Ui.WatchFace { if (null == altitude) { fieldText = "-"; } else { - if (altUnit == 0) { + if (distanceUnit == 0) { fieldText = (altitude.data.toFloat() + altitudeOffset).format("%.0f"); } else { fieldText = ((altitude.data.toFloat() + altitudeOffset) / 0.3048).format("%.0f"); } } - unitText = altUnit == 0 ? "m" : "ft"; + unitText = distanceUnit == 0 ? "m" : "ft"; break; case 6: // Pressure var pressureHistory = Sensor.getPressureHistory(null); @@ -844,13 +821,12 @@ class Digital5View extends Ui.WatchFace { break; case 13: // Weather if (apiKey.length() > 0) { - if (field == 4) { textX += 10; } + if (field == BOTTOM_FIELD) { textX += 10; } var icon = 7; if (currentWeather) { var temp = App.getApp().getProperty("temp"); if (null == temp) { fieldText = "--/--"; - unitText = "E"; } else { if (tempUnit == 1) { temp = temp * 1.8 + 32; } icon = App.getApp().getProperty("icon"); @@ -863,7 +839,6 @@ class Digital5View extends Ui.WatchFace { var tempMax = App.getApp().getProperty("tempMax"); if (null == tempMin || null == tempMax) { fieldText = "--/--"; - unitText = "E"; } else { if (tempUnit == 1) { tempMin = tempMin * 1.8 + 32; @@ -875,22 +850,100 @@ class Digital5View extends Ui.WatchFace { fieldText = tempMin.format("%.0f") + "/" + tempMax.format("%.0f"); } } - drawWeatherSymbol(field, icon, dc); + drawWeatherSymbol(field, icon, dc, xyPositions); } else { fieldText = "--/--"; - unitText = "E"; } + unitText = tempUnit == 0 ? "C" : "F"; break; } dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, field < 4 ? digitalUpright24 : digitalUpright20, fieldText, Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText(unitLcdX, unitLcdY, digitalUpright16, unitText, Gfx.TEXT_JUSTIFY_LEFT); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, fieldText, Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText(unitX, unitY, Graphics.FONT_XTINY, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(textX, textY, GetFieldFont(field, false), fieldText, Gfx.TEXT_JUSTIFY_RIGHT); + drawUnitText(xyPositions, dc, unitText, field); + } + + function drawUnitText(xyPositions, dc, unitText, field){ + var unitLcdX = xyPositions[4]; + var unitLcdY = xyPositions[5]; + var unitX = xyPositions[6]; + var unitY = xyPositions[7]; + if (debug) {System.println("unitText: " + unitText + ", field: " + field);} + if (field == BOTTOM_FIELD){ + switch(unitText.toLower()){ + case "km": + drawCharacter(xyPositions, dc, K, 0); + drawCharacter(xyPositions, dc, M, 6); + break; + case "mi": + drawCharacter(xyPositions, dc, M, 0); + drawCharacter(xyPositions, dc, I, 0); + break; + case "m": + drawCharacter(xyPositions, dc, M, -5); + break; + case "ft": + drawCharacter(xyPositions, dc, F, 0); + drawCharacter(xyPositions, dc, T, 0); + break; + case "mb": + drawCharacter(xyPositions, dc, M, 0); + drawCharacter(xyPositions, dc, B, 0); + break; + case "c": + drawCharacter(xyPositions, dc, C, 6); + break; + case "f": + drawCharacter(xyPositions, dc, F, 6); + break; + } + return; } + + dc.drawText(unitLcdX, unitLcdY, GetFieldFont(field, true), unitText, Gfx.TEXT_JUSTIFY_LEFT); } + + function drawCharacter(xyPositions,dc, char, x) { + dc.setPenWidth(1); + var bmpX = xyPositions[0] + 84 + x; + var bmpY = xyPositions[1]; + switch(char) { + case M: + dc.drawLine(bmpX - 1, bmpY + 2, bmpX - 1, bmpY + 7); + dc.drawLine(bmpX + 1, bmpY + 2, bmpX + 1, bmpY + 7); + dc.drawLine(bmpX + 3, bmpY + 2, bmpX + 3, bmpY + 7); + dc.drawLine(bmpX - 1, bmpY + 2, bmpX + 3, bmpY + 2); + break; + case I: + dc.drawLine(bmpX + 7, bmpY + 2, bmpX + 7, bmpY + 7); + break; + case K: + dc.drawLine(bmpX - 1, bmpY - 1, bmpX - 1, bmpY + 7); + dc.drawLine(bmpX - 1, bmpY + 4, bmpX + 3, bmpY); + dc.drawLine(bmpX - 1, bmpY + 3, bmpX + 3, bmpY + 7); + break; + case B: + dc.drawLine(bmpX + 5, bmpY - 1, bmpX + 5, bmpY + 7); + dc.drawLine(bmpX + 8, bmpY + 2, bmpX + 8, bmpY + 7); + dc.drawLine(bmpX + 5, bmpY + 2, bmpX + 8, bmpY + 2); + dc.drawLine(bmpX + 5, bmpY + 6, bmpX + 8, bmpY + 6); + break; + case C: + dc.drawLine(bmpX + 4, bmpY, bmpX, bmpY); + dc.drawLine(bmpX, bmpY, bmpX, bmpY + 8); + dc.drawLine(bmpX + 4, bmpY + 7, bmpX, bmpY + 7); + break; + case F: + dc.drawLine(bmpX + 4, bmpY, bmpX, bmpY); + dc.drawLine(bmpX, bmpY, bmpX, bmpY + 8); + dc.drawLine(bmpX + 3, bmpY + 3, bmpX - 1, bmpY + 3); + break; + case T: + dc.drawLine(bmpX + 8, bmpY, bmpX + 8, bmpY + 7); + dc.drawLine(bmpX + 6, bmpY, bmpX + 11, bmpY); + break; + } + } + function drawActiveTime(xyPositions, dc, isDay, field) { var textX = xyPositions[2]; var textY = xyPositions[3]; @@ -899,21 +952,15 @@ class Digital5View extends Ui.WatchFace { var unitX = xyPositions[6]; var unitY = xyPositions[7]; var horAlign = Gfx.TEXT_JUSTIFY_RIGHT; + switch (field) { - case 0: break; - case 1: textX -= lcdFontDataFields ? 76 : 72; horAlign = Gfx.TEXT_JUSTIFY_LEFT; break; - case 2: break; - case 3: break; //textX -= lcdFontDataFields ? 55 : 51; horAlign = Gfx.TEXT_JUSTIFY_LEFT; break; + case UPPER_RIGHT: textX -= 76; horAlign = Gfx.TEXT_JUSTIFY_LEFT; break; } var activeTimeText = getActiveTimeText(isDay); dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, digitalUpright24, activeTimeText, horAlign); - dc.drawText(unitLcdX, unitLcdY, digitalUpright16, isDay ? "D" : "W", Gfx.TEXT_JUSTIFY_LEFT); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, activeTimeText, horAlign); - dc.drawText(unitX, unitY, Graphics.FONT_XTINY, isDay ? "D" : "W", Gfx.TEXT_JUSTIFY_LEFT); - } + dc.drawText(textX, textY, GetFieldFont(field, false), activeTimeText, horAlign); + drawUnitText(xyPositions, dc, isDay ? "D" : "W", field); + } function drawFloors(xyPositions, dc, field) { var bmpX = xyPositions[0]; @@ -922,17 +969,22 @@ class Digital5View extends Ui.WatchFace { var textY = xyPositions[3]; var horAlign = Gfx.TEXT_JUSTIFY_RIGHT; switch (field) { - case 0: break; - case 1: bmpX +=2; textX += lcdFontDataFields ? 8 : 12; break; - case 2: break; - case 3: bmpX +=2; textX += lcdFontDataFields ? 8 : 12; break; - case 4: textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; break; + case UPPER_RIGHT: bmpX +=2; textX += 8; break; + case LOWER_RIGHT: bmpX +=2; textX += 8; break; + case BOTTOM_FIELD: textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; break; } var floorsClimbed = actinfo.floorsClimbed; var floorsDescended = actinfo.floorsDescended; dc.setColor(fieldForegroundColor, fieldBackgroundColor); // draw stairs icon - if (field < 4) { + if (field == BOTTOM_FIELD) + { + drawArrow(dc, bmpX, bmpY, 0); + drawArrow(dc, .66 * width, bmpY, 1); + horAlign = Gfx.TEXT_JUSTIFY_CENTER; + textX = centerX; + } + else { dc.setPenWidth(1); dc.drawLine(bmpX + 3, bmpY + 15, bmpX + 6, bmpY + 15); dc.drawLine(bmpX + 6, bmpY + 15, bmpX + 6, bmpY + 12); @@ -944,13 +996,12 @@ class Digital5View extends Ui.WatchFace { dc.drawLine(bmpX + 15, bmpY + 6, bmpX + 15, bmpY + 3); dc.drawLine(bmpX + 15, bmpY + 3, bmpX + 18, bmpY + 3); } - if (lcdFontDataFields) { - dc.drawText(textX, textY, field < 4 ? digitalUpright24 : digitalUpright20, (floorsClimbed.toString() + "/" + floorsDescended.toString()), horAlign); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, (floorsClimbed.toString() + "/" + floorsDescended.toString()), horAlign); - } + dc.drawText(textX, textY, GetFieldFont(field, false), (floorsClimbed.toString() + "/" + floorsDescended.toString()), horAlign); } + function drawMeters(xyPositions, dc, field) { + var bmpX = xyPositions[0]; + var bmpY = xyPositions[1]; var textX = xyPositions[2]; var textY = xyPositions[3]; var unitLcdX = xyPositions[4]; @@ -960,59 +1011,65 @@ class Digital5View extends Ui.WatchFace { var metersClimbed = actinfo.metersClimbed.format("%0d"); var metersDescended = actinfo.metersDescended.format("%0d"); var horAlign = Gfx.TEXT_JUSTIFY_RIGHT; - if (field == 4) { textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; } + if (field == BOTTOM_FIELD) { textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; } switch (field) { - case 0: break; - case 1: unitLcdX += 8; unitX += 4; textX += lcdFontDataFields ? 8 : 4; break; //horAlign = Gfx.TEXT_JUSTIFY_LEFT; break; - case 2: break; - case 3: unitLcdX += 8; unitX += 4; textX += lcdFontDataFields ? 8 : 4; break; //horAlign = Gfx.TEXT_JUSTIFY_LEFT; break; - case 4: textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; break; + case UPPER_RIGHT: + unitLcdX += 8; + unitX += 4; + textX += 8; + break; + case LOWER_RIGHT: + unitLcdX += 8; + unitX += 4; + textX += 8; + break; + case BOTTOM_FIELD: + textX = width /2; + horAlign = Gfx.TEXT_JUSTIFY_CENTER; + break; } dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, field < 4 ? digitalUpright24 : digitalUpright20, metersClimbed.toString() + "/" + metersDescended.toString(), horAlign); - if (field < 4) { dc.drawText(unitLcdX, unitLcdY, digitalUpright16, "m", Gfx.TEXT_JUSTIFY_LEFT); } - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, metersClimbed.toString() + " / " + metersDescended.toString(), horAlign); - if (field < 4) { dc.drawText(unitX, unitY, Graphics.FONT_XTINY, "m", Gfx.TEXT_JUSTIFY_LEFT); } + dc.drawText(textX, textY, GetFieldFont(field, false), metersClimbed.toString() + "/" + metersDescended.toString(), horAlign); + drawUnitText(xyPositions, dc, "m", field); + + if (field == BOTTOM_FIELD){ + drawArrow(dc, bmpX, bmpY, 0); + drawArrow(dc, width - bmpX, bmpY, 1); + } + } + + function drawArrow(dc, x, y, direction){ + + var horSize = 12; + var vertSize = 6; + if (direction == 0){ + dc.fillPolygon([[x, y + vertSize ], [x + horSize, y + vertSize], [x + horSize / 2, y]]); //(left bottom , right bottom , top) + return; } + dc.fillPolygon([[x, y], [x + horSize, y], [x + horSize / 2, y + vertSize]]); //(left top , right top , bottom) + } + function drawActKcalAvg(xyPositions, dc, field) { var bmpX = xyPositions[0]; var bmpY = xyPositions[1]; var textX = xyPositions[2]; var textY = xyPositions[3]; var horAlign = Gfx.TEXT_JUSTIFY_RIGHT; - if (field == 4) { + if (field == BOTTOM_FIELD) { textX = 120; horAlign = Gfx.TEXT_JUSTIFY_CENTER; } else { dc.drawBitmap(bmpX, bmpY, darkFieldBackground ? burnedIconWhite : burnedIcon); } dc.setColor(fieldForegroundColor, fieldBackgroundColor); - if (lcdFontDataFields) { - dc.drawText(textX, textY, field < 4 ? digitalUpright24 : digitalUpright20, getActKcalAvg(activeKcal), horAlign); - } else { - dc.drawText(textX, textY, Graphics.FONT_XTINY, getActKcalAvg(activeKcal), horAlign); - } + dc.drawText(textX, textY, GetFieldFont(field, false), getActKcalAvg(activeKcal), horAlign); } - function drawWeatherSymbol(field, icon, dc) { - var x; - var y; - switch(field) { - case UPPER_LEFT: - x = 16; - y = 157; - break; - case UPPER_RIGHT: - x = 207; - y = 157; - break; - case BOTTOM_FIELD: - x = 85; - y = 216; - break; - } + + function drawWeatherSymbol(field, icon, dc, xyPositions) { + var x = xyPositions[0]; + var y = xyPositions[1]; + dc.setColor(fieldForegroundColor, fieldBackgroundColor); dc.setPenWidth(2); switch(icon) { @@ -1080,10 +1137,10 @@ class Digital5View extends Ui.WatchFace { dc.fillCircle(x + 13, y + 15, 2); dc.fillCircle(x + 7, y + 18, 2); break; - } dc.setPenWidth(1); } + function drawCloud(dc, x, y) { dc.setColor(fieldForegroundColor, fieldBackgroundColor); dc.fillCircle(x + 11, y + 6, 6); @@ -1096,56 +1153,16 @@ class Digital5View extends Ui.WatchFace { dc.fillRectangle(x + 5, y + 8, 12, 7); dc.setColor(fieldForegroundColor, fieldBackgroundColor); } - function drawCharacter(dc, char, x) { - dc.setPenWidth(1); - switch(char) { - case M: - dc.drawLine(168 + x, 218, 168 + x, 223); - dc.drawLine(170 + x, 218, 170 + x, 223); - dc.drawLine(172 + x, 218, 172 + x, 223); - dc.drawLine(168 + x, 218, 172 + x, 218); - break; - case I: - dc.drawLine(176, 218, 176, 223); - break; - case K: - dc.drawLine(168, 215, 168, 223); - dc.drawLine(168, 220, 172, 216); - dc.drawLine(168, 219, 172, 223); - break; - case B: - dc.drawLine(174, 215, 174, 223); - dc.drawLine(177, 218, 177, 223); - dc.drawLine(174, 218, 177, 218); - dc.drawLine(174, 222, 177, 222); - break; - case C: - dc.drawLine(173, 216, 169, 216); - dc.drawLine(169, 216, 169, 223); - dc.drawLine(173, 223, 168, 223); - break; - case F: - dc.drawLine(173, 216, 169, 216); - dc.drawLine(169, 216, 169, 223); - dc.drawLine(172, 219, 168, 219); - break; - case T: - dc.drawLine(177, 216, 177, 223); - dc.drawLine(175, 216, 180, 216); - break; - } - } - function drawTime(hourColor, minuteColor, font, dc) { + function drawTime(hourColor, minuteColor, font, dc, timeYPosition) { var hh = clockTime.hour; var hour = is24Hour ? hh : (hh == 12) ? hh : (hh % 12 == 0 ? 12 : hh % 12); - var y = (deviceName.equals("vivoactive3") || deviceName.equals("vivoactive3m")) ? 44 : 56; dc.setColor(hourColor, Gfx.COLOR_TRANSPARENT); - dc.drawText(centerX - 6, lcdFont ? 51 : y, font, hour.format(showLeadingZero ? "%02d" : "%01d"), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 6, timeYPosition, font, hour.format(showLeadingZero ? "%02d" : "%01d"), Gfx.TEXT_JUSTIFY_RIGHT); dc.setColor(upperForegroundColor, Gfx.COLOR_TRANSPARENT); - dc.drawText(centerX, lcdFont ? 51 : y, font, ":", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, font, ":", Gfx.TEXT_JUSTIFY_CENTER); dc.setColor(minuteColor, Gfx.COLOR_TRANSPARENT); - dc.drawText(centerX + 6, lcdFont ? 51 : y, font, clockTime.min.format("%02d"), Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(centerX + 6, timeYPosition, font, clockTime.min.format("%02d"), Gfx.TEXT_JUSTIFY_LEFT); dc.setColor(upperForegroundColor, Gfx.COLOR_TRANSPARENT); } @@ -1165,56 +1182,60 @@ class Digital5View extends Ui.WatchFace { function getXYPositions(field) { var bmpX, bmpY, textX, textY, unitLcdX, unitLcdY, unitX, unitY; - switch(field) { - case 0: // UPPER LEFT - bmpX = 16; - bmpY = 157; - textX = 115; - textY = lcdFontDataFields ? 153 : 152; + + var font = GetFieldFont(field, false); + var fontSize = Graphics.getFontHeight(font); + var textYPadding = (fieldHeight - fontSize)/2; + switch (field) { + case UPPER_LEFT: // UPPER LEFT + bmpX = 0.06667 * width; + bmpY = dataFieldsTop + dataFieldsTopPadding; + textX = centerX - 5; + textY = dataFieldsTop + textYPadding; unitLcdX = 16; - unitLcdY = 160; + unitLcdY = dataFieldsTop + 10; unitX = 16; - unitY = 152; + unitY = dataFieldsTop + 2; break; - case 1: // UPPER RIGHT - bmpX = 207; - bmpY = 157; - textX = lcdFontDataFields ? 202 : 196; - textY = lcdFontDataFields ? 153 : 152; - unitLcdX = 207; - unitLcdY = 160; - unitX = 200; - unitY = 152; + case UPPER_RIGHT: // UPPER RIGHT + bmpX = width - 33; + bmpY = dataFieldsTop + dataFieldsTopPadding; + textX = width - 38; + textY = dataFieldsTop + textYPadding; + unitLcdX = width - 33; + unitLcdY = dataFieldsTop + 10; + unitX = width - 40; + unitY = dataFieldsTop + 2; break; - case 2: // LOWER LEFT - bmpX = 36; - bmpY = 187; - textX = 115; - textY = lcdFontDataFields ? 184 : 183; + case LOWER_LEFT: // LOWER LEFT + bmpX = 0.15 * width; + bmpY = dataFieldsTop + fieldHeight + dataFieldsTopPadding; + textX = centerX - 5; + textY = dataFieldsTop + fieldHeight + textYPadding; unitLcdX = 36; - unitLcdY = 190; + unitLcdY = dataFieldsTop + fieldHeight + 10; unitX = 36; - unitY = 183; + unitY = dataFieldsTop + fieldHeight + 3; break; - case 3: // LOWER RIGHT - bmpX = 187; - bmpY = 187; - textX = lcdFontDataFields ? 181 : 175; - textY = lcdFontDataFields ? 184 : 183; - unitLcdX = 187; - unitLcdY = 190; - unitX = 180; - unitY = 183; + case LOWER_RIGHT: // LOWER RIGHT + bmpX = width - 53; + bmpY = dataFieldsTop + fieldHeight + dataFieldsTopPadding; + textX = width - 59; + textY = dataFieldsTop + fieldHeight + textYPadding; + unitLcdX = width - 53; + unitLcdY = dataFieldsTop + fieldHeight + 10; + unitX = width - 60; + unitY = dataFieldsTop + fieldHeight + 3; break; - case 4: // BOTTOM_FIELD - bmpX = 85; - bmpY = 216; - textX = 150; - textY = 213; - unitLcdX = 0; - unitLcdY = 0; - unitX = 0; - unitY = 0; + case BOTTOM_FIELD: // BOTTOM_FIELD + bmpX = 0.33 * width; + bmpY = dataFieldsTop + 2 * fieldHeight + dataFieldsTopPadding; + textX = centerX + 30; + textY = dataFieldsTop + 2 * fieldHeight + textYPadding + 1; + unitLcdX = width - 83; + unitLcdY = dataFieldsTop + 2 * fieldHeight + 10; + unitX = width - 90; + unitY = dataFieldsTop + 2 * fieldHeight + 3; break; } return [ bmpX, bmpY, textX, textY, unitLcdX, unitLcdY, unitX, unitY ]; @@ -1317,11 +1338,100 @@ class Digital5View extends Ui.WatchFace { if (value > max) { return max; } return value; } + + function GetFieldFont(fieldNumber, isUnitText) { + var tinyFont = Graphics.FONT_XTINY; - function getDeviceName() { - if (deviceName == null) { - deviceName = Ui.loadResource(Rez.Strings.deviceName); + if (width > 240 and !isUnitText){ + tinyFont = Graphics.FONT_TINY; + } + + if (fieldNumber == BOTTOM_FIELD) { + if (isUnitText){ + return Graphics.FONT_XTINY; + } + return digitalUpright20; + } + + if (isUnitText){ + return digitalUpright16; + } + return digitalUpright24; + } + + /// + /// Get the home date and time, both time zone dependent. Depending on settings we may return the current date, and an empty time + /// + /// array that contains Date and Time + function calcHomeDateTime(){ + var dst = App.getApp().getProperty("DST"); + var dayOfWeek = nowinfo.day_of_week; + var dayMonth = App.getApp().getProperty("DateFormat") == 0; + var dateFormat = dayMonth ? "$1$.$2$" : "$2$/$1$"; + var monthAsText = App.getApp().getProperty("MonthAsText"); + var timezoneOffset = clockTime.timeZoneOffset; + var showHomeTimezone = App.getApp().getProperty("ShowHomeTimezone"); + var showHomeDate = App.getApp().getProperty("ShowHomeDate"); + var homeTimezoneOffset = dst ? App.getApp().getProperty("HomeTimezoneOffset") + 3600 : App.getApp().getProperty("HomeTimezoneOffset"); + var onTravel = timezoneOffset != homeTimezoneOffset; + + var monthText = ""; + var timeText = ""; + var currentWeekdayText = weekdays[dayOfWeek - 1]; + var currentDateText = dayMonth ? nowinfo.day.format(showLeadingZero ? "%02d" : "%01d") + " " + months[nowinfo.month - 1] : months[nowinfo.month - 1] + " " + nowinfo.day.format(showLeadingZero ? "%02d" : "%01d"); + var currentDateNumberText = Lang.format(dateFormat, [nowinfo.day.format(showLeadingZero ? "%02d" : "%01d"), nowinfo.month.format(showLeadingZero ? "%02d" : "%01d")]); + monthText = currentWeekdayText + (monthAsText ? currentDateText : currentDateNumberText); + + if (!onTravel) { + // if we are not traveling, just show the current date, time will be empty + return [monthText, timeText]; } - return deviceName; + + if (showHomeTimezone || showHomeDate){ + // we are traveling. If we are showing either home Time or home Date, we need to calculate this + var currentSeconds = clockTime.hour * 3600 + clockTime.min * 60 + clockTime.sec; + var utcSeconds = currentSeconds - clockTime.timeZoneOffset; + + var homeDayOfWeek = dayOfWeek - 1; + var homeDay = nowinfo.day; + var homeMonth = nowinfo.month; + var homeSeconds = utcSeconds + homeTimezoneOffset; + if (dst) { + homeSeconds = homeTimezoneOffset > 0 ? homeSeconds : homeSeconds - 3600; + } + var homeHour = ((homeSeconds / 3600)).toNumber() % 24l; + var homeMinute = ((homeSeconds - (homeHour.abs() * 3600)) / 60) % 60; + + if (homeHour < 0) { + homeHour += 24; + homeDay--; + if (homeDay == 0) { + homeMonth--; + if (homeMonth == 0) { homeMonth = 12; } + homeDay = daysOfMonth(homeMonth); + } + homeDayOfWeek--; + if (homeDayOfWeek < 0) { homeDayOfWeek = 6; } + } + if (homeMinute < 0) { homeMinute += 60; } + + var ampm = is24Hour ? "" : homeHour < 12 ? "A" : "P"; + homeHour = is24Hour ? homeHour : (homeHour == 12) ? homeHour : (homeHour % 12); + + if (showHomeDate) { + // if we want to show the home date, we need to calculate it + var homeWeekdayText = weekdays[homeDayOfWeek]; + var homeDateText = dayMonth ? + homeDay.format(showLeadingZero ? "%02d" : "%01d") + " " + months[homeMonth - 1] : + months[homeMonth - 1] + " " + homeDay.format(showLeadingZero ? "%02d" : "%01d"); + var homeDateNumberText = Lang.format(dateFormat, [homeDay.format(showLeadingZero ? "%02d" : "%01d"), homeMonth.format(showLeadingZero ? "%02d" : "%01d")]); + monthText = homeWeekdayText + (monthAsText ? homeDateText : homeDateNumberText); + } + + timeText = Lang.format("$1$:$2$", [homeHour.format(showLeadingZero ? "%02d" : "%01d"), homeMinute.format("%02d")]) + ampm; + } + + + return [monthText, timeText]; } } From 0d3814f25f612cb0549e874203a0db6733aa1b07 Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Fri, 3 Jan 2020 03:35:29 +0100 Subject: [PATCH 4/8] Fix am/pm positioning (#2) --- manifest.xml | 2 -- resources-fre/strings/strings.xml | 1 + resources-hun/strings/strings.xml | 2 +- resources-spa/strings/strings.xml | 1 + source/Digital5View.mc | 44 +++++++++++++++++++++++-------- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/manifest.xml b/manifest.xml index d80e3ee..a0b6115 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,11 +1,9 @@ - - diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index e7ac163..34ff815 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -46,6 +46,7 @@ Heure d'été Afficher le fuseau horaire Domicile + Afficher la date de domicile Fuseau horaire Domicile diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index a33eeef..4fbd623 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -41,7 +41,7 @@ Lcd betűtipus az adatmezőkön - Bigger battery font + Nagyobb betűtípus Nyári időszámítás diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 40b6756..b2cf5ff 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -46,6 +46,7 @@ Horario de Verano Mostrar zona horaria local + Mostrar fecha de inicio Desfase zona horaria local diff --git a/source/Digital5View.mc b/source/Digital5View.mc index e8fdf2d..50946df 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -15,9 +15,11 @@ using Toybox.SensorHistory as Sensor; class Digital5View extends Ui.WatchFace { - var debug = false; + var debug = true; var is24Hour; var secondsAlwaysOn; + var lcdFont = false; + var lcdFontDataFields = false; var showLeadingZero; var clockTime; var sunRiseSet; @@ -63,6 +65,7 @@ class Digital5View extends Ui.WatchFace { var sunsetText = "--:--"; var currentWeather; var digitalUpright72, digitalUpright26, digitalUpright24, digitalUpright20, digitalUpright16; + //var robotoCondensed72; var burnedIcon, burnedIconWhite, stepsIcon, stepsIconWhite; var alarmIcon, alarmIconWhite; var width, height; @@ -101,6 +104,7 @@ class Digital5View extends Ui.WatchFace { digitalUpright24 = Ui.loadResource(Rez.Fonts.digitalUpright24); digitalUpright20 = Ui.loadResource(Rez.Fonts.digitalUpright20); digitalUpright16 = Ui.loadResource(Rez.Fonts.digitalUpright16); + //robotoCondensed72 = Ui.loadResource(Rez.Fonts.robotoCondensed72); burnedIcon = Ui.loadResource(Rez.Drawables.burned); burnedIconWhite = Ui.loadResource(Rez.Drawables.burnedWhite); stepsIcon = Ui.loadResource(Rez.Drawables.steps); @@ -149,6 +153,8 @@ class Digital5View extends Ui.WatchFace { is24Hour = Sys.getDeviceSettings().is24Hour; secondsAlwaysOn = App.getApp().getProperty("SecondsAlwaysOn"); + //lcdFont = App.getApp().getProperty("LcdFont"); + //lcdFontDataFields = App.getApp().getProperty("LcdFontDataFields"); showLeadingZero = App.getApp().getProperty("ShowLeadingZero"); tempUnit = App.getApp().getProperty("TempUnit"); coloredCalorieText = App.getApp().getProperty("ColorizeCalorieText"); @@ -222,6 +228,14 @@ class Digital5View extends Ui.WatchFace { userHeight = profile.height; userAge = nowinfo.year - profile.birthYear; } + + if (hourColor == upperBackgroundColor){ + hourColor = upperForegroundColor; + } + if (minuteColor == upperBackgroundColor){ + minuteColor = upperForegroundColor; + } + // Mifflin-St.Jeor Formula (1990) var baseKcalMen = (9.99 * userWeight) + (6.25 * userHeight) - (4.92 * userAge) + 5.0; // base kcal men @@ -502,23 +516,20 @@ class Digital5View extends Ui.WatchFace { secondsFont = digitalUpright20; secondsYPosition = dateYPosition - Graphics.getFontHeight(secondsFont); - if (lcdBackgroundVisible) { + if (lcdFont && lcdBackgroundVisible) { dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); if (showLeadingZero) { - dc.drawText(centerX, timeYPosition, digitalUpright72, "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, timeFont, "88:88", Gfx.TEXT_JUSTIFY_CENTER); } else { if (is24Hour) { - dc.drawText(centerX, timeYPosition, digitalUpright72, clockTime.hour < 10 ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, timeFont, clockTime.hour < 10 ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); } else { - dc.drawText(centerX, timeYPosition, digitalUpright72, (clockTime.hour < 10 || clockTime.hour > 12) ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); + dc.drawText(centerX, timeYPosition, timeFont, (clockTime.hour < 10 || clockTime.hour > 12) ? "8:88" : "88:88", Gfx.TEXT_JUSTIFY_CENTER); } } } drawTime(hourColor, minuteColor, timeFont, dc, timeYPosition); - if (!is24Hour) { - var amPm = clockTime.hour < 12 ? "am" : "pm"; - dc.drawText(195, 93, digitalUpright20, amPm, Gfx.TEXT_JUSTIFY_LEFT); - } + // draw Date if (onTravel) { @@ -663,8 +674,8 @@ class Digital5View extends Ui.WatchFace { dc.drawText(xBase, secondsYPosition, secondsFont, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); } else { - dc.fillRectangle(xBase, 75, 25, Graphics.getFontHeight(secondsFont)); - dc.setClip(xBase, 75, 25, Graphics.getFontHeight(secondsFont)); + dc.fillRectangle(xBase, secondsYPosition, 25, Graphics.getFontHeight(secondsFont)); + dc.setClip(xBase, secondsYPosition, 25, Graphics.getFontHeight(secondsFont)); dc.setColor(upperForegroundColor, upperBackgroundColor); dc.drawText(xBase, secondsYPosition, secondsFont, Lang.format("$1$", [clockTime.sec.format("%02d")]), Gfx.TEXT_JUSTIFY_LEFT); } @@ -1157,6 +1168,7 @@ class Digital5View extends Ui.WatchFace { function drawTime(hourColor, minuteColor, font, dc, timeYPosition) { var hh = clockTime.hour; var hour = is24Hour ? hh : (hh == 12) ? hh : (hh % 12 == 0 ? 12 : hh % 12); + dc.setColor(hourColor, Gfx.COLOR_TRANSPARENT); dc.drawText(centerX - 6, timeYPosition, font, hour.format(showLeadingZero ? "%02d" : "%01d"), Gfx.TEXT_JUSTIFY_RIGHT); dc.setColor(upperForegroundColor, Gfx.COLOR_TRANSPARENT); @@ -1164,6 +1176,16 @@ class Digital5View extends Ui.WatchFace { dc.setColor(minuteColor, Gfx.COLOR_TRANSPARENT); dc.drawText(centerX + 6, timeYPosition, font, clockTime.min.format("%02d"), Gfx.TEXT_JUSTIFY_LEFT); dc.setColor(upperForegroundColor, Gfx.COLOR_TRANSPARENT); + + if (!is24Hour) { + var xBase = centerX + 70 + 3; + var yBase = secondsYPosition; + if (secondsAlwaysOn) { + yBase = yBase - Graphics.getFontHeight(digitalUpright20); + } + var amPm = clockTime.hour < 12 ? "am" : "pm"; + dc.drawText(xBase, yBase, digitalUpright20, amPm, Gfx.TEXT_JUSTIFY_LEFT); + } } function setBatteryColor(charge, dc) { From 77409a96d2666625292ba98d9b2c3bdb942bbc79 Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Sat, 4 Jan 2020 12:11:21 +0100 Subject: [PATCH 5/8] fix battery percentage (#6) --- source/Digital5View.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Digital5View.mc b/source/Digital5View.mc index 50946df..ace839a 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -318,7 +318,7 @@ class Digital5View extends Ui.WatchFace { var showPercentageUnder20 = App.getApp().getProperty("ShowPercentageUnder20"); var charge = systemStats.battery + 0.5; var coloredBattery = App.getApp().getProperty("ColoredBattery"); - showChargePercentage = showPercentageUnder20 && charge < 20; + showChargePercentage = showChargePercentage || showPercentageUnder20 && charge < 20; if (debug) {System.println("charge: " + charge + ", showPercentageUnder20: " + showPercentageUnder20 + ", showChargePercentage: " + showChargePercentage);} From 30fc95b25241599e3c51f9d8f4b0da9df87a162c Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Wed, 8 Jan 2020 07:13:44 +0100 Subject: [PATCH 6/8] rework weather logic (#8) refactored some of the logic behind weather updates, making it more clear when weather is updating, and when an error situation occurs --- resources/resources.xml | 2 +- source/Digital5App.mc | 23 +++++-- source/Digital5ServiceDelegate.mc | 9 ++- source/Digital5View.mc | 99 +++++++++++++++++++++++-------- 4 files changed, 101 insertions(+), 32 deletions(-) diff --git a/resources/resources.xml b/resources/resources.xml index abca48d..e95c229 100644 --- a/resources/resources.xml +++ b/resources/resources.xml @@ -11,7 +11,7 @@ - + \ No newline at end of file diff --git a/source/Digital5App.mc b/source/Digital5App.mc index 44a3935..6019719 100644 --- a/source/Digital5App.mc +++ b/source/Digital5App.mc @@ -5,6 +5,17 @@ using Toybox.System; using Toybox.Time; using Toybox.Time.Gregorian; +var debug = true; + + function Log(method, message){ + if ($.debug){ + + var myTime = System.getClockTime(); + var myTimeString = myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d"); + if ($.debug) {System.println(myTimeString + " | " + method + " | " + message);} + } + } + class Digital5ReloadedApp extends App.AppBase { hidden var view; hidden var sunRiseSet; @@ -27,7 +38,7 @@ class Digital5ReloadedApp extends App.AppBase { view = new Digital5View(); - Background.registerForTemporalEvent(new Time.Duration(900)); // 15 min + Background.registerForTemporalEvent(new Time.Duration(300)); // 15 min if( Toybox.WatchUi has :WatchFaceDelegate ) { return [view, new Digital5Delegate()]; @@ -41,14 +52,16 @@ class Digital5ReloadedApp extends App.AppBase { } function onBackgroundData(data) { + Log("Digital5ServiceDelegate.onBackgroundData","data: " + data); + if (data instanceof Dictionary) { var msg = data.get("msg"); - if (msg.equals("FAIL") || msg.equals("WRONG KEY")) { - } else if (msg.equals("CURRENTLY")) { + App.getApp().setProperty("dsResult", msg); + if (msg.equals("CURRENTLY")) { App.getApp().setProperty("temp", data.get("temp")); } else if (msg.equals("DAILY")) { - App.getApp().setProperty("tempMin", data.get("tempMin")); - App.getApp().setProperty("tempMax", data.get("tempMax")); + App.getApp().setProperty("minTemp", data.get("minTemp")); + App.getApp().setProperty("maxTemp", data.get("maxTemp")); } // rain, snow, sleet, wind, fog, cloudy var icon = data.get("icon"); diff --git a/source/Digital5ServiceDelegate.mc b/source/Digital5ServiceDelegate.mc index f81581f..757ce09 100644 --- a/source/Digital5ServiceDelegate.mc +++ b/source/Digital5ServiceDelegate.mc @@ -14,6 +14,7 @@ class Digital5ServiceDelegate extends System.ServiceDelegate { var apiKey = App.getApp().getProperty("DarkSkyApiKey"); var lat = App.getApp().getProperty("UserLat").toFloat(); var lng = App.getApp().getProperty("UserLng").toFloat(); + if (System.getDeviceSettings().phoneConnected && apiKey.length() > 0 && (null != lat && null != lng)) { @@ -37,13 +38,17 @@ class Digital5ServiceDelegate extends System.ServiceDelegate { :headers => { "Content-Type" => Comm.REQUEST_CONTENT_TYPE_JSON }, :responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_JSON }; + + if ($.debug) {System.println("Digital5ServiceDelegate.makeRequest - url: " + url + ", params: " + params);} + Comm.makeWebRequest(url, params, options, method(:onReceive)); } function onReceive(responseCode, data) { + if ($.debug) {System.println("Digital5ServiceDelegate.onReceive - responseCode: " + responseCode + ", data: " + data);} if (responseCode == 200) { if (data instanceof Lang.String && data.equals("Forbidden")) { - var dict = { "msg" => "WRONG KEY" }; + var dict = { "msg" => "KEY" }; Background.exit(dict); } else { var currentWeather = App.getApp().getProperty("CurrentWeather"); @@ -69,7 +74,7 @@ class Digital5ServiceDelegate extends System.ServiceDelegate { } } } else { - var dict = { "msg" => "FAIL" }; + var dict = { "msg" => responseCode + " FAIL" }; Background.exit(dict); } } diff --git a/source/Digital5View.mc b/source/Digital5View.mc index ace839a..14ca4ab 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -13,9 +13,8 @@ using Toybox.Ant as Ant; using Toybox.SensorHistory as Sensor; - class Digital5View extends Ui.WatchFace { - var debug = true; + var is24Hour; var secondsAlwaysOn; var lcdFont = false; @@ -96,6 +95,13 @@ class Digital5View extends Ui.WatchFace { function initialize() { WatchFace.initialize(); + + //reset weather data + App.getApp().setProperty("dsResult", ""); + App.getApp().setProperty("temp", ""); + App.getApp().setProperty("minTemp", ""); + App.getApp().setProperty("maxTemp", ""); + } function onLayout(dc) { @@ -142,13 +148,13 @@ class Digital5View extends Ui.WatchFace { distanceUnit = Sys.getDeviceSettings().distanceUnits; - if (debug) {System.println("width: " + width + ", height: " + height);} + Log("Digital5View.onLayout","width: " + width + ", height: " + height); } function onUpdate(dc) { View.onUpdate(dc); - + dc.clearClip(); is24Hour = Sys.getDeviceSettings().is24Hour; @@ -194,7 +200,6 @@ class Digital5View extends Ui.WatchFace { var lcdBackgroundVisible = App.getApp().getProperty("LcdBackground"); var profile = UserProfile.getProfile(); - var alarmCount = Sys.getDeviceSettings().alarmCount; var dst = App.getApp().getProperty("DST"); var timezoneOffset = clockTime.timeZoneOffset; var showHomeTimezone = App.getApp().getProperty("ShowHomeTimezone"); @@ -320,7 +325,7 @@ class Digital5View extends Ui.WatchFace { var coloredBattery = App.getApp().getProperty("ColoredBattery"); showChargePercentage = showChargePercentage || showPercentageUnder20 && charge < 20; - if (debug) {System.println("charge: " + charge + ", showPercentageUnder20: " + showPercentageUnder20 + ", showChargePercentage: " + showChargePercentage);} + Log("Digital5View.onUpdate","(draw battery) charge: " + charge + ", showPercentageUnder20: " + showPercentageUnder20 + ", showChargePercentage: " + showChargePercentage); if (showChargePercentage) { batteryIconOffsetX = 7; @@ -363,10 +368,10 @@ class Digital5View extends Ui.WatchFace { // draw notification var notificationCount = Sys.getDeviceSettings().notificationCount; if (notificationCount > 0) { - var startX = centerX - 55 - batteryIconOffsetX; + var startX = centerX - 55 - batteryIconOffsetX; var startY = 18; - if (debug) {System.println("startX: " + startX + ", startY: " + startY);} + Log("Digital5View.onUpdate","(draw notification) startX: " + startX + ", startY: " + startY + ", notificationCount: " + notificationCount); dc.setColor(darkUpperBackground ? Gfx.COLOR_WHITE : Gfx.COLOR_BLACK, upperBackgroundColor); dc.fillRectangle(startX, startY, 18, 11); @@ -378,11 +383,11 @@ class Digital5View extends Ui.WatchFace { } // draw bluetooth - var connected = Sys.getDeviceSettings().phoneConnected; - + var connected = Sys.getDeviceSettings().phoneConnected; if (connected) { var startX = centerX - 30 - batteryIconOffsetX; var startY = 12; + Log("Digital5View.onUpdate","(draw bluetooth) startX: " + startX + ", startY: " + startY + ", connected: " + connected); dc.setColor(upperForegroundColor, upperBackgroundColor); dc.drawLine(startX, startY, startX + 7, startY + 7); dc.drawLine(startX + 7, 19, startX + 3, startY + 11); @@ -400,6 +405,7 @@ class Digital5View extends Ui.WatchFace { } // Draw Alarm + var alarmCount = Sys.getDeviceSettings().alarmCount; if (alarmCount > 0) { var alarmX = centerX + 42 + batteryIconOffsetX; dc.fillPolygon([[alarmX + 6, 17], [alarmX + 9, 21], [alarmX + 10, 25], [alarmX + 11, 26], [alarmX + 11, 27], [alarmX, 27], [alarmX, 26], [alarmX + 1, 25], [alarmX + 2, 21], [alarmX + 3, 19]]); @@ -481,7 +487,7 @@ class Digital5View extends Ui.WatchFace { var moveBarRightPart = moveBarLength * 0.138888889; var moveBarX = dataFieldsTop - 6; - if (debug) {System.println("moveBarLength: " + moveBarLength + "moveBarLeft: " + moveBarLeft + "moveBarLeftPart: " + moveBarLeftPart + "moveBarRightStart: " + moveBarRightStart + "moveBarRightPart: " + moveBarRightPart + "moveBarX: " + moveBarX);} + Log("Digital5View.onUpdate","(draw move bar) moveBarLength: " + moveBarLength + "moveBarLeft: " + moveBarLeft + "moveBarLeftPart: " + moveBarLeftPart + "moveBarRightStart: " + moveBarRightStart + "moveBarRightPart: " + moveBarRightPart + "moveBarX: " + moveBarX); dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); @@ -832,12 +838,37 @@ class Digital5View extends Ui.WatchFace { break; case 13: // Weather if (apiKey.length() > 0) { + + Log("Digital5View.drawWithUnit","(weather) - apiKey: " + apiKey); + if (field == BOTTOM_FIELD) { textX += 10; } var icon = 7; + var dsResult = App.getApp().getProperty("dsResult"); + Log("Digital5View.drawWithUnit","(weather) - dsResult: " + dsResult + ", length: " + dsResult.length()); + + if (dsResult.length() == 0){ + Log("Digital5View.drawWithUnit","(weather) - no results yet, displaying empty"); + fieldText = "----"; + unitText = ""; + break; + } + + if (!dsResult.equals("CURRENTLY") && !dsResult.equals("DAILY")){ + Log("Digital5View.drawWithUnit","(weather) - displaying error"); + fieldText = dsResult; + unitText = ""; + break; + } + + if (currentWeather) { var temp = App.getApp().getProperty("temp"); - if (null == temp) { - fieldText = "--/--"; + Log("Digital5View.drawWithUnit","(weather) - temp: " + temp); + if (!(temp instanceof Toybox.Lang.Float)) { + Log("Digital5View.drawWithUnit","(weather) - no current data available, displaying empty"); + fieldText = "----"; + unitText = ""; + break; } else { if (tempUnit == 1) { temp = temp * 1.8 + 32; } icon = App.getApp().getProperty("icon"); @@ -845,25 +876,36 @@ class Digital5View extends Ui.WatchFace { var bmpY = xyPositions[1]; fieldText = temp.format("%.1f"); } - } else { - var tempMin = App.getApp().getProperty("tempMin"); - var tempMax = App.getApp().getProperty("tempMax"); - if (null == tempMin || null == tempMax) { - fieldText = "--/--"; + } + else { + var minTemp = App.getApp().getProperty("minTemp"); + var maxTemp = App.getApp().getProperty("maxTemp"); + Log("Digital5View.drawWithUnit","(weather) - minTemp: " + minTemp + ", maxTemp: " + maxTemp); + if (!(minTemp instanceof Toybox.Lang.Float)) { + Log("Digital5View.drawWithUnit","(weather) - no daily data available, displaying empty"); + fieldText = "----"; + unitText = ""; + break; } else { if (tempUnit == 1) { - tempMin = tempMin * 1.8 + 32; - tempMax = tempMax * 1.8 + 32; + minTemp = minTemp * 1.8 + 32; + maxTemp = maxTemp * 1.8 + 32; } icon = App.getApp().getProperty("icon"); var bmpX = xyPositions[0]; var bmpY = xyPositions[1]; - fieldText = tempMin.format("%.0f") + "/" + tempMax.format("%.0f"); + fieldText = minTemp.format("%.0f") + "/" + maxTemp.format("%.0f"); } } + + Log("Digital5View.drawWithUnit","drawWithUnit (weather) - icon: " + icon ); + drawWeatherSymbol(field, icon, dc, xyPositions); - } else { - fieldText = "--/--"; + } + else { + fieldText = "KEY"; + unitText = ""; + break; } unitText = tempUnit == 0 ? "C" : "F"; break; @@ -878,7 +920,7 @@ class Digital5View extends Ui.WatchFace { var unitLcdY = xyPositions[5]; var unitX = xyPositions[6]; var unitY = xyPositions[7]; - if (debug) {System.println("unitText: " + unitText + ", field: " + field);} + Log("Digital5View.drawUnitText", "unitText: " + unitText + ", field: " + field); if (field == BOTTOM_FIELD){ switch(unitText.toLower()){ case "km": @@ -1456,4 +1498,13 @@ class Digital5View extends Ui.WatchFace { return [monthText, timeText]; } + + //function Log(method, message){ + // if ($.debug){ + // + // var myTime = System.getClockTime(); + // var myTimeString = myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d"); + // if ($.debug) {System.println(myTimeString + " | " + method + " | " + message);} + // } + // } } From d330bcff4d75c652bfaab87a257449ee2090cf32 Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Wed, 8 Jan 2020 17:53:01 +0100 Subject: [PATCH 7/8] Features/bring back non lcd font (#9) * start work on non-lcd font * add extra Sans Serif fonts * final updates for non-lcd font support --- resources/fonts/RobotoCondensed_14.fnt | 101 ----------- resources/fonts/RobotoCondensed_14.png | Bin 8330 -> 0 bytes resources/fonts/RobotoCondensed_20.fnt | 19 +++ resources/fonts/RobotoCondensed_20.png | Bin 0 -> 849 bytes resources/fonts/RobotoCondensed_24.fnt | 209 +++++++++++++++++++++++ resources/fonts/RobotoCondensed_24.png | Bin 0 -> 6558 bytes resources/fonts/RobotoCondensed_7.bmfc | 55 ++++++ resources/fonts/RobotoCondensed_7.fnt | 13 ++ resources/fonts/RobotoCondensed_7.png | Bin 0 -> 361 bytes resources/fonts/RobotoCondensed_72.bmfc | 55 ++++++ resources/fonts/RobotoCondensed_72.fnt | 15 ++ resources/fonts/RobotoCondensed_72.png | Bin 0 -> 3382 bytes resources/fonts/Roboto_26.fnt | 214 ++++++++++++++++++++++++ resources/fonts/Roboto_26.png | Bin 0 -> 7907 bytes resources/resources.xml | 7 +- resources/settings/properties.xml | 6 +- resources/settings/settings.xml | 8 + source/Digital5App.mc | 4 +- source/Digital5View.mc | 108 ++++++------ 19 files changed, 660 insertions(+), 154 deletions(-) delete mode 100644 resources/fonts/RobotoCondensed_14.fnt delete mode 100644 resources/fonts/RobotoCondensed_14.png create mode 100644 resources/fonts/RobotoCondensed_20.fnt create mode 100644 resources/fonts/RobotoCondensed_20.png create mode 100644 resources/fonts/RobotoCondensed_24.fnt create mode 100644 resources/fonts/RobotoCondensed_24.png create mode 100644 resources/fonts/RobotoCondensed_7.bmfc create mode 100644 resources/fonts/RobotoCondensed_7.fnt create mode 100644 resources/fonts/RobotoCondensed_7.png create mode 100644 resources/fonts/RobotoCondensed_72.bmfc create mode 100644 resources/fonts/RobotoCondensed_72.fnt create mode 100644 resources/fonts/RobotoCondensed_72.png create mode 100644 resources/fonts/Roboto_26.fnt create mode 100644 resources/fonts/Roboto_26.png diff --git a/resources/fonts/RobotoCondensed_14.fnt b/resources/fonts/RobotoCondensed_14.fnt deleted file mode 100644 index 3e7cf60..0000000 --- a/resources/fonts/RobotoCondensed_14.fnt +++ /dev/null @@ -1,101 +0,0 @@ -info face="RobotoCondensed-Regular" size=14 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2 -common lineHeight=19 base=15 scaleW=512 scaleH=512 pages=1 packed=0 -page id=0 file="RobotoCondensed_14.png" -chars count=97 -char id=0 x=255 y=0 width=598 height=21 xoffset=-1 yoffset=-1 xadvance=0 page=0 chnl=0 -char id=10 x=255 y=0 width=205 height=21 xoffset=-1 yoffset=-1 xadvance=0 page=0 chnl=0 -char id=32 x=255 y=0 width=436 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=33 x=257 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=34 x=251 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=35 x=433 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=36 x=389 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=37 x=404 y=21 width=11 height=21 xoffset=-1 yoffset=-1 xadvance=9 page=0 chnl=0 -char id=38 x=449 y=21 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=39 x=276 y=21 width=4 height=21 xoffset=-1 yoffset=-1 xadvance=2 page=0 chnl=0 -char id=40 x=300 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=41 x=306 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=42 x=469 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=43 x=415 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=44 x=285 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=45 x=398 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=46 x=280 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=47 x=355 y=21 width=7 height=21 xoffset=-1 yoffset=-1 xadvance=5 page=0 chnl=0 -char id=48 x=242 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=49 x=161 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=50 x=170 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=51 x=179 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=52 x=188 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=53 x=197 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=54 x=206 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=55 x=215 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=56 x=224 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=57 x=233 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=58 x=295 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=59 x=290 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=60 x=334 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=61 x=424 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=62 x=342 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=63 x=268 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=64 x=362 y=21 width=13 height=21 xoffset=-1 yoffset=-1 xadvance=11 page=0 chnl=0 -char id=65 x=0 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=66 x=10 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=67 x=20 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=68 x=29 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=69 x=39 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=70 x=48 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=71 x=57 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=72 x=67 y=0 width=11 height=21 xoffset=-1 yoffset=-1 xadvance=9 page=0 chnl=0 -char id=73 x=78 y=0 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=74 x=84 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=75 x=93 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=76 x=103 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=77 x=112 y=0 width=12 height=21 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 -char id=78 x=124 y=0 width=11 height=21 xoffset=-1 yoffset=-1 xadvance=9 page=0 chnl=0 -char id=79 x=135 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=80 x=145 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=81 x=155 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=82 x=165 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=83 x=175 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=84 x=184 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=85 x=193 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=86 x=203 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=87 x=213 y=0 width=13 height=21 xoffset=-1 yoffset=-1 xadvance=11 page=0 chnl=0 -char id=88 x=226 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=89 x=236 y=0 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 -char id=90 x=246 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=91 x=312 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=92 x=375 y=21 width=7 height=21 xoffset=-1 yoffset=-1 xadvance=5 page=0 chnl=0 -char id=93 x=317 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=94 x=382 y=21 width=7 height=21 xoffset=-1 yoffset=-1 xadvance=5 page=0 chnl=0 -char id=95 x=442 y=21 width=7 height=21 xoffset=-1 yoffset=-1 xadvance=5 page=0 chnl=0 -char id=96 x=262 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=97 x=460 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=98 x=469 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=99 x=478 y=0 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=100 x=486 y=0 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=101 x=495 y=0 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=102 x=503 y=0 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=103 x=0 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=104 x=9 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=105 x=18 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=106 x=23 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=107 x=28 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=108 x=36 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=109 x=41 y=21 width=12 height=21 xoffset=-1 yoffset=-1 xadvance=10 page=0 chnl=0 -char id=110 x=53 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=111 x=62 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=112 x=71 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=113 x=80 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=114 x=89 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=115 x=95 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=116 x=103 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=117 x=109 y=21 width=9 height=21 xoffset=-1 yoffset=-1 xadvance=7 page=0 chnl=0 -char id=118 x=118 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=119 x=126 y=21 width=11 height=21 xoffset=-1 yoffset=-1 xadvance=9 page=0 chnl=0 -char id=120 x=137 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=121 x=145 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=122 x=153 y=21 width=8 height=21 xoffset=-1 yoffset=-1 xadvance=6 page=0 chnl=0 -char id=123 x=322 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=124 x=350 y=21 width=5 height=21 xoffset=-1 yoffset=-1 xadvance=3 page=0 chnl=0 -char id=125 x=328 y=21 width=6 height=21 xoffset=-1 yoffset=-1 xadvance=4 page=0 chnl=0 -char id=126 x=459 y=21 width=10 height=21 xoffset=-1 yoffset=-1 xadvance=8 page=0 chnl=0 diff --git a/resources/fonts/RobotoCondensed_14.png b/resources/fonts/RobotoCondensed_14.png deleted file mode 100644 index 30abd779270b9f1955bccecbfdf02a7a02d006b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8330 zcmeHr*I(1i`t=v22vUxsA{zoWK$N0Egn$s)poj=a??vgogCPVEx2Rhw3Iu7vLXnb$ z7J3z>L!^clf+9o+5KRa%2_Y}%?)N9W7iVss=Wb@!%x67ot>^bFOvFY15(NN2-1N4w zH30A*wEVzfp@XvXaEc88r>#tl4Q(IJZxM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ZmT3iwNd_O|PkqgfNSP{~ z?K7gDB`;Q|UmczP!^`i)+?E=+gxr1gaynjv8tC331n;d&U}Lw;*(sKrj%T;i~jk5;k#H;?cUBzmKk%CZA#f{CQ--+ABxE=e&~9e z%1L0m(y)66!=v8fbhXz1-=yS!{r?d79|HfMB9Pqnns+F}p!Od*3rVB@p3(HCg)!!D H&y@cMfSftI diff --git a/resources/fonts/RobotoCondensed_20.fnt b/resources/fonts/RobotoCondensed_20.fnt new file mode 100644 index 0000000..371ed41 --- /dev/null +++ b/resources/fonts/RobotoCondensed_20.fnt @@ -0,0 +1,19 @@ +info face="Roboto Condensed" size=20 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 +common lineHeight=20 base=16 scaleW=64 scaleH=64 pages=1 packed=0 alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0 +page id=0 file="RobotoCondensed_20.png" +chars count=13 +char id=48 x=21 y=0 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=49 x=57 y=0 width=5 height=12 xoffset=1 yoffset=4 xadvance=8 page=0 chnl=15 +char id=50 x=30 y=0 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=51 x=39 y=0 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=52 x=48 y=0 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=53 x=36 y=13 width=7 height=12 xoffset=1 yoffset=4 xadvance=8 page=0 chnl=15 +char id=54 x=0 y=13 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=55 x=9 y=13 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=56 x=18 y=13 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=57 x=27 y=13 width=8 height=12 xoffset=0 yoffset=4 xadvance=8 page=0 chnl=15 +char id=58 x=44 y=13 width=4 height=9 xoffset=0 yoffset=7 xadvance=4 page=0 chnl=15 +char id=65 x=0 y=0 width=10 height=12 xoffset=0 yoffset=4 xadvance=10 page=0 chnl=15 +char id=80 x=11 y=0 width=9 height=12 xoffset=0 yoffset=4 xadvance=9 page=0 chnl=15 +kernings count=1 +kerning first=80 second=65 amount=-1 diff --git a/resources/fonts/RobotoCondensed_20.png b/resources/fonts/RobotoCondensed_20.png new file mode 100644 index 0000000000000000000000000000000000000000..ba9a4e717b078f34666b085823f3d1359b8ae402 GIT binary patch literal 849 zcmV-X1FrmuP)5LOO?3`S_1ld-{#Ww66Ujg>M&vWrx{R8Fxrc431p z7xFpy3YDuP5F=p=A%ZL|L7i9jsR*}sMYg!iA22Cq_wHm#u2O~lnw{A<^X+@z``!YG zFcbhXHpZB(5AOJkA5McmHd&tE1ya#ySJna9B17qz@r)_JvY|P)& z_cxAb@`xV+suz~e{{$@V9g7bjCtoFO{xGottlxv3Uhn`wUH-lSz|PK>H=Z=q^wm#F zRmK=&jGuME_QSXB0MGVrbU}cMC4oJj^@{ukqgRdXlebGHDV;{heWnTs;Qz=^`MdhifDS?c8MoM!_AIiGW)2g2!v$A!!37{19 ztbB~%KY)0kL(vs808uxlE&x$Cx15Mgj?8=WIP-rZa~ z{1X^H*M#P|VW*Z~AEh;1;3i0cYApEmSuP@c{1jKiA~dyftJ&3ZDDy;>Tja># zj>~(MdoO47N3tK+sV~>^9FrugIwb2)x{p-6E2u}2dh4`9PVn)?UJ2adUY_*XGvP6d zf&gc>!Q1Tki_p~%$1RH*8Djoa5K)KLb++v|HdPBZt_6+mZpD50-sDyN7KPGI&3Y0T?!Q+4+J_g$IG+)2Nm5Lf z;ZHFH?L?e?mwywGt%vjCKtU((_?2I{zni^7+z2i0*v{xS7y9sa_;KdMMAPeS=t~^4 zH>*>X_N5Tx8BVHuGHF#f*_qDIDHrOjzX>1WVWB`oVmzl@R$j|iZ^A1!X43x_&s&9 z9lpAY-J`|0y1NH)Umw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2zk0?; zt54?dzVJj^#w%odzMo*esZ+RdiqW)~J$(!@@u2_kI9H|lwLmuh3@H2Uj{ zv0R$N{$g_Pa$89S1UcuLYNwjZaSr~gujbP-OH7tAcl%=#-zR6X&6W45H}Cu)g^Cke zz`_T?KAKAalLYwiPfAJPW75h&#xRlhQ?5hg$j)%(v7rQki^aTH3Fu^Ri(KTN0hM^) zHh6hrpkF4TCinFRIyE_mQAXFVZyMk-iAWBLi#h9`pxj9wh7#JQr7KJ zm4ZV4*XZ5M_JS%)hMZ?tRl%1Wf0F6*Bx$oi(0VYd^97LcPYU$C>q_)OpeN=~GqJS8 zkmjoA3$BuZmkM~o{I9?xhmSpw0u_FT92&+?QBS%!UnORw#ptybnw3OJzY&Qz|EuYeCVG4C!n)2>|DA+(T4lE z9pMg1`ousGj!p(Y@H<3s(#m^!E12V*eEkGc3HQ}}(Qz!>L(!y<+8v}DK%usS8HPRLW*umjAA|1onqU2g!PA2sCe|GSn_<>Kie@UQwp>1cyJP5M@ z;13uwOP%w>b@HnglR6p;q&rPRdLpXn@I{Jfy^lLYRcJ=EM#A$M&A&{1i0*xvSbEt@ zB4Ww!TPNb%%l666t6-BB#h3q2|Cb`L6g7B7I-lrB6;`4Z^uOQhH;O7Ri(VK7{0}FVVn+Y~ literal 0 HcmV?d00001 diff --git a/resources/resources.xml b/resources/resources.xml index e95c229..5889895 100644 --- a/resources/resources.xml +++ b/resources/resources.xml @@ -13,5 +13,10 @@ + + + + + - \ No newline at end of file + diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml index b832075..576d4f0 100644 --- a/resources/settings/properties.xml +++ b/resources/settings/properties.xml @@ -6,7 +6,11 @@ 47 false - + + true + + true + true false diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 4532efd..ba596fb 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -65,6 +65,14 @@ + + + + + + + + diff --git a/source/Digital5App.mc b/source/Digital5App.mc index 6019719..e1dc2c0 100644 --- a/source/Digital5App.mc +++ b/source/Digital5App.mc @@ -38,7 +38,7 @@ class Digital5ReloadedApp extends App.AppBase { view = new Digital5View(); - Background.registerForTemporalEvent(new Time.Duration(300)); // 15 min + Background.registerForTemporalEvent(new Time.Duration(900)); // 15 min if( Toybox.WatchUi has :WatchFaceDelegate ) { return [view, new Digital5Delegate()]; @@ -84,6 +84,8 @@ class Digital5ReloadedApp extends App.AppBase { } else { App.getApp().setProperty("icon", 7); } + + WatchUi.requestUpdate(); } } diff --git a/source/Digital5View.mc b/source/Digital5View.mc index 14ca4ab..0e996e6 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -17,8 +17,8 @@ class Digital5View extends Ui.WatchFace { var is24Hour; var secondsAlwaysOn; - var lcdFont = false; - var lcdFontDataFields = false; + var lcdFont; + var lcdFontDataFields; var showLeadingZero; var clockTime; var sunRiseSet; @@ -64,7 +64,7 @@ class Digital5View extends Ui.WatchFace { var sunsetText = "--:--"; var currentWeather; var digitalUpright72, digitalUpright26, digitalUpright24, digitalUpright20, digitalUpright16; - //var robotoCondensed72; + var robotoCondensed72, robotoCondensed24, roboto26, robotoCondensed7, robotoCondensed20; var burnedIcon, burnedIconWhite, stepsIcon, stepsIconWhite; var alarmIcon, alarmIconWhite; var width, height; @@ -92,6 +92,9 @@ class Digital5View extends Ui.WatchFace { var secondsFont = 0; var secondsYPosition = 0; + var timeFont; + var dateTimeFont; + var amPmFont; function initialize() { WatchFace.initialize(); @@ -110,7 +113,11 @@ class Digital5View extends Ui.WatchFace { digitalUpright24 = Ui.loadResource(Rez.Fonts.digitalUpright24); digitalUpright20 = Ui.loadResource(Rez.Fonts.digitalUpright20); digitalUpright16 = Ui.loadResource(Rez.Fonts.digitalUpright16); - //robotoCondensed72 = Ui.loadResource(Rez.Fonts.robotoCondensed72); + robotoCondensed72 = Ui.loadResource(Rez.Fonts.robotoCondensed72); + roboto26 = Ui.loadResource(Rez.Fonts.roboto26); + robotoCondensed24 = Ui.loadResource(Rez.Fonts.robotoCondensed24); + robotoCondensed7 = Ui.loadResource(Rez.Fonts.robotoCondensed7); + robotoCondensed20 = Ui.loadResource(Rez.Fonts.robotoCondensed20); burnedIcon = Ui.loadResource(Rez.Drawables.burned); burnedIconWhite = Ui.loadResource(Rez.Drawables.burnedWhite); stepsIcon = Ui.loadResource(Rez.Drawables.steps); @@ -159,8 +166,8 @@ class Digital5View extends Ui.WatchFace { is24Hour = Sys.getDeviceSettings().is24Hour; secondsAlwaysOn = App.getApp().getProperty("SecondsAlwaysOn"); - //lcdFont = App.getApp().getProperty("LcdFont"); - //lcdFontDataFields = App.getApp().getProperty("LcdFontDataFields"); + lcdFont = App.getApp().getProperty("LcdFont"); + lcdFontDataFields = App.getApp().getProperty("LcdFontDataFields"); showLeadingZero = App.getApp().getProperty("ShowLeadingZero"); tempUnit = App.getApp().getProperty("TempUnit"); coloredCalorieText = App.getApp().getProperty("ColorizeCalorieText"); @@ -241,6 +248,17 @@ class Digital5View extends Ui.WatchFace { minuteColor = upperForegroundColor; } + if (lcdFont) { + timeFont = digitalUpright72 ; + dateTimeFont = digitalUpright26; + amPmFont = digitalUpright20; + } + else { + timeFont = robotoCondensed72 ; + dateTimeFont = roboto26; + amPmFont = robotoCondensed24; + } + // Mifflin-St.Jeor Formula (1990) var baseKcalMen = (9.99 * userWeight) + (6.25 * userHeight) - (4.92 * userAge) + 5.0; // base kcal men @@ -509,18 +527,18 @@ class Digital5View extends Ui.WatchFace { // Date and home timezone dc.setColor(upperForegroundColor, upperBackgroundColor); - var dateTimeFont = digitalUpright26; var dateTimefontSize = Graphics.getFontHeight(dateTimeFont); var dateYPosition = dataFieldsTop - 9 - dateTimefontSize; var dateXPosition = centerX - 99; var dateTimeText = calcHomeDateTime(); // draw Time - var timeFont = digitalUpright72 ; var timeFontSize = Graphics.getFontHeight(timeFont); var timeYPosition = dateYPosition - timeFontSize + 10; - secondsFont = digitalUpright20; - secondsYPosition = dateYPosition - Graphics.getFontHeight(secondsFont); + var yCorrection = 0; + if (lcdFont) { yCorrection = - 4; } + secondsFont = amPmFont; + secondsYPosition = dateYPosition - Graphics.getFontHeight(secondsFont) + yCorrection; if (lcdFont && lcdBackgroundVisible) { dc.setColor(darkUpperBackground ? Gfx.COLOR_DK_GRAY : Gfx.COLOR_LT_GRAY, upperBackgroundColor); @@ -550,8 +568,8 @@ class Digital5View extends Ui.WatchFace { // draw Calendar Week if (showCalendarWeek) { var calendarWeekText = Ui.loadResource(Rez.Strings.CalendarWeek); - dc.drawText(centerX - 77, secondsYPosition - Graphics.getFontHeight(digitalUpright20), digitalUpright20, (calendarWeekText), Gfx.TEXT_JUSTIFY_RIGHT); - dc.drawText(centerX - 77, secondsYPosition, digitalUpright20, (getWeekOfYear(nowinfo)), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 75, secondsYPosition - Graphics.getFontHeight(amPmFont), amPmFont, (calendarWeekText), Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 75, secondsYPosition, amPmFont, (getWeekOfYear(nowinfo)), Gfx.TEXT_JUSTIFY_RIGHT); } // draw Sunrise/Sunset @@ -561,8 +579,8 @@ class Digital5View extends Ui.WatchFace { calcSunriseSunset(); drawArrow(dc, centerX - 70, sunRiseY, 0); drawArrow(dc, centerX + 60, sunRiseY, 1); - dc.drawText(centerX - 50, sunRiseY - 5, digitalUpright16, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); - dc.drawText(centerX + 55 , sunRiseY - 5, digitalUpright16, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); + dc.drawText(centerX - 50, sunRiseY - 5, lcdFont ? digitalUpright16 : robotoCondensed20, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(centerX + 55 , sunRiseY - 5, lcdFont ? digitalUpright16 : robotoCondensed20, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); } @@ -836,7 +854,7 @@ class Digital5View extends Ui.WatchFace { fieldText = null == pressure ? "-" : ((pressure.data.toFloat() + pressureOffset) / 100.0).format("%.2f"); unitText = "mb"; break; - case 13: // Weather + case 13: // if (apiKey.length() > 0) { Log("Digital5View.drawWithUnit","(weather) - apiKey: " + apiKey); @@ -916,6 +934,8 @@ class Digital5View extends Ui.WatchFace { } function drawUnitText(xyPositions, dc, unitText, field){ + var bmpX = xyPositions[0] + 84 ; + var bmpY = xyPositions[1] - 4; var unitLcdX = xyPositions[4]; var unitLcdY = xyPositions[5]; var unitX = xyPositions[6]; @@ -924,29 +944,36 @@ class Digital5View extends Ui.WatchFace { if (field == BOTTOM_FIELD){ switch(unitText.toLower()){ case "km": - drawCharacter(xyPositions, dc, K, 0); - drawCharacter(xyPositions, dc, M, 6); + //drawCharacter(xyPositions, dc, K, 0); + //drawCharacter(xyPositions, dc, M, 6); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "mi": - drawCharacter(xyPositions, dc, M, 0); - drawCharacter(xyPositions, dc, I, 0); + //drawCharacter(xyPositions, dc, M, 0); + //drawCharacter(xyPositions, dc, I, 0); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "m": - drawCharacter(xyPositions, dc, M, -5); + //drawCharacter(xyPositions, dc, M, -5); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "ft": - drawCharacter(xyPositions, dc, F, 0); - drawCharacter(xyPositions, dc, T, 0); + //drawCharacter(xyPositions, dc, F, 0); + //drawCharacter(xyPositions, dc, T, 0); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "mb": - drawCharacter(xyPositions, dc, M, 0); - drawCharacter(xyPositions, dc, B, 0); + //drawCharacter(xyPositions, dc, M, 0); + //drawCharacter(xyPositions, dc, B, 0); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "c": - drawCharacter(xyPositions, dc, C, 6); + //drawCharacter(xyPositions, dc, C, 6); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "f": - drawCharacter(xyPositions, dc, F, 6); + //drawCharacter(xyPositions, dc, F, 6); + dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; } return; @@ -1223,10 +1250,10 @@ class Digital5View extends Ui.WatchFace { var xBase = centerX + 70 + 3; var yBase = secondsYPosition; if (secondsAlwaysOn) { - yBase = yBase - Graphics.getFontHeight(digitalUpright20); + yBase = yBase - Graphics.getFontHeight(amPmFont); } var amPm = clockTime.hour < 12 ? "am" : "pm"; - dc.drawText(xBase, yBase, digitalUpright20, amPm, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(xBase, yBase, amPmFont, amPm, Gfx.TEXT_JUSTIFY_LEFT); } } @@ -1404,23 +1431,14 @@ class Digital5View extends Ui.WatchFace { } function GetFieldFont(fieldNumber, isUnitText) { - var tinyFont = Graphics.FONT_XTINY; - - if (width > 240 and !isUnitText){ - tinyFont = Graphics.FONT_TINY; - } - if (fieldNumber == BOTTOM_FIELD) { - if (isUnitText){ - return Graphics.FONT_XTINY; - } - return digitalUpright20; + return lcdFontDataFields ? digitalUpright20 : robotoCondensed24; } if (isUnitText){ - return digitalUpright16; + return lcdFontDataFields ? digitalUpright16 : robotoCondensed7; } - return digitalUpright24; + return lcdFontDataFields ? digitalUpright24 : robotoCondensed24; } /// @@ -1495,16 +1513,6 @@ class Digital5View extends Ui.WatchFace { timeText = Lang.format("$1$:$2$", [homeHour.format(showLeadingZero ? "%02d" : "%01d"), homeMinute.format("%02d")]) + ampm; } - return [monthText, timeText]; } - - //function Log(method, message){ - // if ($.debug){ - // - // var myTime = System.getClockTime(); - // var myTimeString = myTime.hour.format("%02d") + ":" + myTime.min.format("%02d") + ":" + myTime.sec.format("%02d"); - // if ($.debug) {System.println(myTimeString + " | " + method + " | " + message);} - // } - // } } From 1a9d8e77cafa918e662a9123319316676a986d1f Mon Sep 17 00:00:00 2001 From: Erik van Ballegoij Date: Mon, 27 Apr 2020 18:30:01 +0200 Subject: [PATCH 8/8] Small UI Fixes Fixing issues #10 and #11 --- source/Digital5View.mc | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/source/Digital5View.mc b/source/Digital5View.mc index 0e996e6..9e2d59d 100644 --- a/source/Digital5View.mc +++ b/source/Digital5View.mc @@ -100,10 +100,10 @@ class Digital5View extends Ui.WatchFace { WatchFace.initialize(); //reset weather data - App.getApp().setProperty("dsResult", ""); - App.getApp().setProperty("temp", ""); - App.getApp().setProperty("minTemp", ""); - App.getApp().setProperty("maxTemp", ""); + //App.getApp().setProperty("dsResult", ""); + //App.getApp().setProperty("temp", ""); + //App.getApp().setProperty("minTemp", ""); + //App.getApp().setProperty("maxTemp", ""); } @@ -490,7 +490,7 @@ class Digital5View extends Ui.WatchFace { stopAngleRight = stopAngleRight > 59.0 ? 59.0 : stopAngleRight; for(var i = 0; i < 10 ; i++) { var startAngleRight = -10 + (i * 6); - if (startAngleRight < stopAngleRight) { dc.drawArc(centerX, centerY, 117, 0, startAngleRight, startAngleRight + 5); } + if (startAngleRight < stopAngleRight) { dc.drawArc(centerX, centerY, arcRadius, 0, startAngleRight, startAngleRight + 5); } } } @@ -577,10 +577,10 @@ class Digital5View extends Ui.WatchFace { var notificationsBottomY = 30; var sunRiseY = (timeYPosition - notificationsBottomY) / 2 + notificationsBottomY; calcSunriseSunset(); - drawArrow(dc, centerX - 70, sunRiseY, 0); - drawArrow(dc, centerX + 60, sunRiseY, 1); - dc.drawText(centerX - 50, sunRiseY - 5, lcdFont ? digitalUpright16 : robotoCondensed20, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); - dc.drawText(centerX + 55 , sunRiseY - 5, lcdFont ? digitalUpright16 : robotoCondensed20, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); + drawArrow(dc, .4 * centerX, sunRiseY, 0); + drawArrow(dc, 1.5 * centerX, sunRiseY, 1); + dc.drawText(.4 * centerX + 15, sunRiseY - 5, lcdFont ? digitalUpright20 : robotoCondensed24, sunriseText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(1.5 * centerX - 5, sunRiseY - 5, lcdFont ? digitalUpright20 : robotoCondensed24, sunsetText, Gfx.TEXT_JUSTIFY_RIGHT); } @@ -864,19 +864,19 @@ class Digital5View extends Ui.WatchFace { var dsResult = App.getApp().getProperty("dsResult"); Log("Digital5View.drawWithUnit","(weather) - dsResult: " + dsResult + ", length: " + dsResult.length()); - if (dsResult.length() == 0){ - Log("Digital5View.drawWithUnit","(weather) - no results yet, displaying empty"); - fieldText = "----"; - unitText = ""; - break; - } + //if (dsResult.length() == 0){ + // Log("Digital5View.drawWithUnit","(weather) - no results yet, displaying empty"); + // fieldText = "----"; + // unitText = ""; + // break; + //} - if (!dsResult.equals("CURRENTLY") && !dsResult.equals("DAILY")){ - Log("Digital5View.drawWithUnit","(weather) - displaying error"); - fieldText = dsResult; - unitText = ""; - break; - } + //if (!dsResult.equals("CURRENTLY") && !dsResult.equals("DAILY")){ + // Log("Digital5View.drawWithUnit","(weather) - displaying error"); + // fieldText = dsResult; + // unitText = ""; + // break; + //} if (currentWeather) { @@ -946,34 +946,34 @@ class Digital5View extends Ui.WatchFace { case "km": //drawCharacter(xyPositions, dc, K, 0); //drawCharacter(xyPositions, dc, M, 6); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "mi": //drawCharacter(xyPositions, dc, M, 0); //drawCharacter(xyPositions, dc, I, 0); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "m": //drawCharacter(xyPositions, dc, M, -5); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "ft": //drawCharacter(xyPositions, dc, F, 0); //drawCharacter(xyPositions, dc, T, 0); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "mb": //drawCharacter(xyPositions, dc, M, 0); //drawCharacter(xyPositions, dc, B, 0); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "c": //drawCharacter(xyPositions, dc, C, 6); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; case "f": //drawCharacter(xyPositions, dc, F, 6); - dc.drawText(bmpX, bmpY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); + dc.drawText(unitX, unitY, robotoCondensed7, unitText, Gfx.TEXT_JUSTIFY_LEFT); break; } return; @@ -1325,7 +1325,7 @@ class Digital5View extends Ui.WatchFace { textY = dataFieldsTop + 2 * fieldHeight + textYPadding + 1; unitLcdX = width - 83; unitLcdY = dataFieldsTop + 2 * fieldHeight + 10; - unitX = width - 90; + unitX = .7 * width; unitY = dataFieldsTop + 2 * fieldHeight + 3; break; }