Skip to content

Commit

Permalink
Added support for new watches (Epix Gen 2, Fenix 7, Fenix 7s, Fenix 7…
Browse files Browse the repository at this point in the history
…x, Venu 2 Plus)
  • Loading branch information
gcormier9 committed Feb 6, 2022
1 parent 98e9d7c commit 9c2803a
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 1 deletion.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,28 @@ Calculate the vertical speed in meter/min or feet/min depending on the watch set


## Release Notes
### Version 1.31
- Added support for new watches (Epix Gen 2, Fenix 7, Fenix 7s, Fenix 7x, Venu 2 Plus)

| Memory Usage on va3 (28.6 KB) | Current | Peak |
| --------------------------------- |:-------:|:-------:|
| At startup | 25.5 kB | 27.1 kB |
| 10 sec running | 25.5 kB | 27.5 kB |
| After setting change | 25.5 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.4 kB | 28.4 kB |


| Memory Usage on fr945 (124.6 KB) | Current | Peak |
| --------------------------------- |:-------:|:-------:|
| At startup | 30.5 kB | 32.6 kB |
| 10 sec running | 30.5 kB | 33.0 kB |
| After setting change | 30.5 kB | 33.7 kB |

### Version 1.30
- Added Lap Average Heart Rate on high memory devices

Expand Down
5 changes: 5 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<iq:product id="edge830"/>
<iq:product id="edgeexplore"/>
<iq:product id="enduro"/>
<iq:product id="epix2"/>
<iq:product id="fenix5"/>
<iq:product id="fenix5plus"/>
<iq:product id="fenix5s"/>
Expand All @@ -32,6 +33,9 @@
<iq:product id="fenix6s"/>
<iq:product id="fenix6spro"/>
<iq:product id="fenix6xpro"/>
<iq:product id="fenix7"/>
<iq:product id="fenix7s"/>
<iq:product id="fenix7x"/>
<iq:product id="fenixchronos"/>
<iq:product id="fr245"/>
<iq:product id="fr245m"/>
Expand All @@ -58,6 +62,7 @@
<iq:product id="rino7xx"/>
<iq:product id="venu"/>
<iq:product id="venu2"/>
<iq:product id="venu2plus"/>
<iq:product id="venu2s"/>
<iq:product id="venud"/>
<iq:product id="vivoactive3"/>
Expand Down
12 changes: 12 additions & 0 deletions monkey.jungle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ project.manifest = manifest.xml
base.sourcePath = source

# High Memory (252.6 KB)
epix2.sourcePath = source;source-highmem;source-highmem-epix2
fenix7.sourcePath = source;source-highmem;source-highmem-fenix7
fenix7s.sourcePath = source;source-highmem;source-highmem-fenix7s
fenix7x.sourcePath = source;source-highmem;source-highmem-fenix7
venu2.sourcePath = source;source-lowmem-venu
venu2s.sourcePath = source;source-lowmem-venu
venu2plus.sourcePath = source;source-highmem;source-highmem-venu2

# High Memory (124.7 KB)
approachs62.sourcePath = source;source-highmem;source-highmem-approachs62
Expand Down Expand Up @@ -84,6 +89,13 @@ vivoactive4s.sourcePath = source;source-lowmem-vivoactive4s
#######################################################
base.resourcePath = resources

# High Memory (252.6 KB) with "Power" and "Training Effect" support
epix2.resourcePath = resources;resources-highmem;resources-highmem-power-te
fenix7.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
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
Expand Down
2 changes: 1 addition & 1 deletion resources/settings/properties.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<properties>
<property id="AppVersion" type="string">1.30</property>
<property id="AppVersion" type="string">1.31</property>
<property id="HeaderHeight" type="number">30</property>
<property id="SingleBackgroundColor" type="boolean">false</property>
<property id="LapDistance" type="number">0</property>
Expand Down
56 changes: 56 additions & 0 deletions source-highmem-epix2/GRunApp.mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using Toybox.Application;
using Toybox.Graphics;


class GRunApp extends Application.AppBase
{
protected var gRunView;

function initialize()
{
//System.println("Garmin Epix Gen 2 (High Memory)");
AppBase.initialize();
gRunView = new GRunViewHighMem();
}


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));

return textDimensions;
}


public static function getYOffset(font)
{
var yOffset = -2;
if (font >= 8) { yOffset = 2; }
else if (font >= 7) { yOffset = 1; }
else if (font >= 6) { yOffset = -1; }
else if (font >= 5) { yOffset = 0; }
else if (font >= 4) { yOffset = -3; }
else if (font == 2) { yOffset = -3; }
else if (font == 1) { yOffset = -1; }

return yOffset;
}


function onSettingsChanged()
{
AppBase.onSettingsChanged();
gRunView.initializeUserData();
}


function getInitialView()
{
return [ gRunView ];
}
}
55 changes: 55 additions & 0 deletions source-highmem-fenix7/GRunApp.mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Toybox.Application;
using Toybox.Graphics;


class GRunApp extends Application.AppBase
{
protected var gRunView;

function initialize()
{
//System.println("Garmin Fenix 7/7x (High Memory)");
AppBase.initialize();
gRunView = new GRunViewHighMem();
}


public static function getTextDimensions(dc, value, font)
{
var textDimensions = dc.getTextDimensions(value, font);

if (font <= 4) { textDimensions[0] += 1; }

var yFactor = 1.65;
if (font < 5) { yFactor = 1.4; }
textDimensions[1] = textDimensions[1] - (yFactor * dc.getFontDescent(font));

return textDimensions;
}


public static function getYOffset(font)
{
var yOffset = -1;
if (font >= 8) { yOffset = 1; }
else if (font >= 6) { yOffset = 0; }
else if (font >= 4) { yOffset = -1; }
else if (font >= 3) { yOffset = -2; }
else if (font <= 1) { yOffset = -2; }

return yOffset;
}


function onSettingsChanged()
{
AppBase.onSettingsChanged();
gRunView.initializeUserData();
}


function getInitialView()
{
return [ gRunView ];
}
}
54 changes: 54 additions & 0 deletions source-highmem-fenix7s/GRunApp.mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Toybox.Application;
using Toybox.Graphics;


class GRunApp extends Application.AppBase
{
protected var gRunView;

function initialize()
{
//System.println("Garmin Fenix 7s (High Memory)");
AppBase.initialize();
gRunView = new GRunViewHighMem();
}


public static function getTextDimensions(dc, value, font)
{
var textDimensions = dc.getTextDimensions(value, font);

if (font <= 4) { textDimensions[0] += 1; }

var yFactor = 1.65;
if (font == 5) { yFactor = 1.5; }
else if (font < 5) { yFactor = 1.35; }
textDimensions[1] = textDimensions[1] - (yFactor * dc.getFontDescent(font));

return textDimensions;
}


public static function getYOffset(font)
{
var yOffset = 0;
if (font == 7) { yOffset = 1; }
else if (font <= 2) { yOffset = -2; }
else if (font <= 4) { yOffset = -1; }

return yOffset;
}


function onSettingsChanged()
{
AppBase.onSettingsChanged();
gRunView.initializeUserData();
}


function getInitialView()
{
return [ gRunView ];
}
}
55 changes: 55 additions & 0 deletions source-highmem-venu2/GRunApp.mc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using Toybox.Application;
using Toybox.Graphics;


class GRunApp extends Application.AppBase
{
protected var gRunView;

function initialize()
{
//System.println("Garmin Venu2 (High Memory)");
AppBase.initialize();
gRunView = new GRunViewHighMem();
}


public static function getTextDimensions(dc, value, font)
{
var textDimensions = dc.getTextDimensions(value, font);

if (font <= 4) { textDimensions[0] += 1; }

var yFactor = 1.7;
if (font == 6) { yFactor = 1.6; }
else if (font == 5) { yFactor = 1.6; }
else if (font < 5) { yFactor = 1.55; }
textDimensions[1] = textDimensions[1] - (yFactor * dc.getFontDescent(font));

return textDimensions;
}


public static function getYOffset(font)
{
var yOffset = -2;
if (font >= 7) { yOffset = 1; }
if (font == 6) { yOffset = -1; }
if (font == 5) { yOffset = 0; }

return yOffset;
}


function onSettingsChanged()
{
AppBase.onSettingsChanged();
gRunView.initializeUserData();
}


function getInitialView()
{
return [ gRunView ];
}
}

0 comments on commit 9c2803a

Please sign in to comment.