Skip to content

Commit

Permalink
missing some old commits
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcm committed Jan 26, 2018
1 parent 8f0eb00 commit 3561742
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="2">
<iq:application entry="KISSFaceApp" id="bdaefedfce3f4a0382fc878b7344ce78" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="2.1.0" name="@Strings.AppName" type="watchface">
<iq:application entry="KISSFaceApp" id="bdaefedfce3f4a0382fc878b7344ce78" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="2.4.0" name="@Strings.AppName" type="watchface">
<iq:products>
<iq:product id="fenix5x"/>
<iq:product id="fenix5"/>
Expand Down
6 changes: 5 additions & 1 deletion source/DoNotDisturb.mc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ module DoNotDisturb {
}

function isDND() {
return Sys.getDeviceSettings().doNotDisturb;
if (Sys.getDeviceSettings() has :doNotDisturb) {
return Sys.getDeviceSettings().doNotDisturb;
} else {
return null;
}
}

function isSleepy() {
Expand Down
21 changes: 19 additions & 2 deletions source/Time.mc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,26 @@ module Time {

// Goals percentage
var stepsPercent = info.steps.toFloat() / info.stepGoal * 100;
var floorsPercent = info.floorsClimbed.toFloat() / info.floorsClimbedGoal * 100;
var activePercent = Goals.getActive().toFloat() / Goals.getActiveGoal().toFloat() * 100;


var floorsPercent;
if (info has :floorsClimbed && info has :floorsClimbedGoal) {
floorsPercent = info.floorsClimbed.toFloat() / info.floorsClimbedGoal * 100;
}
else {
floorsPercent = stepsPercent;
}

var caloriesPercent = Goals.getCalories().toFloat() / Goals.getCaloriesGoal().toFloat() * 100;

var activePercent;
if (info has :activeMinutesWeek && info has :activeMinutesWeekGoal) {
activePercent = Goals.getActive().toFloat() / Goals.getActiveGoal().toFloat() * 100;
}
else {
activePercent = caloriesPercent;
}


// 1st digit
var text = hourString.substring(0, 1);
Expand Down

0 comments on commit 3561742

Please sign in to comment.