diff --git a/resources-epix2pro42mm/layouts.xml b/resources-epix2pro42mm/layouts.xml
new file mode 100755
index 0000000..8b94115
--- /dev/null
+++ b/resources-epix2pro42mm/layouts.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+ 150
+ 62
+ 250
+ -32
+
+
+ 64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 64
+
+
+
+
+
+
+
+
+
+
+ 64
+
+
+
+
+
+
+
+
diff --git a/resources-epix2pro51mm/layouts.xml b/resources-epix2pro51mm/layouts.xml
index df1d655..4b1415f 100755
--- a/resources-epix2pro51mm/layouts.xml
+++ b/resources-epix2pro51mm/layouts.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/resources-round-454x454/layouts.xml b/resources-round-454x454/layouts.xml
index 8ab115f..697c5d8 100755
--- a/resources-round-454x454/layouts.xml
+++ b/resources-round-454x454/layouts.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml
index 68ae7b7..44dbf34 100644
--- a/resources/settings/properties.xml
+++ b/resources/settings/properties.xml
@@ -5,5 +5,6 @@
FFFF00
0
false
+ true
1
diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml
index 565f0fa..3052703 100644
--- a/resources/settings/settings.xml
+++ b/resources/settings/settings.xml
@@ -30,4 +30,7 @@
+
+
+
\ No newline at end of file
diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml
index 0e23bee..32c3c17 100644
--- a/resources/strings/strings.xml
+++ b/resources/strings/strings.xml
@@ -9,6 +9,7 @@
Percentage
Zone
Show speed instead of pace
+ Show next navigation point name (only on newer devices w/ high resolution)
Top-left field data
Cadence
Grade
diff --git a/source/RepaFieldTrack.mc b/source/RepaFieldTrack.mc
index 3da679b..91d6744 100644
--- a/source/RepaFieldTrack.mc
+++ b/source/RepaFieldTrack.mc
@@ -9,6 +9,9 @@ class Track extends WatchUi.Drawable {
hidden var _toNextPoint as Float;
hidden var _distance as Float;
hidden var _offCourse as Float;
+ hidden var _nextPointName as String;
+ hidden var _showNextPoint as Boolean;
+ hidden var _font;
function initialize() {
var dictionary = {
@@ -21,29 +24,23 @@ class Track extends WatchUi.Drawable {
_toNextPoint = 0.0f;
_distance = 0.0f;
_offCourse = 0.0f;
+ _nextPointName = "";
+ _showNextPoint = true;
+
+ if (Graphics has :getVectorFont) {
+ _font = Graphics.getVectorFont({:face => "RobotoCondensedRegular", :size => 24});
+ } else {
+ _font = null;
+ }
}
- function setToDestination(tdst as Float) as Void {
- _toDestination = tdst;
- }
-
- function setToNextPoint(tnp as Float) as Void {
- _toNextPoint = tnp;
- }
-
- function setDistance(dst as Float) as Void {
- _distance = dst;
- }
-
- function setOffCourse(off as Float) as Void {
- _offCourse = off;
- }
-
- function setTrackData(tdst as Float, tnp as Float, dst as Float, off as Float) as Void {
+ function setTrackData(tdst as Float, tnp as Float, dst as Float, off as Float, nextPointName as String, showNextPoint as Boolean) as Void {
_toDestination = tdst;
_toNextPoint = tnp;
_distance = dst;
_offCourse = off;
+ _nextPointName = nextPointName;
+ _showNextPoint = showNextPoint;
}
function draw(dc as Dc) as Void {
@@ -105,6 +102,22 @@ class Track extends WatchUi.Drawable {
dc.setPenWidth((dc.getWidth() * 0.01).toNumber());
dc.setColor(0xFFFF00, Graphics.COLOR_TRANSPARENT);
dc.drawArc(w / 2, h / 2, w / 2 - 2, Graphics.ARC_COUNTER_CLOCKWISE, acurrent, anext);
+
+ // next point name
+ if (_showNextPoint && _font != null && h > 350) {
+ var pointText = (_toNextPoint / 1000.0).format("%.1f");
+ if (_nextPointName.length() > 0 && _nextPointName.length() <= 20) {
+ pointText += " | " + _nextPointName;
+ } else if (_nextPointName.length() > 20) {
+ pointText += " | " + _nextPointName.substring(0, 17) + "...";
+ }
+ if (_toNextPoint > 1000) {
+ dc.setColor(0x88FFFF, Graphics.COLOR_TRANSPARENT);
+ } else {
+ dc.setColor(0xAAFF44, Graphics.COLOR_TRANSPARENT);
+ }
+ dc.drawRadialText(w / 2, h / 2, _font, pointText, Graphics.TEXT_JUSTIFY_CENTER, 270, h / 2 - 12, Graphics.RADIAL_TEXT_DIRECTION_COUNTER_CLOCKWISE);
+ }
}
}
}
diff --git a/source/RepaFieldView.mc b/source/RepaFieldView.mc
index f3406ab..f7a1903 100644
--- a/source/RepaFieldView.mc
+++ b/source/RepaFieldView.mc
@@ -44,6 +44,7 @@ class RepaFieldView extends WatchUi.DataField {
hidden var themeColor3 as Number;
hidden var hrDisplayType as Number;
hidden var speedNotPace as Boolean;
+ hidden var showNextPoint as Boolean;
hidden var tlFieldData as Number;
hidden var hrZones as Array;
hidden var hrHist as Array;
@@ -109,6 +110,7 @@ class RepaFieldView extends WatchUi.DataField {
themeColor3 = Application.Properties.getValue("themeColor3").toNumberWithBase(16);
hrDisplayType = Application.Properties.getValue("hrDisplay").toNumber();
speedNotPace = Application.Properties.getValue("speedNotPace");
+ showNextPoint = Application.Properties.getValue("showNextPoint");
tlFieldData = Application.Properties.getValue("tlFieldData").toNumber();
hrValue = 0;
@@ -404,7 +406,7 @@ class RepaFieldView extends WatchUi.DataField {
// track
if (fTrack != null) {
- fTrack.setTrackData(toDestination, toNextPoint, distance, offCourse);
+ fTrack.setTrackData(toDestination, toNextPoint, distance, offCourse, nextPointName, showNextPoint);
}
// time