From 10cd094dacb4eaf5909a1490c967eb3fcf32f754 Mon Sep 17 00:00:00 2001 From: gcormier9 Date: Mon, 17 Jul 2023 22:40:51 -0400 Subject: [PATCH] Add support for MARQ (Gen 2) Athlete / Adventurer / Captain / Golfer/ Aviator, D2 Mach 1, Edge Explore 2, epix PRO Gen2 42mm, epix PRO Gen2 47mm, epix PRO Gen2 51mm, fenix 6 Pro System 5 Preview, fenix 7 PRO, fenix 7S PRO, fenix Co-Authored-By: Chuanyi <26034018+Likenttt@users.noreply.github.com> --- README.md | 170 +++++++++++++++----------- manifest.xml | 197 ++++++++++++++++-------------- monkey.jungle | 28 +++++ resources/settings/properties.xml | 2 +- source-highmem-fr265s/GRunApp.mc | 50 ++++++++ source-highmem-marq2/GRunApp.mc | 50 ++++++++ 6 files changed, 332 insertions(+), 165 deletions(-) create mode 100644 source-highmem-fr265s/GRunApp.mc create mode 100644 source-highmem-marq2/GRunApp.mc diff --git a/README.md b/README.md index ea260ae..ae138d5 100644 --- a/README.md +++ b/README.md @@ -94,78 +94,81 @@ High-Memory devices also supports the following fields: ### Supported Features/Devices -| Device Qualifier | Device Name | Available Memory | Low Memory | High Memory | Training Effect | Power* | -| ----------------------- | ------------------------------------- |:----------------:|:----------:|:-----------:|:---------------:|:-------:| -| approachs62 | Approach S62 | 124.7 KB | | ✓ | | | -| d2air | D2 Air | 28.7 KB | ✓ | | | | -| d2charlie | D2 Charlie | 124.7 KB | | ✓ | | ✓ | -| d2delta | D2 Delta | 124.7 KB | | ✓ | | ✓ | -| d2deltapx | D2 Delta PX | 124.7 KB | | ✓ | | ✓ | -| d2deltas | D2 Delta S | 124.7 KB | | ✓ | | ✓ | -| descentmk1 | Descent Mk1 | 124.7 KB | | ✓ | ✓ | ✓ | -| descentmk2 | Descent Mk2 | 124.7 KB | | ✓ | ✓ | ✓ | -| descentmk2s | Descent Mk2 S | 124.7 KB | | ✓ | ✓ | ✓ | -| edge1030 | Edge 1030 | 124.7 KB | | ✓ | ✓ | ✓ | -| edge1030plus | Edge 1030 Plus | 124.7 KB | | ✓ | ✓ | ✓ | -| edge1030bontrager | Edge 1030 Bontrager | 124.7 KB | | ✓ | ✓ | ✓ | -| edge130 | Edge 130 | 28.7 KB | ✓ | | | ✓ | -| edge130plus | Edge 130 Plus | 28.7 KB | ✓ | | | ✓ | -| edge520plus | Edge 520 Plus | 124.7 KB | | ✓ | ✓ | ✓ | -| edge530 | Edge 530 | 124.7 KB | | ✓ | ✓ | ✓ | -| edge820 | Edge 820 | 124.7 KB | | ✓ | | ✓ | -| edge830 | Edge 830 | 124.7 KB | | ✓ | ✓ | ✓ | -| edgeexplore | Edge Explore | 124.7 KB | | ✓ | | | -| enduro | Enduro | 28.7 KB | ✓ | | ✓ | ✓ | -| fenix5 | fēnix 5 | 28.7 KB | ✓ | | ✓ | ✓ | -| fenix5plus | fēnix 5 Plus | 124.7 KB | | ✓ | | ✓ | -| fenix5s | fēnix 5S | 28.7 KB | ✓ | | ✓ | ✓ | -| fenix5splus | fēnix 5S Plus | 124.7 KB | | ✓ | | ✓ | -| fenix5x | fēnix 5X | 124.7 KB | | ✓ | ✓ | ✓ | -| fenix5xplus | fēnix 5X Plus | 124.7 KB | | ✓ | ✓ | ✓ | -| fenix6 | fēnix 6 | 28.7 KB | ✓ | | ✓ | ✓ | -| fenix6pro | fēnix 6 Pro | 124.7 KB | | ✓ | ✓ | ✓ | -| fenix6s | fēnix 6S | 28.7 KB | ✓ | | ✓ | ✓ | -| fenix6spro | fēnix 6S Pro | 124.7 KB | | ✓ | ✓ | ✓ | -| fenix6xpro | fēnix 6X Pro | 124.7 KB | | ✓ | ✓ | ✓ | -| fenixchronos | fēnix Chronos | 28.7 KB | ✓ | | ✓ | ✓ | -| fr55 | Forerunner 55 | 28.7 KB | ✓ | | | | -| fr245 | Forerunner 245 | 28.7 KB | ✓ | | ✓ | | -| fr245m | Forerunner 245 Music | 124.7 KB | | ✓ | ✓ | ✓ | -| fr255 | Forerunner 255 | 252.6 KB | | ✓ | ✓ | ✓ | -| fr255m | Forerunner 255 Music | 252.6 KB | | ✓ | ✓ | ✓ | -| fr255s | Forerunner 255s | 252.6 KB | | ✓ | ✓ | ✓ | -| fr255sm | Forerunner 255s Music | 252.6 KB | | ✓ | ✓ | ✓ | -| fr645 | Forerunner 645 | 28.7 KB | ✓ | | ✓ | | -| fr645m | Forerunner 645 Music | 60.7 KB | | ✓ | ✓ | | -| fr745 | Forerunner 745 | 124.7 KB | | ✓ | ✓ | ✓ | -| fr935 | Forerunner 935 | 28.7 KB | ✓ | | ✓ | ✓ | -| fr945 | Forerunner 945 | 124.7 KB | | ✓ | ✓ | ✓ | -| fr945lte | Forerunner 945 LTE | 124.7 KB | | ✓ | ✓ | ✓ | -| fr955 | Forerunner 955 | 252.6 KB | | ✓ | ✓ | ✓ | -| legacyherocaptainmarvel | Captain Marvel | 28.7 KB | ✓ | | | | -| legacyherofirstavenger | First Avenger | 28.7 KB | ✓ | | | | -| legacysagadarthvader | Darth Vader | 28.7 KB | ✓ | | | | -| legacysagarey | Rey | 28.7 KB | ✓ | | | | -| marqadventurer | MARQ Adventurer | 124.7 KB | | ✓ | ✓ | ✓ | -| marqathlete | MARQ Athlete | 124.7 KB | | ✓ | ✓ | ✓ | -| marqaviator | MARQ Aviator | 124.7 KB | | ✓ | ✓ | ✓ | -| marqcaptain | MARQ Captain | 124.7 KB | | ✓ | ✓ | ✓ | -| marqcommander | MARQ Commander | 124.7 KB | | ✓ | ✓ | ✓ | -| marqdriver | MARQ Driver | 124.7 KB | | ✓ | ✓ | ✓ | -| marqexpedition | MARQ Expedition | 124.7 KB | | ✓ | ✓ | ✓ | -| marqgolfer | MARQ Golfer | 124.7 KB | | ✓ | ✓ | ✓ | -| oregon7xx | Oregon 7xx | 124.7 KB | | ✓ | | | -| rino7xx | Rino 7xx | 124.7 KB | | ✓ | | | -| venu | Venu | 28.7 KB | ✓ | | | | -| venu2 | Venu 2 | 28.7 KB | ✓ | | | | -| venu2s | Venu 2S | 28.7 KB | ✓ | | | | -| venu2d | Venu Mercedes-Benz Collection | 28.7 KB | ✓ | | | | -| vivoactive3 | vívoactive 3 | 28.7 KB | ✓ | | | | -| vivoactive3d | vívoactive 3 Mercedes-Benz Collection | 28.7 KB | ✓ | | | | -| vivoactive3m | vívoactive 3 Music | 28.7 KB | ✓ | | | | -| vivoactive3mlte | vívoactive 3 Music LTE | 28.7 KB | ✓ | | | | -| vivoactive4 | vívoactive 4 | 28.7 KB | ✓ | | | | -| vivoactive4s | vívoactive 4S | 28.7 KB | ✓ | | | | + +| Device Qualifier | Device Name | Available Memory | Low Memory | High Memory | Training Effect | Power\* | +| ----------------------- | ----------------------------------------------------- | :--------------: | :--------: | :---------: | :-------------: | :-----: | +| approachs62 | Approach S62 | 124.7 KB | | ✓ | | | +| d2air | D2 Air | 28.7 KB | ✓ | | | | +| d2charlie | D2 Charlie | 124.7 KB | | ✓ | | ✓ | +| d2delta | D2 Delta | 124.7 KB | | ✓ | | ✓ | +| d2deltapx | D2 Delta PX | 124.7 KB | | ✓ | | ✓ | +| d2deltas | D2 Delta S | 124.7 KB | | ✓ | | ✓ | +| descentmk1 | Descent Mk1 | 124.7 KB | | ✓ | ✓ | ✓ | +| descentmk2 | Descent Mk2 | 124.7 KB | | ✓ | ✓ | ✓ | +| descentmk2s | Descent Mk2 S | 124.7 KB | | ✓ | ✓ | ✓ | +| edge1030 | Edge 1030 | 124.7 KB | | ✓ | ✓ | ✓ | +| edge1030plus | Edge 1030 Plus | 124.7 KB | | ✓ | ✓ | ✓ | +| edge1030bontrager | Edge 1030 Bontrager | 124.7 KB | | ✓ | ✓ | ✓ | +| edge130 | Edge 130 | 28.7 KB | ✓ | | | ✓ | +| edge130plus | Edge 130 Plus | 28.7 KB | ✓ | | | ✓ | +| edge520plus | Edge 520 Plus | 124.7 KB | | ✓ | ✓ | ✓ | +| edge530 | Edge 530 | 124.7 KB | | ✓ | ✓ | ✓ | +| edge820 | Edge 820 | 124.7 KB | | ✓ | | ✓ | +| edge830 | Edge 830 | 124.7 KB | | ✓ | ✓ | ✓ | +| edgeexplore | Edge Explore | 124.7 KB | | ✓ | | | +| enduro | Enduro | 28.7 KB | ✓ | | ✓ | ✓ | +| fenix5 | fēnix 5 | 28.7 KB | ✓ | | ✓ | ✓ | +| fenix5plus | fēnix 5 Plus | 124.7 KB | | ✓ | | ✓ | +| fenix5s | fēnix 5S | 28.7 KB | ✓ | | ✓ | ✓ | +| fenix5splus | fēnix 5S Plus | 124.7 KB | | ✓ | | ✓ | +| fenix5x | fēnix 5X | 124.7 KB | | ✓ | ✓ | ✓ | +| fenix5xplus | fēnix 5X Plus | 124.7 KB | | ✓ | ✓ | ✓ | +| fenix6 | fēnix 6 | 28.7 KB | ✓ | | ✓ | ✓ | +| fenix6pro | fēnix 6 Pro | 124.7 KB | | ✓ | ✓ | ✓ | +| fenix6s | fēnix 6S | 28.7 KB | ✓ | | ✓ | ✓ | +| fenix6spro | fēnix 6S Pro | 124.7 KB | | ✓ | ✓ | ✓ | +| fenix6xpro | fēnix 6X Pro | 124.7 KB | | ✓ | ✓ | ✓ | +| fenixchronos | fēnix Chronos | 28.7 KB | ✓ | | ✓ | ✓ | +| fr55 | Forerunner 55 | 28.7 KB | ✓ | | | | +| fr245 | Forerunner 245 | 28.7 KB | ✓ | | ✓ | | +| fr245m | Forerunner 245 Music | 124.7 KB | | ✓ | ✓ | ✓ | +| fr255 | Forerunner 255 | 252.6 KB | | ✓ | ✓ | ✓ | +| fr255m | Forerunner 255 Music | 252.6 KB | | ✓ | ✓ | ✓ | +| fr255s | Forerunner 255s | 252.6 KB | | ✓ | ✓ | ✓ | +| fr255sm | Forerunner 255s Music | 252.6 KB | | ✓ | ✓ | ✓ | +| fr645 | Forerunner 645 | 28.7 KB | ✓ | | ✓ | | +| fr645m | Forerunner 645 Music | 60.7 KB | | ✓ | ✓ | | +| fr745 | Forerunner 745 | 124.7 KB | | ✓ | ✓ | ✓ | +| fr935 | Forerunner 935 | 28.7 KB | ✓ | | ✓ | ✓ | +| fr945 | Forerunner 945 | 124.7 KB | | ✓ | ✓ | ✓ | +| fr945lte | Forerunner 945 LTE | 124.7 KB | | ✓ | ✓ | ✓ | +| fr955 | Forerunner 955 | 252.6 KB | | ✓ | ✓ | ✓ | +| legacyherocaptainmarvel | Captain Marvel | 28.7 KB | ✓ | | | | +| legacyherofirstavenger | First Avenger | 28.7 KB | ✓ | | | | +| legacysagadarthvader | Darth Vader | 28.7 KB | ✓ | | | | +| legacysagarey | Rey | 28.7 KB | ✓ | | | | +| marqadventurer | MARQ Adventurer | 124.7 KB | | ✓ | ✓ | ✓ | +| marqathlete | MARQ Athlete | 124.7 KB | | ✓ | ✓ | ✓ | +| marqaviator | MARQ Aviator | 124.7 KB | | ✓ | ✓ | ✓ | +| marqcaptain | MARQ Captain | 124.7 KB | | ✓ | ✓ | ✓ | +| marqcommander | MARQ Commander | 124.7 KB | | ✓ | ✓ | ✓ | +| marqdriver | MARQ Driver | 124.7 KB | | ✓ | ✓ | ✓ | +| marqexpedition | MARQ Expedition | 124.7 KB | | ✓ | ✓ | ✓ | +| marqgolfer | MARQ Golfer | 124.7 KB | | ✓ | ✓ | ✓ | +| marq2 | MARQ® (Gen 2) Athlete / Adventurer / Captain / Golfer | 252.6 KB | | ✓ | ✓ | ✓ | +| marq2aviator | MARQ® (Gen 2) Aviator | 252.6 KB | | ✓ | ✓ | ✓ | +| oregon7xx | Oregon 7xx | 124.7 KB | | ✓ | | | +| rino7xx | Rino 7xx | 124.7 KB | | ✓ | | | +| venu | Venu | 28.7 KB | ✓ | | | | +| venu2 | Venu 2 | 28.7 KB | ✓ | | | | +| venu2s | Venu 2S | 28.7 KB | ✓ | | | | +| venu2d | Venu Mercedes-Benz Collection | 28.7 KB | ✓ | | | | +| vivoactive3 | vívoactive 3 | 28.7 KB | ✓ | | | | +| vivoactive3d | vívoactive 3 Mercedes-Benz Collection | 28.7 KB | ✓ | | | | +| vivoactive3m | vívoactive 3 Music | 28.7 KB | ✓ | | | | +| vivoactive3mlte | vívoactive 3 Music LTE | 28.7 KB | ✓ | | | | +| vivoactive4 | vívoactive 4 | 28.7 KB | ✓ | | | | +| vivoactive4s | vívoactive 4S | 28.7 KB | ✓ | | | | * Power has limited support. The datafield simply display the value of `Toybox.Activity.Info.currentPower` @@ -294,6 +297,29 @@ Calculate the vertical speed in meter/min or feet/min depending on the watch set ## Release Notes +### Version 1.37 (MARQ Support by @Likenttt) + + - Add support for MARQ® (Gen 2) Athlete / Adventurer / Captain / Golfer/ Aviator. They all have a high and sufficient memory 256kB. + - Add support for D2 Mach 1, Edge Explore 2, epix PRO Gen2 42mm, epix PRO Gen2 47mm, epix PRO Gen2 51mm, fenix 6 Pro System 5 Preview, fenix 7 PRO, fenix 7S PRO, fenix 7X PRO, Forerunner 265, Forerunner 265s, Forerunner 965 + +| Memory Usage on va3 (28.6 KB) | Current | Peak | +| ----------------------------- | :-----: | :-----: | +| At startup | 25.4 kB | 27.1 kB | +| 10 sec running | 25.4 kB | 27.5 kB | +| After setting change | 25.4 kB | 28.4 kB | + +| Memory Usage on fenix5 (28.6 KB) | Current | Peak | +| -------------------------------- | :-----: | :-----: | +| At startup | 25.4 kB | 27.4 kB | +| 10 sec running | 25.4 kB | 27.7 kB | +| After setting change | 25.5 kB | 28.3 kB | + +| Memory Usage on fr945 (124.6 KB) | Current | Peak | +| -------------------------------- | :-----: | :-----: | +| At startup | 30.3 kB | 32.4 kB | +| 10 sec running | 30.3 kB | 32.7 kB | +| After setting change | 30.3 kB | 33.4 kB | + ### Version 1.36 (by @Likenttt) - Using Connect IQ 4.1.5 diff --git a/manifest.xml b/manifest.xml index f5c53a1..9b8bde7 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,92 +1,105 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - eng - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + eng + + + + diff --git a/monkey.jungle b/monkey.jungle index 831ff5e..481a9fd 100644 --- a/monkey.jungle +++ b/monkey.jungle @@ -7,15 +7,25 @@ base.sourcePath = source # High Memory (252.6 KB) d2airx10.sourcePath = source;source-highmem;source-highmem-venu2plus +d2mach1.sourcePath = source;source-highmem;source-highmem-venu2plus epix2.sourcePath = source;source-highmem;source-highmem-epix2 +epix2pro42mm.sourcePath = source;source-highmem;source-highmem-epix2 +epix2pro47mm.sourcePath = source;source-highmem;source-highmem-epix2 +epix2pro51mm.sourcePath = source;source-highmem;source-highmem-fenix7 fenix7.sourcePath = source;source-highmem;source-highmem-fenix7 +fenix7pro.sourcePath = source;source-highmem;source-highmem-fenix7 +fenix7spro.sourcePath = source;source-highmem;source-highmem-fenix7 +fenix7xpro.sourcePath = source;source-highmem;source-highmem-fenix7 fenix7s.sourcePath = source;source-highmem;source-highmem-fenix7s fenix7x.sourcePath = source;source-highmem;source-highmem-fenix7 fr255.sourcePath = source;source-highmem;source-highmem-fenix7 fr255m.sourcePath = source;source-highmem;source-highmem-fenix7 fr255s.sourcePath = source;source-highmem;source-highmem-fr255s fr255sm.sourcePath = source;source-highmem;source-highmem-fr255s +fr265.sourcePath = source;source-highmem;source-highmem-fenix7 +fr265s.sourcePath = source;source-highmem;source-highmem-fr265s fr955.sourcePath = source;source-highmem;source-highmem-fenix7 +fr965.sourcePath = source;source-highmem;source-highmem-fr265s venu2plus.sourcePath = source;source-highmem;source-highmem-venu2plus # High Memory (124.7 KB) @@ -35,6 +45,7 @@ edge530.sourcePath = source;source-highmem;source-highmem-edge530 edge820.sourcePath = source;source-highmem;source-highmem-edge520plus edge830.sourcePath = source;source-highmem;source-highmem-edge830 edgeexplore.sourcePath = source;source-highmem;source-highmem-edgeexplore +edgeexplore2.sourcePath = source;source-highmem;source-highmem-edgeexplore fenix5plus.sourcePath = source;source-highmem;source-highmem-default fenix5splus.sourcePath = source;source-highmem;source-highmem-default fenix5x.sourcePath = source;source-highmem;source-highmem-default @@ -50,10 +61,13 @@ marqcommander.sourcePath = source;source-highmem;source-highmem-marq marqdriver.sourcePath = source;source-highmem;source-highmem-marq marqexpedition.sourcePath = source;source-highmem;source-highmem-marq marqgolfer.sourcePath = source;source-highmem;source-highmem-marq +marq2.sourcePath = source;source-highmem;source-highmem-marq2 +marq2aviator.sourcePath = source;source-highmem;source-highmem-marq2 oregon7xx.sourcePath = source;source-highmem;source-highmem-oregon7xx rino7xx.sourcePath = source;source-highmem;source-highmem-oregon7xx fenix6pro.sourcePath = source;source-highmem;source-highmem-fenix6pro +fenix6prosystem5preview.sourcePath = source;source-highmem;source-highmem-fenix6pro fenix6spro.sourcePath = source;source-highmem;source-highmem-fenix6xpro fenix6xpro.sourcePath = source;source-highmem;source-highmem-fenix6xpro @@ -100,20 +114,31 @@ base.resourcePath = resources # High Memory (252.6 KB) with "Power" and "Training Effect" support d2airx10.resourcePath = resources;resources-highmem;resources-highmem-power-te +d2mach1.resourcePath = resources;resources-highmem;resources-highmem-power-te epix2.resourcePath = resources;resources-highmem;resources-highmem-power-te +epix2pro42mm.resourcePath = resources;resources-highmem;resources-highmem-power-te +epix2pro47mm.resourcePath = resources;resources-highmem;resources-highmem-power-te +epix2pro51mm.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix7.resourcePath = resources;resources-highmem;resources-highmem-power-te +fenix7pro.resourcePath = resources;resources-highmem;resources-highmem-power-te +fenix7spro.resourcePath = resources;resources-highmem;resources-highmem-power-te +fenix7xpro.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix7s.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix7x.resourcePath = resources;resources-highmem;resources-highmem-power-te fr255.resourcePath = resources;resources-highmem;resources-highmem-power-te fr255m.resourcePath = resources;resources-highmem;resources-highmem-power-te fr255s.resourcePath = resources;resources-highmem;resources-highmem-power-te fr255sm.resourcePath = resources;resources-highmem;resources-highmem-power-te +fr265.resourcePath = resources;resources-highmem;resources-highmem-power-te +fr265s.resourcePath = resources;resources-highmem;resources-highmem-power-te fr955.resourcePath = resources;resources-highmem;resources-highmem-power-te +fr965.resourcePath = resources;resources-highmem;resources-highmem-power-te venu2plus.resourcePath = resources;resources-highmem;resources-highmem-power-te # High Memory (124.7 KB) with no specific feature approachs62.resourcePath = resources;resources-highmem;resources-highmem-basic edgeexplore.resourcePath = resources;resources-highmem;resources-highmem-basic +edgeexplore2.resourcePath = resources;resources-highmem;resources-highmem-basic oregon7xx.resourcePath = resources;resources-highmem;resources-highmem-basic rino7xx.resourcePath = resources;resources-highmem;resources-highmem-basic @@ -143,6 +168,7 @@ edge830.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix5x.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix5xplus.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix6pro.resourcePath = resources;resources-highmem;resources-highmem-power-te +fenix6prosystem5preview.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix6spro.resourcePath = resources;resources-highmem;resources-highmem-power-te fenix6xpro.resourcePath = resources;resources-highmem;resources-highmem-power-te fr745.resourcePath = resources;resources-highmem;resources-highmem-power-te @@ -156,6 +182,8 @@ marqcommander.resourcePath = resources;resources-highmem;resources-highmem-power marqdriver.resourcePath = resources;resources-highmem;resources-highmem-power-te marqexpedition.resourcePath = resources;resources-highmem;resources-highmem-power-te marqgolfer.resourcePath = resources;resources-highmem;resources-highmem-power-te +marq2.resourcePath = resources;resources-highmem;resources-highmem-power-te +marq2aviator.resourcePath = resources;resources-highmem;resources-highmem-power-te # Low Memory (28.7 KB) with no specific feature d2air.resourcePath = resources;resources-lowmem-basic diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml index 8f5996f..c98441a 100644 --- a/resources/settings/properties.xml +++ b/resources/settings/properties.xml @@ -1,5 +1,5 @@ - 1.36 + 1.37 30 false 0 diff --git a/source-highmem-fr265s/GRunApp.mc b/source-highmem-fr265s/GRunApp.mc new file mode 100644 index 0000000..2d57a2b --- /dev/null +++ b/source-highmem-fr265s/GRunApp.mc @@ -0,0 +1,50 @@ +using Toybox.Application; +using Toybox.Graphics; + + +class GRunApp extends Application.AppBase +{ + protected var gRunView; + + function initialize() + { + //System.println("Garmin Fr265s (High Memory)"); + AppBase.initialize(); + gRunView = new GRunView(); + } + + + public static function getTextDimensions(dc, value, font) + { + var textDimensions = dc.getTextDimensions(value, font); + + var yFactor = 1.65; + if (font > 5) { yFactor = 1.75; } + if (font < 2) { yFactor = 1.4; } + textDimensions[1] = textDimensions[1] - (yFactor * dc.getFontDescent(font)) + 2; + + return textDimensions; + } + + + public static function getYOffset(font) + { + var yOffset = 1; + if (font == 0) { yOffset = -1; } + + return yOffset; + } + + + function onSettingsChanged() + { + AppBase.onSettingsChanged(); + gRunView.initializeUserData(); + } + + + function getInitialView() + { + return [ gRunView ]; + } +} \ No newline at end of file diff --git a/source-highmem-marq2/GRunApp.mc b/source-highmem-marq2/GRunApp.mc new file mode 100644 index 0000000..f78a556 --- /dev/null +++ b/source-highmem-marq2/GRunApp.mc @@ -0,0 +1,50 @@ +using Toybox.Application; +using Toybox.Graphics; + + +class GRunApp extends Application.AppBase +{ + protected var gRunView; + + function initialize() + { + //System.println("Garmin MARQ2 (High Memory)"); + AppBase.initialize(); + gRunView = new GRunViewHighMem(); + } + + + public static function getTextDimensions(dc, value, font) { + var textDimensions = dc.getTextDimensions(value, font); + + if (font < 7) { textDimensions[0] += 2; } + textDimensions[1] = textDimensions[1] - 1.5 * dc.getFontDescent(font); + + return textDimensions; + } + + public static function getYOffset(font) { + var yOffset = 0; + + if (font == 0) { yOffset = -2; } + else if (font == 1) { yOffset = -3; } + else if (font <= 3) { yOffset = -2; } + else if (font <= 6) { yOffset = -1; } + + + return yOffset; + } + + + function onSettingsChanged() + { + AppBase.onSettingsChanged(); + gRunView.initializeUserData(); + } + + + function getInitialView() + { + return [ gRunView ]; + } +} \ No newline at end of file