Skip to content

Commit

Permalink
v.0.5.0 Fenix 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverHannover committed Jan 15, 2017
1 parent 902bfdb commit 3cf55bc
Show file tree
Hide file tree
Showing 19 changed files with 1,615 additions and 1,166 deletions.
2 changes: 1 addition & 1 deletion bin/Aviatorlike-settings.json

Large diffs are not rendered by default.

Binary file modified bin/Aviatorlike.prg
Binary file not shown.
1,609 changes: 807 additions & 802 deletions bin/Aviatorlike.prg.debug.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<iq:application entry="AviatorlikeApp" id="CCDC19A246E54A2589B40F655A3515F2" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="1.3.1" name="@Strings.AppName" type="watchface">

<iq:products>
<iq:product id="fenix5"/>
<iq:product id="fenix5x"/>
<iq:product id="fr630"/>
<iq:product id="fr235"/>
<iq:product id="fr735xt"/>
Expand Down
4 changes: 2 additions & 2 deletions resources/drawables/drawables.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
</drawables>
<bitmap id="LauncherIcon" filename="launcher_icon.png" />
</drawables>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fileVersion=1
fontName=DJB Get Digital
fontFile=
charSet=0
fontSize=34
fontSize=35
aa=1
scaleH=100
useSmoothing=1
Expand Down
2 changes: 1 addition & 1 deletion resources/fonts/classicklein.bmfc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fileVersion=1
fontName=Modern No. 20
fontFile=
charSet=0
fontSize=24
fontSize=26
aa=1
scaleH=100
useSmoothing=1
Expand Down
319 changes: 159 additions & 160 deletions resources/fonts/classicklein.fnt

Large diffs are not rendered by default.

Binary file modified resources/fonts/classicklein_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
312 changes: 156 additions & 156 deletions resources/fonts/digital.fnt

Large diffs are not rendered by default.

Binary file modified resources/fonts/digital_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/fonts/fonts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<font id="id_font_roman" filename="roman.fnt" />
<font id="id_font_digital" filename="digital.fnt" />
<font id="id_font_classicklein" filename="classicklein.fnt" />
<font id="id_font_label" filename="label.fnt" />
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
fileVersion=1

# font settings
fontName=Modern No. 20
fontName=Roboto Medium
fontFile=
charSet=0
fontSize=24
fontSize=17
aa=1
scaleH=100
useSmoothing=1
isBold=1
isBold=0
isItalic=0
useUnicode=1
disableBoxChars=1
Expand Down Expand Up @@ -50,6 +50,6 @@ invB=0
outlineThickness=0

# selected chars
chars=32-33,37,40-93,97-126,160,171,187-246,248-255
chars=32-33,40-93,97-126,160,171,187-246,248-255

# imported icon images
380 changes: 380 additions & 0 deletions resources/fonts/label.fnt

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions resources/fonts/label.fnt.bmfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# AngelCode Bitmap Font Generator configuration file
fileVersion=1

# font settings
fontName=Roboto Medium
fontFile=
charSet=0
fontSize=17
aa=1
scaleH=100
useSmoothing=1
isBold=0
isItalic=0
useUnicode=1
disableBoxChars=1
outputInvalidCharGlyph=0
dontIncludeKerningPairs=0
useHinting=0
renderFromOutline=0
useClearType=1

# character alignment
paddingDown=0
paddingUp=0
paddingRight=0
paddingLeft=0
spacingHoriz=1
spacingVert=1
useFixedHeight=0
forceZero=0

# output file
outWidth=256
outHeight=256
outBitDepth=8
fontDescFormat=0
fourChnlPacked=0
textureFormat=png
textureCompression=0
alphaChnl=2
redChnl=4
greenChnl=4
blueChnl=4
invA=0
invR=0
invG=0
invB=0

# outline
outlineThickness=0

# selected chars
chars=32-33,40-93,97-126,160,171,187-246,248-255

# imported icon images
Binary file added resources/fonts/label_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions resources/settings/properties.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<properties>
<property id="appVersion" type="string">0.4.9</property>
<property id="appVersion" type="string">0.5.0</property>

<property id="BatProgressEnable" type="boolean">true</property>
<property id="StepProgressEnable" type="boolean">true</property>

<property id="BackgroundColor" type="number">0x000000</property>
<property id="BackgroundColor" type="number">0xFFFFFF</property>

<property id="DigitalBackgroundColor" type="number">0xAAAAAA</property>
<property id="ForegroundColor" type="number">0x000000</property>

<property id="Numbers" type="number">1</property>
<property id="QuarterNumbersColor" type="number">0xFFFFFF</property>
<property id="MinutesColor" type="number">0xFFFFFF</property>
<property id="DigitalBackgroundColor" type="number">0xAAAAAA</property>
<property id="QuarterNumbersColor" type="number">0x000000</property>
<property id="MinutesColor" type="number">0x00AAFF</property>

<property id="HandsForm" type="number">1</property>
<property id="HandsColor1" type="number">0xFF0000</property>
<property id="HandsColor2" type="number">0xAA0000</property>

<property id="HandOutlinesEnable" type="boolean">false</property>
<property id="HandsOutlineColor" type="number">0x000000</property>
<property id="HandOutlinesEnable" type="boolean">true</property>
<property id="HandsOutlineColor" type="number">0xFFFFFF</property>

<property id="SecHandEnable" type="boolean">true</property>
<property id="SecHandsColor" type="number">0x00AAFF</property>
Expand Down
66 changes: 34 additions & 32 deletions source/AviatorlikeView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ class AviatorlikeView extends Ui.WatchFace{

var font1;
var fontDigital;
var fontLabel;

var isAwake;
var screenShape;
//var dndIcon;

var clockTime;

Expand Down Expand Up @@ -58,7 +59,8 @@ class AviatorlikeView extends Ui.WatchFace{
function onLayout(dc) {
font1 = Ui.loadResource(Rez.Fonts.id_font_fat);
//font1 = Gfx.FONT_SYSTEM_NUMBER_SMALL;
fontDigital = Ui.loadResource(Rez.Fonts.id_font_digital);
fontDigital = Ui.loadResource(Rez.Fonts.id_font_digital);
fontLabel = Ui.loadResource(Rez.Fonts.id_font_label);

}

Expand Down Expand Up @@ -538,8 +540,8 @@ function drawBattery(dc) {
var stepsStr = Lang.format("$1$", [actsteps]);
dc.setColor((App.getApp().getProperty("ForegroundColor")), Gfx.COLOR_TRANSPARENT);
dc.drawText(UDTextwidth + 15, UDTextHeight, fontDigital, stepsStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, stepGoal, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, stepGoal, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, "steps", Gfx.TEXT_JUSTIFY_RIGHT);

}

Expand All @@ -556,15 +558,15 @@ function drawBattery(dc) {
stepstogo = stepGoal - actsteps;
stepstogo = Lang.format("$1$", [stepstogo]);
dc.drawText(UDTextwidth + 15, UDTextHeight, fontDigital, stepstogo, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, "to go", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, "to go", Gfx.TEXT_JUSTIFY_RIGHT);
}
if (actsteps > stepGoal) {
stepstogo = actsteps - stepGoal;
stepstogo = Lang.format("$1$", [stepstogo]);
dc.drawText(UDTextwidth + 15, UDTextHeight, fontDigital, stepstogo, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, "since", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, "goal", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, "since", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, "goal", Gfx.TEXT_JUSTIFY_RIGHT);
}
}
//Draw DigitalTime---------------------------------
Expand All @@ -578,8 +580,8 @@ function drawBattery(dc) {
if (UDInfo == 5) {
drawAltitude(dc);
dc.drawText(UDTextwidth, UDTextHeight, fontDigital, altitudeStr, Gfx.TEXT_JUSTIFY_CENTER);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, "Alt", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, altUnit, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, "Alt", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, altUnit, Gfx.TEXT_JUSTIFY_RIGHT);
}

// Draw Calories------------------------------
Expand All @@ -595,9 +597,9 @@ function drawBattery(dc) {
if (UDInfo == 7) {
distance.drawDistance(dc);
dc.drawText(UDTextwidth + 20 , UDTextHeight, fontDigital, distance.distStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, "Dist", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, "Dist", Gfx.TEXT_JUSTIFY_RIGHT);
//draw unit-String
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, distance.distUnit, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, distance.distUnit, Gfx.TEXT_JUSTIFY_RIGHT);
}


Expand All @@ -606,15 +608,15 @@ function drawBattery(dc) {
var Battery = Toybox.System.getSystemStats().battery;
BatteryStr = Lang.format("$1$ % ", [ Battery.format ( "%2d" ) ] );
dc.drawText(UDTextwidth + 20 , UDTextHeight, fontDigital, BatteryStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, "Bat", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, "Bat", Gfx.TEXT_JUSTIFY_RIGHT);
}

//Draw Day an d week of year
if (UDInfo == 9) {
date.builddayWeekStr();
dc.drawText(UDTextwidth + 15 , UDTextHeight, fontDigital, date.dayWeekStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, Gfx.FONT_XTINY, "day /", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, Gfx.FONT_XTINY, "week", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDobereZeile, fontLabel, "day /", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(UDExtraTextWidth, UDuntereZeile, fontLabel, "week", Gfx.TEXT_JUSTIFY_RIGHT);
}


Expand Down Expand Up @@ -652,8 +654,8 @@ function drawBattery(dc) {
var stepsStr = Lang.format("$1$", [actsteps]);
dc.setColor((App.getApp().getProperty("ForegroundColor")), Gfx.COLOR_TRANSPARENT);
dc.drawText(LDTextwidth + 15, LDTextHeight, fontDigital, stepsStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, stepGoal, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, stepGoal, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
}

//Draw Steps to go --------------------------------------
Expand All @@ -669,15 +671,15 @@ function drawBattery(dc) {
stepstogo = stepGoal - actsteps;
stepstogo = Lang.format("$1$", [stepstogo]);
dc.drawText(LDTextwidth + 15, LDTextHeight, fontDigital, stepstogo, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, "to go", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, "steps", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, "to go", Gfx.TEXT_JUSTIFY_RIGHT);
}
if (actsteps > stepGoal) {
stepstogo = actsteps - stepGoal;
stepstogo = Lang.format("$1$", [stepstogo]);
dc.drawText(LDTextwidth + 15, LDTextHeight, fontDigital, stepstogo, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, "since", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, "goal", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, "since", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, "goal", Gfx.TEXT_JUSTIFY_RIGHT);
}
}

Expand All @@ -692,8 +694,8 @@ function drawBattery(dc) {
if (LDInfo == 5) {
drawAltitude(dc);
dc.drawText(LDTextwidth, LDTextHeight, fontDigital, altitudeStr, Gfx.TEXT_JUSTIFY_CENTER);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, "Alt", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, altUnit, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, "Alt", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, altUnit, Gfx.TEXT_JUSTIFY_RIGHT);
}

// Draw Calories------------------------------
Expand All @@ -709,25 +711,25 @@ function drawBattery(dc) {
if (LDInfo == 7) {
distance.drawDistance(dc);
dc.drawText(LDTextwidth + 20 , LDTextHeight, fontDigital, distance.distStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, "Dist", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, "Dist", Gfx.TEXT_JUSTIFY_RIGHT);
//draw unit-String
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, distance.distUnit, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, distance.distUnit, Gfx.TEXT_JUSTIFY_RIGHT);
}

//Draw battery
if (LDInfo == 8) {
var Battery = Toybox.System.getSystemStats().battery;
BatteryStr = Lang.format("$1$ % ", [ Battery.format ( "%2d" ) ] );
dc.drawText(LDTextwidth + 20, LDTextHeight, fontDigital, BatteryStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, "Bat", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, "Bat", Gfx.TEXT_JUSTIFY_RIGHT);
}

//Draw Day an d week of year
if (LDInfo == 9) {
date.builddayWeekStr();
dc.drawText(LDTextwidth + 15, LDTextHeight, fontDigital, date.dayWeekStr, Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, Gfx.FONT_XTINY, "day /", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, Gfx.FONT_XTINY, "week", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDobereZeile, fontLabel, "day /", Gfx.TEXT_JUSTIFY_RIGHT);
dc.drawText(LDExtraTextWidth, LDuntereZeile, fontLabel, "week", Gfx.TEXT_JUSTIFY_RIGHT);
}
}

Expand Down Expand Up @@ -835,8 +837,8 @@ function drawBattery(dc) {
dc.setPenWidth(2);
dc.setColor((App.getApp().getProperty("QuarterNumbersColor")), Gfx.COLOR_TRANSPARENT);
dc.drawCircle(width / 2 + 30, height / 2 -7, 5);
dc.drawText(width / 2 + 30, height / 2 -2, Gfx.FONT_XTINY, "Msg", Gfx.TEXT_JUSTIFY_CENTER);
//dc.drawText(width / 3 + 7, height / 2, Gfx.FONT_XTINY, messages, Gfx.TEXT_JUSTIFY_CENTER);
dc.drawText(width / 2 + 30, height / 2 -2, fontLabel, "Msg", Gfx.TEXT_JUSTIFY_CENTER);
//dc.drawText(width / 3 + 7, height / 2, fontLabel, messages, Gfx.TEXT_JUSTIFY_CENTER);

//Alarm is set
var alarm = Sys.getDeviceSettings().alarmCount;
Expand All @@ -847,8 +849,8 @@ function drawBattery(dc) {
dc.setPenWidth(2);
dc.setColor((App.getApp().getProperty("QuarterNumbersColor")), Gfx.COLOR_TRANSPARENT);
dc.drawCircle(width / 2 - 30, height / 2 -7, 5);
dc.drawText(width / 2 - 30, height / 2 -2, Gfx.FONT_XTINY, "Alm", Gfx.TEXT_JUSTIFY_CENTER);
//dc.drawText(width / 3 + 7, height / 2, Gfx.FONT_XTINY, messages, Gfx.TEXT_JUSTIFY_CENTER);
dc.drawText(width / 2 - 30, height / 2 -2, fontLabel, "Alm", Gfx.TEXT_JUSTIFY_CENTER);
//dc.drawText(width / 3 + 7, height / 2, fontLabel, messages, Gfx.TEXT_JUSTIFY_CENTER);



Expand Down
2 changes: 2 additions & 0 deletions source/date.mc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ module date{


if (dateFormat == 1) {
info = Calendar.info(now, Time.FORMAT_MEDIUM);
dateStr = Lang.format("$1$ $2$ $3$", [info.day_of_week, info.day, info.month ]);
}
if (dateFormat == 2) {
info = Calendar.info(now, Time.FORMAT_MEDIUM);
dateStr = Lang.format("$1$ $2$ $3$", [info.day_of_week, info.month, info.day]);
}
if (dateFormat == 3) {
Expand Down

0 comments on commit 3cf55bc

Please sign in to comment.