diff --git a/resources-legacyherofirstavenger/bitmaps.xml b/resources-legacyherofirstavenger/bitmaps.xml
new file mode 100644
index 0000000..2bd9bbb
--- /dev/null
+++ b/resources-legacyherofirstavenger/bitmaps.xml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/resources-legacyherofirstavenger/images/MoveToBeActive.png b/resources-legacyherofirstavenger/images/MoveToBeActive.png
new file mode 100644
index 0000000..9d834fe
Binary files /dev/null and b/resources-legacyherofirstavenger/images/MoveToBeActive.png differ
diff --git a/resources-legacysagadarthvader/bitmaps.xml b/resources-legacysagadarthvader/bitmaps.xml
new file mode 100644
index 0000000..2bd9bbb
--- /dev/null
+++ b/resources-legacysagadarthvader/bitmaps.xml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/resources-legacysagadarthvader/images/MoveToBeActive.png b/resources-legacysagadarthvader/images/MoveToBeActive.png
new file mode 100644
index 0000000..9d834fe
Binary files /dev/null and b/resources-legacysagadarthvader/images/MoveToBeActive.png differ
diff --git a/source/AnalogSettingsView.mc b/source/AnalogSettingsView.mc
index 6f01cd7..e8715b4 100644
--- a/source/AnalogSettingsView.mc
+++ b/source/AnalogSettingsView.mc
@@ -76,7 +76,6 @@ class Menu2TestMenu2Delegate extends WatchUi.Menu2InputDelegate { // Sub-menu De
}
function onSelect(item) {
-
var boolean;
if( item.getId().equals("design") ) {
@@ -165,46 +164,50 @@ class Menu2TestMenu2Delegate extends WatchUi.Menu2InputDelegate { // Sub-menu De
} else if( item.getId().equals("units") ) {
var checkWeather=Storage.getValue(21)[1]; // has :Weather
var unitsMenu = new WatchUi.Menu2({:title=>"Units"});
- if (checkWeather or System.getSystemStats() has :batteryInDays){
- if (System.getSystemStats() has :batteryInDays){
- if (Storage.getValue(19) != null ){
- boolean = Storage.getValue(19);
+ if (System.getSystemStats() has :batteryInDays){
+ if (Storage.getValue(19) != null ){
+ boolean = Storage.getValue(19);
+ } else {
+ boolean = false;
+ }
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Battery Estimate", {:enabled=>"ON", :disabled=>"OFF"}, 19, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+ }
+ if (checkWeather){
+ if (Storage.getValue(6) != null ){
+ boolean = Storage.getValue(6);
+ } else {
+ boolean = true;
+ }
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Temp. Type", {:enabled=>"Real Temperature", :disabled=>"Feels Like"}, 6, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+ if (Storage.getValue(16) != null ){
+ boolean = Storage.getValue(16);
+ } else {
+ boolean = false;
+ }
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Temp. Unit", {:enabled=>"Always Celsius", :disabled=>"User Settings"}, 16, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+ if (Storage.getValue(15) != null ){
+ boolean = Storage.getValue(15);
+ } else {
+ boolean = true;
+ }
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Wind Speed Unit", {:enabled=>"km/h or mph", :disabled=>"m/s"}, 15, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+ if (Storage.getValue(21)[19]){
+ if (Storage.getValue(20) != null ){
+ boolean = Storage.getValue(20);
} else {
boolean = false;
- }
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("Battery Estimate", {:enabled=>"ON", :disabled=>"OFF"}, 19, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
- }
- if (checkWeather){
- if (Storage.getValue(6) != null ){
- boolean = Storage.getValue(6);
- } else {
- boolean = true;
}
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("Temp. Type", {:enabled=>"Real Temperature", :disabled=>"Feels Like"}, 6, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
- if (Storage.getValue(16) != null ){
- boolean = Storage.getValue(16);
- } else {
- boolean = false;
- }
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("Temp. Unit", {:enabled=>"Always Celsius", :disabled=>"User Settings"}, 16, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
- if (Storage.getValue(15) != null ){
- boolean = Storage.getValue(15);
- } else {
- boolean = true;
- }
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("Wind Speed Unit", {:enabled=>"km/h or mph", :disabled=>"m/s"}, 15, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
- if (Storage.getValue(21)[19]){
- if (Storage.getValue(20) != null ){
- boolean = Storage.getValue(20);
- } else {
- boolean = true;
- }
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("Atm. Pres. Type", {:enabled=>"Mean Sea-Level", :disabled=>"Standard"}, 20, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
- }
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Atm. Pres. Type", {:enabled=>"Mean Sea Level", :disabled=>"Local Pressure"}, 20, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
}
+ }
+ if (Storage.getValue(24) != null ){
+ boolean = Storage.getValue(24);
} else {
- unitsMenu.addItem(new WatchUi.ToggleMenuItem("None available", {:enabled=>"None", :disabled=>"None"}, null, null, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+ boolean = false;
}
+ var info = Time.Gregorian.info(Time.now(), Time.FORMAT_LONG);
+ unitsMenu.addItem(new WatchUi.ToggleMenuItem("Date Format", {:enabled=>Lang.format("$2$ $1$", [info.month, info.day]), :disabled=>Lang.format("$1$ $2$", [info.month, info.day])}, 24, boolean, {:alignment=>WatchUi.MenuItem.MENU_ITEM_LABEL_ALIGN_LEFT}));
+
WatchUi.pushView(unitsMenu, new AnalogSettingsViewTest(), WatchUi.SLIDE_BLINK );
} else {
WatchUi.requestUpdate();
diff --git a/source/AnalogView.mc b/source/AnalogView.mc
index e6ca874..2a4ad41 100644
--- a/source/AnalogView.mc
+++ b/source/AnalogView.mc
@@ -29,11 +29,13 @@ class AnalogView extends WatchUi.WatchFace
function initialize() {
WatchFace.initialize();
+ var currentVersion=401;
- //var checks as Array = Storage.getValue(21);
- //if (checks==null or checks.size()<20) {
- if (Storage.getValue(21)==null or Storage.getValue(21).size()<20) {
- var checks as Array = Storage.getValue(21);
+ if (Storage.getValue(23)==null or Storage.getValue(23) = Storage.getValue(21);
+ var checks as Array;
checks = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false];
if (System.getDeviceSettings() has :requiresBurnInProtection){
checks[0]=System.getDeviceSettings().requiresBurnInProtection;
@@ -56,7 +58,7 @@ class AnalogView extends WatchUi.WatchFace
if (Activity.getActivityInfo() has :currentOxygenSaturation){ checks[11]=true; }
if (Activity.getActivityInfo() has :altitude) { checks[16]=true; }
if (Activity.getActivityInfo() has :meanSeaLevelPressure) { checks[18]=true; }
- if (Activity.getActivityInfo() has :ambientPressure) { checks[19]=true; }
+ if (Activity.getActivityInfo() has :rawAmbientPressure) { checks[19]=true; }
}
if (ActivityMonitor has :getHeartRateHistory) { checks[10]=true; }
if ((Toybox has :SensorHistory) && (Toybox.SensorHistory has :getBodyBatteryHistory)) { checks[15]=true; }
@@ -100,7 +102,7 @@ class AnalogView extends WatchUi.WatchFace
var accentColor = Storage.getValue(1);
// If this device supports BufferedBitmap, allocate the buffers we use for drawing
- if(Toybox.Graphics has :BufferedBitmap or :BufferedBitmapReference) {
+ if(Graphics has :BufferedBitmap or :BufferedBitmapReference) {
// Allocate a full screen size buffer with a palette of only 4 colors to draw
// the background image of the watchface. This is used to facilitate blanking
// the second hand during partial updates of the display
@@ -131,7 +133,7 @@ class AnalogView extends WatchUi.WatchFace
// Handle the update event
- function onUpdate(dc) {
+ function onUpdate(dc as Dc) as Void {
var targetDc = null;
var width;
var height;
@@ -242,10 +244,6 @@ class AnalogView extends WatchUi.WatchFace
MtbA.drawBatteryIcon(dc, width*0.69, height / 2.11, width*0.82, height / 2.06+(width==218 ? 1 : 0), width, height, accentColor);
MtbA.drawBatteryText(dc, width*0.76, height / 2.14 - 1, width);
-System.println(width);
-System.println(dc.getFontHeight(Graphics.FONT_TINY)); //29-19 F6 / 27-19 VA4 /
-System.println(dc.getFontHeight(Graphics.FONT_XTINY));
-
//Data Points
var FontAdj= 0;
if (Storage.getValue(14)==true){
diff --git a/source/MtbA_functions.mc b/source/MtbA_functions.mc
index 203c714..c42e266 100644
--- a/source/MtbA_functions.mc
+++ b/source/MtbA_functions.mc
@@ -223,7 +223,13 @@ class MtbA_functions {
// Draw the date string into the provided buffer at the specified location
function drawDateString( dc, x, y ) {
var info = Time.Gregorian.info(Time.now(), Time.FORMAT_LONG);
- var dateStr = Lang.format("$1$, $2$ $3$", [info.day_of_week, info.month, info.day]);
+ var dateStr;
+
+ if (Storage.getValue(24)==true){
+ dateStr = Lang.format("$1$, $3$ $2$", [info.day_of_week, info.month, info.day]);
+ } else {
+ dateStr = Lang.format("$1$, $2$ $3$", [info.day_of_week, info.month, info.day]);
+ }
if (x*2 == 260){
y = y + 3;
@@ -489,8 +495,9 @@ class MtbA_functions {
else {
formattedNotificationAmount = notificationAmount.format("%d");
}
- dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
+
// Text
+ dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
dc.drawText( xText, yText, fontSize, formattedNotificationAmount, Graphics.TEXT_JUSTIFY_LEFT);
if(width==280 or width==240){ //Fenix 6X & Enduro
@@ -718,13 +725,13 @@ class MtbA_functions {
var estimateFlag = Storage.getValue(19);
var battery;
- if (estimateFlag == true and System.getSystemStats().batteryInDays!=null){
- battery = Math.ceil(System.getSystemStats().batteryInDays);
- } else {
- battery = Math.ceil(System.getSystemStats().battery);
+ battery = Math.ceil(System.getSystemStats().battery);
+ if (estimateFlag == true){
+ if (System.getSystemStats().batteryInDays!=null and System.getSystemStats().batteryInDays!=0){ //trying to make sure that we don't get an error if batteryInDays not supported by watch
+ battery = System.getSystemStats().batteryInDays;
+ }
}
-
var offset = 0, offsetLED = 0;
if (width==390) { // Venu & D2 Air
offset = -2;
@@ -943,7 +950,7 @@ class MtbA_functions {
unit = "?";
}
- if (stepDistance >= 10) {
+ if (stepDistance >= 100) {
distStr = stepDistance.format("%.0f");
} else { //(stepDistance <10)
distStr = stepDistance.format("%.1f");
@@ -1231,9 +1238,9 @@ class MtbA_functions {
} else {
if (check[19]) {
//elevation = Activity.getActivityInfo().altitude;
- if(Activity.getActivityInfo().ambientPressure!=null){
- //System.println(Activity.getActivityInfo().ambientPressure);
- //System.println(Activity.getActivityInfo().meanSeaLevelPressure );
+ if(Activity.getActivityInfo().rawAmbientPressure!=null){
+ pressure = Activity.getActivityInfo().rawAmbientPressure;
+ } else if (Activity.getActivityInfo().ambientPressure!=null){
pressure = Activity.getActivityInfo().ambientPressure;
}
}
@@ -1266,7 +1273,7 @@ class MtbA_functions {
}
dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
- dc.drawText(xText, yText, fontSize, pressure /*+ unit*/, Graphics.TEXT_JUSTIFY_LEFT); // pressure in hPa
+ dc.drawText(xText, yText, fontSize, pressure, Graphics.TEXT_JUSTIFY_LEFT); // pressure in hPa
}