diff --git a/apps/tempmonitor/tempmonitor.app.js b/apps/tempmonitor/tempmonitor.app.js index c3af4bf7b..62a4fee67 100644 --- a/apps/tempmonitor/tempmonitor.app.js +++ b/apps/tempmonitor/tempmonitor.app.js @@ -8,7 +8,7 @@ var rect = Bangle.appRect; var history = []; var readFreq=5000; //ms //PEND add to settings var saveFreq=60000; //ms 1min -var v_saveToFile='Y'; //Y save //N +var v_saveToFile= new Boolean(true); //true save //false //with upload file º is not displayed properly //with upload RAM º is displayed var v_t_symbol="";//ºC @@ -69,7 +69,7 @@ function saveToFile() { strlastSaveTime=a.toISOString(); //strlastSaveTime=strlastSaveTime.concat(a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes());; if (v_mode_debug==1) console.log("saving="+strlastSaveTime+";"+a.getHours()+":"+a.getMinutes()+";"+lastMeasure); - if (v_saveToFile=='Y'){ + if (v_saveToFile==true){ //write(strlastSaveTime+";"+ require("Storage").open(filename,"a").write((a.getMonth()+1)+";"+a.getDate()+";"+a.getHours()+":"+a.getMinutes()+";"+lastMeasure+"\n"); //(getTime()+","); @@ -127,7 +127,7 @@ setInterval(function() { drawTemperature(); }, readFreq); //ms -if (v_saveToFile=="Y") { +if (v_saveToFile==true) { setInterval(function() { saveToFile(); }, saveFreq); //ms diff --git a/apps/widclkbttm/README.md b/apps/widclkbttm/README.md index 5e386a757..a8379e288 100644 --- a/apps/widclkbttm/README.md +++ b/apps/widclkbttm/README.md @@ -1,5 +1,9 @@ # Digital clock widget (bottom widget area) -This very basic widget clock allows to test the unfrequently used widget bottom area. +This very basic widget clock shows time inside apps that respect the bottom widget area, also allows to test this unfrequently used area. + +Note that it will not be displayed when a clock app is been shown + +Compatible with BangleJS1,BangleJS2,and EMSCRIPTENx emulators forked from https://github.com/espruino/BangleApps/tree/master/apps/widclk @@ -10,14 +14,17 @@ Example of usage ![](widTextBottom_ss1.jpg) +Screenshot emulator bangle.js2 + +![](ss_bjs2.jpg) + ## Usage Upload the widget file -Open an app that supports displaying widgets - +Open an app (not a clock/watchface) that supports displaying widgets (included the bottom one) @@ -25,4 +32,4 @@ Open an app that supports displaying widgets This app is so basic that probably the easiest is to just edit the code ;) -Otherwise you can contact me [here](https://github.com/dapgo) \ No newline at end of file +Otherwise you can contact me [here](https://github.com/dapgo/my_espruino_smartwatch_things) \ No newline at end of file diff --git a/apps/widclkbttm/metadata.json b/apps/widclkbttm/metadata.json index 2bcd6bc58..4b14ef9c6 100644 --- a/apps/widclkbttm/metadata.json +++ b/apps/widclkbttm/metadata.json @@ -3,11 +3,12 @@ "name": "Digital clock (Bottom) widget", "shortName": "Digital clock Bottom Widget", "version": "0.05", - "description": "Displays time in the bottom of the screen (may not be compatible with some apps)", + "description": "Displays time HH:mm in the bottom of the screen (may not be compatible with some apps)", "icon": "widclkbttm.png", "type": "widget", "tags": "widget", "supports": ["BANGLEJS","BANGLEJS2"], + "screenshots": [{"url":"ss_bjs1.png"}], "readme": "README.md", "storage": [ {"name":"widclkbttm.wid.js","url":"widclkbttm.wid.js"} diff --git a/apps/widclkbttm/ss_bjs1.png b/apps/widclkbttm/ss_bjs1.png new file mode 100644 index 000000000..b1b2f553a Binary files /dev/null and b/apps/widclkbttm/ss_bjs1.png differ diff --git a/apps/widclkbttm/ss_bjs2.png b/apps/widclkbttm/ss_bjs2.png new file mode 100644 index 000000000..a7c557c53 Binary files /dev/null and b/apps/widclkbttm/ss_bjs2.png differ diff --git a/apps/widclkbttm/widclkbttm.wid.js b/apps/widclkbttm/widclkbttm.wid.js index 2278b5380..879274b8c 100644 --- a/apps/widclkbttm/widclkbttm.wid.js +++ b/apps/widclkbttm/widclkbttm.wid.js @@ -1,6 +1,11 @@ WIDGETS["wdclkbttm"]={area:"br",width:Bangle.CLOCK?0:60,draw:function() { + console.log("clock? "+Bangle.CLOCK); + if (Bangle.CLOCK){ + console.log("clock and return"); + return; + }; if (!Bangle.CLOCK == !this.width) { // if we're the wrong size for if we have a clock or not... - this.width = Bangle.CLOCK?0:60; + this.width = Bangle.CLOCK?0:60; return setTimeout(Bangle.drawWidgets,1); // widget changed size - redraw } if (!this.width) return; // if size not right, return