From c3784ced8f8bf1651c220ba50d3924c32d8af7f6 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:01:49 -0700 Subject: [PATCH 01/38] Create app.js --- apps/MetricImperialConverter/app.js | 190 ++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 apps/MetricImperialConverter/app.js diff --git a/apps/MetricImperialConverter/app.js b/apps/MetricImperialConverter/app.js new file mode 100644 index 000000000..0f68f5980 --- /dev/null +++ b/apps/MetricImperialConverter/app.js @@ -0,0 +1,190 @@ +var Layout = require("Layout"); +var mainmenu = { + "" : { title : "Main Menu" }, // options + "Metric to Imperial" : function() { E.showMenu(MetricToImperial); activateBackButton();}, + "Imperial to Metric" : function() { E.showMenu(ImperialToMetric); activateBackButton();} +}; +//Example Equation: 50 F to C would be written as 5/9(E - 32) +//The E is the number that is inserted +function activateBackButton() +{ + setWatch(function() {E.showMenu(mainmenu);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"}); +} +var MetricToImperial = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(MetricToImperialWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(MetricToImperialDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(MetricToImperialTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(MetricToImperialLiquid); activateBackButton();}, +}; +var MetricToImperialDistance = { + "" : { title : "Select Measurement", }, + "MM-IN" : () => { convertAndPrint("E/25.4", "IN");}, + "CM-IN" : () => { convertAndPrint("E/2.54", "IN");}, + "M-FT" : () => { convertAndPrint("3.2808399*E", "FT");}, + "KM-MI" : () => { convertAndPrint("E/1.609344", "MI");} +}; +var MetricToImperialWeight = { + "" : { title : "Select Measurement", }, + "MG-OZ" : () => { convertAndPrint("E/28349.5231", "OZ");}, + "KG-LB" : () => { convertAndPrint("E*2.20462262", "LB");}, + "MT-US Ton" : () => { convertAndPrint("E*1.1023109950010197", "US TON");}, + "G-OZ" : () => { convertAndPrint("E/28.3495231", "OZ");} +}; +var MetricToImperialLiquid = { + "" : { title : "Select Measurement", }, + "ML-FL OZ" : () => { convertAndPrint("E/29.5735295", "FL OZ");}, + "ML-PT" : () => { convertAndPrint("E*0.002113", "PT");}, + "L-QT" : () => { convertAndPrint("E*1.056688", "QT");}, + "L-GAL" : () => { convertAndPrint("E*0.2641720524", "GAL");}, + "ML-C" : () => { convertAndPrint("E/236.588236", "C");} +}; +var MetricToImperialTemp = { + "" : { title : "Select Measurement", }, + "C-F" : () => { convertAndPrint("(E*1.8)+32", "F");}, + "K-F" : () => { convertAndPrint("((E-273.15)*1.8)+32", "F");} +}; +var ImperialToMetric = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(ImperialToMetricWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(ImperialToMetricDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(ImperialToMetricTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(ImperialToMetricLiquid); activateBackButton();}, +}; +var ImperialToMetricDistance = { + "" : { title : "Select Measurement", }, + "IN-MM" : () => { convertAndPrint("E*25.4", "MM");}, + "IN-CM" : () => { convertAndPrint("E*2.54", "MM");}, + "FT-M" : () => { convertAndPrint("E/3.2808399", "M");}, + "MI-KM" : () => { convertAndPrint("E*1.609344", "KM");} +}; +var ImperialToMetricWeight = { + "" : { title : "Select Measurement", }, + "OZ-MG" : () => { convertAndPrint("E*28349.5231", "MG");}, + "LB-KG" : () => { convertAndPrint("E/2.20462262", "KG");}, + "US Ton-MT" : () => { convertAndPrint("E/1.1023109950010197", "MT");}, + "OZ-G" : () => { convertAndPrint("E*28.3495231", "G");} +}; +var ImperialToMetricLiquid = { + "" : { title : "Select Measurement", }, + "FL OZ-ML" : () => { convertAndPrint("E*29.5735295", "ML");}, + "PT-ML" : () => { convertAndPrint("E/0.002113", "ML");}, + "QT-L" : () => { convertAndPrint("E/1.056688", "L");}, + "GAL-L" : () => { convertAndPrint("E/0.2641720524", "L");}, + "C-ML" : () => { convertAndPrint("E*236.588236", "ML");} +}; +var ImperialToMetricTemp = { + "" : { title : "Select Measurement", }, + "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, + "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} +}; +E.showMenu(mainmenu); +function convertAndPrint(equation, endText) +{ + E.showMenu(); + g.clear(); + showNumpad().then((number) => { + g.clear(); + equation = equation.replace("E", number); + var textToWrite = ""; + var layout = new Layout({}); + if (equation.includes(".")) + { + console.log(eval(equation).toString().split(".")[1].length); + if(eval(equation).toString().split(".")[1].length < 3) + { + console.log("decimal but no need for round"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + else + { + console.log("decimal rounded"); + textToWrite = Math.round(eval(equation) * 1000) / 1000; + textToWrite = "ABT " + textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + } + else + { + console.log("no decimal"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + activateBackButton(); + }); + +} +function showNumpad() { + return new Promise((resolve, reject) => { + let number = ''; + E.showMenu(); + function addDigit(digit) { + if(digit == "." && !number.includes(".")) + { + number += digit; + Bangle.buzz(20); + update(); + } + else if(digit != ".") + { + number += digit; + Bangle.buzz(20); + update(); + } + else + { + console.log("Already includes ."); + } + } + function removeDigit() { + number = number.slice(0, -1); + Bangle.buzz(20); + update(); + } + function update() { + g.reset(); + g.clearRect(0,0,g.getWidth(),23); + g.setFont("Vector:24").setFontAlign(1,0).drawString(number, g.getWidth(),12); + console.log(number.length); + if(number.length > 0){setWatch(function() {resolve(number);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"});} + } + const ds="12%"; + const digitBtn = (digit) => ({type:"btn", font:ds, width:58, label:digit, cb:l=>{addDigit(digit);}}); + var numPad = new Layout ({ + type:"v", c: [{ + type:"v", c: [ + {type:"", height:24}, + {type:"h",filly:1, c: [digitBtn("1"), digitBtn("2"), digitBtn("3")]}, + {type:"h",filly:1, c: [digitBtn("4"), digitBtn("5"), digitBtn("6")]}, + {type:"h",filly:1, c: [digitBtn("7"), digitBtn("8"), digitBtn("9")]}, + {type:"h",filly:1, c: [ + {type:"btn", font:ds, width:58, label:"<", cb: removeDigit}, + digitBtn('0'), + {type:"btn", font:ds, width:58, id:".", label:".", cb: l => addDigit(".")} + ]} + ]} + ], lazy:true}); + g.clear(); + numPad.render(); + update(); + + }); +} From a5df1e05983dcb95c31b5afb11bbc5badf9f6f35 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:12:38 -0700 Subject: [PATCH 02/38] Create app-icon.js --- apps/MetricImperialConverter/app-icon.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/MetricImperialConverter/app-icon.js diff --git a/apps/MetricImperialConverter/app-icon.js b/apps/MetricImperialConverter/app-icon.js new file mode 100644 index 000000000..f7ce64e2c --- /dev/null +++ b/apps/MetricImperialConverter/app-icon.js @@ -0,0 +1 @@ +E.toArrayBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) From 69179f34bde3fe8175280ddabd5102ef7ffa24d5 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:14:20 -0700 Subject: [PATCH 03/38] Update app-icon.js --- apps/MetricImperialConverter/app-icon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/MetricImperialConverter/app-icon.js b/apps/MetricImperialConverter/app-icon.js index f7ce64e2c..8a7983daf 100644 --- a/apps/MetricImperialConverter/app-icon.js +++ b/apps/MetricImperialConverter/app-icon.js @@ -1 +1 @@ -E.toArrayBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) +E.toArryBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) From e43e06fe71fa0f6be4f4db85d5362acc2f307f75 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:18:35 -0700 Subject: [PATCH 04/38] Create metadata.json --- apps/MetricImperialConverter/metadata.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 apps/MetricImperialConverter/metadata.json diff --git a/apps/MetricImperialConverter/metadata.json b/apps/MetricImperialConverter/metadata.json new file mode 100644 index 000000000..886b65a4d --- /dev/null +++ b/apps/MetricImperialConverter/metadata.json @@ -0,0 +1,13 @@ +{ "id": "ImperialToMetricConverter", + "name": "Imperial To Metric Converter", + "shortName":"IMC", + "icon": "app.png", + "version":"0.01", + "description": "A simple app for the bangle.js 2 to convert imperial measurements to metric, or the other way around.", + "tags": "", + "supports": ["BANGLEJS2"], + "storage": [ + {"name":"IMC.app.js","url":"app.js"}, + {"name":"IMC.img","url":"app-icon.js","evaluate":true} + ] +} From 4be6df8e74c8accee3ffe078de10adf2a325b632 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:18:55 -0700 Subject: [PATCH 05/38] Add files via upload --- apps/MetricImperialConverter/IMC (1).png | Bin 0 -> 2584 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/MetricImperialConverter/IMC (1).png diff --git a/apps/MetricImperialConverter/IMC (1).png b/apps/MetricImperialConverter/IMC (1).png new file mode 100644 index 0000000000000000000000000000000000000000..9d1b64012f2b6b93c755c9dcec23496c14d3d986 GIT binary patch literal 2584 zcmbtWdsGwm65fD>D+&h%r3JwVY7os6kR&F7K;&5{LM-pfCRs=zWMi^{fG9bjg0?Dc z1+7(4D-}e+N(ox6pan#&A|lU9-ZU}mJ)Ls9=qQ75GT}nc4^JTsf3IH&x(OsClwPrQ|Fzc2-kZSf?6!R z2ti~F5-BAmg_z<@gyr!h3Y|_Tk*Opqm4G4$ic~2Ast8hr1Il26({pekg+MNrA!1mH z({X})Sc$OkcoW<#H3vcDV*VVvR6zvw9;GgXh!#x(g$fddNY*_T4#%9qGdMzp&YVdS z3T@RJGnPcG&m;ro3W%2~gIM?wNC7M50!YuG3z{YIl0zT@3E5OK)s;Y|5vXJ)>2F86 z9Pa`)st`XRTR^3|IMd=>2|_AuJ;8-S6A(b>I0^xT;vkwcnMNVg_;W-vAs^Cs^HCO8 zsw;K9E1lv(aihD^-euMweu(G6N`XjM3Y$8|`_8AwGD*7bO2jiw(HpZ}nTwcd*$nW# zvHbU=5(?(VBvZ;IdI<;xBuD}!K~h9FB+BfNgaQU4MkLU?5pg8Qha*C@$B=;1cotqo z5JGXFQi9;wet}*%0*>+z#mvStN$*krAEn6N6SPip`u9pFHuM0k!+Ew2)M9XyhzORm zy~R=~E&zt4;&`SG^_L&jxxU-~Q%BJkajvBwJcbICy{CB;#?WgOmh)g(!uA5C$skS$ z3s_u^PYN8zp^MTIaY_XwXKm*ANHU}-Laeg9NHzTQR!xyHamv2jdFbxN1$R6jsja`NF}hlfu@Knr-DKr3_}jhy zZ)0SbeeRSrGR4Vw^y&2~we|p%VbC4sUiSR%UeL{MJ25`CCvC({|X7e7q_Qy|$ z#uulnw__761YDLY%VoRFvQp&GmwLZkdFuQ`M}uQs+6(eMO!{%`>V+SvI=|;a&sv9h zHIJp(d+`TfdumI#leBc!;eL~o%KDEcsg_ON?7O)}-kQbp>&wqH z%QOQg9Y&&fcK+esor#PDw-W`yV{a`+HYz}m!cG0qjzuDi9OVwvakCM+$h~E#(C!ts zf7b&Kc<6OjJGZOm#=xn=7;b5(>QLG^Vjo3}L;sfNQm|NRr4bqxz>wkes{j4FEm zY-I?5%qvziulDibJS&_aYzVnMJjb!@OIN9 z?$!0jsI?`HWg6}L@F8nOQ}PBTHYR(lCjwyqFwv1|TxweowMTAn;gY%fq;YtiDQT2r z{KmzXEFyK|`6CLfn)R7VRaz1U#R9k1WQIsqT!;rv>8<&+` zpa>u3wN+XoXFD^8v2@S)z}JqW_6c{0zRlep#{<@UzWUSM94jk>;I1dDLtEk%^Rg1# zPAa#(b;}IWVAdVz%~jDOt0?Uezza)RulI?5*DE>EN1)`UEQiaxBFKp0xYyR!Q_~K4 zW8W2DOm6A|ytS$Md$Cc?w`~opqeR`{!^bJX(-@bX*&khHA9DCQv9{H^h1CAcofET0 zO*4WFL_?#*5reRE-Wh#AC{25~rkigKUb#vD@7B}3x9blh(^M-x#9tFn#m%Iv(XRD@T!q{EwCrkF% z6gm~GjFnzJLq3wOHDm=;_vFflr`C+v`;`SQ9?fVsY0fVU&|dB>&)09K>8jUOe>4PR TUTu)-Ki>Q{260P0V>AB)Pf;0{ literal 0 HcmV?d00001 From a362833f1f25abd449b63ad4ca4da3286d308f2c Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:19:28 -0700 Subject: [PATCH 06/38] Rename IMC (1).png to IMC.png --- .../{IMC (1).png => IMC.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/MetricImperialConverter/{IMC (1).png => IMC.png} (100%) diff --git a/apps/MetricImperialConverter/IMC (1).png b/apps/MetricImperialConverter/IMC.png similarity index 100% rename from apps/MetricImperialConverter/IMC (1).png rename to apps/MetricImperialConverter/IMC.png From 59ba2634c92805245aa2ee1d5be720d7de27c793 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:19:44 -0700 Subject: [PATCH 07/38] Rename IMC.png to app-icon.png --- .../{IMC.png => app-icon.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/MetricImperialConverter/{IMC.png => app-icon.png} (100%) diff --git a/apps/MetricImperialConverter/IMC.png b/apps/MetricImperialConverter/app-icon.png similarity index 100% rename from apps/MetricImperialConverter/IMC.png rename to apps/MetricImperialConverter/app-icon.png From d16eb869889d0cbf084ec40c2669aae022cd201e Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:20:08 -0700 Subject: [PATCH 08/38] Rename app-icon.png to app.png --- .../{app-icon.png => app.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/MetricImperialConverter/{app-icon.png => app.png} (100%) diff --git a/apps/MetricImperialConverter/app-icon.png b/apps/MetricImperialConverter/app.png similarity index 100% rename from apps/MetricImperialConverter/app-icon.png rename to apps/MetricImperialConverter/app.png From d83e12cb42bfdc6d0bfa821a6a3bc4bbe98290d4 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:24:07 -0700 Subject: [PATCH 09/38] Create ChangeLog --- apps/MetricImperialConverter/ChangeLog | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/MetricImperialConverter/ChangeLog diff --git a/apps/MetricImperialConverter/ChangeLog b/apps/MetricImperialConverter/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/MetricImperialConverter/ChangeLog @@ -0,0 +1 @@ +0.01: New App! From dd4718bcca10240cdd05af187dae0d4c3c3e11cd Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:32:58 -0700 Subject: [PATCH 10/38] Update metadata.json --- apps/MetricImperialConverter/metadata.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/MetricImperialConverter/metadata.json b/apps/MetricImperialConverter/metadata.json index 886b65a4d..89aee6ba7 100644 --- a/apps/MetricImperialConverter/metadata.json +++ b/apps/MetricImperialConverter/metadata.json @@ -1,9 +1,10 @@ -{ "id": "ImperialToMetricConverter", - "name": "Imperial To Metric Converter", +{ "id": "IMC", + "name": "Metric to Imperial Converter", "shortName":"IMC", - "icon": "app.png", + "icon": "IMC.png", "version":"0.01", - "description": "A simple app for the bangle.js 2 to convert imperial measurements to metric, or the other way around.", + "allow_emulator": true, + "description": "A tool for converting measurements", "tags": "", "supports": ["BANGLEJS2"], "storage": [ From 4ba0b7596d0b3285a62e016fa2a2a0bf77729729 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:36:08 -0700 Subject: [PATCH 11/38] Update metadata.json --- apps/MetricImperialConverter/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/MetricImperialConverter/metadata.json b/apps/MetricImperialConverter/metadata.json index 89aee6ba7..a50aabffa 100644 --- a/apps/MetricImperialConverter/metadata.json +++ b/apps/MetricImperialConverter/metadata.json @@ -1,4 +1,4 @@ -{ "id": "IMC", +{ "id": "MetricImperialConverter", "name": "Metric to Imperial Converter", "shortName":"IMC", "icon": "IMC.png", From 17688b5c794432ebe516c7871460cdfded4bb257 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:39:29 -0700 Subject: [PATCH 13/38] Rename app.png to IMC.png --- apps/MetricImperialConverter/{app.png => IMC.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/MetricImperialConverter/{app.png => IMC.png} (100%) diff --git a/apps/MetricImperialConverter/app.png b/apps/MetricImperialConverter/IMC.png similarity index 100% rename from apps/MetricImperialConverter/app.png rename to apps/MetricImperialConverter/IMC.png From 3846a57582992144fa065d07d199f6d65562336f Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:43:06 -0700 Subject: [PATCH 14/38] Create app.js --- apps/IMC/app.js | 190 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 apps/IMC/app.js diff --git a/apps/IMC/app.js b/apps/IMC/app.js new file mode 100644 index 000000000..0f68f5980 --- /dev/null +++ b/apps/IMC/app.js @@ -0,0 +1,190 @@ +var Layout = require("Layout"); +var mainmenu = { + "" : { title : "Main Menu" }, // options + "Metric to Imperial" : function() { E.showMenu(MetricToImperial); activateBackButton();}, + "Imperial to Metric" : function() { E.showMenu(ImperialToMetric); activateBackButton();} +}; +//Example Equation: 50 F to C would be written as 5/9(E - 32) +//The E is the number that is inserted +function activateBackButton() +{ + setWatch(function() {E.showMenu(mainmenu);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"}); +} +var MetricToImperial = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(MetricToImperialWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(MetricToImperialDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(MetricToImperialTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(MetricToImperialLiquid); activateBackButton();}, +}; +var MetricToImperialDistance = { + "" : { title : "Select Measurement", }, + "MM-IN" : () => { convertAndPrint("E/25.4", "IN");}, + "CM-IN" : () => { convertAndPrint("E/2.54", "IN");}, + "M-FT" : () => { convertAndPrint("3.2808399*E", "FT");}, + "KM-MI" : () => { convertAndPrint("E/1.609344", "MI");} +}; +var MetricToImperialWeight = { + "" : { title : "Select Measurement", }, + "MG-OZ" : () => { convertAndPrint("E/28349.5231", "OZ");}, + "KG-LB" : () => { convertAndPrint("E*2.20462262", "LB");}, + "MT-US Ton" : () => { convertAndPrint("E*1.1023109950010197", "US TON");}, + "G-OZ" : () => { convertAndPrint("E/28.3495231", "OZ");} +}; +var MetricToImperialLiquid = { + "" : { title : "Select Measurement", }, + "ML-FL OZ" : () => { convertAndPrint("E/29.5735295", "FL OZ");}, + "ML-PT" : () => { convertAndPrint("E*0.002113", "PT");}, + "L-QT" : () => { convertAndPrint("E*1.056688", "QT");}, + "L-GAL" : () => { convertAndPrint("E*0.2641720524", "GAL");}, + "ML-C" : () => { convertAndPrint("E/236.588236", "C");} +}; +var MetricToImperialTemp = { + "" : { title : "Select Measurement", }, + "C-F" : () => { convertAndPrint("(E*1.8)+32", "F");}, + "K-F" : () => { convertAndPrint("((E-273.15)*1.8)+32", "F");} +}; +var ImperialToMetric = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(ImperialToMetricWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(ImperialToMetricDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(ImperialToMetricTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(ImperialToMetricLiquid); activateBackButton();}, +}; +var ImperialToMetricDistance = { + "" : { title : "Select Measurement", }, + "IN-MM" : () => { convertAndPrint("E*25.4", "MM");}, + "IN-CM" : () => { convertAndPrint("E*2.54", "MM");}, + "FT-M" : () => { convertAndPrint("E/3.2808399", "M");}, + "MI-KM" : () => { convertAndPrint("E*1.609344", "KM");} +}; +var ImperialToMetricWeight = { + "" : { title : "Select Measurement", }, + "OZ-MG" : () => { convertAndPrint("E*28349.5231", "MG");}, + "LB-KG" : () => { convertAndPrint("E/2.20462262", "KG");}, + "US Ton-MT" : () => { convertAndPrint("E/1.1023109950010197", "MT");}, + "OZ-G" : () => { convertAndPrint("E*28.3495231", "G");} +}; +var ImperialToMetricLiquid = { + "" : { title : "Select Measurement", }, + "FL OZ-ML" : () => { convertAndPrint("E*29.5735295", "ML");}, + "PT-ML" : () => { convertAndPrint("E/0.002113", "ML");}, + "QT-L" : () => { convertAndPrint("E/1.056688", "L");}, + "GAL-L" : () => { convertAndPrint("E/0.2641720524", "L");}, + "C-ML" : () => { convertAndPrint("E*236.588236", "ML");} +}; +var ImperialToMetricTemp = { + "" : { title : "Select Measurement", }, + "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, + "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} +}; +E.showMenu(mainmenu); +function convertAndPrint(equation, endText) +{ + E.showMenu(); + g.clear(); + showNumpad().then((number) => { + g.clear(); + equation = equation.replace("E", number); + var textToWrite = ""; + var layout = new Layout({}); + if (equation.includes(".")) + { + console.log(eval(equation).toString().split(".")[1].length); + if(eval(equation).toString().split(".")[1].length < 3) + { + console.log("decimal but no need for round"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + else + { + console.log("decimal rounded"); + textToWrite = Math.round(eval(equation) * 1000) / 1000; + textToWrite = "ABT " + textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + } + else + { + console.log("no decimal"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + activateBackButton(); + }); + +} +function showNumpad() { + return new Promise((resolve, reject) => { + let number = ''; + E.showMenu(); + function addDigit(digit) { + if(digit == "." && !number.includes(".")) + { + number += digit; + Bangle.buzz(20); + update(); + } + else if(digit != ".") + { + number += digit; + Bangle.buzz(20); + update(); + } + else + { + console.log("Already includes ."); + } + } + function removeDigit() { + number = number.slice(0, -1); + Bangle.buzz(20); + update(); + } + function update() { + g.reset(); + g.clearRect(0,0,g.getWidth(),23); + g.setFont("Vector:24").setFontAlign(1,0).drawString(number, g.getWidth(),12); + console.log(number.length); + if(number.length > 0){setWatch(function() {resolve(number);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"});} + } + const ds="12%"; + const digitBtn = (digit) => ({type:"btn", font:ds, width:58, label:digit, cb:l=>{addDigit(digit);}}); + var numPad = new Layout ({ + type:"v", c: [{ + type:"v", c: [ + {type:"", height:24}, + {type:"h",filly:1, c: [digitBtn("1"), digitBtn("2"), digitBtn("3")]}, + {type:"h",filly:1, c: [digitBtn("4"), digitBtn("5"), digitBtn("6")]}, + {type:"h",filly:1, c: [digitBtn("7"), digitBtn("8"), digitBtn("9")]}, + {type:"h",filly:1, c: [ + {type:"btn", font:ds, width:58, label:"<", cb: removeDigit}, + digitBtn('0'), + {type:"btn", font:ds, width:58, id:".", label:".", cb: l => addDigit(".")} + ]} + ]} + ], lazy:true}); + g.clear(); + numPad.render(); + update(); + + }); +} From d88225ab2627bc63a786167732d44de283af8046 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:43:24 -0700 Subject: [PATCH 15/38] Delete apps/IMC directory --- apps/IMC/app.js | 190 ------------------------------------------------ 1 file changed, 190 deletions(-) delete mode 100644 apps/IMC/app.js diff --git a/apps/IMC/app.js b/apps/IMC/app.js deleted file mode 100644 index 0f68f5980..000000000 --- a/apps/IMC/app.js +++ /dev/null @@ -1,190 +0,0 @@ -var Layout = require("Layout"); -var mainmenu = { - "" : { title : "Main Menu" }, // options - "Metric to Imperial" : function() { E.showMenu(MetricToImperial); activateBackButton();}, - "Imperial to Metric" : function() { E.showMenu(ImperialToMetric); activateBackButton();} -}; -//Example Equation: 50 F to C would be written as 5/9(E - 32) -//The E is the number that is inserted -function activateBackButton() -{ - setWatch(function() {E.showMenu(mainmenu);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"}); -} -var MetricToImperial = { - "" : { title : "Select Type", }, - "Weight" : function() { E.showMenu(MetricToImperialWeight); activateBackButton();}, - "Distance" : function() { E.showMenu(MetricToImperialDistance); activateBackButton();}, - "Temperature" : function() { E.showMenu(MetricToImperialTemp); activateBackButton();}, - "Liquid" : function() { E.showMenu(MetricToImperialLiquid); activateBackButton();}, -}; -var MetricToImperialDistance = { - "" : { title : "Select Measurement", }, - "MM-IN" : () => { convertAndPrint("E/25.4", "IN");}, - "CM-IN" : () => { convertAndPrint("E/2.54", "IN");}, - "M-FT" : () => { convertAndPrint("3.2808399*E", "FT");}, - "KM-MI" : () => { convertAndPrint("E/1.609344", "MI");} -}; -var MetricToImperialWeight = { - "" : { title : "Select Measurement", }, - "MG-OZ" : () => { convertAndPrint("E/28349.5231", "OZ");}, - "KG-LB" : () => { convertAndPrint("E*2.20462262", "LB");}, - "MT-US Ton" : () => { convertAndPrint("E*1.1023109950010197", "US TON");}, - "G-OZ" : () => { convertAndPrint("E/28.3495231", "OZ");} -}; -var MetricToImperialLiquid = { - "" : { title : "Select Measurement", }, - "ML-FL OZ" : () => { convertAndPrint("E/29.5735295", "FL OZ");}, - "ML-PT" : () => { convertAndPrint("E*0.002113", "PT");}, - "L-QT" : () => { convertAndPrint("E*1.056688", "QT");}, - "L-GAL" : () => { convertAndPrint("E*0.2641720524", "GAL");}, - "ML-C" : () => { convertAndPrint("E/236.588236", "C");} -}; -var MetricToImperialTemp = { - "" : { title : "Select Measurement", }, - "C-F" : () => { convertAndPrint("(E*1.8)+32", "F");}, - "K-F" : () => { convertAndPrint("((E-273.15)*1.8)+32", "F");} -}; -var ImperialToMetric = { - "" : { title : "Select Type", }, - "Weight" : function() { E.showMenu(ImperialToMetricWeight); activateBackButton();}, - "Distance" : function() { E.showMenu(ImperialToMetricDistance); activateBackButton();}, - "Temperature" : function() { E.showMenu(ImperialToMetricTemp); activateBackButton();}, - "Liquid" : function() { E.showMenu(ImperialToMetricLiquid); activateBackButton();}, -}; -var ImperialToMetricDistance = { - "" : { title : "Select Measurement", }, - "IN-MM" : () => { convertAndPrint("E*25.4", "MM");}, - "IN-CM" : () => { convertAndPrint("E*2.54", "MM");}, - "FT-M" : () => { convertAndPrint("E/3.2808399", "M");}, - "MI-KM" : () => { convertAndPrint("E*1.609344", "KM");} -}; -var ImperialToMetricWeight = { - "" : { title : "Select Measurement", }, - "OZ-MG" : () => { convertAndPrint("E*28349.5231", "MG");}, - "LB-KG" : () => { convertAndPrint("E/2.20462262", "KG");}, - "US Ton-MT" : () => { convertAndPrint("E/1.1023109950010197", "MT");}, - "OZ-G" : () => { convertAndPrint("E*28.3495231", "G");} -}; -var ImperialToMetricLiquid = { - "" : { title : "Select Measurement", }, - "FL OZ-ML" : () => { convertAndPrint("E*29.5735295", "ML");}, - "PT-ML" : () => { convertAndPrint("E/0.002113", "ML");}, - "QT-L" : () => { convertAndPrint("E/1.056688", "L");}, - "GAL-L" : () => { convertAndPrint("E/0.2641720524", "L");}, - "C-ML" : () => { convertAndPrint("E*236.588236", "ML");} -}; -var ImperialToMetricTemp = { - "" : { title : "Select Measurement", }, - "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, - "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} -}; -E.showMenu(mainmenu); -function convertAndPrint(equation, endText) -{ - E.showMenu(); - g.clear(); - showNumpad().then((number) => { - g.clear(); - equation = equation.replace("E", number); - var textToWrite = ""; - var layout = new Layout({}); - if (equation.includes(".")) - { - console.log(eval(equation).toString().split(".")[1].length); - if(eval(equation).toString().split(".")[1].length < 3) - { - console.log("decimal but no need for round"); - textToWrite = eval(equation); - textToWrite = textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - else - { - console.log("decimal rounded"); - textToWrite = Math.round(eval(equation) * 1000) / 1000; - textToWrite = "ABT " + textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - } - else - { - console.log("no decimal"); - textToWrite = eval(equation); - textToWrite = textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - activateBackButton(); - }); - -} -function showNumpad() { - return new Promise((resolve, reject) => { - let number = ''; - E.showMenu(); - function addDigit(digit) { - if(digit == "." && !number.includes(".")) - { - number += digit; - Bangle.buzz(20); - update(); - } - else if(digit != ".") - { - number += digit; - Bangle.buzz(20); - update(); - } - else - { - console.log("Already includes ."); - } - } - function removeDigit() { - number = number.slice(0, -1); - Bangle.buzz(20); - update(); - } - function update() { - g.reset(); - g.clearRect(0,0,g.getWidth(),23); - g.setFont("Vector:24").setFontAlign(1,0).drawString(number, g.getWidth(),12); - console.log(number.length); - if(number.length > 0){setWatch(function() {resolve(number);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"});} - } - const ds="12%"; - const digitBtn = (digit) => ({type:"btn", font:ds, width:58, label:digit, cb:l=>{addDigit(digit);}}); - var numPad = new Layout ({ - type:"v", c: [{ - type:"v", c: [ - {type:"", height:24}, - {type:"h",filly:1, c: [digitBtn("1"), digitBtn("2"), digitBtn("3")]}, - {type:"h",filly:1, c: [digitBtn("4"), digitBtn("5"), digitBtn("6")]}, - {type:"h",filly:1, c: [digitBtn("7"), digitBtn("8"), digitBtn("9")]}, - {type:"h",filly:1, c: [ - {type:"btn", font:ds, width:58, label:"<", cb: removeDigit}, - digitBtn('0'), - {type:"btn", font:ds, width:58, id:".", label:".", cb: l => addDigit(".")} - ]} - ]} - ], lazy:true}); - g.clear(); - numPad.render(); - update(); - - }); -} From be59e63ef0e6a8f9c17c0bd73378bc4ef21b9aee Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:43:54 -0700 Subject: [PATCH 16/38] Create app.js --- apps/imc/app.js | 190 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 apps/imc/app.js diff --git a/apps/imc/app.js b/apps/imc/app.js new file mode 100644 index 000000000..0f68f5980 --- /dev/null +++ b/apps/imc/app.js @@ -0,0 +1,190 @@ +var Layout = require("Layout"); +var mainmenu = { + "" : { title : "Main Menu" }, // options + "Metric to Imperial" : function() { E.showMenu(MetricToImperial); activateBackButton();}, + "Imperial to Metric" : function() { E.showMenu(ImperialToMetric); activateBackButton();} +}; +//Example Equation: 50 F to C would be written as 5/9(E - 32) +//The E is the number that is inserted +function activateBackButton() +{ + setWatch(function() {E.showMenu(mainmenu);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"}); +} +var MetricToImperial = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(MetricToImperialWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(MetricToImperialDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(MetricToImperialTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(MetricToImperialLiquid); activateBackButton();}, +}; +var MetricToImperialDistance = { + "" : { title : "Select Measurement", }, + "MM-IN" : () => { convertAndPrint("E/25.4", "IN");}, + "CM-IN" : () => { convertAndPrint("E/2.54", "IN");}, + "M-FT" : () => { convertAndPrint("3.2808399*E", "FT");}, + "KM-MI" : () => { convertAndPrint("E/1.609344", "MI");} +}; +var MetricToImperialWeight = { + "" : { title : "Select Measurement", }, + "MG-OZ" : () => { convertAndPrint("E/28349.5231", "OZ");}, + "KG-LB" : () => { convertAndPrint("E*2.20462262", "LB");}, + "MT-US Ton" : () => { convertAndPrint("E*1.1023109950010197", "US TON");}, + "G-OZ" : () => { convertAndPrint("E/28.3495231", "OZ");} +}; +var MetricToImperialLiquid = { + "" : { title : "Select Measurement", }, + "ML-FL OZ" : () => { convertAndPrint("E/29.5735295", "FL OZ");}, + "ML-PT" : () => { convertAndPrint("E*0.002113", "PT");}, + "L-QT" : () => { convertAndPrint("E*1.056688", "QT");}, + "L-GAL" : () => { convertAndPrint("E*0.2641720524", "GAL");}, + "ML-C" : () => { convertAndPrint("E/236.588236", "C");} +}; +var MetricToImperialTemp = { + "" : { title : "Select Measurement", }, + "C-F" : () => { convertAndPrint("(E*1.8)+32", "F");}, + "K-F" : () => { convertAndPrint("((E-273.15)*1.8)+32", "F");} +}; +var ImperialToMetric = { + "" : { title : "Select Type", }, + "Weight" : function() { E.showMenu(ImperialToMetricWeight); activateBackButton();}, + "Distance" : function() { E.showMenu(ImperialToMetricDistance); activateBackButton();}, + "Temperature" : function() { E.showMenu(ImperialToMetricTemp); activateBackButton();}, + "Liquid" : function() { E.showMenu(ImperialToMetricLiquid); activateBackButton();}, +}; +var ImperialToMetricDistance = { + "" : { title : "Select Measurement", }, + "IN-MM" : () => { convertAndPrint("E*25.4", "MM");}, + "IN-CM" : () => { convertAndPrint("E*2.54", "MM");}, + "FT-M" : () => { convertAndPrint("E/3.2808399", "M");}, + "MI-KM" : () => { convertAndPrint("E*1.609344", "KM");} +}; +var ImperialToMetricWeight = { + "" : { title : "Select Measurement", }, + "OZ-MG" : () => { convertAndPrint("E*28349.5231", "MG");}, + "LB-KG" : () => { convertAndPrint("E/2.20462262", "KG");}, + "US Ton-MT" : () => { convertAndPrint("E/1.1023109950010197", "MT");}, + "OZ-G" : () => { convertAndPrint("E*28.3495231", "G");} +}; +var ImperialToMetricLiquid = { + "" : { title : "Select Measurement", }, + "FL OZ-ML" : () => { convertAndPrint("E*29.5735295", "ML");}, + "PT-ML" : () => { convertAndPrint("E/0.002113", "ML");}, + "QT-L" : () => { convertAndPrint("E/1.056688", "L");}, + "GAL-L" : () => { convertAndPrint("E/0.2641720524", "L");}, + "C-ML" : () => { convertAndPrint("E*236.588236", "ML");} +}; +var ImperialToMetricTemp = { + "" : { title : "Select Measurement", }, + "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, + "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} +}; +E.showMenu(mainmenu); +function convertAndPrint(equation, endText) +{ + E.showMenu(); + g.clear(); + showNumpad().then((number) => { + g.clear(); + equation = equation.replace("E", number); + var textToWrite = ""; + var layout = new Layout({}); + if (equation.includes(".")) + { + console.log(eval(equation).toString().split(".")[1].length); + if(eval(equation).toString().split(".")[1].length < 3) + { + console.log("decimal but no need for round"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + else + { + console.log("decimal rounded"); + textToWrite = Math.round(eval(equation) * 1000) / 1000; + textToWrite = "ABT " + textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + } + else + { + console.log("no decimal"); + textToWrite = eval(equation); + textToWrite = textToWrite + " " + endText; + layout = new Layout({ + type: "txt", + font: "Vector:20", + label: textToWrite + }); + layout.render(); + } + activateBackButton(); + }); + +} +function showNumpad() { + return new Promise((resolve, reject) => { + let number = ''; + E.showMenu(); + function addDigit(digit) { + if(digit == "." && !number.includes(".")) + { + number += digit; + Bangle.buzz(20); + update(); + } + else if(digit != ".") + { + number += digit; + Bangle.buzz(20); + update(); + } + else + { + console.log("Already includes ."); + } + } + function removeDigit() { + number = number.slice(0, -1); + Bangle.buzz(20); + update(); + } + function update() { + g.reset(); + g.clearRect(0,0,g.getWidth(),23); + g.setFont("Vector:24").setFontAlign(1,0).drawString(number, g.getWidth(),12); + console.log(number.length); + if(number.length > 0){setWatch(function() {resolve(number);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"});} + } + const ds="12%"; + const digitBtn = (digit) => ({type:"btn", font:ds, width:58, label:digit, cb:l=>{addDigit(digit);}}); + var numPad = new Layout ({ + type:"v", c: [{ + type:"v", c: [ + {type:"", height:24}, + {type:"h",filly:1, c: [digitBtn("1"), digitBtn("2"), digitBtn("3")]}, + {type:"h",filly:1, c: [digitBtn("4"), digitBtn("5"), digitBtn("6")]}, + {type:"h",filly:1, c: [digitBtn("7"), digitBtn("8"), digitBtn("9")]}, + {type:"h",filly:1, c: [ + {type:"btn", font:ds, width:58, label:"<", cb: removeDigit}, + digitBtn('0'), + {type:"btn", font:ds, width:58, id:".", label:".", cb: l => addDigit(".")} + ]} + ]} + ], lazy:true}); + g.clear(); + numPad.render(); + update(); + + }); +} From 8350b0fa5b06516cb23110c21feac1710b2feeaf Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:15:36 -0700 Subject: [PATCH 17/38] Create metadata.json --- apps/imc/metadata.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 apps/imc/metadata.json diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json new file mode 100644 index 000000000..2d2ab1b50 --- /dev/null +++ b/apps/imc/metadata.json @@ -0,0 +1,14 @@ +{ "id": "imc", + "name": "Metric Imperial Converter", + "shortName":"imc", + "icon": "IMC.png", + "version":"0.01", + "allow_emulator": true, + "description": "A tool for converting metric and imperial measurements", + "tags": "game", + "supports": ["BANGLEJS2"], + "storage": [ + {"name":"imc.app.js","url":"app.js"}, + {"name":"imc.img","url":"app-icon.js","evaluate":true} + ] +} From 7b6892c859458b5a74b1ba5055cd69aa9a513fda Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:16:13 -0700 Subject: [PATCH 18/38] Create app-icon.js --- apps/imc/app-icon.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/imc/app-icon.js diff --git a/apps/imc/app-icon.js b/apps/imc/app-icon.js new file mode 100644 index 000000000..8a7983daf --- /dev/null +++ b/apps/imc/app-icon.js @@ -0,0 +1 @@ +E.toArryBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) From f6dc3b67601b4903f041d8fec95525e10bfc10af Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:17:25 -0700 Subject: [PATCH 19/38] Update app-icon.js --- apps/imc/app-icon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/imc/app-icon.js b/apps/imc/app-icon.js index 8a7983daf..e36cb2ef4 100644 --- a/apps/imc/app-icon.js +++ b/apps/imc/app-icon.js @@ -1 +1 @@ -E.toArryBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) +require("heatshrink").decompress(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) From dcefb9506f3d4c0939c690fbaac92a9d55b61680 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:20:36 -0700 Subject: [PATCH 20/38] Add files via upload --- apps/imc/IMC (1).png | Bin 0 -> 2584 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/imc/IMC (1).png diff --git a/apps/imc/IMC (1).png b/apps/imc/IMC (1).png new file mode 100644 index 0000000000000000000000000000000000000000..9d1b64012f2b6b93c755c9dcec23496c14d3d986 GIT binary patch literal 2584 zcmbtWdsGwm65fD>D+&h%r3JwVY7os6kR&F7K;&5{LM-pfCRs=zWMi^{fG9bjg0?Dc z1+7(4D-}e+N(ox6pan#&A|lU9-ZU}mJ)Ls9=qQ75GT}nc4^JTsf3IH&x(OsClwPrQ|Fzc2-kZSf?6!R z2ti~F5-BAmg_z<@gyr!h3Y|_Tk*Opqm4G4$ic~2Ast8hr1Il26({pekg+MNrA!1mH z({X})Sc$OkcoW<#H3vcDV*VVvR6zvw9;GgXh!#x(g$fddNY*_T4#%9qGdMzp&YVdS z3T@RJGnPcG&m;ro3W%2~gIM?wNC7M50!YuG3z{YIl0zT@3E5OK)s;Y|5vXJ)>2F86 z9Pa`)st`XRTR^3|IMd=>2|_AuJ;8-S6A(b>I0^xT;vkwcnMNVg_;W-vAs^Cs^HCO8 zsw;K9E1lv(aihD^-euMweu(G6N`XjM3Y$8|`_8AwGD*7bO2jiw(HpZ}nTwcd*$nW# zvHbU=5(?(VBvZ;IdI<;xBuD}!K~h9FB+BfNgaQU4MkLU?5pg8Qha*C@$B=;1cotqo z5JGXFQi9;wet}*%0*>+z#mvStN$*krAEn6N6SPip`u9pFHuM0k!+Ew2)M9XyhzORm zy~R=~E&zt4;&`SG^_L&jxxU-~Q%BJkajvBwJcbICy{CB;#?WgOmh)g(!uA5C$skS$ z3s_u^PYN8zp^MTIaY_XwXKm*ANHU}-Laeg9NHzTQR!xyHamv2jdFbxN1$R6jsja`NF}hlfu@Knr-DKr3_}jhy zZ)0SbeeRSrGR4Vw^y&2~we|p%VbC4sUiSR%UeL{MJ25`CCvC({|X7e7q_Qy|$ z#uulnw__761YDLY%VoRFvQp&GmwLZkdFuQ`M}uQs+6(eMO!{%`>V+SvI=|;a&sv9h zHIJp(d+`TfdumI#leBc!;eL~o%KDEcsg_ON?7O)}-kQbp>&wqH z%QOQg9Y&&fcK+esor#PDw-W`yV{a`+HYz}m!cG0qjzuDi9OVwvakCM+$h~E#(C!ts zf7b&Kc<6OjJGZOm#=xn=7;b5(>QLG^Vjo3}L;sfNQm|NRr4bqxz>wkes{j4FEm zY-I?5%qvziulDibJS&_aYzVnMJjb!@OIN9 z?$!0jsI?`HWg6}L@F8nOQ}PBTHYR(lCjwyqFwv1|TxweowMTAn;gY%fq;YtiDQT2r z{KmzXEFyK|`6CLfn)R7VRaz1U#R9k1WQIsqT!;rv>8<&+` zpa>u3wN+XoXFD^8v2@S)z}JqW_6c{0zRlep#{<@UzWUSM94jk>;I1dDLtEk%^Rg1# zPAa#(b;}IWVAdVz%~jDOt0?Uezza)RulI?5*DE>EN1)`UEQiaxBFKp0xYyR!Q_~K4 zW8W2DOm6A|ytS$Md$Cc?w`~opqeR`{!^bJX(-@bX*&khHA9DCQv9{H^h1CAcofET0 zO*4WFL_?#*5reRE-Wh#AC{25~rkigKUb#vD@7B}3x9blh(^M-x#9tFn#m%Iv(XRD@T!q{EwCrkF% z6gm~GjFnzJLq3wOHDm=;_vFflr`C+v`;`SQ9?fVsY0fVU&|dB>&)09K>8jUOe>4PR TUTu)-Ki>Q{260P0V>AB)Pf;0{ literal 0 HcmV?d00001 From 97381a87ba76a3c416ed561db557bd0de2519cfa Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:21:30 -0700 Subject: [PATCH 21/38] Rename IMC (1).png to imc.png --- apps/imc/{IMC (1).png => imc.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/imc/{IMC (1).png => imc.png} (100%) diff --git a/apps/imc/IMC (1).png b/apps/imc/imc.png similarity index 100% rename from apps/imc/IMC (1).png rename to apps/imc/imc.png From 5cb95b118875efb896eb5cbfca72df29afb6c811 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:22:13 -0700 Subject: [PATCH 22/38] Rename apps/imc/imc.png to apps/imc/IMC.png --- apps/{imc/imc.png => IMC.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/{imc/imc.png => IMC.png} (100%) diff --git a/apps/imc/imc.png b/apps/IMC.png similarity index 100% rename from apps/imc/imc.png rename to apps/IMC.png From b894a4009b64dd3a315214d6b9573fe8548a8c21 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:25:32 -0700 Subject: [PATCH 23/38] Rename apps/IMC.png to apps/imc/IMC.png --- apps/{ => imc}/IMC.png | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/{ => imc}/IMC.png (100%) diff --git a/apps/IMC.png b/apps/imc/IMC.png similarity index 100% rename from apps/IMC.png rename to apps/imc/IMC.png From bb8bc03ec47728f3aacedde6b22bf4212e59ad3d Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:26:50 -0700 Subject: [PATCH 24/38] Delete apps/MetricImperialConverter directory --- apps/MetricImperialConverter/ChangeLog | 1 - apps/MetricImperialConverter/IMC.png | Bin 2584 -> 0 bytes apps/MetricImperialConverter/app-icon.js | 1 - apps/MetricImperialConverter/app.js | 190 --------------------- apps/MetricImperialConverter/metadata.json | 14 -- 5 files changed, 206 deletions(-) delete mode 100644 apps/MetricImperialConverter/ChangeLog delete mode 100644 apps/MetricImperialConverter/IMC.png delete mode 100644 apps/MetricImperialConverter/app-icon.js delete mode 100644 apps/MetricImperialConverter/app.js delete mode 100644 apps/MetricImperialConverter/metadata.json diff --git a/apps/MetricImperialConverter/ChangeLog b/apps/MetricImperialConverter/ChangeLog deleted file mode 100644 index 5560f00bc..000000000 --- a/apps/MetricImperialConverter/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -0.01: New App! diff --git a/apps/MetricImperialConverter/IMC.png b/apps/MetricImperialConverter/IMC.png deleted file mode 100644 index 9d1b64012f2b6b93c755c9dcec23496c14d3d986..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2584 zcmbtWdsGwm65fD>D+&h%r3JwVY7os6kR&F7K;&5{LM-pfCRs=zWMi^{fG9bjg0?Dc z1+7(4D-}e+N(ox6pan#&A|lU9-ZU}mJ)Ls9=qQ75GT}nc4^JTsf3IH&x(OsClwPrQ|Fzc2-kZSf?6!R z2ti~F5-BAmg_z<@gyr!h3Y|_Tk*Opqm4G4$ic~2Ast8hr1Il26({pekg+MNrA!1mH z({X})Sc$OkcoW<#H3vcDV*VVvR6zvw9;GgXh!#x(g$fddNY*_T4#%9qGdMzp&YVdS z3T@RJGnPcG&m;ro3W%2~gIM?wNC7M50!YuG3z{YIl0zT@3E5OK)s;Y|5vXJ)>2F86 z9Pa`)st`XRTR^3|IMd=>2|_AuJ;8-S6A(b>I0^xT;vkwcnMNVg_;W-vAs^Cs^HCO8 zsw;K9E1lv(aihD^-euMweu(G6N`XjM3Y$8|`_8AwGD*7bO2jiw(HpZ}nTwcd*$nW# zvHbU=5(?(VBvZ;IdI<;xBuD}!K~h9FB+BfNgaQU4MkLU?5pg8Qha*C@$B=;1cotqo z5JGXFQi9;wet}*%0*>+z#mvStN$*krAEn6N6SPip`u9pFHuM0k!+Ew2)M9XyhzORm zy~R=~E&zt4;&`SG^_L&jxxU-~Q%BJkajvBwJcbICy{CB;#?WgOmh)g(!uA5C$skS$ z3s_u^PYN8zp^MTIaY_XwXKm*ANHU}-Laeg9NHzTQR!xyHamv2jdFbxN1$R6jsja`NF}hlfu@Knr-DKr3_}jhy zZ)0SbeeRSrGR4Vw^y&2~we|p%VbC4sUiSR%UeL{MJ25`CCvC({|X7e7q_Qy|$ z#uulnw__761YDLY%VoRFvQp&GmwLZkdFuQ`M}uQs+6(eMO!{%`>V+SvI=|;a&sv9h zHIJp(d+`TfdumI#leBc!;eL~o%KDEcsg_ON?7O)}-kQbp>&wqH z%QOQg9Y&&fcK+esor#PDw-W`yV{a`+HYz}m!cG0qjzuDi9OVwvakCM+$h~E#(C!ts zf7b&Kc<6OjJGZOm#=xn=7;b5(>QLG^Vjo3}L;sfNQm|NRr4bqxz>wkes{j4FEm zY-I?5%qvziulDibJS&_aYzVnMJjb!@OIN9 z?$!0jsI?`HWg6}L@F8nOQ}PBTHYR(lCjwyqFwv1|TxweowMTAn;gY%fq;YtiDQT2r z{KmzXEFyK|`6CLfn)R7VRaz1U#R9k1WQIsqT!;rv>8<&+` zpa>u3wN+XoXFD^8v2@S)z}JqW_6c{0zRlep#{<@UzWUSM94jk>;I1dDLtEk%^Rg1# zPAa#(b;}IWVAdVz%~jDOt0?Uezza)RulI?5*DE>EN1)`UEQiaxBFKp0xYyR!Q_~K4 zW8W2DOm6A|ytS$Md$Cc?w`~opqeR`{!^bJX(-@bX*&khHA9DCQv9{H^h1CAcofET0 zO*4WFL_?#*5reRE-Wh#AC{25~rkigKUb#vD@7B}3x9blh(^M-x#9tFn#m%Iv(XRD@T!q{EwCrkF% z6gm~GjFnzJLq3wOHDm=;_vFflr`C+v`;`SQ9?fVsY0fVU&|dB>&)09K>8jUOe>4PR TUTu)-Ki>Q{260P0V>AB)Pf;0{ diff --git a/apps/MetricImperialConverter/app-icon.js b/apps/MetricImperialConverter/app-icon.js deleted file mode 100644 index 8a7983daf..000000000 --- a/apps/MetricImperialConverter/app-icon.js +++ /dev/null @@ -1 +0,0 @@ -E.toArryBuffer(atob("lEowMB/4A/8+H+H+h/HAgP4gYEB8HwofHwfg8PzAgXj/4EB4AECwPIAgWJAgeIxAEDzAECxkY8fxAgM4+IED+A2Bx04/EHJIcfQ3YA==")) diff --git a/apps/MetricImperialConverter/app.js b/apps/MetricImperialConverter/app.js deleted file mode 100644 index 0f68f5980..000000000 --- a/apps/MetricImperialConverter/app.js +++ /dev/null @@ -1,190 +0,0 @@ -var Layout = require("Layout"); -var mainmenu = { - "" : { title : "Main Menu" }, // options - "Metric to Imperial" : function() { E.showMenu(MetricToImperial); activateBackButton();}, - "Imperial to Metric" : function() { E.showMenu(ImperialToMetric); activateBackButton();} -}; -//Example Equation: 50 F to C would be written as 5/9(E - 32) -//The E is the number that is inserted -function activateBackButton() -{ - setWatch(function() {E.showMenu(mainmenu);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"}); -} -var MetricToImperial = { - "" : { title : "Select Type", }, - "Weight" : function() { E.showMenu(MetricToImperialWeight); activateBackButton();}, - "Distance" : function() { E.showMenu(MetricToImperialDistance); activateBackButton();}, - "Temperature" : function() { E.showMenu(MetricToImperialTemp); activateBackButton();}, - "Liquid" : function() { E.showMenu(MetricToImperialLiquid); activateBackButton();}, -}; -var MetricToImperialDistance = { - "" : { title : "Select Measurement", }, - "MM-IN" : () => { convertAndPrint("E/25.4", "IN");}, - "CM-IN" : () => { convertAndPrint("E/2.54", "IN");}, - "M-FT" : () => { convertAndPrint("3.2808399*E", "FT");}, - "KM-MI" : () => { convertAndPrint("E/1.609344", "MI");} -}; -var MetricToImperialWeight = { - "" : { title : "Select Measurement", }, - "MG-OZ" : () => { convertAndPrint("E/28349.5231", "OZ");}, - "KG-LB" : () => { convertAndPrint("E*2.20462262", "LB");}, - "MT-US Ton" : () => { convertAndPrint("E*1.1023109950010197", "US TON");}, - "G-OZ" : () => { convertAndPrint("E/28.3495231", "OZ");} -}; -var MetricToImperialLiquid = { - "" : { title : "Select Measurement", }, - "ML-FL OZ" : () => { convertAndPrint("E/29.5735295", "FL OZ");}, - "ML-PT" : () => { convertAndPrint("E*0.002113", "PT");}, - "L-QT" : () => { convertAndPrint("E*1.056688", "QT");}, - "L-GAL" : () => { convertAndPrint("E*0.2641720524", "GAL");}, - "ML-C" : () => { convertAndPrint("E/236.588236", "C");} -}; -var MetricToImperialTemp = { - "" : { title : "Select Measurement", }, - "C-F" : () => { convertAndPrint("(E*1.8)+32", "F");}, - "K-F" : () => { convertAndPrint("((E-273.15)*1.8)+32", "F");} -}; -var ImperialToMetric = { - "" : { title : "Select Type", }, - "Weight" : function() { E.showMenu(ImperialToMetricWeight); activateBackButton();}, - "Distance" : function() { E.showMenu(ImperialToMetricDistance); activateBackButton();}, - "Temperature" : function() { E.showMenu(ImperialToMetricTemp); activateBackButton();}, - "Liquid" : function() { E.showMenu(ImperialToMetricLiquid); activateBackButton();}, -}; -var ImperialToMetricDistance = { - "" : { title : "Select Measurement", }, - "IN-MM" : () => { convertAndPrint("E*25.4", "MM");}, - "IN-CM" : () => { convertAndPrint("E*2.54", "MM");}, - "FT-M" : () => { convertAndPrint("E/3.2808399", "M");}, - "MI-KM" : () => { convertAndPrint("E*1.609344", "KM");} -}; -var ImperialToMetricWeight = { - "" : { title : "Select Measurement", }, - "OZ-MG" : () => { convertAndPrint("E*28349.5231", "MG");}, - "LB-KG" : () => { convertAndPrint("E/2.20462262", "KG");}, - "US Ton-MT" : () => { convertAndPrint("E/1.1023109950010197", "MT");}, - "OZ-G" : () => { convertAndPrint("E*28.3495231", "G");} -}; -var ImperialToMetricLiquid = { - "" : { title : "Select Measurement", }, - "FL OZ-ML" : () => { convertAndPrint("E*29.5735295", "ML");}, - "PT-ML" : () => { convertAndPrint("E/0.002113", "ML");}, - "QT-L" : () => { convertAndPrint("E/1.056688", "L");}, - "GAL-L" : () => { convertAndPrint("E/0.2641720524", "L");}, - "C-ML" : () => { convertAndPrint("E*236.588236", "ML");} -}; -var ImperialToMetricTemp = { - "" : { title : "Select Measurement", }, - "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, - "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} -}; -E.showMenu(mainmenu); -function convertAndPrint(equation, endText) -{ - E.showMenu(); - g.clear(); - showNumpad().then((number) => { - g.clear(); - equation = equation.replace("E", number); - var textToWrite = ""; - var layout = new Layout({}); - if (equation.includes(".")) - { - console.log(eval(equation).toString().split(".")[1].length); - if(eval(equation).toString().split(".")[1].length < 3) - { - console.log("decimal but no need for round"); - textToWrite = eval(equation); - textToWrite = textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - else - { - console.log("decimal rounded"); - textToWrite = Math.round(eval(equation) * 1000) / 1000; - textToWrite = "ABT " + textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - } - else - { - console.log("no decimal"); - textToWrite = eval(equation); - textToWrite = textToWrite + " " + endText; - layout = new Layout({ - type: "txt", - font: "Vector:20", - label: textToWrite - }); - layout.render(); - } - activateBackButton(); - }); - -} -function showNumpad() { - return new Promise((resolve, reject) => { - let number = ''; - E.showMenu(); - function addDigit(digit) { - if(digit == "." && !number.includes(".")) - { - number += digit; - Bangle.buzz(20); - update(); - } - else if(digit != ".") - { - number += digit; - Bangle.buzz(20); - update(); - } - else - { - console.log("Already includes ."); - } - } - function removeDigit() { - number = number.slice(0, -1); - Bangle.buzz(20); - update(); - } - function update() { - g.reset(); - g.clearRect(0,0,g.getWidth(),23); - g.setFont("Vector:24").setFontAlign(1,0).drawString(number, g.getWidth(),12); - console.log(number.length); - if(number.length > 0){setWatch(function() {resolve(number);}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:false, edge:"falling"});} - } - const ds="12%"; - const digitBtn = (digit) => ({type:"btn", font:ds, width:58, label:digit, cb:l=>{addDigit(digit);}}); - var numPad = new Layout ({ - type:"v", c: [{ - type:"v", c: [ - {type:"", height:24}, - {type:"h",filly:1, c: [digitBtn("1"), digitBtn("2"), digitBtn("3")]}, - {type:"h",filly:1, c: [digitBtn("4"), digitBtn("5"), digitBtn("6")]}, - {type:"h",filly:1, c: [digitBtn("7"), digitBtn("8"), digitBtn("9")]}, - {type:"h",filly:1, c: [ - {type:"btn", font:ds, width:58, label:"<", cb: removeDigit}, - digitBtn('0'), - {type:"btn", font:ds, width:58, id:".", label:".", cb: l => addDigit(".")} - ]} - ]} - ], lazy:true}); - g.clear(); - numPad.render(); - update(); - - }); -} diff --git a/apps/MetricImperialConverter/metadata.json b/apps/MetricImperialConverter/metadata.json deleted file mode 100644 index a50aabffa..000000000 --- a/apps/MetricImperialConverter/metadata.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "id": "MetricImperialConverter", - "name": "Metric to Imperial Converter", - "shortName":"IMC", - "icon": "IMC.png", - "version":"0.01", - "allow_emulator": true, - "description": "A tool for converting measurements", - "tags": "", - "supports": ["BANGLEJS2"], - "storage": [ - {"name":"IMC.app.js","url":"app.js"}, - {"name":"IMC.img","url":"app-icon.js","evaluate":true} - ] -} From 29aebf966dcdbe0cb5eb94559f90b76b8e998045 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:30:12 -0700 Subject: [PATCH 25/38] Update metadata.json --- apps/imc/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json index 2d2ab1b50..3969a647c 100644 --- a/apps/imc/metadata.json +++ b/apps/imc/metadata.json @@ -5,7 +5,7 @@ "version":"0.01", "allow_emulator": true, "description": "A tool for converting metric and imperial measurements", - "tags": "game", + "tags": "tool", "supports": ["BANGLEJS2"], "storage": [ {"name":"imc.app.js","url":"app.js"}, From 5c8c3e0cd95195d5fb1d4055da9dace9a88a28d5 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:33:22 -0700 Subject: [PATCH 26/38] Create ChangeLog --- apps/imc/ChangeLog | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/imc/ChangeLog diff --git a/apps/imc/ChangeLog b/apps/imc/ChangeLog new file mode 100644 index 000000000..972543ac6 --- /dev/null +++ b/apps/imc/ChangeLog @@ -0,0 +1 @@ +0.01 new app! From 0729b4a403a52d5e1be6942257a49feba25c8e28 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:34:33 -0700 Subject: [PATCH 27/38] Update ChangeLog --- apps/imc/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/imc/ChangeLog b/apps/imc/ChangeLog index 972543ac6..5560f00bc 100644 --- a/apps/imc/ChangeLog +++ b/apps/imc/ChangeLog @@ -1 +1 @@ -0.01 new app! +0.01: New App! From a86858e81a8bd739c9b14fa6972b532decb76634 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:38:48 -0700 Subject: [PATCH 28/38] Create README.md --- apps/imc/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/imc/README.md diff --git a/apps/imc/README.md b/apps/imc/README.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/apps/imc/README.md @@ -0,0 +1 @@ + From 4061a78bc496c91ecbbda51a5772667de8be7bbd Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:39:17 -0700 Subject: [PATCH 29/38] Update metadata.json --- apps/imc/metadata.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json index 3969a647c..1a59a453b 100644 --- a/apps/imc/metadata.json +++ b/apps/imc/metadata.json @@ -5,6 +5,7 @@ "version":"0.01", "allow_emulator": true, "description": "A tool for converting metric and imperial measurements", + "readme": "README.md", "tags": "tool", "supports": ["BANGLEJS2"], "storage": [ From 4242c1417f89a7908f75a34b4f740fd7fe915696 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:46:42 -0700 Subject: [PATCH 30/38] Update README.md --- apps/imc/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/imc/README.md b/apps/imc/README.md index 8b1378917..619c06787 100644 --- a/apps/imc/README.md +++ b/apps/imc/README.md @@ -1 +1,11 @@ +*Imperial Metric Converter +A simple app for converting metric to imperial and imperial to metric. + +*Controls + +Scroll through the menus and select the measurement you want to convert, choose it, and then type in the number you want to convert. +Click the button (on the side of the watch) to confirm and then click it again if you want to go back to the main menu + +Credit to the contacts app for the keypad, I took some (very) heavy inspiration from that +Also if anyone notices that one of the equations are wrong (at least one probably is) then either just change it or let me know, its very easy to change the equations when editing the code. From bb6b59179dd08935064768e5768cb5deab7abc30 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:47:20 -0700 Subject: [PATCH 31/38] Update README.md --- apps/imc/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/imc/README.md b/apps/imc/README.md index 619c06787..b72da6493 100644 --- a/apps/imc/README.md +++ b/apps/imc/README.md @@ -1,8 +1,8 @@ -*Imperial Metric Converter +# Imperial Metric Converter A simple app for converting metric to imperial and imperial to metric. -*Controls +## Controls Scroll through the menus and select the measurement you want to convert, choose it, and then type in the number you want to convert. Click the button (on the side of the watch) to confirm and then click it again if you want to go back to the main menu From 50d433b88620813d6fe30b76ff0859e669ece532 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:47:48 -0700 Subject: [PATCH 32/38] Update README.md --- apps/imc/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/imc/README.md b/apps/imc/README.md index b72da6493..2c6d01d7d 100644 --- a/apps/imc/README.md +++ b/apps/imc/README.md @@ -7,5 +7,6 @@ A simple app for converting metric to imperial and imperial to metric. Scroll through the menus and select the measurement you want to convert, choose it, and then type in the number you want to convert. Click the button (on the side of the watch) to confirm and then click it again if you want to go back to the main menu +## Other stuff Credit to the contacts app for the keypad, I took some (very) heavy inspiration from that Also if anyone notices that one of the equations are wrong (at least one probably is) then either just change it or let me know, its very easy to change the equations when editing the code. From 725096d66bc8b373ad06edfdea02374e5f3c6386 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:48:25 -0700 Subject: [PATCH 33/38] Update README.md --- apps/imc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/imc/README.md b/apps/imc/README.md index 2c6d01d7d..68d849fab 100644 --- a/apps/imc/README.md +++ b/apps/imc/README.md @@ -1,6 +1,6 @@ # Imperial Metric Converter -A simple app for converting metric to imperial and imperial to metric. +A simple app for converting measurements from metric to imperial and imperial to metric. ## Controls From e009a32d25403e4cc5c348da433454b2fc82279f Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:50:05 -0700 Subject: [PATCH 34/38] Update metadata.json --- apps/imc/metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json index 1a59a453b..3969a647c 100644 --- a/apps/imc/metadata.json +++ b/apps/imc/metadata.json @@ -5,7 +5,6 @@ "version":"0.01", "allow_emulator": true, "description": "A tool for converting metric and imperial measurements", - "readme": "README.md", "tags": "tool", "supports": ["BANGLEJS2"], "storage": [ From 0e0d9abcd267174a8e5dd0f54b312decf9956a0c Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:51:28 -0700 Subject: [PATCH 35/38] Update metadata.json --- apps/imc/metadata.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json index 3969a647c..7e1b8e8bc 100644 --- a/apps/imc/metadata.json +++ b/apps/imc/metadata.json @@ -5,6 +5,8 @@ "version":"0.01", "allow_emulator": true, "description": "A tool for converting metric and imperial measurements", + "readme": "README.md", + "interface": "interface.html", "tags": "tool", "supports": ["BANGLEJS2"], "storage": [ From 45ff75c7a508f7aedb911ff8f2a85785490535e2 Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:53:27 -0700 Subject: [PATCH 36/38] Update metadata.json --- apps/imc/metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/imc/metadata.json b/apps/imc/metadata.json index 7e1b8e8bc..1a59a453b 100644 --- a/apps/imc/metadata.json +++ b/apps/imc/metadata.json @@ -6,7 +6,6 @@ "allow_emulator": true, "description": "A tool for converting metric and imperial measurements", "readme": "README.md", - "interface": "interface.html", "tags": "tool", "supports": ["BANGLEJS2"], "storage": [ From e1807b11b80cebc09318577a1c159c92148b18ff Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:59:08 -0700 Subject: [PATCH 37/38] Update README.md --- apps/imc/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/imc/README.md b/apps/imc/README.md index 68d849fab..207720a19 100644 --- a/apps/imc/README.md +++ b/apps/imc/README.md @@ -5,8 +5,10 @@ A simple app for converting measurements from metric to imperial and imperial to ## Controls Scroll through the menus and select the measurement you want to convert, choose it, and then type in the number you want to convert. + Click the button (on the side of the watch) to confirm and then click it again if you want to go back to the main menu ## Other stuff Credit to the contacts app for the keypad, I took some (very) heavy inspiration from that + Also if anyone notices that one of the equations are wrong (at least one probably is) then either just change it or let me know, its very easy to change the equations when editing the code. From 2b0ddf68781f9b0f99ce7a97ca1a646e89552fea Mon Sep 17 00:00:00 2001 From: AwesomeMeeps <151784194+only-meeps@users.noreply.github.com> Date: Wed, 20 Aug 2025 12:29:57 -0700 Subject: [PATCH 38/38] Update app.js --- apps/imc/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/imc/app.js b/apps/imc/app.js index 0f68f5980..090c89ed5 100644 --- a/apps/imc/app.js +++ b/apps/imc/app.js @@ -75,8 +75,8 @@ var ImperialToMetricLiquid = { }; var ImperialToMetricTemp = { "" : { title : "Select Measurement", }, - "F-C" : () => { convertAndPrint("(E-32)/1.8", "F");}, - "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "F");} + "F-C" : () => { convertAndPrint("(E-32)/1.8", "C");}, + "F-K" : () => { convertAndPrint("((E-32)/1.8)+273.15", "K");} }; E.showMenu(mainmenu); function convertAndPrint(equation, endText)