diff --git a/apps/.eslintrc.js b/apps/.eslintrc.js index 6ff8f8dc8..9bff7882e 100644 --- a/apps/.eslintrc.js +++ b/apps/.eslintrc.js @@ -4,6 +4,7 @@ module.exports = { "env": { // TODO: "espruino": false // TODO: "banglejs": false + // For a prototype of the above, see https://github.com/espruino/BangleApps/pull/3237 }, "extends": "eslint:recommended", "globals": { @@ -25,10 +26,8 @@ module.exports = { "Flash": "readonly", "Float32Array": "readonly", "Float64Array": "readonly", - "fs": "readonly", "Function": "readonly", "Graphics": "readonly", - "heatshrink": "readonly", "I2C": "readonly", "Int16Array": "readonly", "Int32Array": "readonly", @@ -48,11 +47,9 @@ module.exports = { "RegExp": "readonly", "Serial": "readonly", "SPI": "readonly", - "Storage": "readonly", "StorageFile": "readonly", "String": "readonly", "SyntaxError": "readonly", - "tensorflow": "readonly", "TFMicroInterpreter": "readonly", "TypeError": "readonly", "Uint16Array": "readonly", @@ -60,8 +57,10 @@ module.exports = { "Uint32Array": "readonly", "Uint8Array": "readonly", "Uint8ClampedArray": "readonly", + "Unistroke": "readonly", "Waveform": "readonly", // Methods and Fields at https://banglejs.com/reference + "__FILE__": "readonly", "analogRead": "readonly", "analogWrite": "readonly", "arguments": "readonly", @@ -131,7 +130,41 @@ module.exports = { "VIBRATE": "readonly", // Aliases and not defined at https://banglejs.com/reference "g": "readonly", - "WIDGETS": "readonly" + "WIDGETS": "readonly", + "module": "readonly", + "exports": "writable", + "D0": "readonly", + "D1": "readonly", + "D2": "readonly", + "D3": "readonly", + "D4": "readonly", + "D5": "readonly", + "D6": "readonly", + "D7": "readonly", + "D8": "readonly", + "D9": "readonly", + "D10": "readonly", + "D11": "readonly", + "D12": "readonly", + "D13": "readonly", + "D14": "readonly", + "D15": "readonly", + "D16": "readonly", + "D17": "readonly", + "D18": "readonly", + "D19": "readonly", + "D20": "readonly", + "D21": "readonly", + "D22": "readonly", + "D23": "readonly", + "D24": "readonly", + "D25": "readonly", + "D26": "readonly", + "D27": "readonly", + "D28": "readonly", + "D29": "readonly", + "D30": "readonly", + "D31": "readonly" }, "parserOptions": { "ecmaVersion": 11 @@ -154,8 +187,7 @@ module.exports = { "no-unreachable": "warn", "no-cond-assign": "warn", "no-useless-catch": "warn", - // TODO: "no-undef": "warn", - "no-undef": "off", + "no-undef": "warn", "no-unused-vars": ["warn", { "args": "none" } ], "no-useless-escape": "off", "no-control-regex" : "off" diff --git a/apps/1button/ChangeLog b/apps/1button/ChangeLog index 4c21f3ace..f49841cf1 100644 --- a/apps/1button/ChangeLog +++ b/apps/1button/ChangeLog @@ -1 +1,2 @@ 0.01: New Widget! +0.02: Minor code improvements diff --git a/apps/1button/metadata.json b/apps/1button/metadata.json index 6cfcb9310..917e5d8f7 100644 --- a/apps/1button/metadata.json +++ b/apps/1button/metadata.json @@ -1,7 +1,7 @@ { "id": "1button", "name": "One-Button-Tracker", - "version": "0.01", + "version": "0.02", "description": "A widget that turns BTN1 into a tracker, records time of button press/release.", "icon": "widget.png", "type": "widget", diff --git a/apps/1button/widget.js b/apps/1button/widget.js index cce099309..414d3e29f 100644 --- a/apps/1button/widget.js +++ b/apps/1button/widget.js @@ -22,7 +22,7 @@ console.log("Button let go"); digitalWrite(LED2,0); var unpress_time = new Date(); - recFile = require("Storage").open("one_button_presses.csv","a"); + const recFile = require("Storage").open("one_button_presses.csv","a"); recFile.write([press_time.getTime(),unpress_time.getTime()].join(",")+"\n"); }, BTN1, { repeat: true, edge: 'falling', debounce: 50 }); diff --git a/apps/acmaze/ChangeLog b/apps/acmaze/ChangeLog index 085de3be3..8a19442ef 100644 --- a/apps/acmaze/ChangeLog +++ b/apps/acmaze/ChangeLog @@ -2,3 +2,4 @@ 0.02: Faster maze generation 0.03: Avoid clearing bottom widgets 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/acmaze/app.js b/apps/acmaze/app.js index fba317aea..c3157f087 100644 --- a/apps/acmaze/app.js +++ b/apps/acmaze/app.js @@ -206,7 +206,7 @@ function Maze(n) { return false; }; this.tick = function() { - accel = Bangle.getAccel(); + let accel = Bangle.getAccel(); if (this.ball_x%this.wall_length) { this.try_move_horizontally(accel.x); } else if (this.ball_y%this.wall_length) { diff --git a/apps/acmaze/metadata.json b/apps/acmaze/metadata.json index 974e882f1..ad6ca04b7 100644 --- a/apps/acmaze/metadata.json +++ b/apps/acmaze/metadata.json @@ -1,7 +1,7 @@ { "id": "acmaze", "name": "AccelaMaze", "shortName":"AccelaMaze", - "version": "0.04", + "version": "0.05", "description": "Tilt the watch to roll a ball through a maze.", "icon": "app.png", "tags": "game", diff --git a/apps/activepedom/ChangeLog b/apps/activepedom/ChangeLog index 58d9bfc5f..b26277cdb 100644 --- a/apps/activepedom/ChangeLog +++ b/apps/activepedom/ChangeLog @@ -8,3 +8,4 @@ 0.08: Fixed zero steps issue caused by 0.07 0.09: Prettied up user interface, decluttered graphs 0.10: Minor code improvements +0.11: Minor code improvements diff --git a/apps/activepedom/metadata.json b/apps/activepedom/metadata.json index 114e95b16..dc0d3370e 100644 --- a/apps/activepedom/metadata.json +++ b/apps/activepedom/metadata.json @@ -2,7 +2,7 @@ "id": "activepedom", "name": "Active Pedometer", "shortName": "Active Pedometer", - "version": "0.10", + "version": "0.11", "description": "(NOT RECOMMENDED) Pedometer that filters out arm movement and displays a step goal progress. Steps are saved to a daily file and can be viewed as graph. The `Health` app now provides step logging and graphs.", "icon": "app.png", "tags": "outdoors,widget", diff --git a/apps/activepedom/widget.js b/apps/activepedom/widget.js index 638449288..3288b5ae4 100644 --- a/apps/activepedom/widget.js +++ b/apps/activepedom/widget.js @@ -32,10 +32,10 @@ } function storeData() { - now = new Date(); - month = now.getMonth() + 1; //month is 0-based + let now = new Date(); + let month = now.getMonth() + 1; //month is 0-based if (month < 10) month = "0" + month; //leading 0 - filename = filename = "activepedom" + now.getFullYear() + month + now.getDate() + ".data"; //new file for each day + let filename = "activepedom" + now.getFullYear() + month + now.getDate() + ".data"; //new file for each day dataFile = s.open(filename,"a"); if (dataFile) { //check if filen already exists if (dataFile.getLength() == 0) { @@ -222,16 +222,17 @@ if (on) WIDGETS["activepedom"].draw(); }); - //Read data from file and set variables - let pedomData = s.readJSON(PEDOMFILE,1); - if (pedomData) { - if (pedomData.lastUpdate) lastUpdate = new Date(pedomData.lastUpdate); - stepsCounted = pedomData.stepsToday|0; - stepsTooShort = pedomData.stepsTooShort; - stepsTooLong = pedomData.stepsTooLong; - stepsOutsideTime = pedomData.stepsOutsideTime; + // Read data from file and set variables + { // new scope ensures pedomData gets freed + let pedomData = s.readJSON(PEDOMFILE,1); + if (pedomData) { + if (pedomData.lastUpdate) lastUpdate = new Date(pedomData.lastUpdate); + stepsCounted = pedomData.stepsToday|0; + stepsTooShort = pedomData.stepsTooShort; + stepsTooLong = pedomData.stepsTooLong; + stepsOutsideTime = pedomData.stepsOutsideTime; + } } - pedomdata = 0; //reset pedomdata to save memory setStepSensitivity(setting('stepSensitivity')); //set step sensitivity (80 is standard, 400 is muss less sensitive) /*timerStoreData =*/ setInterval(storeData, storeDataInterval); //store data regularly diff --git a/apps/antonclkplus/ChangeLog b/apps/antonclkplus/ChangeLog index 3b0a3d8b8..fc099a165 100644 --- a/apps/antonclkplus/ChangeLog +++ b/apps/antonclkplus/ChangeLog @@ -13,3 +13,4 @@ 0.09: Use default Bangle formatter for booleans 0.10: Use Bangle.setUI({remove:...}) to allow loading the launcher without a full reset on 2v16 Modified to avoid leaving functions defined when using setUI({remove:...}) +0.11: Minor code improvements diff --git a/apps/antonclkplus/app.js b/apps/antonclkplus/app.js index 409d7d487..4e5128a4e 100644 --- a/apps/antonclkplus/app.js +++ b/apps/antonclkplus/app.js @@ -107,7 +107,7 @@ let isoStr = function(date) { let calWeekBuffer = [false,false,false]; //buffer tz, date, week no (once calculated until other tz or date is requested) let ISO8601calWeek = function(date) { //copied from: https://gist.github.com/IamSilviu/5899269#gistcomment-3035480 - dateNoTime = date; dateNoTime.setHours(0,0,0,0); + const dateNoTime = date; dateNoTime.setHours(0,0,0,0); if (calWeekBuffer[0] === date.getTimezoneOffset() && calWeekBuffer[1] === dateNoTime) return calWeekBuffer[2]; calWeekBuffer[0] = date.getTimezoneOffset(); calWeekBuffer[1] = dateNoTime; diff --git a/apps/antonclkplus/metadata.json b/apps/antonclkplus/metadata.json index 05c59a4fb..75f0b7cd6 100644 --- a/apps/antonclkplus/metadata.json +++ b/apps/antonclkplus/metadata.json @@ -2,7 +2,7 @@ "id": "antonclkplus", "name": "Anton Clock Plus", "shortName": "Anton Clock+", - "version": "0.10", + "version": "0.11", "description": "A clock using the bold Anton font, optionally showing seconds and date in ISO-8601 format.", "readme":"README.md", "icon": "app.png", diff --git a/apps/aptsciclk/ChangeLog b/apps/aptsciclk/ChangeLog index 19e7c9469..5483b3fb4 100644 --- a/apps/aptsciclk/ChangeLog +++ b/apps/aptsciclk/ChangeLog @@ -7,3 +7,4 @@ 0.07: Added potato GLaDOS and quote functionality when you tap her 0.08: Fixed drawing issues with the quotes and added more 0.09: Minor code improvements +0.10: Minor code improvements diff --git a/apps/aptsciclk/app.js b/apps/aptsciclk/app.js index f32a52870..311a8cd77 100644 --- a/apps/aptsciclk/app.js +++ b/apps/aptsciclk/app.js @@ -136,6 +136,7 @@ else if (img == "apetureLaboratoriesLight"){ function drawStart(){ g.clear(); g.reset(); + let apSciLab; if (g.theme.dark){apSciLab = getImg("apetureLaboratories");} else {apSciLab = getImg("apetureLaboratoriesLight");} g.drawImage(apSciLab, xyCenter-apSciLab.width/2, xyCenter-apSciLab.height/2); @@ -241,7 +242,7 @@ function buttonPressed(){ if (curWarning < maxWarning) curWarning += 1; else curWarning = 0; g.reset(); - buttonImg = getImg("butPress"); + const buttonImg = getImg("butPress"); g.drawImage(buttonImg, 0, 0); warningImg = getImg("w"+String(curWarning)); @@ -251,7 +252,7 @@ function buttonPressed(){ } function buttonUnpressed(){ if (!pause){ - buttonImg = getImg("butUnpress"); + const buttonImg = getImg("butUnpress"); g.drawImage(buttonImg, 0, 0); } else{ @@ -277,11 +278,12 @@ function draw() { g.reset(); // default draw styles //draw watchface + let apSciWatch; if (g.theme.dark){apSciWatch = getImg("apetureWatch");} else {apSciWatch = getImg("apetureWatchLight");} g.drawImage(apSciWatch, xyCenter-apSciWatch.width/2, xyCenter-apSciWatch.height/2); - potato = getImg("potato"); + const potato = getImg("potato"); g.drawImage(potato, 118, 118); g.drawImage(warningImg, 1, g.getWidth()-61);//update warning diff --git a/apps/aptsciclk/metadata.json b/apps/aptsciclk/metadata.json index edc9704d2..d4f1c2c49 100644 --- a/apps/aptsciclk/metadata.json +++ b/apps/aptsciclk/metadata.json @@ -2,7 +2,7 @@ "id": "aptsciclk", "name": "Apeture Science Clock", "shortName":"AptSci Clock", - "version": "0.09", + "version": "0.10", "description": "A clock based on the portal series", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], diff --git a/apps/astrocalc/ChangeLog b/apps/astrocalc/ChangeLog index 2831b2721..ee9c7bbe4 100644 --- a/apps/astrocalc/ChangeLog +++ b/apps/astrocalc/ChangeLog @@ -5,3 +5,4 @@ 0.05: Enable widgets 0.06: Fix azimuth (bug #2651), only show degrees 0.07: Minor code improvements +0.08: Minor code improvements diff --git a/apps/astrocalc/astrocalc-app.js b/apps/astrocalc/astrocalc-app.js index 293cd9386..cd1965290 100644 --- a/apps/astrocalc/astrocalc-app.js +++ b/apps/astrocalc/astrocalc-app.js @@ -23,7 +23,7 @@ function drawMoon(phase, x, y) { "waning-crescent", ]; - img = require("Storage").read(`${moonImgFiles[phase]}.img`); + const img = require("Storage").read(`${moonImgFiles[phase]}.img`); // image width & height = 92px g.drawImage(img, x - parseInt(92 / 2), y); } diff --git a/apps/astrocalc/metadata.json b/apps/astrocalc/metadata.json index 4b9d1c8a0..a43534325 100644 --- a/apps/astrocalc/metadata.json +++ b/apps/astrocalc/metadata.json @@ -1,7 +1,7 @@ { "id": "astrocalc", "name": "Astrocalc", - "version": "0.07", + "version": "0.08", "description": "Calculates interesting information on the sun like sunset and sunrise and moon cycles for the current day based on your location from MyLocation app", "icon": "astrocalc.png", "tags": "app,sun,moon,cycles,tool,outdoors", diff --git a/apps/awairmonitor/ChangeLog b/apps/awairmonitor/ChangeLog index 71d6399c4..17417e79b 100644 --- a/apps/awairmonitor/ChangeLog +++ b/apps/awairmonitor/ChangeLog @@ -1,3 +1,4 @@ 0.01: Beta version for Bangle 2 paired with Chrome (2021/12/11) 0.02: The app is now a clock, the data is greyed after the connection is lost (2021/12/22) 0.03: Set the Awair's IP directly on the webpage (2021/12/27) +0.04: Minor code improvements diff --git a/apps/awairmonitor/app.js b/apps/awairmonitor/app.js index 9123a9c2c..ef2f33a9e 100644 --- a/apps/awairmonitor/app.js +++ b/apps/awairmonitor/app.js @@ -80,7 +80,7 @@ function draw() { g.drawString(""+bt_current_humi, 123, 110); g.drawString(""+bt_current_temp, 158, 110); - for (i = 0; i < 10; i++) { + for (let i = 0; i < 10; i++) { if (display_frozen) { g.setColor("#888"); } // max height = 32 diff --git a/apps/awairmonitor/metadata.json b/apps/awairmonitor/metadata.json index a58175b1b..dd59b4965 100644 --- a/apps/awairmonitor/metadata.json +++ b/apps/awairmonitor/metadata.json @@ -4,7 +4,7 @@ "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], "allow_emulator": true, - "version":"0.03", + "version": "0.04", "description": "Displays the level of CO2, VOC, PM 2.5, Humidity and Temperature, from your Awair device.", "type": "clock", "tags": "clock,tool,health", diff --git a/apps/balltastic/ChangeLog b/apps/balltastic/ChangeLog index 6ed48b5df..c3411c031 100644 --- a/apps/balltastic/ChangeLog +++ b/apps/balltastic/ChangeLog @@ -1,3 +1,4 @@ 0.01: Initial version of Balltastic released! Happy! 0.02: Set LCD timeout for Espruino 2v10 compatibility 0.03: Now also works on Bangle.js 2 +0.04: Minor code improvements diff --git a/apps/balltastic/app.js b/apps/balltastic/app.js index d0262c3cb..d9241591e 100644 --- a/apps/balltastic/app.js +++ b/apps/balltastic/app.js @@ -1,4 +1,4 @@ -BANGLEJS2 = process.env.HWVERSION==2; +const BANGLEJS2 = process.env.HWVERSION==2; Bangle.setLCDBrightness(1); if (!BANGLEJS2) Bangle.setLCDMode("doublebuffered"); Bangle.setLCDTimeout(0); diff --git a/apps/balltastic/metadata.json b/apps/balltastic/metadata.json index 09e265829..19ec3f901 100644 --- a/apps/balltastic/metadata.json +++ b/apps/balltastic/metadata.json @@ -1,7 +1,7 @@ { "id": "balltastic", "name": "Balltastic", - "version": "0.03", + "version": "0.04", "description": "Simple but fun ball eats dots game.", "icon": "app.png", "screenshots": [{"url":"bangle2-balltastic-screenshot.png"}], diff --git a/apps/banglexercise/ChangeLog b/apps/banglexercise/ChangeLog index 362c24378..06c4adf1b 100644 --- a/apps/banglexercise/ChangeLog +++ b/apps/banglexercise/ChangeLog @@ -4,3 +4,4 @@ Clean up code 0.03: Add software back button on main menu 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/banglexercise/app.js b/apps/banglexercise/app.js index c29671258..f4addc05a 100644 --- a/apps/banglexercise/app.js +++ b/apps/banglexercise/app.js @@ -148,7 +148,7 @@ function accelHandler(accel) { // slope for Z if (exerciseType.useZaxis) { - l = historyAvgZ.length; + let l = historyAvgZ.length; if (l > 1) { const p1 = historyAvgZ[l - 2]; const p2 = historyAvgZ[l - 1]; diff --git a/apps/banglexercise/metadata.json b/apps/banglexercise/metadata.json index 2638eb195..b2f8e39ea 100644 --- a/apps/banglexercise/metadata.json +++ b/apps/banglexercise/metadata.json @@ -1,7 +1,7 @@ { "id": "banglexercise", "name": "BanglExercise", "shortName":"BanglExercise", - "version": "0.04", + "version": "0.05", "description": "Can automatically track exercises while wearing the Bangle.js watch.", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], diff --git a/apps/batchart/ChangeLog b/apps/batchart/ChangeLog index af80ff046..21ee5c3e7 100644 --- a/apps/batchart/ChangeLog +++ b/apps/batchart/ChangeLog @@ -11,3 +11,4 @@ 0.11: Initial port to the BangleJS2 0.12: Remove debug log 0.13: Minor code improvements +0.14: Minor code improvements diff --git a/apps/batchart/app.js b/apps/batchart/app.js index c25617365..b93f004d4 100644 --- a/apps/batchart/app.js +++ b/apps/batchart/app.js @@ -101,6 +101,7 @@ function loadLinesFromFile(requestedLineCount, fileName) { var readFile = Storage.open(fileName, "r"); + let nextLine; while ((nextLine = readFile.readLine())) { if(nextLine) { allLines.push(nextLine); diff --git a/apps/batchart/metadata.json b/apps/batchart/metadata.json index dda43fac4..7be1637f0 100644 --- a/apps/batchart/metadata.json +++ b/apps/batchart/metadata.json @@ -2,7 +2,7 @@ "id": "batchart", "name": "Battery Chart", "shortName": "Battery Chart", - "version": "0.13", + "version": "0.14", "description": "A widget and an app for recording and visualizing battery percentage over time.", "icon": "app.png", "tags": "app,widget,battery,time,record,chart,tool", diff --git a/apps/bigdclock/ChangeLog b/apps/bigdclock/ChangeLog index c92d139bb..9af3b7ea8 100644 --- a/apps/bigdclock/ChangeLog +++ b/apps/bigdclock/ChangeLog @@ -5,3 +5,4 @@ 0.05: proper fix for the race condition in queueDraw() 0.06: Tell clock widgets to hide. 0.07: Better battery graphic - now has green, yellow and red sections; battery status reflected in the bar across the middle of the screen; current battery state checked only once every 15 minutes, leading to longer-lasting battery charge +0.08: Minor code improvements diff --git a/apps/bigdclock/bigdclock.app.js b/apps/bigdclock/bigdclock.app.js index a8e2b38df..3f8607495 100644 --- a/apps/bigdclock/bigdclock.app.js +++ b/apps/bigdclock/bigdclock.app.js @@ -31,7 +31,7 @@ function draw() { var dow = require("date_utils").dows(0,1)[date.getDay()]; if ((date.getTime() >= lastBattCheck + 15*60000) || Bangle.isCharging()) { - lastBattcheck = date.getTime(); + lastBattCheck = date.getTime(); width = E.getBattery(); width += width/2; } diff --git a/apps/bigdclock/metadata.json b/apps/bigdclock/metadata.json index 30352ca1a..54a4296bc 100644 --- a/apps/bigdclock/metadata.json +++ b/apps/bigdclock/metadata.json @@ -1,7 +1,7 @@ { "id": "bigdclock", "name": "Big digit clock containing just the essentials", "shortName":"Big digit clk", - "version":"0.07", + "version": "0.08", "description": "A clock containing just the essentials, made as easy to read as possible for those of us that need glasses. It contains the time, the day-of-week, the day-of-month, and the current battery state-of-charge.", "icon": "bigdclock.png", "type": "clock", diff --git a/apps/bikespeedo/ChangeLog b/apps/bikespeedo/ChangeLog index 296b6f948..7330eb937 100644 --- a/apps/bikespeedo/ChangeLog +++ b/apps/bikespeedo/ChangeLog @@ -4,3 +4,4 @@ 0.04: Add options for units in locale and recording GPS 0.05: Allow toggling of "max" values (screen tap) and recording (button press) 0.06: Fix local unit setting +0.07: Minor code improvements diff --git a/apps/bikespeedo/app.js b/apps/bikespeedo/app.js index 2310f1656..a1f0b53ce 100644 --- a/apps/bikespeedo/app.js +++ b/apps/bikespeedo/app.js @@ -409,7 +409,8 @@ function updateClock() { if ( emulator ) { max.spd++; max.alt++; - d=new Date(); sec=d.getSeconds(); + const d=new Date(); + sec=d.getSeconds(); onGPS(lf); } } diff --git a/apps/bikespeedo/metadata.json b/apps/bikespeedo/metadata.json index 4b8ff9d92..20c7d4f53 100644 --- a/apps/bikespeedo/metadata.json +++ b/apps/bikespeedo/metadata.json @@ -2,7 +2,7 @@ "id": "bikespeedo", "name": "Bike Speedometer (beta)", "shortName": "Bike Speedometer", - "version": "0.06", + "version": "0.07", "description": "Shows GPS speed, GPS heading, Compass heading, GPS altitude and Barometer altitude from internal sources", "icon": "app.png", "screenshots": [{"url":"Screenshot.png"}], diff --git a/apps/binwatch/ChangeLog b/apps/binwatch/ChangeLog index a7913c299..2d60667d2 100644 --- a/apps/binwatch/ChangeLog +++ b/apps/binwatch/ChangeLog @@ -5,3 +5,4 @@ 0.05: move setUI() up before draw() as to not have a false positive 'sanity check' when building on github. 0.06: Minor code improvements +0.07: Minor code improvements diff --git a/apps/binwatch/app.js b/apps/binwatch/app.js index 8e21a06a0..a25595bf5 100644 --- a/apps/binwatch/app.js +++ b/apps/binwatch/app.js @@ -136,7 +136,7 @@ var cgimg; */ function drawSquare(gfx, x, y, data, numOfBits) { - for(i = numOfBits; i > 0 ; i--) { + for(let i = numOfBits; i > 0 ; i--) { if( (data & 1) != 0) { gfx.fillRect(x + (i - 1) * x_step, y, x + i * x_step , y + y_step); @@ -245,7 +245,7 @@ function drawBattery(gfx, level) { var pos_y = bat_pos_y - 1; var stepLevel = Math.round((level + 10) / 20); - for(i = 0; i < stepLevel; i++) { + for(let i = 0; i < stepLevel; i++) { pos_y -= bat_size_y + 2; gfx.fillRect(bat_pos_x, pos_y, bat_pos_x + bat_size_x, pos_y + bat_size_y); diff --git a/apps/binwatch/metadata.json b/apps/binwatch/metadata.json index 85881d46b..1e71362cb 100644 --- a/apps/binwatch/metadata.json +++ b/apps/binwatch/metadata.json @@ -3,7 +3,7 @@ "shortName":"BinWatch", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], - "version": "0.06", + "version": "0.07", "supports": ["BANGLEJS2"], "readme": "README.md", "allow_emulator":true, diff --git a/apps/bowserWF/ChangeLog b/apps/bowserWF/ChangeLog index dd2b05fb3..4417339fa 100644 --- a/apps/bowserWF/ChangeLog +++ b/apps/bowserWF/ChangeLog @@ -1,3 +1,4 @@ ... 0.02: First update with ChangeLog Added 0.03: updated watch face to use the ClockFace library +0.04: Minor code improvements diff --git a/apps/bowserWF/app.js b/apps/bowserWF/app.js index 956c43602..e93617b18 100644 --- a/apps/bowserWF/app.js +++ b/apps/bowserWF/app.js @@ -34,10 +34,10 @@ const background = { ), }; -numbersDims = { +/*const numbersDims = { width: 20, height: 44, -}; +};*/ const numbers = [ require("heatshrink").decompress( atob( @@ -88,7 +88,7 @@ const numbers = [ ) ), ]; -digitPositions = [ +const digitPositions = [ // relative to the box { x: 13, y: 6 }, { x: 32, y: 6 }, diff --git a/apps/bowserWF/metadata.json b/apps/bowserWF/metadata.json index bba15e5df..462592902 100644 --- a/apps/bowserWF/metadata.json +++ b/apps/bowserWF/metadata.json @@ -2,7 +2,7 @@ "id": "bowserWF", "name": "Bowser Watchface", "shortName": "Bowser Watchface", - "version": "0.03", + "version": "0.04", "description": "Let bowser show you the time", "icon": "app.png", "type": "clock", diff --git a/apps/breath/ChangeLog b/apps/breath/ChangeLog index 62542be60..03c748ea5 100644 --- a/apps/breath/ChangeLog +++ b/apps/breath/ChangeLog @@ -1,2 +1,3 @@ 0.01: New app! 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/breath/app.js b/apps/breath/app.js index 309189c9a..f9abf9d6b 100644 --- a/apps/breath/app.js +++ b/apps/breath/app.js @@ -51,9 +51,9 @@ g.setFont("6x8", 2); function circle() { g.clear(); - adjusted_radius = max_radius * Math.abs(origin); + const adjusted_radius = max_radius * Math.abs(origin); g.drawCircle(120, 120, adjusted_radius); - radius = Math.abs(Math.sin(origin)); + //const radius = Math.abs(Math.sin(origin)); angle += 2; origin = angle * (Math.PI / 180); if (angle >= 0 && angle < 90) { diff --git a/apps/breath/metadata.json b/apps/breath/metadata.json index 993ffc51d..c4280c4ad 100644 --- a/apps/breath/metadata.json +++ b/apps/breath/metadata.json @@ -2,7 +2,7 @@ "id": "breath", "name": "Breathing App", "shortName": "Breathing App", - "version": "0.02", + "version": "0.03", "description": "app to aid relaxation and train breath syncronicity using haptics and visualisation, also displays HR", "icon": "app-icon.png", "tags": "tools,health", diff --git a/apps/bthrm/ChangeLog b/apps/bthrm/ChangeLog index 000c5e3f8..85a7ca0b6 100644 --- a/apps/bthrm/ChangeLog +++ b/apps/bthrm/ChangeLog @@ -41,3 +41,4 @@ Additional logging on errors Add debug option for disabling active scanning 0.17: New GUI based on layout library +0.18: Minor code improvements diff --git a/apps/bthrm/lib.js b/apps/bthrm/lib.js index a792167ca..18af4f3ae 100644 --- a/apps/bthrm/lib.js +++ b/apps/bthrm/lib.js @@ -6,7 +6,7 @@ exports.enable = () => { var log = function(text, param){ if (global.showStatusInfo) - showStatusInfo(text); + global.showStatusInfo(text); if (settings.debuglog){ var logline = new Date().toISOString() + " - " + text; if (param) logline += ": " + JSON.stringify(param); diff --git a/apps/bthrm/metadata.json b/apps/bthrm/metadata.json index 6c31759c9..343df40a1 100644 --- a/apps/bthrm/metadata.json +++ b/apps/bthrm/metadata.json @@ -2,7 +2,7 @@ "id": "bthrm", "name": "Bluetooth Heart Rate Monitor", "shortName": "BT HRM", - "version": "0.17", + "version": "0.18", "description": "Overrides Bangle.js's build in heart rate monitor with an external Bluetooth one.", "icon": "app.png", "screenshots": [{"url":"screen.png"}], diff --git a/apps/bthrm/recorder.js b/apps/bthrm/recorder.js index fcfed47c3..c3019b465 100644 --- a/apps/bthrm/recorder.js +++ b/apps/bthrm/recorder.js @@ -16,7 +16,7 @@ name : "BT HR", fields : ["BT Heartrate", "BT Battery", "Energy expended", "Contact", "RR"], getValues : () => { - result = [bpm,bat,energy,contact,rr]; + const result = [bpm,bat,energy,contact,rr]; bpm = ""; rr = ""; bat = ""; diff --git a/apps/bthrv/ChangeLog b/apps/bthrv/ChangeLog index ef9d84bdb..e4dc0f14d 100644 --- a/apps/bthrv/ChangeLog +++ b/apps/bthrv/ChangeLog @@ -2,3 +2,4 @@ 0.02: Write available data on reset or kill 0.03: Buzz short on every finished measurement and longer if all are done 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/bthrv/metadata.json b/apps/bthrv/metadata.json index 9fff1589c..e20e6bfb8 100644 --- a/apps/bthrv/metadata.json +++ b/apps/bthrv/metadata.json @@ -2,7 +2,7 @@ "id": "bthrv", "name": "Bluetooth Heart Rate variance calculator", "shortName": "BT HRV", - "version": "0.04", + "version": "0.05", "description": "Calculates HRV from a a BT HRM with interval data", "icon": "app.png", "type": "app", diff --git a/apps/bthrv/recorder.js b/apps/bthrv/recorder.js index 0fce6971e..f1e1d5040 100644 --- a/apps/bthrv/recorder.js +++ b/apps/bthrv/recorder.js @@ -31,7 +31,7 @@ } } } - result = [hrv]; + const result = [hrv]; hrv = ""; rrHistory = []; return result; diff --git a/apps/calibration/ChangeLog b/apps/calibration/ChangeLog index 64bff2b31..3813bfdf8 100644 --- a/apps/calibration/ChangeLog +++ b/apps/calibration/ChangeLog @@ -1,3 +1,4 @@ 0.01: New App! 0.02: Use fractional numbers and scale the points to keep working consistently on whole screen 0.03: Use default Bangle formatter for booleans +0.04: Minor code improvements diff --git a/apps/calibration/app.js b/apps/calibration/app.js index 049430d45..b5faa8f81 100644 --- a/apps/calibration/app.js +++ b/apps/calibration/app.js @@ -129,7 +129,7 @@ class BanglejsApp { E.srand(Date.now()); -calibration = new BanglejsApp(); +const calibration = new BanglejsApp(); calibration.load_settings(); Bangle.disableCalibration = true; diff --git a/apps/calibration/metadata.json b/apps/calibration/metadata.json index f428bd538..11fc73828 100644 --- a/apps/calibration/metadata.json +++ b/apps/calibration/metadata.json @@ -2,7 +2,7 @@ "name": "Touchscreen Calibration", "shortName":"Calibration", "icon": "calibration.png", - "version":"0.03", + "version": "0.04", "description": "(NOT RECOMMENDED) A simple calibration app for the touchscreen. Please use the Touchscreen Calibration in the Settings app instead.", "supports": ["BANGLEJS","BANGLEJS2"], "readme": "README.md", diff --git a/apps/chess/ChangeLog b/apps/chess/ChangeLog index 87e526de0..1fb70549c 100644 --- a/apps/chess/ChangeLog +++ b/apps/chess/ChangeLog @@ -2,3 +2,4 @@ 0.02: Bugfixes 0.03: Use Bangle.setBacklight() 0.04: Add option to buzz after computer move +0.05: Minor code improvements diff --git a/apps/chess/engine.js b/apps/chess/engine.js index f67ecc456..c30e2587d 100644 --- a/apps/chess/engine.js +++ b/apps/chess/engine.js @@ -14,7 +14,7 @@ if (this.imports !== undefined && this.printerr !== undefined){//seed or gjs p4_log = function(){ var args = Array.prototype.slice.call(arguments); - printerr(args.join(', ')); + this.printerr(args.join(', ')); }; } else if (this.console === undefined){//MSIE diff --git a/apps/chess/metadata.json b/apps/chess/metadata.json index 94ecbedbd..4f810886b 100644 --- a/apps/chess/metadata.json +++ b/apps/chess/metadata.json @@ -2,7 +2,7 @@ "id": "chess", "name": "Chess", "shortName": "Chess", - "version": "0.04", + "version": "0.05", "description": "Chess game based on the [p4wn engine](https://p4wn.sourceforge.net/). Drag on the touchscreen to move the green cursor onto a piece, select it with a single touch and drag the now red cursor around. Release the piece with another touch to finish the move. The button opens a menu.", "icon": "app.png", "tags": "game", diff --git a/apps/clickms/ChangeLog b/apps/clickms/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/clickms/ChangeLog +++ b/apps/clickms/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/clickms/click-master.js b/apps/clickms/click-master.js index 55027e733..a5b3d1a7e 100644 --- a/apps/clickms/click-master.js +++ b/apps/clickms/click-master.js @@ -19,7 +19,7 @@ function drawPlayers() { g.clear(1); g.setFont("6x8",2); var l = [{name:ME,cnt:mycounter}]; - for (p of players) l.push(p); + for (const p of players) l.push(p); l.sort((a,b)=>a.cnt-b.cnt); var y=0; l.forEach(player=>{ diff --git a/apps/clickms/metadata.json b/apps/clickms/metadata.json index baa8c9563..c07f83dcd 100644 --- a/apps/clickms/metadata.json +++ b/apps/clickms/metadata.json @@ -1,7 +1,7 @@ { "id": "clickms", "name": "Click Master", - "version": "0.01", + "version": "0.02", "description": "Get several friends to start the game, then compete to see who can press BTN1 the most!", "icon": "click-master.png", "tags": "game", diff --git a/apps/clkinfosunrise/ChangeLog b/apps/clkinfosunrise/ChangeLog index 686d2ffb3..a89e38715 100644 --- a/apps/clkinfosunrise/ChangeLog +++ b/apps/clkinfosunrise/ChangeLog @@ -3,3 +3,4 @@ Add a 'time' clockinfo that also displays a percentage of day left 0.03: Change 3rd mode to show the time to next sunrise/sunset time (not actual time) 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/clkinfosunrise/clkinfo.js b/apps/clkinfosunrise/clkinfo.js index f8ea7f4c7..69df208f4 100644 --- a/apps/clkinfosunrise/clkinfo.js +++ b/apps/clkinfosunrise/clkinfo.js @@ -49,6 +49,7 @@ let day = true; let d = date.getTime(); let dayLength = sunset.getTime()-sunrise.getTime(); + let timePast; let timeTotal; if (d < sunrise.getTime()) { day = false; // early morning diff --git a/apps/clkinfosunrise/metadata.json b/apps/clkinfosunrise/metadata.json index dfba179b1..723f1f0a5 100644 --- a/apps/clkinfosunrise/metadata.json +++ b/apps/clkinfosunrise/metadata.json @@ -1,6 +1,6 @@ { "id": "clkinfosunrise", "name": "Sunrise Clockinfo", - "version": "0.04", + "version": "0.05", "description": "For clocks that display 'clockinfo' (messages that can be cycled through using the clock_info module) this displays sunrise and sunset based on the location from the 'My Location' app", "icon": "app.png", "type": "clkinfo", diff --git a/apps/contacts/ChangeLog b/apps/contacts/ChangeLog index 7727f3cc4..b09594212 100644 --- a/apps/contacts/ChangeLog +++ b/apps/contacts/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/contacts/contacts.app.js b/apps/contacts/contacts.app.js index a16bd1917..8d20e8646 100644 --- a/apps/contacts/contacts.app.js +++ b/apps/contacts/contacts.app.js @@ -66,7 +66,7 @@ function showNumpad(text, key_, callback) { s = key + text.substr(key.length, 999); g.setFont("Vector:24").setFontAlign(1,0).drawString(s,g.getWidth(),12); } - ds="12%"; + const ds="12%"; var numPad = new Layout ({ type:"v", c: [{ type:"v", c: [ diff --git a/apps/contacts/metadata.json b/apps/contacts/metadata.json index cbd3bf019..525c7ef6e 100644 --- a/apps/contacts/metadata.json +++ b/apps/contacts/metadata.json @@ -1,6 +1,6 @@ { "id": "contacts", "name": "Contacts", - "version": "0.02", + "version": "0.03", "description": "Provides means of storing user contacts, viewing/editing them on device and from the App loader", "icon": "app.png", "tags": "tool", diff --git a/apps/devstopwatch/ChangeLog b/apps/devstopwatch/ChangeLog index c1a645cf8..11567d141 100644 --- a/apps/devstopwatch/ChangeLog +++ b/apps/devstopwatch/ChangeLog @@ -7,3 +7,4 @@ fixed bangle2 colors for chrono and last lap highlight added screen for bangle2 and a small README 0.05: Minor code improvements +0.06: Minor code improvements diff --git a/apps/devstopwatch/app.js b/apps/devstopwatch/app.js index 30424d19d..747573c0c 100644 --- a/apps/devstopwatch/app.js +++ b/apps/devstopwatch/app.js @@ -65,7 +65,7 @@ function chronometer() { } currentLap = calculateLap(state.whenStarted); - total = calculateLap(state.whenStartedTotal); + const total = calculateLap(state.whenStartedTotal); state.laps[0] = total; state.laps[1] = currentLap; diff --git a/apps/devstopwatch/metadata.json b/apps/devstopwatch/metadata.json index f7d3e4f06..f8e3fe106 100644 --- a/apps/devstopwatch/metadata.json +++ b/apps/devstopwatch/metadata.json @@ -2,7 +2,7 @@ "id": "devstopwatch", "name": "Dev Stopwatch", "shortName": "Dev Stopwatch", - "version": "0.05", + "version": "0.06", "description": "Stopwatch with 5 laps supported (cyclically replaced)", "icon": "app.png", "tags": "stopwatch,chrono,timer,chronometer", diff --git a/apps/diract/ChangeLog b/apps/diract/ChangeLog index 34fc73a76..272d01ab8 100644 --- a/apps/diract/ChangeLog +++ b/apps/diract/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Tweaked proximity identification settings +0.03: Minor code improvements diff --git a/apps/diract/diract.js b/apps/diract/diract.js index 69f0a88e4..d4effca89 100644 --- a/apps/diract/diract.js +++ b/apps/diract/diract.js @@ -74,6 +74,7 @@ let digestTime = new Uint8Array([ 0, 0, 0 ]); let numberOfDigestPages = 0; let sensorData = [ 0x82, 0x08, 0x3f ]; let cyclicCount = 0; +let encodedBattery = 0; let lastDigestTime = Math.round(getTime()); let lastResetTime = Math.round(getTime()); let isExciterPresent = false; @@ -517,7 +518,7 @@ function updateSensorData() { encodedBattery = encodeBatteryPercentage(); } - encodedAcceleration = encodeAcceleration(); + let encodedAcceleration = encodeAcceleration(); sensorData[0] = ((encodedAcceleration.x << 2) & 0xfc) | ((encodedAcceleration.y >> 4) & 0x3f); diff --git a/apps/diract/metadata.json b/apps/diract/metadata.json index af9406e91..2b6cd810e 100644 --- a/apps/diract/metadata.json +++ b/apps/diract/metadata.json @@ -2,7 +2,7 @@ "id": "diract", "name": "DirAct", "shortName": "DirAct", - "version": "0.02", + "version": "0.03", "description": "Proximity interaction detection.", "icon": "diract.png", "type": "app", diff --git a/apps/edisonsball/ChangeLog b/apps/edisonsball/ChangeLog index 71bcbf97f..c871dbe41 100644 --- a/apps/edisonsball/ChangeLog +++ b/apps/edisonsball/ChangeLog @@ -1,3 +1,4 @@ 0.01: Initial version 0.02: Added BangleJS Two 0.03: Minor code improvements +0.04: Minor code improvements diff --git a/apps/edisonsball/app.js b/apps/edisonsball/app.js index 6e58ffcc1..39b764dfe 100644 --- a/apps/edisonsball/app.js +++ b/apps/edisonsball/app.js @@ -118,8 +118,8 @@ function checkHR() { if(HR_samples.length == 5){ g.clear(); - average_HR = average(HR_samples).toFixed(0); - stdev_HR = getStandardDeviation (HR_samples).toFixed(1); + let average_HR = average(HR_samples).toFixed(0); + let stdev_HR = getStandardDeviation (HR_samples).toFixed(1); if (ISBANGLEJS1) { g.drawString("HR: " + average_HR, 120,100); diff --git a/apps/edisonsball/metadata.json b/apps/edisonsball/metadata.json index 9fcfe38bf..8526c7926 100644 --- a/apps/edisonsball/metadata.json +++ b/apps/edisonsball/metadata.json @@ -2,7 +2,7 @@ "id": "edisonsball", "name": "Edison's Ball", "shortName": "Edison's Ball", - "version": "0.03", + "version": "0.04", "description": "Hypnagogia/Micro-Sleep alarm for experimental use in exploring sleep transition and combating drowsiness", "icon": "app-icon.png", "tags": "sleep,hyponagogia,quick,nap", diff --git a/apps/espruinoterm/ChangeLog b/apps/espruinoterm/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/espruinoterm/ChangeLog +++ b/apps/espruinoterm/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/espruinoterm/app.js b/apps/espruinoterm/app.js index 348190db4..1253b253a 100644 --- a/apps/espruinoterm/app.js +++ b/apps/espruinoterm/app.js @@ -7,7 +7,7 @@ var R = Bangle.appRect; var termg = Graphics.createArrayBuffer(R.w, R.h, 1, {msb:true}); var termVisible = false; termg.setFont("6x8"); -term = require("VT100").connect(termg, { +let term = require("VT100").connect(termg, { charWidth : 6, charHeight : 8 }); diff --git a/apps/espruinoterm/metadata.json b/apps/espruinoterm/metadata.json index 25e6183e1..d967e0e1a 100644 --- a/apps/espruinoterm/metadata.json +++ b/apps/espruinoterm/metadata.json @@ -2,7 +2,7 @@ "id": "espruinoterm", "name": "Espruino Terminal", "shortName": "Espruino Term", - "version": "0.01", + "version": "0.02", "description": "Send commands to other Espruino devices via the Bluetooth UART interface, and see the result on a VT100 terminal. Customisable commands!", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}], diff --git a/apps/fclock/ChangeLog b/apps/fclock/ChangeLog index f70cedaba..35fa366a4 100644 --- a/apps/fclock/ChangeLog +++ b/apps/fclock/ChangeLog @@ -2,3 +2,4 @@ 0.02: Move to Bangle.setUI to launcher support 0.03: Tell clock widgets to hide. 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/fclock/fclock.app.js b/apps/fclock/fclock.app.js index b010d0536..52607b9fc 100644 --- a/apps/fclock/fclock.app.js +++ b/apps/fclock/fclock.app.js @@ -86,7 +86,7 @@ const drawSec = function (sections, color) { const drawClock = function () { - currentTime = new Date(); + const currentTime = new Date(); //Get date as a string date = dateStr(currentTime); @@ -163,12 +163,10 @@ const drawHR = function () { } if (grow) { - color = settings.hr.color; - g.setColor(color); + g.setColor(settings.hr.color); g.fillCircle(settings.hr.x, settings.hr.y, size); } else { - color = "#000000"; - g.setColor(color); + g.setColor("#000000"); g.drawCircle(settings.hr.x, settings.hr.y, size); } }; diff --git a/apps/fclock/metadata.json b/apps/fclock/metadata.json index 0cb48f9ff..3491be0e2 100644 --- a/apps/fclock/metadata.json +++ b/apps/fclock/metadata.json @@ -2,7 +2,7 @@ "id": "fclock", "name": "fclock", "shortName": "F Clock", - "version": "0.04", + "version": "0.05", "description": "Simple design of a digital clock", "icon": "app.png", "type": "clock", diff --git a/apps/flashcards/ChangeLog b/apps/flashcards/ChangeLog index 6f9ed7196..4c0434f5b 100644 --- a/apps/flashcards/ChangeLog +++ b/apps/flashcards/ChangeLog @@ -2,4 +2,5 @@ 1.10: Download cards data from Trello public board 1.20: Configuration instructions added and card layout optimized 1.30: Font size can be changed in Settings -1.31: Fix for fast-loading support \ No newline at end of file +1.31: Fix for fast-loading support +1.32: Minor code improvements diff --git a/apps/flashcards/app.js b/apps/flashcards/app.js index d2118f8cb..43dde213e 100644 --- a/apps/flashcards/app.js +++ b/apps/flashcards/app.js @@ -39,7 +39,7 @@ while (str.length > maxLength) { let found = false; // Inserts new line at first whitespace of the line - for (i = maxLength - 1; i > 0; i--) { + for (let i = maxLength - 1; i > 0; i--) { if (str.charAt(i)==' ') { res = res + [str.slice(0, i), "\n"].join(''); str = str.slice(i + 1); diff --git a/apps/flashcards/metadata.json b/apps/flashcards/metadata.json index 096e7e918..dee6a9e3a 100644 --- a/apps/flashcards/metadata.json +++ b/apps/flashcards/metadata.json @@ -2,7 +2,7 @@ "id": "flashcards", "name": "Flash Cards", "shortName": "Flash Cards", - "version": "1.31", + "version": "1.32", "description": "Flash cards based on public Trello board", "readme":"README.md", "screenshots" : [ { "url":"screenshot.png" }], diff --git a/apps/flow/ChangeLog b/apps/flow/ChangeLog new file mode 100644 index 000000000..62542be60 --- /dev/null +++ b/apps/flow/ChangeLog @@ -0,0 +1,2 @@ +0.01: New app! +0.02: Minor code improvements diff --git a/apps/flow/app.js b/apps/flow/app.js index 5f4da8f35..1a8095327 100644 --- a/apps/flow/app.js +++ b/apps/flow/app.js @@ -193,7 +193,7 @@ let intervalId; if (BTN.read()) { for (let i = 0; i < 10; i++) { - color = getColor(i); + const color = getColor(i); g.setColor(color[0], color[1], color[2]); g.fillRect((i / 10) * h, 0, ((i + 1) / 10) * h, h); } diff --git a/apps/flow/metadata.json b/apps/flow/metadata.json index cbb81082d..7ba8f1b4a 100644 --- a/apps/flow/metadata.json +++ b/apps/flow/metadata.json @@ -2,7 +2,7 @@ "id": "flow", "name": "FLOW", "shortName": "FLOW", - "version": "0.01", + "version": "0.02", "description": "A game where you have to help a flow avoid white obstacles thing by tapping! This is a demake of an app which I forgot the name of. Press BTN(1) to restart. See if you can get to 2500 score!", "icon": "app.png", "tags": "game", diff --git a/apps/forge/ChangeLog b/apps/forge/ChangeLog index 0c651c90b..ade90fc36 100644 --- a/apps/forge/ChangeLog +++ b/apps/forge/ChangeLog @@ -1,2 +1,3 @@ 0.01: attempt to import 0.02: Make it possible for Fastload Utils to fastload into this app. +0.03: Minor code improvements diff --git a/apps/forge/forge.app.js b/apps/forge/forge.app.js index b179fb540..5169a04e9 100644 --- a/apps/forge/forge.app.js +++ b/apps/forge/forge.app.js @@ -2,9 +2,9 @@ "Bangle.loadWidgets()"; // Facilitates fastloading to this app via Fastload Utils, while still not loading widgets on standard `load` calls. -st = require('Storage'); +const st = require('Storage'); -l = /^a\..*\.js$/; +let l = /^a\..*\.js$/; //l = /.*\.js/; l = st.list(l, {sf:false}); diff --git a/apps/forge/metadata.json b/apps/forge/metadata.json index 6e13a4df3..43baca169 100644 --- a/apps/forge/metadata.json +++ b/apps/forge/metadata.json @@ -1,6 +1,6 @@ { "id": "forge", "name": "App Forge", - "version":"0.02", + "version": "0.03", "description": "Easy way to run development versions of your apps", "icon": "app.png", "readme": "README.md", diff --git a/apps/ftclock/mkFourTwentyTz.js b/apps/ftclock/mkFourTwentyTz.js index 4e7829aa3..7c6d25995 100644 --- a/apps/ftclock/mkFourTwentyTz.js +++ b/apps/ftclock/mkFourTwentyTz.js @@ -1,3 +1,5 @@ +/* This file is designed to be run on the desktop, not Bangle.js */ +/* eslint-env node */ let fs = require('fs'); let csv = require('csv'); @@ -30,7 +32,7 @@ fs.createReadStream(__dirname+'/country.csv') } else { country = countries[r[1]]; // e.g. United States } - zone = zones[r[0]] || { "name": `${city}, ${country}` }; + let zone = zones[r[0]] || { "name": `${city}, ${country}` }; let starttime = parseInt(r[3] || "0"), // Bugger. They're feeding us blanks for UTC now offs = parseInt(r[4]); if (offs<0) { @@ -43,15 +45,15 @@ fs.createReadStream(__dirname+'/country.csv') zones[r[0]] = zone; }) .on('end', () => { - for (z in zones) { - zone = zones[z]; + for (let z in zones) { + let zone = zones[z]; if (zone.offs%60) continue; // One a dem funky timezones. Ignore. - zonelist = offsdict[zone.offs] || []; + let zonelist = offsdict[zone.offs] || []; zonelist.push(zone.name); offsdict[zone.offs] = zonelist; } - offsets = []; - for (o in offsdict) { + let offsets = []; + for (let o in offsdict) { offsets.unshift(parseInt(o)); } fs.open("fourTwentyTz.js","w", (err, fd) => { @@ -67,7 +69,7 @@ fs.createReadStream(__dirname+'/country.csv') fs.write(fd, ";\n", handleWrite); fs.write(fd, "exports.timezones = function(offs) {\n", handleWrite); fs.write(fd, " switch (offs) {\n", handleWrite); - for (i=0; icourse?"00"+c:100>course?"0"+c:c;buf.drawString(c,10,0);buf.drawString(a.substring(0,a.length-3),140,4);flip(buf,Yoff+70);buf.setColor(1);buf.setFont("Vector",24);a=brg.toString();a=10>brg?"00"+a:100>brg?"0"+a:a;buf.setColor(3);buf.drawString("Brg: ",0,0);buf.drawString("Dist: ", 0,30);buf.setColor(selected?1:2);buf.drawString(wp.name,140,0);buf.setColor(1);buf.drawString(a,60,0);buf.drawString(loc.distance(dist),60,30);flip(buf,Yoff+130);g.setFont("6x8",1);g.setColor(0,0,0);g.fillRect(10,230,60,239);g.setColor(1,1,1);g.drawString("Sats "+satellites.toString(),10,230)}var savedfix; function onGPS(a){savedfix=a;void 0!==a&&(course=isNaN(a.course)?course:Math.round(a.course),speed=isNaN(a.speed)?speed:a.speed,satellites=a.satellites);candraw&&(void 0!==a&&1==a.fix&&(dist=distance(a,wp),isNaN(dist)&&(dist=0),brg=bearing(a,wp),isNaN(brg)&&(brg=0)),drawN())}var intervalRef;function stopdraw(){candraw=!1;intervalRef&&clearInterval(intervalRef)} -function startTimers(){candraw=!0;intervalRefSec=setInterval(function(){heading=newHeading(course,heading);course!=heading&&drawCompass(heading)},200)}function drawAll(){g.setColor(1,.5,.5);g.fillPoly([120,Yoff+50,110,Yoff+70,130,Yoff+70]);g.setColor(1,1,1);drawN();drawCompass(heading)}function startdraw(){g.clear();Bangle.drawWidgets();startTimers();drawAll()} +function startTimers(){candraw=!0;setInterval(function(){heading=newHeading(course,heading);course!=heading&&drawCompass(heading)},200)}function drawAll(){g.setColor(1,.5,.5);g.fillPoly([120,Yoff+50,110,Yoff+70,130,Yoff+70]);g.setColor(1,1,1);drawN();drawCompass(heading)}function startdraw(){g.clear();Bangle.drawWidgets();startTimers();drawAll()} function setButtons(){setWatch(nextwp.bind(null,-1),BTN1,{repeat:!0,edge:"falling"});setWatch(doselect,BTN2,{repeat:!0,edge:"falling"});setWatch(nextwp.bind(null,1),BTN3,{repeat:!0,edge:"falling"})}var SCREENACCESS={withApp:!0,request:function(){this.withApp=!1;stopdraw();clearWatch()},release:function(){this.withApp=!0;startdraw();setButtons()}};Bangle.on("lcdPower",function(a){SCREENACCESS.withApp&&(a?startdraw():stopdraw())});var waypoints=require("waypoints").load(); wp=waypoints[0];function nextwp(a){selected&&(wpindex+=a,wpindex>=waypoints.length&&(wpindex=0),0>wpindex&&(wpindex=waypoints.length-1),wp=waypoints[wpindex],drawN())}function doselect(){selected&&0!=wpindex&&void 0===waypoints[wpindex].lat&&savedfix.fix&&(waypoints[wpindex]={name:"@"+wp.name,lat:savedfix.lat,lon:savedfix.lon},wp=waypoints[wpindex],require("waypoints").save(waypoints));selected=!selected;drawN()}g.clear();Bangle.setLCDBrightness(1);Bangle.loadWidgets();Bangle.drawWidgets(); Bangle.setGPSPower(1);drawAll();startTimers();Bangle.on("GPS",onGPS);setButtons(); diff --git a/apps/gpsnav/app_b2.js b/apps/gpsnav/app_b2.js index ee6519c92..189cdf363 100644 --- a/apps/gpsnav/app_b2.js +++ b/apps/gpsnav/app_b2.js @@ -168,7 +168,7 @@ function stopdraw() { function startTimers() { candraw = true; - intervalRefSec = setInterval(function() { + /*intervalRefSec =*/ setInterval(function() { heading = newHeading(course, heading); if (course != heading) drawCompass(heading); }, 200); diff --git a/apps/gpsnav/metadata.json b/apps/gpsnav/metadata.json index 01092f1c1..5f736ff5f 100644 --- a/apps/gpsnav/metadata.json +++ b/apps/gpsnav/metadata.json @@ -1,7 +1,7 @@ { "id": "gpsnav", "name": "GPS Navigation", - "version": "0.08", + "version": "0.09", "description": "Displays GPS Course and Speed, + Directions to waypoint and waypoint recording, now with waypoint editor", "screenshots": [{"url":"screenshot-b2.png"}], "icon": "icon.png", diff --git a/apps/gsat/ChangeLog b/apps/gsat/ChangeLog index 48156d0d4..ab0aa98e1 100644 --- a/apps/gsat/ChangeLog +++ b/apps/gsat/ChangeLog @@ -1 +1,2 @@ 0.01: Added Source Code +0.02: Minor code improvements diff --git a/apps/gsat/app.js b/apps/gsat/app.js index 3a7d443fe..5c4c81b80 100644 --- a/apps/gsat/app.js +++ b/apps/gsat/app.js @@ -21,7 +21,7 @@ function drawTime() { Bangle.buzz(); return; } - min = seconds / secsinmin; + const min = seconds / secsinmin; if (seconds < quickfixperiod) { g.setFont('Vector', 20); g.drawString('Quick Fix', 125, 50); diff --git a/apps/gsat/metadata.json b/apps/gsat/metadata.json index 878d213e4..691ed39d9 100644 --- a/apps/gsat/metadata.json +++ b/apps/gsat/metadata.json @@ -2,7 +2,7 @@ "id": "gsat", "name": "Geek Squad Appointment Timer", "shortName": "gsat", - "version": "0.01", + "version": "0.02", "description": "Starts a 20 minute timer for appointments at Geek Squad.", "icon": "app.png", "tags": "tool", diff --git a/apps/guitarsongs/ChangeLog b/apps/guitarsongs/ChangeLog index 9e91c9a5e..08a118263 100644 --- a/apps/guitarsongs/ChangeLog +++ b/apps/guitarsongs/ChangeLog @@ -1,3 +1,4 @@ 0.01: First Release 0.02: WIP 0.03: Minor code improvements +0.04: Minor code improvements diff --git a/apps/guitarsongs/app.js b/apps/guitarsongs/app.js index 2536e1c46..c03fe70e3 100644 --- a/apps/guitarsongs/app.js +++ b/apps/guitarsongs/app.js @@ -116,7 +116,7 @@ function drawChordCached(chord, x, y, options) { if (chordCache[chord[0]]) { image = chordCache[chord[0]] } else { - arrbuff = Graphics.createArrayBuffer(chordWidth,chordHeight,1,{msb:true}); + let arrbuff = Graphics.createArrayBuffer(chordWidth,chordHeight,1,{msb:true}); drawChord(arrbuff, chord, 0, 0, options); image = {width: arrbuff.getWidth(), height: arrbuff.getHeight(), bpp:arrbuff.getBPP(), buffer: arrbuff.buffer, transparent:0} chordCache[chord[0]] = image; diff --git a/apps/guitarsongs/metadata.json b/apps/guitarsongs/metadata.json index cdbd1be20..242850a70 100644 --- a/apps/guitarsongs/metadata.json +++ b/apps/guitarsongs/metadata.json @@ -1,7 +1,7 @@ { "id": "guitarsongs", "name": "Guitar Songs", "shortName":"Guitar Songs", - "version": "0.03", + "version": "0.04", "description": "Songs lyrics and guitar chords", "icon": "app.png", "screenshots": [{"url": "screenshot.png"}], diff --git a/apps/ha/ChangeLog b/apps/ha/ChangeLog index 587a074f2..1ae0d9dce 100644 --- a/apps/ha/ChangeLog +++ b/apps/ha/ChangeLog @@ -7,4 +7,5 @@ 0.07: Update clock_info to avoid a redraw 0.08: Allow swiping to switch triggers 0.09: Improve web interface, arrows in UI -0.10: Issue newline before GB commands (solves issue with console.log and ignored commands) \ No newline at end of file +0.10: Issue newline before GB commands (solves issue with console.log and ignored commands) +0.11: Minor code improvements diff --git a/apps/ha/ha.lib.js b/apps/ha/ha.lib.js index 93ba2416e..7b26b02b2 100644 --- a/apps/ha/ha.lib.js +++ b/apps/ha/ha.lib.js @@ -3,7 +3,7 @@ * configured and send a trigger to homeassistant. */ function _getIcon(trigger){ - icon = trigger.icon; + const icon = trigger.icon; if(icon == "light"){ return { width : 48, height : 48, bpp : 1, diff --git a/apps/ha/metadata.json b/apps/ha/metadata.json index c58e5e486..4983aed7c 100644 --- a/apps/ha/metadata.json +++ b/apps/ha/metadata.json @@ -1,7 +1,7 @@ { "id": "ha", "name": "Home Assistant", - "version": "0.10", + "version": "0.11", "description": "Integrates your Bangle.js into Home Assistant using Android Integration/Gadgetbridge", "icon": "ha.png", "type": "app", diff --git a/apps/hamloc/ChangeLog b/apps/hamloc/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/hamloc/ChangeLog +++ b/apps/hamloc/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/hamloc/app.js b/apps/hamloc/app.js index ac608a5f4..3ac792c0b 100644 --- a/apps/hamloc/app.js +++ b/apps/hamloc/app.js @@ -1,4 +1,4 @@ -latLonToGridSquare=function(o,a){var t,e,n,s,l,i,r,h,M,f=-100,g=0,u="ABCDEFGHIJKLMNOPQRSTUVWX",d=u.toLowerCase();function N(o){return"number"==typeof o?o:"string"==typeof o?parseFloat(o):"function"==typeof o?parseFloat(o()):void E.showMessage("can't convert \ninput: "+o)}return"object"==typeof o?2===o.length?(f=N(o[0]),g=N(o[1])):"lat"in o&&"lon"in o?(f=N(o.lat),g=N(o.lon)):"latitude"in o&&"longitude"in o?(f=N(o.latitude),g=N(o.longitude)):E.showMessage("can't convert \nobject "+o):(f=N(o),g=N(a)),isNaN(f)&&E.showMessage("lat is NaN"),isNaN(g)&&E.showMessage("lon is NaN"),90===Math.abs(f)&&E.showMessage("grid invalid \nat N/S"),90editAlarm(-1) }; alarms.forEach((alarm,idx)=>{ - txt = (alarm.on?"on ":"off ")+formatTime(alarm.hr); + let txt = (alarm.on?"on ":"off ")+formatTime(alarm.hr); if (alarm.rp) txt += " (repeat)"; menu[txt] = function() { editAlarm(idx); diff --git a/apps/hardalarm/metadata.json b/apps/hardalarm/metadata.json index ad49a7d0d..25d58f136 100644 --- a/apps/hardalarm/metadata.json +++ b/apps/hardalarm/metadata.json @@ -2,7 +2,7 @@ "id": "hardalarm", "name": "Hard Alarm", "shortName": "HardAlarm", - "version": "0.05", + "version": "0.06", "description": "Make sure you wake up! Count to the right number to turn off the alarm", "icon": "app.png", "tags": "tool,alarm,widget", diff --git a/apps/hcclock/ChangeLog b/apps/hcclock/ChangeLog index f6cf66374..5eb8507c0 100644 --- a/apps/hcclock/ChangeLog +++ b/apps/hcclock/ChangeLog @@ -4,3 +4,4 @@ 0.04: Use `messages` library to check for new messages 0.05: Use `messages` library to open message GUI 0.06: Minor code improvements +0.07: Minor code improvements diff --git a/apps/hcclock/hcclock.app.js b/apps/hcclock/hcclock.app.js index 8cf7b35b5..f4703d597 100644 --- a/apps/hcclock/hcclock.app.js +++ b/apps/hcclock/hcclock.app.js @@ -147,7 +147,7 @@ function drawDigits(x, value) function drawChar(i, xMin, yMin, xMax, yMax) { numbers[i].forEach(rect => { - r = place(rect, xMin, yMin, xMax, yMax); + const r = place(rect, xMin, yMin, xMax, yMax); g.setColor(fg,fg,fg); g.fillRect(r[0], r[1], r[2], r[3]); }); diff --git a/apps/hcclock/metadata.json b/apps/hcclock/metadata.json index e8396adb0..99816cd34 100644 --- a/apps/hcclock/metadata.json +++ b/apps/hcclock/metadata.json @@ -1,7 +1,7 @@ { "id": "hcclock", "name": "Hi-Contrast Clock", - "version": "0.06", + "version": "0.07", "description": "Hi-Contrast Clock : A simple yet very bold clock that aims to be readable in high luninosity environments. Uses big 10x5 pixel digits. Use BTN 1 to switch background and foreground colors.", "icon": "hcclock-icon.png", "type": "clock", diff --git a/apps/heart/ChangeLog b/apps/heart/ChangeLog index fe03575c9..e4f15c31f 100644 --- a/apps/heart/ChangeLog +++ b/apps/heart/ChangeLog @@ -14,3 +14,4 @@ 0.06: Tag HRM power requests to allow this ot work alongside other widgets/apps (fix #799) 0.07: Theme support 0.08: Use default Bangle formatter for booleans +0.09: Minor code improvements diff --git a/apps/heart/app.js b/apps/heart/app.js index c10185b5f..4955bc291 100644 --- a/apps/heart/app.js +++ b/apps/heart/app.js @@ -214,7 +214,7 @@ function graphRecord(n) { var measure; while (line !== undefined) { - currentLine = line; + const currentLine = line; line = f.readLine(); tempCount++; if (tempCount == startLine) { @@ -259,7 +259,7 @@ function graphRecord(n) { positionX++; if (parseInt(currentLine.split(",")[2]) >= 70) { g.setColor(1, 0.3, 0.3); - oldPositionY = positionY; + const oldPositionY = positionY; measure = parseInt(currentLine.split(",")[1]); positionY = GraphYZero - measure + MinMeasurement; if (positionY > GraphYZero) { diff --git a/apps/heart/metadata.json b/apps/heart/metadata.json index 2071bdf08..66f4ba179 100644 --- a/apps/heart/metadata.json +++ b/apps/heart/metadata.json @@ -2,7 +2,7 @@ "id": "heart", "name": "Heart Rate Recorder", "shortName": "HRM Record", - "version": "0.08", + "version": "0.09", "description": "Application that allows you to record your heart rate. Can run in background", "icon": "app.png", "tags": "tool,health,widget", diff --git a/apps/hidbkbd/ChangeLog b/apps/hidbkbd/ChangeLog index 459bf40b9..d6f471688 100644 --- a/apps/hidbkbd/ChangeLog +++ b/apps/hidbkbd/ChangeLog @@ -1,2 +1,3 @@ 0.01: Core functionnality 0.02: Offer to enable HID if disabled. Handle with/without media keys +0.03: Minor code improvements diff --git a/apps/hidbkbd/hid-binary-keyboard.js b/apps/hidbkbd/hid-binary-keyboard.js index 4b0401699..1d4d5baf0 100644 --- a/apps/hidbkbd/hid-binary-keyboard.js +++ b/apps/hidbkbd/hid-binary-keyboard.js @@ -71,8 +71,8 @@ function show(chars,callback) { return; } var m = chars.length/2; - charl=chars.slice(0,m); - charr=chars.slice(m); + let charl=chars.slice(0,m); + let charr=chars.slice(m); showChars(0,charl); showChars(120,charr); setWatch(() => { diff --git a/apps/hidbkbd/metadata.json b/apps/hidbkbd/metadata.json index 135b86651..2410c3991 100644 --- a/apps/hidbkbd/metadata.json +++ b/apps/hidbkbd/metadata.json @@ -2,7 +2,7 @@ "id": "hidbkbd", "name": "Binary Bluetooth Keyboard", "shortName": "Binary BT Kbd", - "version": "0.02", + "version": "0.03", "description": "Enable HID in settings, pair with your phone/PC, then type messages using the onscreen keyboard by tapping repeatedly on the key you want", "icon": "hid-binary-keyboard.png", "tags": "bluetooth", diff --git a/apps/homework/ChangeLog b/apps/homework/ChangeLog index a20d255e4..72bde7863 100644 --- a/apps/homework/ChangeLog +++ b/apps/homework/ChangeLog @@ -1,3 +1,4 @@ ... 0.10: First update with ChangeLog Added 0.11: Minor code improvements +0.12: Minor code improvements diff --git a/apps/homework/app.js b/apps/homework/app.js index 8440f0dee..98e6796b6 100644 --- a/apps/homework/app.js +++ b/apps/homework/app.js @@ -135,7 +135,7 @@ function checkPreciseHomework(subjectnum) { // P A I N checkPreciseHomeworkMenu[subject] = function() {}, checkPreciseHomeworkMenu[taskmsg] = function() {}, checkPreciseHomeworkMenu[statusmsg] = function() { - status = "Status: Finished"; + statusmsg = "Status: Finished"; var d = new Date(); var currenttime = require("locale").time(d, 1); var currentdate = require("locale").date(d); @@ -160,11 +160,11 @@ function checkPreciseHomework(subjectnum) { // P A I N } - +/* function pushHomework(subject, status, datetimehwdone) { homework = require("Storage").readJSON("homework.txt", "r"); - } +*/ function addNewHomework(subject) { // Pass subject console.log(subject); diff --git a/apps/homework/metadata.json b/apps/homework/metadata.json index f440691ef..2752f11e3 100644 --- a/apps/homework/metadata.json +++ b/apps/homework/metadata.json @@ -2,7 +2,7 @@ { "id": "homework", "name": "Homework", "shortName":"Homework", - "version": "0.11", + "version": "0.12", "description": "A simple app to manage homework", "icon": "app.png", "tags": "tool", diff --git a/apps/hworldclock/ChangeLog b/apps/hworldclock/ChangeLog index 5197c6405..42e785b0a 100644 --- a/apps/hworldclock/ChangeLog +++ b/apps/hworldclock/ChangeLog @@ -20,3 +20,4 @@ 0.33: Tidy up and fix clearInterval(undefined) errors 0.34: Fix 'fast load' so clock doesn't always redraw when screen unlocked/locked 0.35: Minor code improvements +0.36: Minor code improvements diff --git a/apps/hworldclock/app.js b/apps/hworldclock/app.js index d97b98319..0c06a16c2 100644 --- a/apps/hworldclock/app.js +++ b/apps/hworldclock/app.js @@ -4,6 +4,7 @@ const SETTINGSFILE = "hworldclock.json"; let secondsMode; let showSunInfo; +let singleOffsetSmall; let colorWhenDark; let rotationTarget; // ------- Settings file @@ -155,7 +156,7 @@ let updatePos = function() { let coord = require("Storage").readJSON(LOCATION_FILE,1)|| {"lat":0,"lon":0,"location":"-"}; //{"lat":53.3,"lon":10.1,"location":"Pattensen"}; if (coord.lat != 0 && coord.lon != 0) { //pos = SunCalc.getPosition(Date.now(), coord.lat, coord.lon); - times = SunCalc.getTimes(Date.now(), coord.lat, coord.lon); + const times = SunCalc.getTimes(Date.now(), coord.lat, coord.lon); rise = "^" + times.sunrise.toString().split(" ")[4].substr(0,5); set = "v" + times.sunset.toString().split(" ")[4].substr(0,5); //noonpos = SunCalc.getPosition(times.solarNoon, coord.lat, coord.lon); @@ -253,7 +254,7 @@ let draw = function() { // Loop through offset(s) and render offsets.forEach((offset, index) => { - dx = getCurrentTimeFromOffset(gmt, offset[OFFSET_HOURS]); + const dx = getCurrentTimeFromOffset(gmt, offset[OFFSET_HOURS]); hours = doublenum(dx.getHours()); minutes = doublenum(dx.getMinutes()); diff --git a/apps/hworldclock/metadata.json b/apps/hworldclock/metadata.json index 918c11872..422ef6b89 100644 --- a/apps/hworldclock/metadata.json +++ b/apps/hworldclock/metadata.json @@ -2,7 +2,7 @@ "id": "hworldclock", "name": "Hanks World Clock", "shortName": "Hanks World Clock", - "version": "0.35", + "version": "0.36", "description": "Current time zone plus up to three others", "allow_emulator":true, "icon": "app.png", diff --git a/apps/icons/ChangeLog b/apps/icons/ChangeLog index d65ad868c..5c4a89f74 100644 --- a/apps/icons/ChangeLog +++ b/apps/icons/ChangeLog @@ -1,2 +1,3 @@ 0.01: New library 0.02: Minor code improvements + diff --git a/apps/icons/gen/generate.js b/apps/icons/gen/generate.js index edf49e212..b91eedcdc 100755 --- a/apps/icons/gen/generate.js +++ b/apps/icons/gen/generate.js @@ -5,6 +5,8 @@ // Icons from https://fonts.google.com/icons +/* eslint-env node */ + var imageconverter = require("../../../webtools/imageconverter.js").imageconverter; var icons = JSON.parse(require("fs").readFileSync(__dirname+"/icon_names.json")); const imgOptions = { diff --git a/apps/infoclk/ChangeLog b/apps/infoclk/ChangeLog index c5453e529..def512856 100644 --- a/apps/infoclk/ChangeLog +++ b/apps/infoclk/ChangeLog @@ -10,4 +10,5 @@ The clock face is redrawn less often, hoping to save some battery Option to show the seconds when unlocked, even when otherwise hidden by other settings Broke out config loading into separate file to avoid duplicating a whole bunch of code - Added support for fast loading \ No newline at end of file + Added support for fast loading +0.10: Minor code improvements diff --git a/apps/infoclk/configLoad.js b/apps/infoclk/configLoad.js index a9d43826e..ac810b83e 100644 --- a/apps/infoclk/configLoad.js +++ b/apps/infoclk/configLoad.js @@ -109,7 +109,7 @@ function isDictionary(object) { function merge(overlay, base) { let result = base; - for (objectKey in overlay) { + for (const objectKey in overlay) { if (!Object.keys(base).includes(objectKey)) result[objectKey] = overlay[objectKey]; // If the key isn't there, add it else if (isDictionary(base[objectKey]) && isDictionary(overlay[objectKey])) // If the key is a dictionary in both, do recursive call result[objectKey] = merge(overlay[objectKey], base[objectKey]); diff --git a/apps/infoclk/metadata.json b/apps/infoclk/metadata.json index 0759528b0..1b1b6e604 100644 --- a/apps/infoclk/metadata.json +++ b/apps/infoclk/metadata.json @@ -1,7 +1,7 @@ { "id": "infoclk", "name": "Informational clock", - "version": "0.09", + "version": "0.10", "description": "A configurable clock with extra info and shortcuts when unlocked, but large time when locked", "readme": "README.md", "icon": "icon.png", diff --git a/apps/kineticscroll/ChangeLog b/apps/kineticscroll/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/kineticscroll/ChangeLog +++ b/apps/kineticscroll/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/kineticscroll/boot.js b/apps/kineticscroll/boot.js index 1f1b7923a..71234596e 100644 --- a/apps/kineticscroll/boot.js +++ b/apps/kineticscroll/boot.js @@ -124,7 +124,7 @@ } velocity = E.clip(velocity,-MAX_VELOCITY,MAX_VELOCITY); - lastDrag=Date.now(); + //lastDrag=Date.now(); if (!scheduledDraw){ scheduledDraw = setTimeout(draw,0); } diff --git a/apps/kineticscroll/boot.min.js b/apps/kineticscroll/boot.min.js index 42f0afa67..60c6002ca 100644 --- a/apps/kineticscroll/boot.min.js +++ b/apps/kineticscroll/boot.min.js @@ -1,4 +1,4 @@ (function(){E.showScroller=function(c){function k(a){return a*c.h+b.y-l}function h(a){return Math.floor((a+l-b.y)/c.h)}if(!c)return Bangle.setUI();let p,e=0,m=0,w=setInterval(()=>{e*=.9},50),q=0,b=Bangle.appRect,n=0|c.scrollMin,r=c.h*c.c-b.h;r{g.reset().clearRect(b).setClipRect(b.x,b.y,b.x2,b.y2);for(var a=h(b.y),d=Math.min(h(b.y2),c.c-1);a<=d;a++)c.draw(a,{x:b.x,y:k(a),w:b.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},u=()=>{var a=e;f.scroll-a>r&& (a=f.scroll-r,e=0);f.scroll-aa){a=Math.max(b.y2-(1-a),b.y);g.setClipRect(b.x,a,b.x2,b.y2);var d=h(a);for(a=k(d);ab.y-c.h;a-=c.h)c.draw(d,{x:b.x,y:a,w:b.w,h:c.h}),d--;g.setClipRect(0,0,g.getWidth()-1,g.getHeight()- -1)}};let v={mode:"custom",back:c.back,drag:a=>{if(0>e&&0a.dy)e*=-1,m=5*e;0{if(!(d.yn||0<=a)&&a{p&&clearTimeout(p);clearInterval(w);c.remove()});Bangle.setUI(v);let f={scroll:E.clip(0|c.scroll, +1)}};let v={mode:"custom",back:c.back,drag:a=>{if(0>e&&0a.dy)e*=-1,m=5*e;0{if(!(d.yn||0<=a)&&a{p&&clearTimeout(p);clearInterval(w);c.remove()});Bangle.setUI(v);let f={scroll:E.clip(0|c.scroll, n,r),draw:()=>{g.reset().clearRect(b).setClipRect(b.x,b.y,b.x2,b.y2);var a=h(b.y);let d=Math.min(h(b.y2),c.c-1);for(;a<=d;a++)c.draw(a,{x:b.x,y:k(a),w:b.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},drawItem:a=>{let d=k(a);g.reset().setClipRect(b.x,Math.max(d,b.y),b.x2,Math.min(d+c.h,b.y2));c.draw(a,{x:b.x,y:d,w:b.w,h:c.h});g.setClipRect(0,0,g.getWidth()-1,g.getHeight()-1)},isActive:()=>Bangle.uiRedraw==t},l=f.scroll&-2;f.draw();g.flip();return f}})() \ No newline at end of file diff --git a/apps/kineticscroll/metadata.json b/apps/kineticscroll/metadata.json index 022d38291..3d275e8c4 100644 --- a/apps/kineticscroll/metadata.json +++ b/apps/kineticscroll/metadata.json @@ -1,7 +1,7 @@ { "id": "kineticscroll", "name": "Kinetic Scroll", "shortName":"Kinetic Scroll", - "version":"0.01", + "version": "0.02", "description": "Replacement for the system scroller with kinetic scrolling.", "icon": "app.png", "type": "bootloader", diff --git a/apps/lint_exemptions.js b/apps/lint_exemptions.js index d9cff2806..d5d58d95c 100644 --- a/apps/lint_exemptions.js +++ b/apps/lint_exemptions.js @@ -8,7 +8,8 @@ module.exports = { "waternet/app.js": { "hash": "a03fbfc731811f8cc9ea8c96781ff7fe46532c5f9e628b317892069e43b97012", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "tabata/tabata.js": { @@ -20,31 +21,36 @@ module.exports = { "speedalt2/GPS Adv Sports II.js": { "hash": "1b0dff5c4ebe0c8042dec9456f809ebaada379357188b8a18dc17a144ee8c071", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "timerclk/alarm.alert.js": { "hash": "2d422f738c044dcf0d6a43712c672dccc0ad4f2d0a877ee11f0a96ec3d939714", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "spacew/prep/split.js": { "hash": "06f25475a3765417e42dc7638ee500b546d3ce75ac28b39b8b836c0aee2ea2cb", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "spacew/bench.js": { "hash": "428a741d8dfba625cb1d2958dab3b6c7b0ca05f582b00e06ec9f7f495658beb6", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "spacew/app.js": { "hash": "6467f44962655f10a649226a2ea180a3662308146d2f19d15903a16ae081d282", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "smclock/app.js": { @@ -56,17 +62,19 @@ module.exports = { "sleepphasealarm/app.js": { "hash": "d234fea5d711ae5a149879e53b28bc9002860c6b6a75285e1fc04093fe400a88", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "sleeplog/settings.js": { "hash": "bd5e3e1382321df6682ef1cb718b0e15ab355422bef77278eb086f213f643021", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "showimg/app.js": { - "hash": "98975f1cdec81d982d1ee8ca23e38f6851c12c2ccf57c4503c449d20f747e9cf", + "hash": "71cbbaa488e2d08c5bf28f7d56178d5e7694eb9761cd4752bbc9733e825d4bcf", "rules": [ "no-unused-vars" ] @@ -74,13 +82,15 @@ module.exports = { "sensible/sensible.js": { "hash": "4b8b4417c352d7a86f39653c812356c36e56770e44051d645c522f986e98abfe", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "rpnsci/app.js": { "hash": "e5bf536babe9b30e7f40b03826d7052aec98f806a7ab3b80b10438e9bf2cc61b", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "recorder/app.js": { @@ -90,7 +100,7 @@ module.exports = { ] }, "podadrem/app.js": { - "hash": "8d02fced6187142b7943c63ddefd874700d0a8731d49121de06d211959db58c4", + "hash": "f7392e74974f69553aade2dcc07527b5d3b71a9b84e6dc5e0dd995e78dff8007", "rules": [ "no-unused-vars" ] @@ -104,25 +114,29 @@ module.exports = { "mtnclock/app.js": { "hash": "c48e3ed1a605e6a131e5947718e26cc9481c6eeab36c5670bb74f0c58cb96cd8", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "mmonday/manic-monday.js": { "hash": "2eff38d4d1cde2b9f17800a554da58300a6250de3e014995a6958a11bcb5b76a", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "mixdiganclock/mixdiganclock.app.js": { "hash": "97beda5daa3b6e60f27dcad1230dd49a9c3b3e81cf55d644496c797fbef1256f", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "legoremote/app.js": { "hash": "af12068cd1b84369aa8416a82e9335298f6a4b69b56aa7bc70b9eb0d91e6d78e", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "lightswitch/settings.js": { @@ -150,7 +164,7 @@ module.exports = { ] }, "wristlight/app.js": { - "hash": "422b63acf557ac81beb0f0d08d85a8988a004752e74b50a08e23c97293351d0b", + "hash": "7400a20766b3f3cd837c29ce09c8dbb5bca19a854392fd2b907d7ac058888e2f", "rules": [ "no-unused-vars" ] @@ -164,29 +178,33 @@ module.exports = { "waypoints/waypoints.app.js": { "hash": "ff02639eb8f81784c942093d57d254295e2c78918adb4bcffdf0d0284ebfac55", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "timerclk/timer.js": { "hash": "f44702e61ad833b53fb28d222ff0fbd77d0307c6eb69c5ecebb8626a1cb20ed4", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "timerclk/stopwatch.js": { "hash": "92838c03923e162c0e9ab4f37ca0220a1fee61ed16cba1d38c79d7bdd0e18765", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "timerclk/alarm.js": { "hash": "6f521742cc6a6d6f215e499084a596ffc3494d1e1f950b204368c051a18773de", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "speedalt2/app.js": { - "hash": "8cf396b8c2b3a449635274d537ac12dda88a829fd32336e6c2c0cd85e7f56b2d", + "hash": "0340a957d78e772467e50874f52817e27be9c52a1257ca38dab5892df15a8e3c", "rules": [ "no-unused-vars" ] @@ -194,29 +212,32 @@ module.exports = { "skyspy/skyspy.app.js": { "hash": "49a727a4c052e8c6322a502750ca036b0d58896f476b1cffebe9c53e426c8bcc", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "sixths/sixths.app.js": { "hash": "b4572a529b31a5edcbd6ca5843b91c54abcbf75b2a28e90bd33751f7d6a3ebcd", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "scribble/app.js": { "hash": "6d13abd27bab8009a6bdabe1df2df394bc14aac20c68f67e8f8b085fa6b427cd", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "promenu/boot.js": { - "hash": "8b0ed99c61c877348365d9ec50f904744f4694c5e2c0a93200e998955034ed0f", + "hash": "21ee195418a13c0ed584381542a6132928cdd2d007ec7078ce6fe4650c6fdd19", "rules": [ "no-unused-vars" ] }, "promenu/bootb2.js": { - "hash": "558ab22819c2bc83ebf97c960c4fa494fccccbc894f1582f28972dbf8f563170", + "hash": "4f7a0cb285c35a61e22325dafdd548845393df8d952d8934b04576efb4b19561", "rules": [ "no-unused-vars" ] @@ -230,13 +251,15 @@ module.exports = { "oxofocus/app.js": { "hash": "cd29309373974ef038725e26d8a2ff2634a437c89cdffc3b12defd65a948db75", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "orloj/app.js": { - "hash": "9240830a097ba545fdbdb06305817234e30238bf2fbb8fbb47af83897cd588a9", + "hash": "fa43f035d759ba94f564392f410c0c6c485bb41a33c062f03d666738d517ccf3", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "nixie/m_vatch.js": { @@ -248,31 +271,36 @@ module.exports = { "moonphase/app.js": { "hash": "0e78c9ec9e7ab04f22f1838fcf033691024c8734de23f8d8dd51d6f11c30a2f2", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "lcars/lcars.app.js": { "hash": "a305f73ee4e77b6534746ea79e699f700fd3db305f2b0289ef081d8869e1faf1", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "widagps/widget.js": { "hash": "a58cdc481962575ef0aa0bfaedcc1f9de3ce966218c5b16168d8ed8b4b9672b8", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "sleeplog/app.js": { "hash": "336da552e4b04677447cf76a253b40bc259a597ea11d455121933f93afe99794", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "recorder/widget.js": { "hash": "b48698bab90fc4f38f880b6663eda108b8d31ce929ba1d32d815aa4ec8c74bca", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "qmsched/app.js": { @@ -294,7 +322,7 @@ module.exports = { ] }, "ohmcalc/app.js": { - "hash": "ac1ac172c9c4f9c4faf9bc2ce8ad7dd51ecd9a5c38f28a107d39f0c86a836899", + "hash": "c7bdea47cb54ec00335d44968f1a4bb1869786584e247739828930b97e60b963", "rules": [ "no-unused-vars" ] @@ -308,23 +336,19 @@ module.exports = { "messagelist/app.js": { "hash": "a76b5cc3ddcdbd60a9979972f274a717a901ea65e108545b13d415740a71b4e0", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "imageclock/app.js": { "hash": "198ad2d18b41ba30e3ee2545372c84ba443cec7d6f9ce4e9ca494defc9476a8e", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "hworldclock/app.js": { - "hash": "e4c34cc76e242541156006952a2cf05427feb0fbe70ae55a1afb9bd0e1d5fae1", - "rules": [ - "no-unused-vars" - ] - }, - "homework/app.js": { - "hash": "f367470e50c9105ee1f48c3193c605293338c35bd1ae1488467404270a20747c", + "hash": "fcdf876d291ec8ad4a2a98871c948bcc055e05ab60b6ef475fffb4e41e9560bc", "rules": [ "no-unused-vars" ] @@ -344,7 +368,8 @@ module.exports = { "gpstrek/app.js": { "hash": "9c941a29790dd642579478bf4b19a2afd5473a782d07fafd2c8113b2d7392bec", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "gpstouch/gpstouch.app.js": { @@ -366,13 +391,14 @@ module.exports = { ] }, "golfview/maptools.js": { - "hash": "2c3bdb849dce1710863693f2370f7fb32070a7c3bec915d8d2ef8106fda937d8", + "hash": "d206f529eda5aae66d23e51f33c253ae78fb764786520c3d36e6c516449a72e4", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "golfview/golfview.js": { - "hash": "76d8a7743122a63bd82c8e95c234229261829b465a4bc998cdc9e45860ec7fc4", + "hash": "e4f8d95394eca46fa7e50bff02c321149497e4726ae76936b08a32cf7062bba9", "rules": [ "no-unused-vars" ] @@ -392,13 +418,15 @@ module.exports = { "gbmusic/app.js": { "hash": "c36e9ccf6813264000732cf8aae5b16bb63afafb3bdc81f6f98d670c008b3416", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "gbdebug/app.js": { "hash": "5372409dd09a1b165b009afc7dc9af24d4be223ffc6507a3f6e1cbb694a3eeec", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "gallery/app.js": { @@ -434,11 +462,12 @@ module.exports = { "doztime/app-bangle2.js": { "hash": "81592fe1bc6537f80d7dbe7b2e8145924d2400f98ea780c68dd5bd9694376c8a", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "devstopwatch/app.js": { - "hash": "bb75693cc6ed2ffef0d227a40b53079e06d1ebcc7c2d9eed671b5401a8e06433", + "hash": "28ca59e605f280a2d8fd4a74f553783205d51f8bb7042d6f51cf8ec11d44c264", "rules": [ "no-unused-vars" ] @@ -464,13 +493,15 @@ module.exports = { "chronowid/widget.js": { "hash": "1056a77f508708a6667e7ae3d201add1d747a1ea4eeab2b3b8afce24a97f1e65", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "cliclockJS2Enhanced/app.js": { "hash": "056b4eeddbabbcf0f94db83d188e55dc0008bccb3913af76e31236e74a780aa1", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "chrono/chrono.js": { @@ -480,7 +511,7 @@ module.exports = { ] }, "chess/engine.js": { - "hash": "5ab335ed76f39b69e5b3436325229d8b3bd2c20a5da6d32bcb7c194f79c9f89c", + "hash": "7a3e08b2d76fea014eef50485871c56348335681109cf2d57b0dd272434d706b", "rules": [ "no-unused-vars" ] @@ -488,7 +519,8 @@ module.exports = { "animclk/create_images.js": { "hash": "05a222b265effe46b2c7a9cc0822c6c4cd86335d5d3a0cecce5fdd15d5e09b9f", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "calculator/app.js": { @@ -504,7 +536,7 @@ module.exports = { ] }, "bowserWF/app.js": { - "hash": "ec1e9fabf53e16dc91b19d305616ae0dfd879c32c3b1116da97928ebb8d2eb56", + "hash": "83feae92eda4c25028892b5b8b7d1b04f7ec3bb45f51eeba517a80b3ab2053cf", "rules": [ "no-unused-vars" ] @@ -512,29 +544,33 @@ module.exports = { "blackjack/blackjack.app.js": { "hash": "392382463c90b11b31818e974c3198ed4ec4ed681c9668b4a39865ab055d68ad", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "blackjack/appb2.js": { "hash": "d2e866a297811dfec4cba834c996e1e085421820673a038a9a9e9d438e4fabf9", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "astral/app.js": { "hash": "a210269f0d57eb496a3b75cfc4550676f9d7e85a697c77e18f41bf02549179e3", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "ballmaze/app.js": { "hash": "cd493a329063e879f44ead211cbecb4ca25da2d5c40b65ba05d6e9b2b91ff8a5", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "astrocalc/astrocalc-app.js": { - "hash": "00e29864b2bfeec7f11bd8509181b26f7916c25dd4a777abfe1fbd555822983d", + "hash": "29f978064e42f947b36c94ab3f212512fb5d0a41fa265354c6039e2cf042b92c", "rules": [ "no-unused-vars" ] @@ -542,7 +578,8 @@ module.exports = { "HRV/app.js": { "hash": "265b4b0272c43126670b5026079711354cee0a211096bcd2c18139b7a3ee774a", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "locale/locales.js": { @@ -554,13 +591,15 @@ module.exports = { "sleeplog/lib.js": { "hash": "755e0d4c02b92181281fd6990df39c9446c73ff896b50b64d7e14cb1c0188556", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "doztime/app-bangle1.js": { "hash": "1e9598c201175180ae77d1c3bc47e8138b339b72eb58782b5057fb7aefdc88a1", "rules": [ - "no-unused-vars" + "no-unused-vars", + "no-undef" ] }, "carcrazy/app.js": { @@ -574,5 +613,875 @@ module.exports = { "rules": [ "no-unused-vars" ] + }, + "widsleepstatus/widget.js": { + "hash": "ba6383eb250baae93b8ee2509f3d841fc735f0e87ba06bfc855ec16f11ba91b1", + "rules": [ + "no-undef" + ] + }, + "widbt_notify/widget.js": { + "hash": "16372ffcbc6bd1419ca326c7da40c2195f82a4bfceb6f123c15872624c4f0adf", + "rules": [ + "no-undef" + ] + }, + "widbgjs/widget.js": { + "hash": "9852ce9aafb0a1ca3029d497282c8cdf07438ea36a3323313bad5b7569b1081b", + "rules": [ + "no-undef" + ] + }, + "warpdrive/app.js": { + "hash": "c2f9113c4d298a3021ec4bc0bc5f5d1bcd88267b4fa2acc03ae17d6447ed7d00", + "rules": [ + "no-undef" + ] + }, + "usgs/settings.js": { + "hash": "af1b7bc7e041c1e6988b407b6c8ee66dbd6a0e181a20caf102d2abdb6dbd5ac0", + "rules": [ + "no-undef" + ] + }, + "usgs/app.js": { + "hash": "d02d04181bb0b6a49ff85e59255b09d4bf63a674db9312912bf39f344af5cabe", + "rules": [ + "no-undef" + ] + }, + "timerclk/timer.alert.js": { + "hash": "319b1e8779325199fa17136da5dc486786d9e05255ab917e8d65255405cb619f", + "rules": [ + "no-undef" + ] + }, + "timecal/timecal.app.js": { + "hash": "9ad04daff299db71901a07d2d1d5116e273287041e9c342c3cd7a4b67db12936", + "rules": [ + "no-undef" + ] + }, + "tictactoe/app.js": { + "hash": "ab459d8ceff1cbcf8fb10360dcfd3cef8130b59500adf404cf443f81e145099e", + "rules": [ + "no-undef" + ] + }, + "thering/calc_precentages.js": { + "hash": "90a1e2e6c3fe94c7929352fc2079f176a143c5aae681ae2c634324b4a782419c", + "rules": [ + "no-undef" + ] + }, + "tetris/tetris.app.js": { + "hash": "28299187d19e3646ea071a970b9bb9308027d1d31f61957d4a27c9b5670bd381", + "rules": [ + "no-undef" + ] + }, + "terminal/app.js": { + "hash": "19d4913fed5a8817e3e60caf04aa6b45413ed683cf5b2c5b6859bd9080d37a34", + "rules": [ + "no-undef" + ] + }, + "tempgraph/app.js": { + "hash": "594ee481fb06bcee226ff2e9adff49543a4fb94985a434a99066c5898f205a43", + "rules": [ + "no-undef" + ] + }, + "taglaunch/app.js": { + "hash": "944689f0600e59bbe4d9e5e2684baeefabe4457a6edd938aae451dc4cd659ad3", + "rules": [ + "no-undef" + ] + }, + "tabanchi/app.js": { + "hash": "6ad6dc1d6b0f539f9f659d5773b5a26d19eb6dacafe7b4682469e6f3c412647e", + "rules": [ + "no-undef" + ] + }, + "swp2clk/settings.js": { + "hash": "2d9de7ffdf171f6e7b058741046c8a326cf9d5dba651f52fcdb523214b08d626", + "rules": [ + "no-undef" + ] + }, + "sunclock/app.js": { + "hash": "54f49294816e06907003a71289a8b79641b1cd082044fb22bb4c4b80f6845459", + "rules": [ + "no-undef" + ] + }, + "stressless/app.js": { + "hash": "5eb7361a7b92d9c6c3eb3aba418161c680873f12a48a4b52b08dd1c6abc71b96", + "rules": [ + "no-undef" + ] + }, + "stetho/stetho.js": { + "hash": "2fa9afb115cecdeba584195b1eba2ff2a85ff1f6fc012f1e6af50887c5db0fcd", + "rules": [ + "no-undef" + ] + }, + "stepo/app.js": { + "hash": "67f620970949011b962fb2a2a1bc9fe44cf2dee2e3342d9c6b3399318d6dbc17", + "rules": [ + "no-undef" + ] + }, + "spotrem/app.js": { + "hash": "35f3ee5371acde28427fd01e191ff58108d3d9e4db1a221dca081b7a7b9c3c77", + "rules": [ + "no-undef" + ] + }, + "speedalt/app.js": { + "hash": "2c8a2c0d7f60a8c25ee86e943f59df8fb5816ceac00e9e077220227d8885b133", + "rules": [ + "no-undef" + ] + }, + "spacew/prep/minitar.js": { + "hash": "573da8daeb53099d7122525e1e424f8d6fcdf928d0cec4fd8955a4e185a1cfe9", + "rules": [ + "no-undef" + ] + }, + "sokoban/app.js": { + "hash": "57f0b0fc0be15e6b4934467dbe3b786b564de9f05d21ab8419dc044f42ca2f9c", + "rules": [ + "no-undef" + ] + }, + "snek/snek.js": { + "hash": "b278a2b65b84d30c556abc5110bf7b3217d1f2fd5df3fccdb98dbc5a0e31eb38", + "rules": [ + "no-undef" + ] + }, + "slopeclockpp/app.js": { + "hash": "f6e3f6723ed4fc71a3cacb3d24ec4fb47447a65d495adccb9d86333c19d4d0bd", + "rules": [ + "no-undef" + ] + }, + "slopeclock/app.js": { + "hash": "fe29b4674b3e3a791898fd2067acc7c0fcb433dc8d4a8e8e3338c6d42a6c468f", + "rules": [ + "no-undef" + ] + }, + "sleeplogalarm/settings.js": { + "hash": "453935949ffcceddfc640a02263e4aff440751566555bd27bf6c22774ebf4703", + "rules": [ + "no-undef" + ] + }, + "sleeplogalarm/lib.js": { + "hash": "9f865aaf07755f52b4cdc52fb884784bfec0404b271a48868d489403290bbbd7", + "rules": [ + "no-undef" + ] + }, + "sleeplog/boot.js": { + "hash": "b4c9d8e3c3e7cdf44ea10e29a9e3b53f958b86c21ca91d88e4efb85901c3bde9", + "rules": [ + "no-undef" + ] + }, + "scicalc/app.js": { + "hash": "416c7b2eb12a5d10bcc3a99d89d8f6f54ecd2b47cce2d1f4d55c3e3bc602b31a", + "rules": [ + "no-undef" + ] + }, + "schoolCalendar/fullcalendar/locales-all.js": { + "hash": "475805ad0fda6abafcaf2101619d6328ab2ef0bd758e2354983310c969a8e222", + "rules": [ + "no-undef" + ] + }, + "runplus/karvonen.js": { + "hash": "3011bbc5afc3e17bb873f4544d680acc8765105dd825417eadb01047ecadbcb7", + "rules": [ + "no-undef" + ] + }, + "rescalc/app.js": { + "hash": "925f00a439817fadf92f4e7a7fcd509eb9d9c7e1e4309e315ea92a6881e18b4b", + "rules": [ + "no-undef" + ] + }, + "regattatimer/app.js": { + "hash": "8d579cc62d82599f776e5e230651f03481f18c3934f35f4fedfb6382a46db861", + "rules": [ + "no-undef" + ] + }, + "ratchet_launch/app.js": { + "hash": "592d432301d7836aa54e288d465ae8952ecb891d628f824ea9f62479a2a01631", + "rules": [ + "no-undef" + ] + }, + "rclock/rclock.app.js": { + "hash": "8e698787730601a1bba71aff03204c2adfaf7eeb77b35dc706534755f63f613b", + "rules": [ + "no-undef" + ] + }, + "qrcode/qr-scanner-worker.min.js": { + "hash": "c1dae679244ade99e144b74a9b2d18d27e1066c69b772f34fd77ec30876b6599", + "rules": [ + "no-undef" + ] + }, + "qmsched/lib.js": { + "hash": "02b6c99f1c31b58552bbab67ff655a902bb37fd54497ba1dbbd9b9bb81912423", + "rules": [ + "no-undef" + ] + }, + "qalarm/app.js": { + "hash": "f8b2d296af5e034f1e596ac30716192b2ecdf39acac2d10e347cdbfc8040f3c8", + "rules": [ + "no-undef" + ] + }, + "puzzle15/puzzle15.app.js": { + "hash": "fc1e5c8f888aa5635ac2c55670f42f3aa1f8abb712379aa0a563f421c4d5d662", + "rules": [ + "no-undef" + ] + }, + "presentation_timer/presentation_timer.app.js": { + "hash": "edb5e46a495bbe65843ec29c079eb401458439b2c5642a713e5d4a7fa80a0bcb", + "rules": [ + "no-undef" + ] + }, + "pomoplus/common.js": { + "hash": "52d7d91b6e5107158b78e5707d6a078490a9a09569669ea8f7c2eb88461b1004", + "rules": [ + "no-undef" + ] + }, + "pomodo/pomodoro.js": { + "hash": "7321de537188d707844da5150e36c6d83db53d95226cc4ec275a6f62988df38e", + "rules": [ + "no-undef" + ] + }, + "planetarium/planetarium.app.js": { + "hash": "0fef48b9b56c9706136a4c1cd0aae1be42821bf061ef33a77491f1275199c622", + "rules": [ + "no-undef" + ] + }, + "pinsafe/app.js": { + "hash": "624b3e70159e0d7eff05fd444d77b9f4fadb0796b878473b61c5b79912303fbe", + "rules": [ + "no-undef" + ] + }, + "pie/app.js": { + "hash": "ff72f99338eaa2004a0b912de1997859353b9e6347c82c570079d562bd749ada", + "rules": [ + "no-undef" + ] + }, + "pastel/pastel.app.js": { + "hash": "c5d2f1e179a7c0dec451e590659ff3080249d59d069b3b738c20dd6068ac98ce", + "rules": [ + "no-undef" + ] + }, + "owmweather/boot.js": { + "hash": "10fe98e871a7df3338fc764d62ac4db65c20c44774aad112f5faf26c7497f78e", + "rules": [ + "no-undef" + ] + }, + "openwind/app.js": { + "hash": "91bfda771bd5cc3127ede3b52f5f088b733ac9e7fc2d8dff4f1d732e66a8af47", + "rules": [ + "no-undef" + ] + }, + "openloc/app.js": { + "hash": "d312cc117410f72407ad1e1ffcb0f76d5e2601c5e9f82a318bc4b979eb1d887d", + "rules": [ + "no-undef" + ] + }, + "omnitrix/omnitrix.app.js": { + "hash": "5de9fb74c9a33d0c35d1cd6260c954cd5e2c9352da3b53406acd6eea9e7e1971", + "rules": [ + "no-undef" + ] + }, + "numerals/numerals.settings.js": { + "hash": "5a35ba644c88f778633e123b9c0e7c931914ae4cf2f260a8d1a322666b07f826", + "rules": [ + "no-undef" + ] + }, + "numberchaser/app.js": { + "hash": "5d152fc1d62e171fa09d3312f05ec1dc397b71ab187b1dcff3e88334dc77c66b", + "rules": [ + "no-undef" + ] + }, + "noteify/app.js": { + "hash": "f0a403bcae6d1d4b9c019dc4ab335f9936c782115010a5e5f9e0cf7db2e9cb50", + "rules": [ + "no-undef" + ] + }, + "neonx/neonx.settings.js": { + "hash": "39df1566e1e4fb139076c34f1db098304b973f1c1df0d60ba655942b21b948af", + "rules": [ + "no-undef" + ] + }, + "mywelcome/app-bangle1.js": { + "hash": "d569916d2a07f067c96ab45f23b12bf68579c9861927613e228c4536485c1454", + "rules": [ + "no-undef" + ] + }, + "multidice/app.js": { + "hash": "4657e0c1a72c555426561f4395febea280d4140cfeba19429c4f0c4737caf7f5", + "rules": [ + "no-undef" + ] + }, + "mtgwatchface/app.js": { + "hash": "7f5ffbd611368003fced26cab9e42dee2bb66b615176ca075198aaf6417b21c9", + "rules": [ + "no-undef" + ] + }, + "mmind/mmind.app.js": { + "hash": "fc9506070d08611f0f2b589b851d93da828bd64f6ad169047ff69691f6575867", + "rules": [ + "no-undef" + ] + }, + "mitherm/app.js": { + "hash": "6e207eced2154ef2a8e510233b9132d338104606c97337f3c7d18db4107bc0a5", + "rules": [ + "no-undef" + ] + }, + "miclock/clock-mixed.js": { + "hash": "712bf8d58dc9f3c7c7b5e063eb78ad243da2ae8bdbdacb19c4f15204c8b5d1e7", + "rules": [ + "no-undef" + ] + }, + "metronome/metronome.js": { + "hash": "78fd7e9466300aeae10ec66c078e2f23c52af6f5d18558efa3d406763059072a", + "rules": [ + "no-undef" + ] + }, + "messagesoverlay/lib.js": { + "hash": "16b61778a78b52043d32adaeca25591aa695d171b91dcef2313ce26ccf5f4495", + "rules": [ + "no-undef" + ] + }, + "messages_light/messages_light.listener.js": { + "hash": "8226cf170d50a30257f3dfdc1dc7cc0e54539aaad263e21340f6d7aa91db8f65", + "rules": [ + "no-undef" + ] + }, + "messages_light/messages_light.app.js": { + "hash": "517584cd07b401a1d43a54ae88cc3870f099de7e8ae2aa1cacef3bf5cc1649f2", + "rules": [ + "no-undef" + ] + }, + "messagegui/app.js": { + "hash": "6ffb405ae2f1e62f5d1ff19888cbfd71e40850752ea8c49a1cc2e358fca7de80", + "rules": [ + "no-undef" + ] + }, + "marioclock/marioclock-app.js": { + "hash": "d46990c757fd217593c6966c82f421bcd51a4d073109dea2cbc398a0f6064602", + "rules": [ + "no-undef" + ] + }, + "limelight/limelight.app.js": { + "hash": "4415ede30b8414a2373a1037168a371470b385c05040a2f2556d3d2fcf52e400", + "rules": [ + "no-undef" + ] + }, + "launch/app.js": { + "hash": "7d5b7d7f2adbe4c8c137f76b6560a06437ab142cfeffb3f0ff261f1250a6b687", + "rules": [ + "no-undef" + ] + }, + "kitchen/stepo2.kit.js": { + "hash": "b7660bef1a2560f23ff696b03d297cdd39936ca61c01b3d0a316d49f9cf72590", + "rules": [ + "no-undef" + ] + }, + "kitchen/stepo.kit.js": { + "hash": "4160dcd4b95295f44de3bc9b8fb4ce1ad8f12592001f5dcb3771f22741b145f9", + "rules": [ + "no-undef" + ] + }, + "kitchen/kitchen.app.js": { + "hash": "1ef7b31e52110e34fb952d7ba0426c8bd9574e5f18be9fbc3b8ad1cc762dda21", + "rules": [ + "no-undef" + ] + }, + "kitchen/digi.kit.js": { + "hash": "e1acdef5e41103793c397aa8fdda73e9b10d2432a84d95da48d4730ad55edb4e", + "rules": [ + "no-undef" + ] + }, + "keytimer/keypad.js": { + "hash": "26df9a67b28d3767c7bfe6bb597c6bbb0c70f77fe29f4b21e99c24de62c84586", + "rules": [ + "no-undef" + ] + }, + "keytimer/common.js": { + "hash": "5cd0e0e924eefa951240330eaf483338003fcb0cc106d140210a8605172e4bb8", + "rules": [ + "no-undef" + ] + }, + "kanawatch/app.js": { + "hash": "01c3fede367b7cbdbaf6b532ebfd4e6ffff61b2e20ce44b25dd04117853a44f2", + "rules": [ + "no-undef" + ] + }, + "ios/boot.js": { + "hash": "875f34ea333f9e1c28dd0cf0c0a73ec7003bd8f03e2ed6632b7978ce7b5f5c7e", + "rules": [ + "no-undef" + ] + }, + "infoclk/settings.js": { + "hash": "56adc3eff3cbc04dd08238ed7e559416ebbc7736c872070c757d70bf5f31b440", + "rules": [ + "no-undef" + ] + }, + "infoclk/app.js": { + "hash": "27cc368eb1be14658db7fd482e78c4bc7673e2a1c68bc3a1a5f7c7e29915ca88", + "rules": [ + "no-undef" + ] + }, + "imageclock/demomode.js": { + "hash": "8abf4190406be6b5c9699cbf77aa7fc3a351f16212fc8809b8ed02e4fca691eb", + "rules": [ + "no-undef" + ] + }, + "hrrawexp/app.js": { + "hash": "12d88a46a0006792b92735c6850866d09bf6a7dcae7f2cc457a49b27f618c32f", + "rules": [ + "no-undef" + ] + }, + "hrmmar/fftelim.js": { + "hash": "96fa4fd14ff0f6dc5eeda903c6a7b27e71a8e845ed3f0c2b1cafb8e1e53bb405", + "rules": [ + "no-undef" + ] + }, + "hrm/heartrate.js": { + "hash": "beb8e433f10d3639b343b060f0d5583ea665445f92b2171daff7612eaf135596", + "rules": [ + "no-undef" + ] + }, + "hebrew_calendar/app.js": { + "hash": "3077d581b9fcf73816e265e61105a0692356b89e8ed41a82be51960ae26fc8de", + "rules": [ + "no-undef" + ] + }, + "heartzone/app.js": { + "hash": "0eab7e375ba25992b335a2589f80ce341b830cf0ae206c21eec664883f4e7de0", + "rules": [ + "no-undef" + ] + }, + "health/app.js": { + "hash": "6d612eed04ee5a844be6ad47c326624cd3e204fecf1c28c99a57ca963b3d7a7b", + "rules": [ + "no-undef" + ] + }, + "hassio/hassio.app.js": { + "hash": "b8fbb03cf4a7595299e65a46c4f850394bf57cd4cba879d5524eafbf40ccc32e", + "rules": [ + "no-undef" + ] + }, + "gpstouch/geotools.js": { + "hash": "5816fbb2dd630f574e5ee505e1b9ec6f80c3c53778b7a5520e5db28b91cdffc5", + "rules": [ + "no-undef" + ] + }, + "gpssetup/gpssetup.js": { + "hash": "a63f670f4adf04895e6837270fcf19bd56f0a6d049cfb8e3ad8928c283d1bfd3", + "rules": [ + "no-undef" + ] + }, + "gpsinfo/gps-info.js": { + "hash": "1eb77f45d4182613879b8214dc174f84c7333b4a541c2b43cba6014a16f470ee", + "rules": [ + "no-undef" + ] + }, + "glbasic/glbasic.app.js": { + "hash": "7d12a030d6f0ef69a0e5a9783229fd49c0a6a06bf751e3ac562145d2ce8350e9", + "rules": [ + "no-undef" + ] + }, + "gipy/app.js": { + "hash": "41f342e8ef6f2a87b3aea19b75ee45cfdfeff723b94281049e3ae0ec89cddba5", + "rules": [ + "no-undef" + ] + }, + "geissclk/precompute.js": { + "hash": "2317812a9e348e7883e93a4be9e294ad7accd4dc3f0e31ee00343e2412030f98", + "rules": [ + "no-undef" + ] + }, + "gbridge/sample_messages.js": { + "hash": "4d0139c7575cdd817338beff88cdb299caba555c5e3666535f92abc76643e466", + "rules": [ + "no-undef" + ] + }, + "gbmusic/boot.js": { + "hash": "1bf553c4c3452eae3930b4a08cd3e01efc2686fcb19fd2c4f9aa949b7768ff4c", + "rules": [ + "no-undef" + ] + }, + "gallifr/app.js": { + "hash": "710063b833ce75cae54a6d0b3309653c59ae5d0e4c2cccd930921621a74f316c", + "rules": [ + "no-undef" + ] + }, + "fuzzyw/fuzzyw.app.js": { + "hash": "dbef30fe5639a240ada0968491c73242092bd2db7f3b060ef9c2f66a6cbbb19d", + "rules": [ + "no-undef" + ] + }, + "fontclock/fontclock.js": { + "hash": "478c96b1319d548a79727c5af3191b77ac9753c6314789570e900e512a99a152", + "rules": [ + "no-undef" + ] + }, + "fontclock/fontclock.hourscriber.js": { + "hash": "eed20b508d336d24b827a8fb7954f7f4bc67bc85a6f3fc7c08aba9ef886c7f03", + "rules": [ + "no-undef" + ] + }, + "flightdash/jquery-csv.min.js": { + "hash": "cc6a3425b6794a7eb053be8cc952f44eb51952ae462d76859cc4027bf852c152", + "rules": [ + "no-undef" + ] + }, + "flightdash/flightdash.settings.js": { + "hash": "bff26577f949c2b92405b0c2f073c69c4901f855b7d5d4deffb756f5a7fef424", + "rules": [ + "no-undef" + ] + }, + "flightdash/flightdash.app.js": { + "hash": "a140a630986fbaaf3845c3623e645a99d035a31c2cc8500948ad33b7e4e23a8a", + "rules": [ + "no-undef" + ] + }, + "fileman/fileman.app.js": { + "hash": "f378179e7dd3655ba7e9ce03e1f7fd5a2d1768ad7d9083b22e7d740405be842a", + "rules": [ + "no-undef" + ] + }, + "flappy/app.js": { + "hash": "e24b0c5e0469070e02dae00887bf50569c2c141a80c7c356b36987ddf68ce9cc", + "rules": [ + "no-undef" + ] + }, + "drinkcounter/app.js": { + "hash": "6652cbf7d08583a5b6a07b90a89004f419adbc378673cd1f134c74976f5c421f", + "rules": [ + "no-undef" + ] + }, + "drained/boot.js": { + "hash": "914ea2c47aa6b9502b9dd354d490b2a8b838d4c6fafaa20e206f1f2396d4db40", + "rules": [ + "no-undef" + ] + }, + "drained/app.js": { + "hash": "2b609ca5bf414b0e400e25512bf396a01f8cb0365b4edd02ea1697b51907d36c", + "rules": [ + "no-undef" + ] + }, + "dinoClock/app.js": { + "hash": "e97566aa4f586ef654e3fc1ec286376352762ed8e0ea2e685a7b3ae687f51552", + "rules": [ + "no-undef" + ] + }, + "diceroll/app.js": { + "hash": "5c603cc10b6c8344aa5e73beacfd4f11f1ef26404b7f813b6742f7cdd3f5e94d", + "rules": [ + "no-undef" + ] + }, + "demoapp/app.js": { + "hash": "6d2f11bea7fc451cc6cb4e60bb45f5264193e0a008578efbf09d4af4837927a9", + "rules": [ + "no-undef" + ] + }, + "cubescramble/cube-scramble.js": { + "hash": "d89eeb6b5851929a3272fd83fce18335dd61b966691d2f3694d50686b10e4f27", + "rules": [ + "no-undef" + ] + }, + "cprassist/cprassist.js": { + "hash": "647f0a1b3dc52466079049a68c27448c18693df8deb1eb8e04ff84fcb93c323e", + "rules": [ + "no-undef" + ] + }, + "coretemp/coretemp.js": { + "hash": "7230802388f9cbb7026ce0e94ced6656dc79a411ef7740279ec82eb4fc892d48", + "rules": [ + "no-undef" + ] + }, + "contourclock/lib.js": { + "hash": "1f2c43f7eb0cdcf3ab09f242022820f6af2962ca48226b9cde15623e61f80458", + "rules": [ + "no-undef" + ] + }, + "contourclock/contourclock.settings.js": { + "hash": "dfbd3057e8dba227b7f83e28c1efea44ac8b3a1312a61c1b4896b8786b96c342", + "rules": [ + "no-undef" + ] + }, + "contacts/contacts.app.js": { + "hash": "f105adae91ef5bb79266bd20b8f1f5aaebe9863853c714d1f2b22c97d9ff7773", + "rules": [ + "no-undef" + ] + }, + "clockcal/settings.js": { + "hash": "2065b3e1e978cd0b04dabd51e2dec7475ec72784312f9598039c048f0fa2b387", + "rules": [ + "no-undef" + ] + }, + "clockcal/app.js": { + "hash": "645b7186be93cfe80c288dac7834e10d1f653eea6bea8522e2f916ea97db246d", + "rules": [ + "no-undef" + ] + }, + "calendar/settings.js": { + "hash": "9f05366b91d0293ed965d8de019bfd044f96683542b86ebabaa3c8d3cc3ad3a7", + "rules": [ + "no-undef" + ] + }, + "calendar/calendar.js": { + "hash": "d4f0375fea397a1b93d39667e9f8eaf1a75ebd0462c216015352131360d30099", + "rules": [ + "no-undef" + ] + }, + "btmultimeter/app.js": { + "hash": "6c403764899fece882b7d900780257f7cf661bc948547d6c6f0ca2c0966d67dc", + "rules": [ + "no-undef" + ] + }, + "bordle/bordle.app.js": { + "hash": "a7725c08cb16d79c44dc9ce8a26bf0c878437ba4f48f5633d15546c15f49c4bc", + "rules": [ + "no-undef" + ] + }, + "bluetoothdock/app.js": { + "hash": "af48c70a33190ecf6aec42a8286166f750bd66bd96dfa8dd97691aba4e6bca63", + "rules": [ + "no-undef" + ] + }, + "beebclock/beebclock.js": { + "hash": "f2860eb523d6394de737d249303a87a96c619ce925943026238d2aedc2441133", + "rules": [ + "no-undef" + ] + }, + "berlinc/berlin-clock.js": { + "hash": "1b69f19c94b35e70283872ec8423e5195d16fbee538f7af5169259100b640fad", + "rules": [ + "no-undef" + ] + }, + "bee/bee.app.js": { + "hash": "684ed07883a14d7f277e8fa16bf739e0a0edb564339a74210ae5ca60707fe780", + "rules": [ + "no-undef" + ] + }, + "banglebridge/widget.js": { + "hash": "4ee8d6749e1d0e28c58ad871fd9f6ccbca2d716bb4fbd3511ba4c34a6a5897e1", + "rules": [ + "no-undef" + ] + }, + "bad/bad.app.js": { + "hash": "d1354613102818190dd4e6e28fd715db7dc4d51b8e618cae61a3135529cc97eb", + "rules": [ + "no-undef" + ] + }, + "aviatorclk/aviatorclk.app.js": { + "hash": "5bc629c86eada72533fc664e01a47e05f207baeeae2092323ae4d04bd1c9fe9a", + "rules": [ + "no-undef" + ] + }, + "authentiwatch/app.js": { + "hash": "02aafe5b6f3f3dce979d5b04f4660f90261e0c893cb39e9eeb2cf0bdb2c256b8", + "rules": [ + "no-undef" + ] + }, + "aptsciclk/app.js": { + "hash": "0b33e7508e461a7e946ecfc5784b48e1d18df18f4d7dcad7c17cb2ff763df932", + "rules": [ + "no-undef" + ] + }, + "approxclock/app.js": { + "hash": "675ce5f16bb26649a39c86561e9fa46bb31e369a465fac9b35e5debfe18672ec", + "rules": [ + "no-undef" + ] + }, + "android/test.js": { + "hash": "703dad907d9b17d281faca2ecd9099d9f127e7241b48c7617f9147978ddb7c43", + "rules": [ + "no-undef" + ] + }, + "android/boot.js": { + "hash": "a537b3f7772e11f44615d80d6c6bacfa69c1854c6da3c01666863bcae8a18059", + "rules": [ + "no-undef" + ] + }, + "altimeter/app.js": { + "hash": "054ac328db51034aa339f1d10b4d264badd49438b95f08bc6fbfb90bd88c6ae0", + "rules": [ + "no-undef" + ] + }, + "alpinenav/app.js": { + "hash": "f8e59724d282f7c5c989adf64974a3728dc521aa8fbe047b7c37dae09213095a", + "rules": [ + "no-undef" + ] + }, + "activepedom/app.js": { + "hash": "c57c787ac33834dce2291562af8106b7a9de1f7116cdeab2a4236004e723273a", + "rules": [ + "no-undef" + ] + }, + "accelrec/app.js": { + "hash": "b5369a60afc8f360f0b33f71080eb3f5d09a1bf3703acfcf07cd80dd19f1997d", + "rules": [ + "no-undef" + ] + }, + "BLEcontroller/app-joy.js": { + "hash": "e4f34bb1bc11b52c3d7a1c537a140b0e23ccef82694dcd602cb517a8ba342898", + "rules": [ + "no-undef" + ] + }, + "BLEcontroller/app.js": { + "hash": "d560cb6d847be8d5c724b1f2af9a68f113a6dca91f3a74897f79bbde9be9922c", + "rules": [ + "no-undef" + ] + }, + "BLEcontroller/app-ex2.js": { + "hash": "a72fccb6079c80c1c17e208e343c65f0980c94397816a1ac2423ba47bba75776", + "rules": [ + "no-undef" + ] + }, + "7x7dotsclock/7x7dotsclock.settings.js": { + "hash": "83f7222a1db7ef7a2e25fed580417eb8a77146ed3431355d3472edc62f6ae242", + "rules": [ + "no-undef" + ] + }, + "7x7dotsclock/7x7dotsclock.app.js": { + "hash": "dd6a87c62dc79039754338ee9f578dbf13f05d8af511009f8cafee97643df6cb", + "rules": [ + "no-undef" + ] + }, + "2047pp/2047pp.app.js": { + "hash": "37283d6c44810b82586b191dd50fe2e6ceab68685653ac520cfde723f56f2605", + "rules": [ + "no-undef" + ] } }; diff --git a/apps/macwatch/ChangeLog b/apps/macwatch/ChangeLog index 221d3fb57..9a0d3d731 100644 --- a/apps/macwatch/ChangeLog +++ b/apps/macwatch/ChangeLog @@ -1 +1,2 @@ 0.01: Created my first BangleJS app! +0.02: Minor code improvements diff --git a/apps/macwatch/app.js b/apps/macwatch/app.js index fb9712a36..eb169ee0d 100644 --- a/apps/macwatch/app.js +++ b/apps/macwatch/app.js @@ -4,6 +4,7 @@ function draw() { g.reset(); g.setFontCustom(font, 48, 8, 1801); g.setFontAlign(0, -1, 0); + let line1, line2; if (showDate) { if (g.theme.dark) { g.setColor("#00ffff"); // cyan date numbers for dark mode diff --git a/apps/macwatch/metadata.json b/apps/macwatch/metadata.json index 0a2558380..8d9b8224c 100644 --- a/apps/macwatch/metadata.json +++ b/apps/macwatch/metadata.json @@ -2,7 +2,7 @@ "name": "MacWatch", "shortName":"MacWatch", "icon": "app.png", - "version":"0.01", + "version": "0.02", "description": "Simple clock with classic Mac font", "type": "clock", "tags": "clock", diff --git a/apps/macwatch2/ChangeLog b/apps/macwatch2/ChangeLog index 12559d732..14f8e3778 100644 --- a/apps/macwatch2/ChangeLog +++ b/apps/macwatch2/ChangeLog @@ -4,3 +4,4 @@ 0.04: Changed clock to use 12/24 hour format based on locale 0.05: Tell clock widgets to hide. 0.06: Widgets can now be made visible by swiping down (#2196) +0.07: Minor code improvements diff --git a/apps/macwatch2/app.js b/apps/macwatch2/app.js index 36917a988..fab2ec036 100644 --- a/apps/macwatch2/app.js +++ b/apps/macwatch2/app.js @@ -36,9 +36,9 @@ function draw() { g.drawString(hh, 52, 65, true); g.drawString(mm, 132, 65, true); g.drawString(':', 93,65); - dd = ("0"+(new Date()).getDate()).substr(-2); - mo = ("0"+((new Date()).getMonth()+1)).substr(-2); - yy = ("0"+((new Date()).getFullYear())).substr(-2); + const dd = ("0"+(new Date()).getDate()).substr(-2); + const mo = ("0"+((new Date()).getMonth()+1)).substr(-2); + const yy = ("0"+((new Date()).getFullYear())).substr(-2); g.setFontCustom(font, 48, 8, 521); g.drawString(dd + ':' + mo + ':' + yy, 88, 120, true); } diff --git a/apps/macwatch2/metadata.json b/apps/macwatch2/metadata.json index 701c82102..de2479049 100644 --- a/apps/macwatch2/metadata.json +++ b/apps/macwatch2/metadata.json @@ -2,7 +2,7 @@ "name": "MacWatch2", "shortName":"MacWatch2", "icon": "app.png", - "version":"0.06", + "version": "0.07", "description": "Classic Mac Finder clock", "type": "clock", "tags": "clock", diff --git a/apps/messageicons/icons/generate.js b/apps/messageicons/icons/generate.js index 4b52ae167..854e04143 100755 --- a/apps/messageicons/icons/generate.js +++ b/apps/messageicons/icons/generate.js @@ -5,6 +5,8 @@ // default icon must come first in icon_names +/* eslint-env node */ + var imageconverter = require("../../../webtools/imageconverter.js"); var icons = JSON.parse(require("fs").readFileSync(__dirname+"/icon_names.json")); const imgOptions = { diff --git a/apps/miclock2/ChangeLog b/apps/miclock2/ChangeLog index c34ba135c..5e4a7120d 100644 --- a/apps/miclock2/ChangeLog +++ b/apps/miclock2/ChangeLog @@ -2,3 +2,4 @@ 0.02: Redraw only when seconds change 0.03: Fix typo in redraw check 0.04: Register as clock and implement fast loading +0.05: Minor code improvements diff --git a/apps/miclock2/clock-mixed.js b/apps/miclock2/clock-mixed.js index e6bc0c094..828a02783 100644 --- a/apps/miclock2/clock-mixed.js +++ b/apps/miclock2/clock-mixed.js @@ -69,7 +69,7 @@ const drawMixedClock = function() { buf.drawString(dateArray[3], 237, 176, true); // draw hour and minute dots - for (i = 0; i < 60; i++) { + for (let i = 0; i < 60; i++) { radius = (i % 5) ? 2 : 4; rotatePoint(0, Radius.dots, i * 6, Center, point); buf.fillCircle(point[0], point[1], radius); diff --git a/apps/miclock2/metadata.json b/apps/miclock2/metadata.json index f177ab4c1..6f586c696 100644 --- a/apps/miclock2/metadata.json +++ b/apps/miclock2/metadata.json @@ -1,7 +1,7 @@ { "id": "miclock2", "name": "Mixed Clock 2", - "version": "0.04", + "version": "0.05", "description": "White color variant of the Mixed Clock with thicker clock hands for better readability in the bright sunlight, extra space under the clock for widgets and seconds in the digital clock.", "icon": "clock-mixed.png", "type": "clock", diff --git a/apps/miplant/ChangeLog b/apps/miplant/ChangeLog index 71da064cb..f7ea7b52d 100644 --- a/apps/miplant/ChangeLog +++ b/apps/miplant/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Adjust alignment for >1 device found +0.03: Minor code improvements diff --git a/apps/miplant/app.js b/apps/miplant/app.js index b6c4ab89a..939b9105f 100644 --- a/apps/miplant/app.js +++ b/apps/miplant/app.js @@ -21,7 +21,7 @@ function parseDevice(device) { var l = d.getUint8(offset+2); var code = d.getUint16(offset,true); if (!deviceInfo[device.id]) deviceInfo[device.id]={id:device.id}; - event = deviceInfo[device.id]; + let event = deviceInfo[device.id]; switch (code) { case 0x1004: event.temperature = d.getInt16(offset+3,true)/10; break; case 0x1006: event.humidity = d.getInt16(offset+3)/10; break; diff --git a/apps/miplant/metadata.json b/apps/miplant/metadata.json index a949190c1..c862eddd2 100644 --- a/apps/miplant/metadata.json +++ b/apps/miplant/metadata.json @@ -2,7 +2,7 @@ "id": "miplant", "name": "Xiaomi Plant Sensor", "shortName": "Mi Plant", - "version": "0.02", + "version": "0.03", "description": "Reads and displays data from Xiaomi bluetooth plant moisture sensors", "icon": "app.png", "tags": "xiaomi,mi,plant,ble,bluetooth", diff --git a/apps/mosaic/ChangeLog b/apps/mosaic/ChangeLog index acebd4321..c8a862a46 100644 --- a/apps/mosaic/ChangeLog +++ b/apps/mosaic/ChangeLog @@ -1,3 +1,4 @@ 0.01: First release 0.02: Use locale time -0.03: Change for fast loading, use widget_utils to hide widgets \ No newline at end of file +0.03: Change for fast loading, use widget_utils to hide widgets +0.04: Minor code improvements diff --git a/apps/mosaic/metadata.json b/apps/mosaic/metadata.json index d6eff12a7..73c293df5 100644 --- a/apps/mosaic/metadata.json +++ b/apps/mosaic/metadata.json @@ -2,7 +2,7 @@ "id":"mosaic", "name":"Mosaic Clock", "shortName": "Mosaic Clock", - "version": "0.03", + "version": "0.04", "description": "A fabulously colourful clock", "readme": "README.md", "icon":"mosaic.png", diff --git a/apps/mosaic/mosaic.app.js b/apps/mosaic/mosaic.app.js index 7fcb631f1..98ed9645c 100644 --- a/apps/mosaic/mosaic.app.js +++ b/apps/mosaic/mosaic.app.js @@ -76,7 +76,7 @@ g.clear(); loadSettings(); loadThemeColors(); -offset_widgets = settings.showWidgets ? 24 : 0; +const offset_widgets = settings.showWidgets ? 24 : 0; let available_height = g.getHeight() - offset_widgets; // Calculate grid size and offsets diff --git a/apps/multiclock/ChangeLog b/apps/multiclock/ChangeLog index 5a481b1d4..4c49c4100 100644 --- a/apps/multiclock/ChangeLog +++ b/apps/multiclock/ChangeLog @@ -9,3 +9,4 @@ 0.09: use setUI clockupdown for controls + fix small display bug in nifty face 0.10: stop widget field from flashing when moving to the dk clock face. 0.11: Minor code improvements +0.12: Minor code improvements diff --git a/apps/multiclock/big.face.js b/apps/multiclock/big.face.js index 2db4ee4d4..10513e2e8 100644 --- a/apps/multiclock/big.face.js +++ b/apps/multiclock/big.face.js @@ -7,7 +7,7 @@ const F = 132*H/240; // reasonable approximation function drawTime() { - d = new Date() + const d = new Date() g.reset(); var da = d.toString().split(" "); var time = da[4].substr(0, 5).split(":"); diff --git a/apps/multiclock/dk.face.js b/apps/multiclock/dk.face.js index bd815da96..dbe4af3a2 100644 --- a/apps/multiclock/dk.face.js +++ b/apps/multiclock/dk.face.js @@ -9,12 +9,12 @@ function drawClock(){ var now=Date(); - d=now.toString().split(' '); - var min=d[4].substr(3,2); + let d=now.toString().split(' '); + //var min=d[4].substr(3,2); //var sec=d[4].substr(-2); var tm=d[4].substring(0,5); //var hr=d[4].substr(0,2); - lastmin=min; + //lastmin=min; g.reset(); g.clearRect(0,24,W-1,H-1); g.setColor(g.theme.fg); diff --git a/apps/multiclock/metadata.json b/apps/multiclock/metadata.json index 8ebbef900..3a99cc831 100644 --- a/apps/multiclock/metadata.json +++ b/apps/multiclock/metadata.json @@ -1,7 +1,7 @@ { "id": "multiclock", "name": "Multi Clock", - "version": "0.11", + "version": "0.12", "description": "Clock with multiple faces. Switch between faces with BTN1 & BTN3 (Bangle 2 touch top-right, bottom right). For best display set theme Background 2 to cyan or some other bright colour in settings.", "screenshots": [{"url":"screen-ana.png"},{"url":"screen-big.png"},{"url":"screen-td.png"},{"url":"screen-nifty.png"},{"url":"screen-word.png"},{"url":"screen-sec.png"}], "icon": "multiclock.png", diff --git a/apps/multitimer/ChangeLog b/apps/multitimer/ChangeLog index fff0d3d23..8bf06a0d3 100644 --- a/apps/multitimer/ChangeLog +++ b/apps/multitimer/ChangeLog @@ -7,3 +7,4 @@ 0.07: Fix fastloading support - ensure drag handler's restored after menu display/fastload removes it 0.08: Add setting for initial page to display +0.09: Minor code improvements diff --git a/apps/multitimer/alarm.js b/apps/multitimer/alarm.js index b202ae662..6d7c03184 100644 --- a/apps/multitimer/alarm.js +++ b/apps/multitimer/alarm.js @@ -17,6 +17,7 @@ function hardMode(tries, max) { g.reset(); g.setClipRect(R.x,R.y,R.x2,R.y2); var code = Math.abs(E.hwRand()%4); + let dir; if (code == 0) dir = "up"; else if (code == 1) dir = "right"; else if (code == 2) dir = "down"; diff --git a/apps/multitimer/metadata.json b/apps/multitimer/metadata.json index 8ba946520..a5c236f67 100644 --- a/apps/multitimer/metadata.json +++ b/apps/multitimer/metadata.json @@ -1,7 +1,7 @@ { "id": "multitimer", "name": "Multi Timer", - "version": "0.08", + "version": "0.09", "description": "Set timers and chronographs (stopwatches) and watch them count down in real time. Pause, create, edit, and delete timers and chronos, and add custom labels/messages. Also sets alarms.", "icon": "app.png", "screenshots": [ diff --git a/apps/mylocation/ChangeLog b/apps/mylocation/ChangeLog index ea1c77bde..d733cb51c 100644 --- a/apps/mylocation/ChangeLog +++ b/apps/mylocation/ChangeLog @@ -8,3 +8,4 @@ 0.08: Allow setting location from webinterface in the AppLoader 0.09: Fix web interface so app can be installed (replaced custom with interface html) 0.10: Add waypoints as location source +0.11: Minor code improvements diff --git a/apps/mylocation/metadata.json b/apps/mylocation/metadata.json index 7e0d16d16..04789e469 100644 --- a/apps/mylocation/metadata.json +++ b/apps/mylocation/metadata.json @@ -4,7 +4,7 @@ "icon": "app.png", "type": "settings", "screenshots": [{"url":"screenshot_1.png"}], - "version":"0.10", + "version": "0.11", "description": "Sets and stores the latitude and longitude of your preferred City. It can be set from GPS, waypoints or webinterface. `mylocation.json` can be used by other apps that need your main location. See README for details.", "readme": "README.md", "tags": "tool,utility", diff --git a/apps/mylocation/settings.js b/apps/mylocation/settings.js index fcae0389c..09640b67a 100644 --- a/apps/mylocation/settings.js +++ b/apps/mylocation/settings.js @@ -51,7 +51,7 @@ function setFromGPS() { } function setFromWaypoint() { - wpmenu = { + const wpmenu = { '': { 'title': /*LANG*/'Waypoint' }, '< Back': ()=>{ showMainMenu(); }, }; diff --git a/apps/neonx/ChangeLog b/apps/neonx/ChangeLog index b055d6a15..d4a62b366 100644 --- a/apps/neonx/ChangeLog +++ b/apps/neonx/ChangeLog @@ -5,3 +5,4 @@ 0.05: Better lock/unlock animation 0.06: Use widget_utils 0.07: Convert Yes/No On/Off in settings to checkboxes +0.08: Minor code improvements diff --git a/apps/neonx/metadata.json b/apps/neonx/metadata.json index edd0e76b8..8cb55b09d 100644 --- a/apps/neonx/metadata.json +++ b/apps/neonx/metadata.json @@ -2,7 +2,7 @@ "id": "neonx", "name": "Neon X & IO X Clock", "shortName": "Neon X Clock", - "version": "0.07", + "version": "0.08", "description": "Pebble Neon X & Neon IO X for Bangle.js", "icon": "neonx.png", "type": "clock", diff --git a/apps/neonx/neonx.app.js b/apps/neonx/neonx.app.js index 7fcf01bde..2b5ce4e21 100644 --- a/apps/neonx/neonx.app.js +++ b/apps/neonx/neonx.app.js @@ -115,7 +115,7 @@ function drawAnimated(){ queueDraw(); // Animate draw through different colors - speed = 25; + const speed = 25; setTimeout(function() { _draw(false, 1); setTimeout(function() { diff --git a/apps/nixie/ChangeLog b/apps/nixie/ChangeLog index 7727f3cc4..b09594212 100644 --- a/apps/nixie/ChangeLog +++ b/apps/nixie/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/nixie/app.js b/apps/nixie/app.js index 2b948b120..8c06a4abc 100644 --- a/apps/nixie/app.js +++ b/apps/nixie/app.js @@ -237,7 +237,7 @@ for (let idx=0; idx*2 < points6.length; idx++) { points9[idx*2+1] = 99-points6[idx*2+1]; } -pointsArray = [points0, points1, points2, points3, points4, points5, points6, points7, points8, points9]; +const pointsArray = [points0, points1, points2, points3, points4, points5, points6, points7, points8, points9]; function eraseDigit(d, x, y) { if(d < 0 || d > 9) return; diff --git a/apps/nixie/metadata.json b/apps/nixie/metadata.json index df8c4653e..7b0139c7e 100644 --- a/apps/nixie/metadata.json +++ b/apps/nixie/metadata.json @@ -2,7 +2,7 @@ "id": "nixie", "name": "Nixie Clock", "shortName": "Nixie", - "version": "0.02", + "version": "0.03", "description": "A nixie tube clock for both Bangle 1 and 2.", "icon": "nixie.png", "type": "clock", diff --git a/apps/notanalog/ChangeLog b/apps/notanalog/ChangeLog index e011c4ae1..dbce71526 100644 --- a/apps/notanalog/ChangeLog +++ b/apps/notanalog/ChangeLog @@ -5,3 +5,4 @@ 0.05: Use internal step counter if no widget is available. 0.06: Use widget_utils. 0.07: Respect system setting for 12h or 24h time +0.08: Minor code improvements diff --git a/apps/notanalog/metadata.json b/apps/notanalog/metadata.json index 851e95ec8..00dcda4e4 100644 --- a/apps/notanalog/metadata.json +++ b/apps/notanalog/metadata.json @@ -3,7 +3,7 @@ "name": "Not Analog", "shortName":"Not Analog", "icon": "notanalog.png", - "version":"0.07", + "version": "0.08", "readme": "README.md", "supports": ["BANGLEJS2"], "description": "An analog watch face for people that can not read analog watch faces.", diff --git a/apps/notanalog/notanalog.app.js b/apps/notanalog/notanalog.app.js index c0c5fc077..3e19780fa 100644 --- a/apps/notanalog/notanalog.app.js +++ b/apps/notanalog/notanalog.app.js @@ -274,7 +274,7 @@ function handleState(fastUpdate){ // Set weather state.has_weather = true; try { - weather = require('weather').get(); + const weather = require('weather').get(); if (weather === undefined){ state.has_weather = false; state.temp = "-"; diff --git a/apps/ohmcalc/ChangeLog b/apps/ohmcalc/ChangeLog index 625982edd..5c69b19e8 100644 --- a/apps/ohmcalc/ChangeLog +++ b/apps/ohmcalc/ChangeLog @@ -2,3 +2,4 @@ 0.02: New Results menu item to show the formula and values used. 0.03: Adds haptics to Input screen and long press "C" to go back. 0.04: Fix font size not resetting on subsequent values in results screen +0.05: Minor code improvements diff --git a/apps/ohmcalc/app.js b/apps/ohmcalc/app.js index 5ef30aaa5..5b7d470aa 100644 --- a/apps/ohmcalc/app.js +++ b/apps/ohmcalc/app.js @@ -325,7 +325,7 @@ function calculateValue(calculatedVariable, variableValues) { // Move down for the next entry let nextTitleY = (i + 1 < titlePositions.length) ? titlePositions[i + 1] : titleY + 1.5 * fontSize + lineSpacing; - yPosition = nextTitleY; + //yPosition = nextTitleY; } g.flip(); }; diff --git a/apps/ohmcalc/metadata.json b/apps/ohmcalc/metadata.json index 252ece421..c72727a4c 100644 --- a/apps/ohmcalc/metadata.json +++ b/apps/ohmcalc/metadata.json @@ -2,7 +2,7 @@ "id": "ohmcalc", "name": "Ohm's Law Calculator", "shortName": "Ohm's Law Calc", - "version": "0.04", + "version": "0.05", "description": "A smart and simple calculator for Ohm's Law calculations, designed specifically for Bangle.js 2 smartwatches. Handles voltage, current, resistance, and power calculations with smart logic to prevent invalid inputs.", "icon": "app.png", "type": "app", diff --git a/apps/openstmap/ChangeLog b/apps/openstmap/ChangeLog index f0a1e5c5a..ec2c19e42 100644 --- a/apps/openstmap/ChangeLog +++ b/apps/openstmap/ChangeLog @@ -34,4 +34,5 @@ 0.27: Display message if no map is installed 0.28: Fix rounding errors 0.29: Keep exit at bottom of menu - Speed up latLonToXY for track rendering \ No newline at end of file + Speed up latLonToXY for track rendering +0.30: Minor code improvements diff --git a/apps/openstmap/app.js b/apps/openstmap/app.js index 2d14fbd2a..3882df946 100644 --- a/apps/openstmap/app.js +++ b/apps/openstmap/app.js @@ -252,7 +252,7 @@ function showMap() { hasScrolled = true; drawLocation(); } else if (hasScrolled) { - delta = getTime() - startDrag; + const delta = getTime() - startDrag; startDrag = 0; hasScrolled = false; if (delta < 0.2) { diff --git a/apps/openstmap/metadata.json b/apps/openstmap/metadata.json index 904c1bd94..3c03e7087 100644 --- a/apps/openstmap/metadata.json +++ b/apps/openstmap/metadata.json @@ -2,7 +2,7 @@ "id": "openstmap", "name": "OpenStreetMap", "shortName": "OpenStMap", - "version": "0.29", + "version": "0.30", "description": "Loads map tiles from OpenStreetMap onto your Bangle.js and displays a map of where you are. Once installed this also adds map functionality to `GPS Recorder` and `Recorder` apps", "readme": "README.md", "icon": "app.png", diff --git a/apps/orloj/ChangeLog b/apps/orloj/ChangeLog index 79da4daf2..d4f06dca3 100644 --- a/apps/orloj/ChangeLog +++ b/apps/orloj/ChangeLog @@ -1,2 +1,3 @@ 0.01: attempt to import 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/orloj/app.js b/apps/orloj/app.js index 166cbdb29..4bfcb1548 100644 --- a/apps/orloj/app.js +++ b/apps/orloj/app.js @@ -297,17 +297,17 @@ function drawBorders() { } { d = new Date(); - sun = SunCalc.getTimes(d, lat, lon); + const sun = SunCalc.getTimes(d, lat, lon); g.setColor(0.5, 0.5, 0); print("sun", sun); drawTimeIcon(sun.sunset, img_sunrise, { rotate: Math.PI, scale: 2 }); drawTimeIcon(sun.sunrise, img_sunrise, { scale: 2 }); g.setColor(0, 0, 0); - moon = SunCalc.getMoonTimes(d, lat, lon); + const moon = SunCalc.getMoonTimes(d, lat, lon); print("moon", moon); drawTimeIcon(moon.set, img_moonrise, { rotate: Math.PI, scale: 2 }); drawTimeIcon(moon.rise, img_sunrise, { scale: 2 }); - pos = SunCalc.getPosition(d, lat, lon); + let pos = SunCalc.getPosition(d, lat, lon); print("sun:", pos); if (pos.altitude > -0.1) { g.setColor(0.5, 0.5, 0); diff --git a/apps/orloj/metadata.json b/apps/orloj/metadata.json index 7c0b320d0..2f58525dc 100644 --- a/apps/orloj/metadata.json +++ b/apps/orloj/metadata.json @@ -1,6 +1,6 @@ { "id": "orloj", "name": "Orloj", - "version": "0.02", + "version": "0.03", "description": "Astronomical clock", "icon": "app.png", "readme": "README.md", diff --git a/apps/owmweather/ChangeLog b/apps/owmweather/ChangeLog index 6b4a80e23..106948e6c 100644 --- a/apps/owmweather/ChangeLog +++ b/apps/owmweather/ChangeLog @@ -1,3 +1,4 @@ 0.01: New App! 0.02: Do first update request 5s after boot to boot up faster 0.03: Fix updating weather too often +0.04: Minor code improvements diff --git a/apps/owmweather/metadata.json b/apps/owmweather/metadata.json index 7ea3dc9bb..658ea953e 100644 --- a/apps/owmweather/metadata.json +++ b/apps/owmweather/metadata.json @@ -1,7 +1,7 @@ { "id": "owmweather", "name": "OpenWeatherMap weather provider", "shortName":"OWM Weather", - "version":"0.03", + "version": "0.04", "description": "Pulls weather from OpenWeatherMap (OWM) API", "icon": "app.png", "type": "bootloader", diff --git a/apps/owmweather/settings.js b/apps/owmweather/settings.js index a4d21dd7c..f6b84c785 100644 --- a/apps/owmweather/settings.js +++ b/apps/owmweather/settings.js @@ -70,7 +70,7 @@ E.showMenu(buildMainMenu()); }); } else { - E.showPrompt("Install a text input lib"),then(()=>{ + E.showAlert("Install a text input lib").then(()=>{ E.showMenu(buildMainMenu()); }); } diff --git a/apps/podadrem/ChangeLog b/apps/podadrem/ChangeLog index 2f6fa8764..da955e60f 100644 --- a/apps/podadrem/ChangeLog +++ b/apps/podadrem/ChangeLog @@ -10,3 +10,4 @@ when fastloading. 0.08: Issue newline before GB commands (solves issue with console.log and ignored commands) 0.09: Don't send the gadgetbridge wake command twice. Once should do since we issue newline before GB commands. +0.10: Minor code improvements diff --git a/apps/podadrem/app.js b/apps/podadrem/app.js index 6f8721126..5407e3ec4 100644 --- a/apps/podadrem/app.js +++ b/apps/podadrem/app.js @@ -16,7 +16,7 @@ let dark = g.theme.dark; // bool let gfx = function() { widgetUtils.hide(); R = Bangle.appRect; - marigin = 8; + const marigin = 8; // g.drawString(str, x, y, solid) g.clearRect(R); g.reset(); @@ -53,9 +53,9 @@ let gfx = function() { // Touch handler for main layout let touchHandler = function(_, xy) { - x = xy.x; - y = xy.y; - len = (R.wb-1 instead of a>=b. if ((R.x-1 { //const w0 = lengths[min]; let widths = ''; for (c = min, o = 0; c <= max; c++) { - for (i = 0, j = offsets[c]; i < lengths[c]; i++) { + for (let i = 0, j = offsets[c]; i < lengths[c]; i++) { xoffs[j] = asc + body + adjustments[c] - 1; ypos[j++] = o++; } @@ -113,7 +113,7 @@ const prepFont = (name, data) => { return x; }; -res = ` +let res = ` const heatshrink = require('heatshrink'); const dec = x => E.toString(heatshrink.decompress(atob(x))); `; diff --git a/apps/pooqround/ChangeLog b/apps/pooqround/ChangeLog index 27c33795e..f72f24b40 100644 --- a/apps/pooqround/ChangeLog +++ b/apps/pooqround/ChangeLog @@ -2,3 +2,4 @@ 0.01: Add tap-to-decorate feature. Bugfixes. 0.02: Add autorotate while charging. Remove autolight. Tweak fonts. Add some haptic feedback on touchscreen operations. 0.03: Minor code improvements +0.04: Minor code improvements diff --git a/apps/pooqround/metadata.json b/apps/pooqround/metadata.json index 2dd3baeef..e0c38f2ed 100644 --- a/apps/pooqround/metadata.json +++ b/apps/pooqround/metadata.json @@ -1,7 +1,7 @@ { "id": "pooqround", "name": "pooq Round watch face", "shortName":"pooq Round", - "version": "0.03", + "version": "0.04", "description": "A 24 hour analogue watchface with high legibility and a novel style.", "icon": "app.png", "type": "clock", diff --git a/apps/pooqround/resourcer.js b/apps/pooqround/resourcer.js index 91b6aa6db..fd6e8ffc4 100644 --- a/apps/pooqround/resourcer.js +++ b/apps/pooqround/resourcer.js @@ -92,7 +92,7 @@ const prepFont = (name, data) => { //const w0 = lengths[min]; let widths = ''; for (c = min, o = 0; c <= max; c++) { - for (i = 0, j = offsets[c]; i < lengths[c]; i++) { + for (let i = 0, j = offsets[c]; i < lengths[c]; i++) { xoffs[j] = asc + body + adjustments[c] - 1; ypos[j++] = o++; } @@ -113,7 +113,7 @@ const prepFont = (name, data) => { return x; }; -res = ` +let res = ` const heatshrink = require('heatshrink'); const dec = x => E.toString(heatshrink.decompress(atob(x))); `; diff --git a/apps/promenu/ChangeLog b/apps/promenu/ChangeLog index b7287cc80..e9ab57880 100644 --- a/apps/promenu/ChangeLog +++ b/apps/promenu/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Add Bangle.js 2 Support +0.03: Minor code improvements diff --git a/apps/promenu/boot.js b/apps/promenu/boot.js index bd813a812..a3d96a255 100644 --- a/apps/promenu/boot.js +++ b/apps/promenu/boot.js @@ -1,6 +1,6 @@ E.showMenu = function(items) { function RectRnd(x1,y1,x2,y2,r) { - pp = []; + let pp = []; pp.push.apply(pp,g.quadraticBezier([x2-r,y1, x2,y1,x2,y1+r])); pp.push.apply(pp,g.quadraticBezier([x2,y2-r,x2,y2,x2-r,y2])); pp.push.apply(pp,g.quadraticBezier([x1+r,y2,x1,y2,x1,y2-r])); diff --git a/apps/promenu/bootb2.js b/apps/promenu/bootb2.js index c84e0d894..b02803a7a 100644 --- a/apps/promenu/bootb2.js +++ b/apps/promenu/bootb2.js @@ -1,6 +1,6 @@ E.showMenu = function(items) { function RectRnd(x1,y1,x2,y2,r) { - pp = []; + let pp = []; pp.push.apply(pp,g.quadraticBezier([x2-r,y1, x2,y1,x2,y1+r])); pp.push.apply(pp,g.quadraticBezier([x2,y2-r,x2,y2,x2-r,y2])); pp.push.apply(pp,g.quadraticBezier([x1+r,y2,x1,y2,x1,y2-r])); diff --git a/apps/promenu/metadata.json b/apps/promenu/metadata.json index e0124467a..5e7508207 100644 --- a/apps/promenu/metadata.json +++ b/apps/promenu/metadata.json @@ -1,7 +1,7 @@ { "id": "promenu", "name": "Pro Menu", - "version": "0.02", + "version": "0.03", "description": "Replace the built in menu function. Supports Bangle.js 1 and Bangle.js 2.", "icon": "icon.png", "type": "bootloader", diff --git a/apps/qcenter/ChangeLog b/apps/qcenter/ChangeLog index 436949dc9..1e5219241 100644 --- a/apps/qcenter/ChangeLog +++ b/apps/qcenter/ChangeLog @@ -1,4 +1,5 @@ 0.01: New App! 0.02: Fix fast loading on swipe to clock 0.03: Adds a setting for going back to clock on a timeout -0.04: Fix timeouts closing fast loaded apps \ No newline at end of file +0.04: Fix timeouts closing fast loaded apps +0.05: Minor code improvements diff --git a/apps/qcenter/metadata.json b/apps/qcenter/metadata.json index cd3e350a4..d38bf3a7a 100644 --- a/apps/qcenter/metadata.json +++ b/apps/qcenter/metadata.json @@ -2,7 +2,7 @@ "id": "qcenter", "name": "Quick Center", "shortName": "QCenter", - "version": "0.04", + "version": "0.05", "description": "An app for quickly launching your favourite apps, inspired by the control centres of other watches.", "icon": "app.png", "tags": "", diff --git a/apps/qcenter/settings.js b/apps/qcenter/settings.js index 5d38b079e..ab7d561d1 100644 --- a/apps/qcenter/settings.js +++ b/apps/qcenter/settings.js @@ -143,7 +143,7 @@ showMainMenu(); }; let timeoutvalues = [10,20,30,60]; - for (c in timeoutvalues){ + for (const c in timeoutvalues){ let v = timeoutvalues[c]; timeoutMenu[v+"s"] = function () { save("timeout", v); diff --git a/apps/quoteclock/ChangeLog b/apps/quoteclock/ChangeLog new file mode 100644 index 000000000..62542be60 --- /dev/null +++ b/apps/quoteclock/ChangeLog @@ -0,0 +1,2 @@ +0.01: New app! +0.02: Minor code improvements diff --git a/apps/quoteclock/app.js b/apps/quoteclock/app.js index 63b3ea032..981c972ff 100644 --- a/apps/quoteclock/app.js +++ b/apps/quoteclock/app.js @@ -105,12 +105,12 @@ function drawStrCenter(str, colour) { g.setColor(colour); g.setFont("Vector", 13); str = "\"" + str + "\""; - maxLength = 24; + const maxLength = 24; var ta = []; let index = 0; let linestart = 0; while (index < str.length) { - newIndex = str.indexOf(" ", index); + const newIndex = str.indexOf(" ", index); if (newIndex == -1) { if ((str.length - linestart) > maxLength) { ta.push(str.substring(linestart, index)); @@ -122,7 +122,7 @@ function drawStrCenter(str, colour) { linestart = index; } else index = newIndex + 1; } - y = 110 - ta.length * 5; + let y = 110 - ta.length * 5; ta.forEach((e) => { g.setFontAlign(0, -1).drawString(e.trim(), 88, y); y += 12; diff --git a/apps/quoteclock/metadata.json b/apps/quoteclock/metadata.json index 0102f010e..68dbf7e0b 100644 --- a/apps/quoteclock/metadata.json +++ b/apps/quoteclock/metadata.json @@ -1,7 +1,7 @@ { "id": "quoteclock", "name": "Quote Clock", - "version": "0.01", + "version": "0.02", "description": "A clock showing quotes every hour", "icon": "app.png", "type": "clock", diff --git a/apps/random/ChangeLog b/apps/random/ChangeLog index c819919ed..f3d249e8c 100644 --- a/apps/random/ChangeLog +++ b/apps/random/ChangeLog @@ -1,2 +1,3 @@ 0.01: New app! -0.02: Submitted to the app loader \ No newline at end of file +0.02: Submitted to the app loader +0.03: Minor code improvements diff --git a/apps/random/app.js b/apps/random/app.js index c3001a6d1..6b9b2f17e 100644 --- a/apps/random/app.js +++ b/apps/random/app.js @@ -110,8 +110,8 @@ function showCardMenu() { }, 'Go': () => { n = Math.min(n, 52); - SUITS = ['Spades', 'Diamonds', 'Clubs', 'Hearts']; - RANKS = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King']; + const SUITS = ['Spades', 'Diamonds', 'Clubs', 'Hearts']; + const RANKS = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King']; class Card { constructor(suit, rank) { this.suit = suit; diff --git a/apps/random/metadata.json b/apps/random/metadata.json index 1af4bc8ac..28187550a 100644 --- a/apps/random/metadata.json +++ b/apps/random/metadata.json @@ -1,7 +1,7 @@ { "id": "random", "name": "Random", - "version": "0.02", + "version": "0.03", "description": "Flip coins, roll dice, draw a card, or choose random numbers", "icon": "icon.png", "tags": "tool", diff --git a/apps/rclock/ChangeLog b/apps/rclock/ChangeLog index 0a86ee3e3..4bb59d869 100644 --- a/apps/rclock/ChangeLog +++ b/apps/rclock/ChangeLog @@ -6,3 +6,4 @@ 0.06: Avoid function wrapper, use setUI for launcher Clock face smaller so no longer breaks widgets 0.07: Tell clock widgets to hide. +0.08: Minor code improvements diff --git a/apps/rclock/metadata.json b/apps/rclock/metadata.json index e5478aa6a..028f452bd 100644 --- a/apps/rclock/metadata.json +++ b/apps/rclock/metadata.json @@ -2,7 +2,7 @@ "id": "rclock", "name": "Round clock with seconds, minutes and date", "shortName": "Round Clock", - "version": "0.07", + "version": "0.08", "description": "Designed round clock with ticks for minutes and seconds and heart rate indication", "icon": "app.png", "type": "clock", diff --git a/apps/rclock/rclock.app.js b/apps/rclock/rclock.app.js index 2d6f84dc4..6bc5977c9 100644 --- a/apps/rclock/rclock.app.js +++ b/apps/rclock/rclock.app.js @@ -90,17 +90,17 @@ const drawSecArc = function (sections, color) { const drawClock = function () { g.reset(); - currentTime = new Date(); + let currentTime = new Date(); //Set to initial time when started if (first == true) { minutes = currentTime.getMinutes(); seconds = currentTime.getSeconds(); - for (count = 0; count <= minutes; count++) { + for (let count = 0; count <= minutes; count++) { drawMinArc(count, settings.circle.colormin); } - for (count = 0; count <= seconds; count++) { + for (let count = 0; count <= seconds; count++) { drawSecArc(count, settings.circle.colorsec); } first = false; @@ -110,7 +110,7 @@ const drawClock = function () { if (seconds == 59) { g.setColor('#000000'); g.fillCircle(settings.circle.middle, settings.circle.center, (settings.circle.height / 2)); - for (count = 0; count <= minutes; count++) { + for (let count = 0; count <= minutes; count++) { drawMinArc(count, settings.circle.colormin); } } diff --git a/apps/rebble/ChangeLog b/apps/rebble/ChangeLog index bde6fda82..587c02ac8 100644 --- a/apps/rebble/ChangeLog +++ b/apps/rebble/ChangeLog @@ -15,3 +15,4 @@ 0.15: fix draw before widget hide 0.16: Use 'modules/suncalc.js' to avoid it being copied 8 times for different apps 0.17: Add fullscreen option (on by default) to show widgets, adjust sidebar 1 and 2 when fullscreen is off +0.18: Minor code improvements diff --git a/apps/rebble/metadata.json b/apps/rebble/metadata.json index 56fe014ff..3a06bebce 100644 --- a/apps/rebble/metadata.json +++ b/apps/rebble/metadata.json @@ -2,7 +2,7 @@ "id": "rebble", "name": "Rebble Clock", "shortName": "Rebble", - "version": "0.17", + "version": "0.18", "description": "A Pebble style clock, with configurable background, three sidebars including steps, day, date, sunrise, sunset, long live the rebellion", "readme": "README.md", "icon": "rebble.png", diff --git a/apps/rebble/rebble.app.js b/apps/rebble/rebble.app.js index bc18d997d..3f97dc5cb 100644 --- a/apps/rebble/rebble.app.js +++ b/apps/rebble/rebble.app.js @@ -313,8 +313,8 @@ Graphics.prototype.setFontKdamThmor = function(scale) { if( Bangle.isCharging() ) { g.setBgColor(settings.bg); - image = ()=> { return require("heatshrink").decompress(atob("j8OwMB/4AD94DC44DCwP//n/gH//EOgE/+AdBh/gAYMH4EAvkDAYP/+/AFAX+FgfzGAnAA=="));} - g.drawImage(image(),x+3,y+4); + const image = require("heatshrink").decompress(atob("j8OwMB/4AD94DC44DCwP//n/gH//EOgE/+AdBh/gAYMH4EAvkDAYP/+/AFAX+FgfzGAnAA==")); + g.drawImage(image,x+3,y+4); } } diff --git a/apps/rebbleagenda/ChangeLog b/apps/rebbleagenda/ChangeLog index ec66c5568..b7e50d38d 100644 --- a/apps/rebbleagenda/ChangeLog +++ b/apps/rebbleagenda/ChangeLog @@ -1 +1,2 @@ 0.01: Initial version +0.02: Minor code improvements diff --git a/apps/rebbleagenda/app.js b/apps/rebbleagenda/app.js index 3b6eca900..8054f0335 100644 --- a/apps/rebbleagenda/app.js +++ b/apps/rebbleagenda/app.js @@ -250,8 +250,8 @@ let oldPoly2 = CLEAR_POLYS_2[0]; doAnim(i => { i = ease(i); - poly1 = interpolatePoly(CLEAR_POLYS_1, i); - poly2 = interpolatePoly(CLEAR_POLYS_2, i); + const poly1 = interpolatePoly(CLEAR_POLYS_1, i); + const poly2 = interpolatePoly(CLEAR_POLYS_2, i); // Fill in black line g.setColor(TEXT_COLOR); g.fillPoly(poly1); diff --git a/apps/rebbleagenda/metadata.json b/apps/rebbleagenda/metadata.json index 07227d3bc..992d1a48e 100644 --- a/apps/rebbleagenda/metadata.json +++ b/apps/rebbleagenda/metadata.json @@ -1,7 +1,7 @@ { "id": "rebbleagenda", "name": "Rebble Agenda", "shortName":"Agenda", - "version":"0.01", + "version": "0.02", "description": "A pebble-inspired animated agenda", "icon": "app.png", "screenshots" : [ diff --git a/apps/rellotge/ChangeLog b/apps/rellotge/ChangeLog index 0ffefec44..e909623dc 100644 --- a/apps/rellotge/ChangeLog +++ b/apps/rellotge/ChangeLog @@ -3,4 +3,5 @@ 0.30: Redisseny de l'aplicatiu, text alineat a l'esquerra, font canviada, treiem dades innecessàries 0.40: Afegits suggeriments de l'usuari @bobrippling al codi 0.50: Fixing lint warnings for unused vars -0.60: Fixes typos, BTN1 to show launcher and show app icon \ No newline at end of file +0.60: Fixes typos, BTN1 to show launcher and show app icon +0.61: Minor code improvements diff --git a/apps/rellotge/metadata.json b/apps/rellotge/metadata.json index b961c36f2..b13ab4789 100644 --- a/apps/rellotge/metadata.json +++ b/apps/rellotge/metadata.json @@ -1,7 +1,7 @@ { "id": "rellotge", "name": "Rellotge en catala", "shortName":"Rellotge", - "version":"0.60", + "version": "0.61", "description": "A clock with traditional naming of hours in Catalan", "icon": "icona.png", "readme": "README.md", diff --git a/apps/rellotge/rellotge.js b/apps/rellotge/rellotge.js index 437766167..7ae48b745 100644 --- a/apps/rellotge/rellotge.js +++ b/apps/rellotge/rellotge.js @@ -22,6 +22,7 @@ g.setFontAlign(-1, 0); // draw time + let t; if (m >= 0 && m < 2) { t = leshores[d.getHours()] + "\r\nen punt"; } else if (m >= 2 && m < 5) { diff --git a/apps/rings/ChangeLog b/apps/rings/ChangeLog index ecdd6b011..b41d367fa 100644 --- a/apps/rings/ChangeLog +++ b/apps/rings/ChangeLog @@ -1,2 +1,3 @@ 0.01: First rev. Could use a little optimization love. -0.02: Added battery ring, bubble background for numbers, settings and little optimaztion love. \ No newline at end of file +0.02: Added battery ring, bubble background for numbers, settings and little optimaztion love. +0.03: Minor code improvements diff --git a/apps/rings/app.js b/apps/rings/app.js index 72485a763..6fbb0839f 100644 --- a/apps/rings/app.js +++ b/apps/rings/app.js @@ -145,7 +145,7 @@ function drawMonthCircleText( text, circleSize, range, value){ grimg.transparent = 1; monthCircleTextBuffer.setColor(1,1,1); - for(z=0; z < text.length; z++){ + for(let z=0; z < text.length; z++){ tobj = { x:watch.screen.centerX, y:watch.screen.centerY, scale:1, rotate: ((z + 1) / range) * (Math.PI * 2) }; tver = [-1, 0, 1, 0, 1, -circleSize, -1, -(circleSize -21)]; tran = monthCircleTextBuffer.transformVertices(tver, tobj); diff --git a/apps/rings/metadata.json b/apps/rings/metadata.json index 706ccbcda..72addf474 100644 --- a/apps/rings/metadata.json +++ b/apps/rings/metadata.json @@ -2,7 +2,7 @@ "id": "rings", "name": "Rings - an animated watchface", "shortName": "Rings", - "version": "0.02", + "version": "0.03", "description": "Ring based watchface that animates to show the date when unlocked. Inspired by / remixed from Rinkulainen.", "icon": "app.png", "screenshots": [{ diff --git a/apps/rndmclk/ChangeLog b/apps/rndmclk/ChangeLog index 1f53ea4ae..1157a257c 100644 --- a/apps/rndmclk/ChangeLog +++ b/apps/rndmclk/ChangeLog @@ -1,3 +1,4 @@ 0.01: New widget 0.02: Less invasive, change default clock setting instead of directly loading the new clock (no longer breaks Gadgetbridge notifications) 0.03: Only changes when the widget id reloaded (no longer uses LCD turning off) +0.04: Minor code improvements diff --git a/apps/rndmclk/metadata.json b/apps/rndmclk/metadata.json index bb8e92f95..07c8fcfc1 100644 --- a/apps/rndmclk/metadata.json +++ b/apps/rndmclk/metadata.json @@ -1,7 +1,7 @@ { "id": "rndmclk", "name": "Random Clock Loader", - "version": "0.03", + "version": "0.04", "description": "Load a different clock whenever the LCD is switched on.", "icon": "rndmclk.png", "type": "widget", diff --git a/apps/rndmclk/widget.js b/apps/rndmclk/widget.js index 479d8b2c3..ceb517d74 100644 --- a/apps/rndmclk/widget.js +++ b/apps/rndmclk/widget.js @@ -19,7 +19,7 @@ // Only update the file if the clock really changed to be nice to the FLASH mem if (clockApps[clockIndex].src != currentClock) { currentClock = clockApps[clockIndex].src; - settings = require("Storage").readJSON('setting.json', 1); + const settings = require("Storage").readJSON('setting.json', 1); settings.clock = clockApps[clockIndex].src; require("Storage").write('setting.json', settings); diff --git a/apps/rtorch/ChangeLog b/apps/rtorch/ChangeLog index 13cbb6e72..96d5ab302 100644 --- a/apps/rtorch/ChangeLog +++ b/apps/rtorch/ChangeLog @@ -1,2 +1,3 @@ 0.01: Cloning torch and making it red :D 0.02: Modify for setUI and Bangle 2 +0.03: Minor code improvements diff --git a/apps/rtorch/app.js b/apps/rtorch/app.js index 03a50ee10..e81e0c329 100644 --- a/apps/rtorch/app.js +++ b/apps/rtorch/app.js @@ -1,7 +1,7 @@ Bangle.setLCDPower(1); Bangle.setLCDTimeout(0); g.reset(); -c = 1; +let c = 1; function setColor(delta){ c+=delta; diff --git a/apps/rtorch/metadata.json b/apps/rtorch/metadata.json index ee056ac57..5a8452e59 100644 --- a/apps/rtorch/metadata.json +++ b/apps/rtorch/metadata.json @@ -2,7 +2,7 @@ "id": "rtorch", "name": "Red Torch", "shortName": "RedTorch", - "version": "0.02", + "version": "0.03", "description": "Turns screen RED to help you see in the dark without breaking your night vision. Select from the launcher or on Bangle 1 press BTN3,BTN1,BTN3,BTN1 quickly to start when in any app that shows widgets", "icon": "app.png", "tags": "tool,torch", diff --git a/apps/ruuviwatch/ChangeLog b/apps/ruuviwatch/ChangeLog index 7eaf8c202..5e12b9562 100644 --- a/apps/ruuviwatch/ChangeLog +++ b/apps/ruuviwatch/ChangeLog @@ -3,3 +3,4 @@ 0.03: Improve design and code, reduce flicker. 0.04: Ability to rename tags. Sauna, Fridge & Freezer alert. Support °F based on locale. 0.05: Minor code improvements +0.06: Minor code improvements diff --git a/apps/ruuviwatch/metadata.json b/apps/ruuviwatch/metadata.json index c88e6d9e6..1eee35c62 100644 --- a/apps/ruuviwatch/metadata.json +++ b/apps/ruuviwatch/metadata.json @@ -2,7 +2,7 @@ "name": "Ruuvi Watch", "shortName":"Ruuvi Watch", "icon": "ruuviwatch.png", - "version": "0.05", + "version": "0.06", "description": "Keep an eye on RuuviTag devices (https://ruuvi.com). For RuuviTags using the v5 format.", "readme":"README.md", "tags": "bluetooth", diff --git a/apps/ruuviwatch/ruuviwatch.app.js b/apps/ruuviwatch/ruuviwatch.app.js index 90d83d0c7..be4855539 100644 --- a/apps/ruuviwatch/ruuviwatch.app.js +++ b/apps/ruuviwatch/ruuviwatch.app.js @@ -16,9 +16,9 @@ let paused = false; const SCAN_FREQ = 1000 * 30; // ALERT LIMITS -LIMIT_SAUNA = 60; -LIMIT_FRIDGE = 4; -LIMIT_FREEZER = -18; +const LIMIT_SAUNA = 60; +const LIMIT_FRIDGE = 4; +const LIMIT_FREEZER = -18; // TODO add wine cellar limits // TODO configurable limits diff --git a/apps/score/ChangeLog b/apps/score/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/score/ChangeLog +++ b/apps/score/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/score/metadata.json b/apps/score/metadata.json index b593d7388..93c08ab01 100644 --- a/apps/score/metadata.json +++ b/apps/score/metadata.json @@ -1,7 +1,7 @@ { "id": "score", "name": "Score Tracker", - "version": "0.01", + "version": "0.02", "description": "Score Tracker for sports that use plain numbers (e.g. Badminton, Volleyball, Soccer, Table Tennis, ...). Also supports tennis scoring.", "icon": "score.app.png", "screenshots": [{"url":"screenshot_score.png"}], diff --git a/apps/score/score.app.js b/apps/score/score.app.js index 56c5a52bf..b2a81c251 100644 --- a/apps/score/score.app.js +++ b/apps/score/score.app.js @@ -96,7 +96,6 @@ function setupMatch() { function showSettingsMenu() { settingsMenuOpened = getSecondsTime(); - l = null; settingsMenu(function (s, reset) { E.showMenu(); diff --git a/apps/seiko-5actus/ChangeLog b/apps/seiko-5actus/ChangeLog index 7d8a35194..3c1a7b791 100644 --- a/apps/seiko-5actus/ChangeLog +++ b/apps/seiko-5actus/ChangeLog @@ -1,3 +1,4 @@ 0.01: Initial Release 0.02: Shrink hand images to save memory 0.03: Tell clock widgets to hide. +0.04: Minor code improvements diff --git a/apps/seiko-5actus/app.js b/apps/seiko-5actus/app.js index 7d5e34f7c..39cc59c70 100644 --- a/apps/seiko-5actus/app.js +++ b/apps/seiko-5actus/app.js @@ -120,7 +120,7 @@ function drawHands() { else {g.setColor(g.theme.bg);} g.drawString(weekDay[0].toUpperCase(), 137, 90); - handLayers = [ + const handLayers = [ {x:cx, y:cy, image:imgHour, @@ -148,7 +148,7 @@ function drawBackground() { g.clear(1); g.setBgColor(g.theme.bg); g.setColor(g.theme.fg); - bgLayer = [ + const bgLayer = [ {x:cx, y:cy, image:imgBg, diff --git a/apps/seiko-5actus/metadata.json b/apps/seiko-5actus/metadata.json index addd8cb70..329701533 100644 --- a/apps/seiko-5actus/metadata.json +++ b/apps/seiko-5actus/metadata.json @@ -3,7 +3,7 @@ "shortName":"5actus", "icon": "seiko-5actus.png", "screenshots": [{"url":"screenshot.png"}], - "version":"0.03", + "version": "0.04", "description": "A watch designed after then Seiko 5actus from the 1970's", "tags": "clock", "type": "clock", diff --git a/apps/setting/ChangeLog b/apps/setting/ChangeLog index ee91834e7..7b9513595 100644 --- a/apps/setting/ChangeLog +++ b/apps/setting/ChangeLog @@ -79,3 +79,4 @@ of 'Select Clock' 0.68: Fix syntax error 0.69: Add option to wake on double tap 0.70: Fix load() typo +0.71: Minor code improvements diff --git a/apps/setting/metadata.json b/apps/setting/metadata.json index 7608a0766..43c7797a7 100644 --- a/apps/setting/metadata.json +++ b/apps/setting/metadata.json @@ -1,7 +1,7 @@ { "id": "setting", "name": "Settings", - "version": "0.70", + "version": "0.71", "description": "A menu for setting up Bangle.js", "icon": "settings.png", "tags": "tool,system", diff --git a/apps/setting/settings.js b/apps/setting/settings.js index df7fe2b3e..99a8971fb 100644 --- a/apps/setting/settings.js +++ b/apps/setting/settings.js @@ -761,7 +761,7 @@ function showLauncherMenu() { } function showSetTimeMenu() { - d = new Date(); + let d = new Date(); const timemenu = { '': { 'title': /*LANG*/'Date & Time' }, '< Back': function () { diff --git a/apps/showimg/ChangeLog b/apps/showimg/ChangeLog index e8d890f83..0a14e1c58 100644 --- a/apps/showimg/ChangeLog +++ b/apps/showimg/ChangeLog @@ -1,2 +1,3 @@ 0.01: Initial release 0.02: Fixed launcher image +0.03: Minor code improvements diff --git a/apps/showimg/app.js b/apps/showimg/app.js index e00385bd7..cc1a0222a 100644 --- a/apps/showimg/app.js +++ b/apps/showimg/app.js @@ -1,7 +1,7 @@ g.reset(); g.clear(); g.drawImage(require("Storage").read("showimg.user.img"),0,0); -drawTimeout = setTimeout(function() { +/*let drawTimeout =*/ setTimeout(function() { load(); }, 60000); setWatch(function() { diff --git a/apps/showimg/metadata.json b/apps/showimg/metadata.json index e4dbc5738..72da93c42 100644 --- a/apps/showimg/metadata.json +++ b/apps/showimg/metadata.json @@ -2,7 +2,7 @@ "id": "showimg", "name": "simple image viewer", "shortName":"showImage", - "version":"0.02", + "version": "0.03", "description": "Displays the image in \"showimg.user.img\". The file has to be uploaded via the espruino IDE. Returns to watch face after 60s or button push. I use it to display my vaccination certificate.", "icon": "app.png", "tags": "tool", diff --git a/apps/speedalt2/ChangeLog b/apps/speedalt2/ChangeLog index 060f6c738..bae9500a6 100644 --- a/apps/speedalt2/ChangeLog +++ b/apps/speedalt2/ChangeLog @@ -17,3 +17,4 @@ 0.17: Use default Bangle formatter for booleans 0.18: Move waypoints.json to 'waypoints' app (with editor) 0.19: Minor code improvements +0.20: Minor code improvements diff --git a/apps/speedalt2/app.js b/apps/speedalt2/app.js index 3e58e1001..2f9677603 100644 --- a/apps/speedalt2/app.js +++ b/apps/speedalt2/app.js @@ -329,7 +329,7 @@ function drawClock() { y=0; buf.setFontAlign(1,-1); buf.setFontVector(94); - time = require("locale").time(new Date(),1); + const time = require("locale").time(new Date(),1); buf.setColor(1); diff --git a/apps/speedalt2/metadata.json b/apps/speedalt2/metadata.json index ad0c28101..dba5a7be6 100644 --- a/apps/speedalt2/metadata.json +++ b/apps/speedalt2/metadata.json @@ -2,7 +2,7 @@ "id": "speedalt2", "name": "GPS Adventure Sports II", "shortName":"GPS Adv Sport II", - "version": "0.19", + "version": "0.20", "description": "GPS speed, altitude and distance to waypoint display. Designed for easy viewing and use during outdoor activities such as para-gliding, hang-gliding, sailing, cycling etc.", "icon": "app.png", "type": "app", diff --git a/apps/sunclock/ChangeLog b/apps/sunclock/ChangeLog index d63f1567e..c81cc2b9b 100644 --- a/apps/sunclock/ChangeLog +++ b/apps/sunclock/ChangeLog @@ -1,2 +1,3 @@ 0.01: First commit 0.02: Use 'modules/suncalc.js' to avoid it being copied 8 times for different apps +0.03: Minor code improvements diff --git a/apps/sunclock/app.js b/apps/sunclock/app.js index 1685bc218..add39c8ec 100644 --- a/apps/sunclock/app.js +++ b/apps/sunclock/app.js @@ -3,10 +3,10 @@ Peter Bernschneider 30.12.2021 Update current latitude and longitude in My Location app Update current Timezone in Settings app, menu item "System" Update for summer time by incrementing Timezone += 1 */ -setting = require("Storage").readJSON("setting.json",1); +const setting = require("Storage").readJSON("setting.json",1); E.setTimeZone(setting.timezone); // timezone = 1 for MEZ, = 2 for MESZ -SunCalc = require("suncalc.js"); -loc = require('locale'); +const SunCalc = require("suncalc.js"); +const loc = require('locale'); const LOCATION_FILE = "mylocation.json"; const xyCenter = g.getWidth() / 2 + 3; const yposTime = 60; @@ -28,9 +28,9 @@ function updatePos() { altitude: Math.round( pos.altitude / rad) }; } - coord = require("Storage").readJSON(LOCATION_FILE,1)|| {"lat":53.3,"lon":10.1,"location":"Pattensen"}; + const coord = require("Storage").readJSON(LOCATION_FILE,1)|| {"lat":53.3,"lon":10.1,"location":"Pattensen"}; pos = radToDeg(SunCalc.getPosition(Date.now(), coord.lat, coord.lon)); - times = SunCalc.getTimes(Date.now(), coord.lat, coord.lon); + const times = SunCalc.getTimes(Date.now(), coord.lat, coord.lon); rise = times.sunrise.toString().split(" ")[4].substr(0,5); set = times.sunset.toString().split(" ")[4].substr(0,5); noonpos = radToDeg(SunCalc.getPosition(times.solarNoon, coord.lat, coord.lon)); diff --git a/apps/sunclock/metadata.json b/apps/sunclock/metadata.json index a9155f6f6..75e30438f 100644 --- a/apps/sunclock/metadata.json +++ b/apps/sunclock/metadata.json @@ -1,7 +1,7 @@ { "id": "sunclock", "name": "Sun Clock", - "version": "0.02", + "version": "0.03", "description": "A clock with sunset/sunrise, sun height/azimuth", "icon": "app.png", "type": "clock", diff --git a/apps/sunrise/ChangeLog b/apps/sunrise/ChangeLog index 146665907..6bda5f395 100644 --- a/apps/sunrise/ChangeLog +++ b/apps/sunrise/ChangeLog @@ -5,3 +5,4 @@ 0.05: Fixed hours increasing too early, added missing 23 o'clock, simplified code 0.06: Draw the screen exactly on the minute boundary 0.07: Minor code improvements +0.08: Minor code improvements diff --git a/apps/sunrise/app.js b/apps/sunrise/app.js index 6b82d3c65..9f2a31806 100644 --- a/apps/sunrise/app.js +++ b/apps/sunrise/app.js @@ -88,7 +88,7 @@ Date.prototype.sunriseSet = function (latitude, longitude, sunrise, zenith) { sinDec = 0.39782 * Math.sinDeg(sunTrueLongitude); cosDec = Math.cosDeg(Math.asinDeg(sinDec)); - cosLocalHourAngle = ((Math.cosDeg(zenith)) - (sinDec * (Math.sinDeg(latitude)))) / (cosDec * (Math.cosDeg(latitude))); + const cosLocalHourAngle = ((Math.cosDeg(zenith)) - (sinDec * (Math.sinDeg(latitude)))) / (cosDec * (Math.cosDeg(latitude))); localHourAngle = Math.acosDeg(cosLocalHourAngle); @@ -190,7 +190,7 @@ function drawSinuses () { g.setColor(1, 1, 1); let y = ypos(x); while (x < w) { - y2 = ypos(x + sinStep); + const y2 = ypos(x + sinStep); g.drawLine(x, y, x + sinStep, y2); y = y2; x += sinStep; // no need to draw all steps diff --git a/apps/sunrise/metadata.json b/apps/sunrise/metadata.json index 495ff3089..faeb846d7 100644 --- a/apps/sunrise/metadata.json +++ b/apps/sunrise/metadata.json @@ -2,7 +2,7 @@ "id": "sunrise", "name": "Sunrise", "shortName": "Sunrise", - "version": "0.07", + "version": "0.08", "type": "clock", "description": "Show sunrise and sunset times", "icon": "app.png", diff --git a/apps/supmariodark/ChangeLog b/apps/supmariodark/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/supmariodark/ChangeLog +++ b/apps/supmariodark/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/supmariodark/metadata.json b/apps/supmariodark/metadata.json index e5d0861ae..012aa4e92 100644 --- a/apps/supmariodark/metadata.json +++ b/apps/supmariodark/metadata.json @@ -2,7 +2,7 @@ "id": "supmariodark", "name": "Super mario clock night mode", "shortName": "supmariodark", - "version": "0.01", + "version": "0.02", "description": "Super mario clock in night mode", "icon": "supmariodark.png", "type": "clock", diff --git a/apps/supmariodark/supmariodark.js b/apps/supmariodark/supmariodark.js index 00a20e5fb..f4c22229e 100644 --- a/apps/supmariodark/supmariodark.js +++ b/apps/supmariodark/supmariodark.js @@ -45,15 +45,15 @@ const drawBanner = (h) =>{ const updateTimeBanner = (h,m)=>{ m = (m<10?'0':'')+m; - h = (h<10?'0':'')+h; - bx1=g.getWidth()/2-90; - by1=50+10; - bx2=g.getWidth()/2+90; - by2=50+62; + h = (h<10?'0':'')+h; + const bx1=g.getWidth()/2-90; + const by1=50+10; + const bx2=g.getWidth()/2+90; + const by2=50+62; - g.setFontCustom(eval(s.read("supmario30x24.bin")), 48, eval(s.read("supmario30x24.wdt")), 24); - g.setClipRect(bx1,by1,bx2,by2).clearRect(bx1,by1,bx2,by2); - g.drawString(h,bx1+35,75).drawString(":",g.getWidth()/2,75).drawString(m,bx1+110,75).flip(); + g.setFontCustom(eval(s.read("supmario30x24.bin")), 48, eval(s.read("supmario30x24.wdt")), 24); + g.setClipRect(bx1,by1,bx2,by2).clearRect(bx1,by1,bx2,by2); + g.drawString(h,bx1+35,75).drawString(":",g.getWidth()/2,75).drawString(m,bx1+110,75).flip(); }; let om = 0; const onHalfSecond =()=>{ diff --git a/apps/swipeinv/ChangeLog b/apps/swipeinv/ChangeLog new file mode 100644 index 000000000..62542be60 --- /dev/null +++ b/apps/swipeinv/ChangeLog @@ -0,0 +1,2 @@ +0.01: New app! +0.02: Minor code improvements diff --git a/apps/swipeinv/metadata.json b/apps/swipeinv/metadata.json index bbd6f03ce..67c26a37d 100644 --- a/apps/swipeinv/metadata.json +++ b/apps/swipeinv/metadata.json @@ -3,7 +3,7 @@ "name": "Swipe inversion", "shortName":"Swipe inv.", "icon": "app.png", - "version":"0.01", + "version": "0.02", "description": "Inverts swipe direction globally or per app, see settings. If global inversion is enabled, you can unselect the inversion per app and vice versa.", "readme":"README.md", "type": "bootloader", diff --git a/apps/swipeinv/settings.js b/apps/swipeinv/settings.js index 6ce16d00a..e32b75e60 100644 --- a/apps/swipeinv/settings.js +++ b/apps/swipeinv/settings.js @@ -11,7 +11,7 @@ } function appMenu() { - menu = { + let menu = { "" : { "title" : /*LANG*/"Swipe inversion apps" }, "< Back" : () => { writeSettings(); mainMenu();} }; diff --git a/apps/swscroll/ChangeLog b/apps/swscroll/ChangeLog index 26fba92e9..9a9d18345 100644 --- a/apps/swscroll/ChangeLog +++ b/apps/swscroll/ChangeLog @@ -4,3 +4,4 @@ 0.04: Rebasing on latest changes to showScroller_Q3 (https://github.com/espruino/Espruino/commit/a0e2d9231df709849f81abf572a742b0fceab85b). Fixes missing `isActive` function that caused an error. 0.05: Fix for the rebase in ver 0.04. Check boxes didn't behave but now they do. 0.06: Minor code improvements +0.07: Minor code improvements diff --git a/apps/swscroll/boot.js b/apps/swscroll/boot.js index a2dc5277d..48ce2aa67 100644 --- a/apps/swscroll/boot.js +++ b/apps/swscroll/boot.js @@ -34,7 +34,7 @@ Bangle.setUI({ remove : options.remove, redraw : draw, swipe : (_,UD)=>{ - pixels = 120; + const pixels = 120; var dy = UD*pixels; if (s.scroll - dy > menuScrollMax) dy = s.scroll - menuScrollMax-8; // Makes it so the last 'page' has the same position as previous pages. This should be done dynamically (change the static 8 to be a variable) so the offset is correct even when no widget field or title field is present. diff --git a/apps/swscroll/metadata.json b/apps/swscroll/metadata.json index 4fbdd61cf..e59c6b50c 100644 --- a/apps/swscroll/metadata.json +++ b/apps/swscroll/metadata.json @@ -1,7 +1,7 @@ { "id": "swscroll", "name": "Swipe menus", - "version": "0.06", + "version": "0.07", "description": "Replace built in E.showScroller to act on swipe instead of drag. Navigate menus in discrete steps instead of a continuous motion.", "readme": "README.md", "icon": "app.png", diff --git a/apps/synthwave/ChangeLog b/apps/synthwave/ChangeLog index 62542be60..03c748ea5 100644 --- a/apps/synthwave/ChangeLog +++ b/apps/synthwave/ChangeLog @@ -1,2 +1,3 @@ 0.01: New app! 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/synthwave/app.js b/apps/synthwave/app.js index 21da76bd4..41711d950 100644 --- a/apps/synthwave/app.js +++ b/apps/synthwave/app.js @@ -701,7 +701,7 @@ function probe() { stride = 68; } */ - stride = 68; + let stride = 68; lcdBuffer = start; print('Found lcdBuffer at ' + lcdBuffer.toString(16) + ' stride=' + stride); diff --git a/apps/synthwave/metadata.json b/apps/synthwave/metadata.json index ed53f9716..8f9864441 100644 --- a/apps/synthwave/metadata.json +++ b/apps/synthwave/metadata.json @@ -1,7 +1,7 @@ { "id": "synthwave", "name": "synthwave clock", - "version": "0.02", + "version": "0.03", "description": "A watchface with an animated 3D scene.", "readme": "README.md", "icon": "app.png", diff --git a/apps/teatimer/ChangeLog b/apps/teatimer/ChangeLog index 31b495ecf..cd2b03136 100644 --- a/apps/teatimer/ChangeLog +++ b/apps/teatimer/ChangeLog @@ -2,3 +2,4 @@ 0.02: Fix issue setting colors after showMessage 0.03: Fix BG/FG Color if e.g. theme background is black 0.04: Get time zone from settings for showing the clock +0.05: Minor code improvements diff --git a/apps/teatimer/app.js b/apps/teatimer/app.js index fbaed4d62..d9d2eb2b1 100644 --- a/apps/teatimer/app.js +++ b/apps/teatimer/app.js @@ -22,7 +22,7 @@ function appTitle() { } function currentTime() { - min = Date().getMinutes(); + let min = Date().getMinutes(); if (min < 10) min = "0" + min; return Date().getHours() + ":" + min; } diff --git a/apps/teatimer/metadata.json b/apps/teatimer/metadata.json index a298a0e2b..4bc7452ee 100644 --- a/apps/teatimer/metadata.json +++ b/apps/teatimer/metadata.json @@ -1,7 +1,7 @@ { "id": "teatimer", "name": "Tea Timer", - "version": "0.04", + "version": "0.05", "description": "A simple timer. You can easyly set up the time.", "icon": "teatimer.png", "type": "app", diff --git a/apps/tempmonitor/ChangeLog b/apps/tempmonitor/ChangeLog index b113480eb..00ef3c6ee 100644 --- a/apps/tempmonitor/ChangeLog +++ b/apps/tempmonitor/ChangeLog @@ -3,3 +3,4 @@ 0.03: Added Stop/start recording, change BG color, filesize info 0.04: Support for negative degree, Min/Max, random for emulator, clean of code 0.05: Fix issue on BJS2 caused by Bangle.getPressure promise +0.06: Minor code improvements diff --git a/apps/tempmonitor/metadata.json b/apps/tempmonitor/metadata.json index 5e0d8deb2..428ae3860 100644 --- a/apps/tempmonitor/metadata.json +++ b/apps/tempmonitor/metadata.json @@ -1,7 +1,7 @@ { "id": "tempmonitor", "name": "Temperature monitor", - "version": "0.05", + "version": "0.06", "description": "Another thermometer, besides displaying current temperature, stores it in a CSV file", "icon": "app.png", "tags": "tool", diff --git a/apps/tempmonitor/tempmonitor.app.js b/apps/tempmonitor/tempmonitor.app.js index c8ea0131e..303c536f4 100644 --- a/apps/tempmonitor/tempmonitor.app.js +++ b/apps/tempmonitor/tempmonitor.app.js @@ -30,7 +30,8 @@ if (readFreq>saveFreq) console.log("Read refresh freq should be higher than savi if (v_mode_debug>0) console.log("original BG/FG color="+v_color_erase+" / "+v_color); - +let v_font_size1; +let v_font_size2; function SetVariables(){ //EMSCRIPTEN,EMSCRIPTEN2 if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') { @@ -209,7 +210,7 @@ g.drawString("Mode debug: "+v_mode_debug, x, y - ((v_font_size1*1)+2)); g.drawString("Read frq(ms): "+readFreq, x, y ); g.drawString("Save file: "+v_saveToFile, x, y+ ((v_font_size1*1)+2) ); g.drawString("Save frq(ms):"+saveFreq, x, y+((v_font_size1*2)+2) ); -fr=require("Storage").read(v_filename+"\1");//suffix required +const fr=require("Storage").read(v_filename+"\1");//suffix required if (fr) g.drawString("Filesize:"+fr.length.toString()+"kb", x, y+((v_font_size1*3)+2) ); else g.drawString("File not exist", x, y+((v_font_size1*3)+2)); } diff --git a/apps/testuserinput/ChangeLog b/apps/testuserinput/ChangeLog index 4b93411fc..e83ccee78 100644 --- a/apps/testuserinput/ChangeLog +++ b/apps/testuserinput/ChangeLog @@ -5,3 +5,4 @@ 0.05: ... 0.06: Improvements, multiple rows with radio buttons 0.07: Minor code improvements +0.08: Minor code improvements diff --git a/apps/testuserinput/app.js b/apps/testuserinput/app.js index a0e2c1c40..89e60177a 100644 --- a/apps/testuserinput/app.js +++ b/apps/testuserinput/app.js @@ -156,8 +156,9 @@ function PrintUserInput(boton){ //Call info banner g.setFontVector(30).drawString(boton, 63, 55); if ((boton=='Touch 1')||(boton=='Touch 2')){ + let v_y_opt; if (v_selected_row==1) v_y_opt=v_y_optionrow1; - else if (v_selected_row==2) v_y_opt=v_y_optionrow2; + else if (v_selected_row==2) v_y_opt=v_y_optionrow2; DrawRoundOption(20,v_y_opt,190,v_y_opt,boton); //set the option value in an array array_r_option[v_selected_row]=boton; @@ -248,6 +249,7 @@ function DrawRowSelArrow(v_drawRow, v_clearRow){ //for clear previous draw arrow if (v_clearRow!== undefined) { g.setColor(colbackg); + let v_y_arrow; if (v_clearRow==1) v_y_arrow=v_y_optionrow1+14; else if (v_clearRow==2) v_y_arrow=v_y_optionrow2+14; else if (v_clearRow==3) v_y_arrow=v_y_optionrow3+14; @@ -256,6 +258,7 @@ function DrawRowSelArrow(v_drawRow, v_clearRow){ } //draw an arrow to select a row if (v_drawRow!== undefined) { + let v_y_arrow; if (v_drawRow==1) v_y_arrow=v_y_optionrow1+14; else if (v_drawRow==2) v_y_arrow=v_y_optionrow2+14; else if (v_drawRow==3) v_y_arrow=v_y_optionrow3+14; @@ -328,4 +331,4 @@ function UserInput(){ //end optional PrintHelp(); - UserInput(); \ No newline at end of file + UserInput(); diff --git a/apps/testuserinput/metadata.json b/apps/testuserinput/metadata.json index 574fd995f..409843198 100644 --- a/apps/testuserinput/metadata.json +++ b/apps/testuserinput/metadata.json @@ -2,7 +2,7 @@ "id": "testuserinput", "name": "Test User Input", "shortName": "Test User Input", - "version": "0.07", + "version": "0.08", "description": "App to test the bangle.js input interface. It displays the user action in text, circle buttons or on/off switch UI elements.", "icon": "app.png", "tags": "input,interface,buttons,touch,UI", diff --git a/apps/tictactoe/ChangeLog b/apps/tictactoe/ChangeLog index 014e162c8..c310850fc 100644 --- a/apps/tictactoe/ChangeLog +++ b/apps/tictactoe/ChangeLog @@ -1,2 +1,3 @@ 0.01: Stable Launch 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/tictactoe/app.js b/apps/tictactoe/app.js index 725f47910..e381a6577 100644 --- a/apps/tictactoe/app.js +++ b/apps/tictactoe/app.js @@ -69,7 +69,7 @@ function calcWin(){ //draw check // drawChk is sum absolute value of array, if drawChk = 9 then there is a draw - drawChk = 0; + let drawChk = 0; for(let i = 0; i<3; i++){ for(let j = 0; j<3; j++){ drawChk = drawChk + Math.abs(arr[i][j]); @@ -94,6 +94,7 @@ function calcWin(){ function draw(){ g.clear(); + let playerIcon; if (player ==1){ playerIcon = "X"; } else if(player == -1){ diff --git a/apps/tictactoe/metadata.json b/apps/tictactoe/metadata.json index eaef3542f..08cbf3f8e 100644 --- a/apps/tictactoe/metadata.json +++ b/apps/tictactoe/metadata.json @@ -2,7 +2,7 @@ "name": "TicTacToe", "shortName":"TicTacToe", "icon": "app.png", - "version": "0.02", + "version": "0.03", "description": "Tic Tac Toe for two players!", "tags": "game", "storage": [ diff --git a/apps/tilthydro/ChangeLog b/apps/tilthydro/ChangeLog index 5560f00bc..7727f3cc4 100644 --- a/apps/tilthydro/ChangeLog +++ b/apps/tilthydro/ChangeLog @@ -1 +1,2 @@ 0.01: New App! +0.02: Minor code improvements diff --git a/apps/tilthydro/app.js b/apps/tilthydro/app.js index 011a19eb6..ebace5aea 100644 --- a/apps/tilthydro/app.js +++ b/apps/tilthydro/app.js @@ -48,7 +48,7 @@ var TILT_DEVICES = { function takeReading() { // scan for 5 seconds max NRF.setScan(function(device) { - d = new DataView(device.manufacturerData); + const d = new DataView(device.manufacturerData); if (d.getUint8(4) == 0xbb) { var hexData = arrayBufferToHex(device.manufacturerData); var tempF = d.getUint16(18); diff --git a/apps/tilthydro/metadata.json b/apps/tilthydro/metadata.json index 38fe599e7..a227d7068 100644 --- a/apps/tilthydro/metadata.json +++ b/apps/tilthydro/metadata.json @@ -2,7 +2,7 @@ "id": "tilthydro", "name": "Tilt Hydrometer Display", "shortName": "Tilt Hydro", - "version": "0.01", + "version": "0.02", "description": "A display for the [Tilt Hydrometer](https://tilthydrometer.com/) - [more info here](http://www.espruino.com/Tilt+Hydrometer+Display)", "icon": "app.png", "tags": "tools,bluetooth", diff --git a/apps/timecal/ChangeLog b/apps/timecal/ChangeLog index 57e7a1758..a42d32632 100644 --- a/apps/timecal/ChangeLog +++ b/apps/timecal/ChangeLog @@ -9,3 +9,4 @@ 0.04: finalized README, fixed settings cancel, fixed border-setting 0.05: bugfix: default settings 0.06: bugfix: Mrk.Color doesn't reflect the color selected, fixes #1706 +0.07: Minor code improvements diff --git a/apps/timecal/metadata.json b/apps/timecal/metadata.json index 9175d92a3..c6b174338 100644 --- a/apps/timecal/metadata.json +++ b/apps/timecal/metadata.json @@ -1,7 +1,7 @@ { "id": "timecal", "name": "TimeCal", "shortName":"TimeCal", - "version":"0.06", + "version": "0.07", "description": "TimeCal shows the date/time along with a 3 week calendar", "icon": "icon.png", "type": "clock", diff --git a/apps/timecal/timecal.settings.js b/apps/timecal/timecal.settings.js index 8a7867c0d..3a38eed09 100644 --- a/apps/timecal/timecal.settings.js +++ b/apps/timecal/timecal.settings.js @@ -1,6 +1,6 @@ // Settings menu for Time calendar clock (function(exit) { - ABR_DAY = require("locale") && require("locale").abday ? require("locale").abday : ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + const ABR_DAY = require("locale") && require("locale").abday ? require("locale").abday : ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; var FILE = "timecal.settings.json"; @@ -19,7 +19,7 @@ calBrdr:false }; - validSttngs = require("Storage").readJSON(FILE, 1) || {}; + let validSttngs = require("Storage").readJSON(FILE, 1) || {}; for (const k in validSttngs) if (!DEFAULTS.hasOwnProperty(k)) delete this.validSttngs[k]; //remove invalid settings for (const k in DEFAULTS) if(!validSttngs.hasOwnProperty(k)) validSttngs[k] = DEFAULTS[k]; //assign missing defaults fixed diff --git a/apps/tinyVario/ChangeLog b/apps/tinyVario/ChangeLog index a693c4136..437eebe73 100644 --- a/apps/tinyVario/ChangeLog +++ b/apps/tinyVario/ChangeLog @@ -4,3 +4,4 @@ 0.04: flight time detection should work without GPS now. New vario display available. 0.05: some bugs fiexed, no new features. 0.06: Minor code improvements +0.07: Minor code improvements diff --git a/apps/tinyVario/app.js b/apps/tinyVario/app.js index 63fc6e94e..87ed671be 100644 --- a/apps/tinyVario/app.js +++ b/apps/tinyVario/app.js @@ -5,9 +5,9 @@ To do: -navigation */ -getAltitude = (p,baseP) => (44330 * (1.0 - Math.pow(p/baseP, 0.1903))); -getFL = () => (44330 * (1.0 - Math.pow(pressure/1013.25, 0.1903))).toFixed(0); -getTimeString = () => (settings.localTime) ? (require("locale").time(Date(),1)):(Date().toUTCString().slice(Date().toUTCString().length-12,Date().toUTCString().length-7)); +const getAltitude = (p,baseP) => (44330 * (1.0 - Math.pow(p/baseP, 0.1903))); +//const getFL = () => (44330 * (1.0 - Math.pow(pressure/1013.25, 0.1903))).toFixed(0); +const getTimeString = () => (settings.localTime) ? (require("locale").time(Date(),1)):(Date().toUTCString().slice(Date().toUTCString().length-12,Date().toUTCString().length-7)); var fg=g.getColor(); //var bg=g.getBgColor(); @@ -146,7 +146,7 @@ function initPFD() { //samples=1; //-------------------- pfdHandle = setInterval(function() { - t1=Date().getTime(); + //const t1=Date().getTime(); //process pressure readings if (samples) { pressure=rawP/samples; diff --git a/apps/tinyVario/metadata.json b/apps/tinyVario/metadata.json index ee1175d84..866d820f9 100644 --- a/apps/tinyVario/metadata.json +++ b/apps/tinyVario/metadata.json @@ -1,7 +1,7 @@ { "id": "tinyVario", "name": "Tiny Vario", "shortName" : "tinyVario", - "version": "0.06", + "version": "0.07", "icon": "app.png", "readme": "README.md", "description": "A very simple app for gliding / paragliding / hang gliding etc.", diff --git a/apps/tinydraw/ChangeLog b/apps/tinydraw/ChangeLog index 4bae1b9f8..6d7c7cfc2 100644 --- a/apps/tinydraw/ChangeLog +++ b/apps/tinydraw/ChangeLog @@ -1,3 +1,4 @@ 0.01: Initial release 0.02: Don't start drawing with white colour on white canvas 0.03: Fix segmented line glitch when drawing, optimize screen lock detection +0.04: Minor code improvements diff --git a/apps/tinydraw/app.js b/apps/tinydraw/app.js index 52460bc79..5ba3ed50c 100644 --- a/apps/tinydraw/app.js +++ b/apps/tinydraw/app.js @@ -164,14 +164,14 @@ Bangle.on("lock", function() { case 'circle': var XS = (to.x - from.x) / 32; var YS = (to.y - from.y) / 32; - for (i = 0; i < 32; i++) { + for (let i = 0; i < 32; i++) { g.fillCircle(from.x + (i * XS), from.y + (i * YS), 4, 4); } break; case 'square': var XS = (to.x - from.x) / 32; var YS = (to.y - from.y) / 32; - for (i = 0; i < 32; i++) { + for (let i = 0; i < 32; i++) { const posX = from.x + (i * XS); const posY = from.y + (i * YS); g.fillRect(posX - 10, posY - 10, posX + 10, posY + 10); diff --git a/apps/tinydraw/metadata.json b/apps/tinydraw/metadata.json index 35d994ec3..21ea1eb89 100644 --- a/apps/tinydraw/metadata.json +++ b/apps/tinydraw/metadata.json @@ -1,7 +1,7 @@ { "id": "tinydraw", "name": "TinyDraw", "shortName":"TinyDraw", - "version":"0.03", + "version": "0.04", "type": "app", "description": "Draw stuff in your wrist", "icon": "app.png", diff --git a/apps/trex/ChangeLog b/apps/trex/ChangeLog index a92abb0df..b89bb7af4 100644 --- a/apps/trex/ChangeLog +++ b/apps/trex/ChangeLog @@ -1,3 +1,4 @@ 0.02: Add "ram" keyword to allow 2v06 Espruino builds to cache function that needs to be fast 0.03: Enabled BTN2 and BTN3, added highscore (score is saved to storage and can be reset in app settings menu) 0.04: Bangle.js 2 support +0.05: Minor code improvements diff --git a/apps/trex/metadata.json b/apps/trex/metadata.json index 8344ba161..6e2f3f567 100644 --- a/apps/trex/metadata.json +++ b/apps/trex/metadata.json @@ -1,7 +1,7 @@ { "id": "trex", "name": "T-Rex", - "version": "0.04", + "version": "0.05", "description": "T-Rex game in the style of Chrome's offline game", "icon": "trex.png", "screenshots": [{"url":"screenshot_trex.png"}], diff --git a/apps/trex/trex.js b/apps/trex/trex.js index 3baca101b..543a6dcae 100644 --- a/apps/trex/trex.js +++ b/apps/trex/trex.js @@ -19,7 +19,7 @@ if (process.env.HWVERSION==2) { BTNR = { read : _=>tap.b && tap.x > 88}; // use button for jump BTNU = BTN1; - greal = g; + const greal = g; g = Graphics.createArrayBuffer(88,64,1,{msb:true}); g.flip = function() { greal.drawImage({ @@ -33,7 +33,7 @@ if (process.env.HWVERSION==2) { BTNL = BTN2; BTNR = BTN3; BTNU = BTN1; - greal = g; + const greal = g; g = Graphics.createArrayBuffer(120,64,1,{msb:true}); g.flip = function() { greal.drawImage({ diff --git a/apps/usgs/ChangeLog b/apps/usgs/ChangeLog index 65536966a..2c66d9b70 100644 --- a/apps/usgs/ChangeLog +++ b/apps/usgs/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Changed menu names, added button interaction. +0.03: Minor code improvements diff --git a/apps/usgs/app.js b/apps/usgs/app.js index e6f2efa1e..90509284e 100644 --- a/apps/usgs/app.js +++ b/apps/usgs/app.js @@ -8,7 +8,7 @@ var FILE = "usgs.json"; tempUnitF: true, }, require('Storage').readJSON(FILE, true) || {}); function fetchStartup() { - uri = "https://labs.waterdata.usgs.gov/sta/v1.1/Things('USGS-" + + const uri = "https://labs.waterdata.usgs.gov/sta/v1.1/Things('USGS-" + settings.loc + "')/Datastreams?$expand=Observations($orderby=phenomenonTime%20desc;$top=1;$select=result)&$select=unitOfMeasurement,description"; if (Bangle.http) { @@ -17,8 +17,10 @@ function fetchStartup() { } function handleStartup(data) { for (var key1 in data) { - desc = data[key1].description.split(" / ")[0]; + const desc = data[key1].description.split(" / ")[0]; if (settings.keys[desc]) { + let symbol; + let result; if (data[key1].unitOfMeasurement.symbol === "degC" && settings.tempUnitF) { symbol = "F"; result = (data[key1].Observations[0].result * 9 / 5) + 32; @@ -42,10 +44,11 @@ function displayData(dataStreams) { g.clear(); g.setFont("Vector",20); g.setFontAlign(0,0); - string = ""; + let string = ""; for (var key in dataStreams) { - unit = dataStreams[key].unit; - value = dataStreams[key].value; + const unit = dataStreams[key].unit; + const value = dataStreams[key].value; + let name; if (settings.shortenedName[key]) { name = settings.shortenedName[key]; } else { diff --git a/apps/usgs/metadata.json b/apps/usgs/metadata.json index 6140c59b9..31d518fec 100644 --- a/apps/usgs/metadata.json +++ b/apps/usgs/metadata.json @@ -1,7 +1,7 @@ { "id": "usgs", "name": "USGS Data fetching app", "shortName":"USGS", - "version":"0.02", + "version": "0.03", "description": "App that fetches [USGS water data](https://maps.waterdata.usgs.gov/) for a configurable location (requires connection to Android phone)", "icon": "app.png", "tags": "outdoors,exercise,http", diff --git a/apps/usgs/settings.js b/apps/usgs/settings.js index 1ddde4c60..8a12197dc 100644 --- a/apps/usgs/settings.js +++ b/apps/usgs/settings.js @@ -68,7 +68,7 @@ function popSubMenuData(data) { function getDataStreams() { - uri = "https://labs.waterdata.usgs.gov/sta/v1.1/Things('USGS-" + + const uri = "https://labs.waterdata.usgs.gov/sta/v1.1/Things('USGS-" + settings.loc + "')/Datastreams?$select=description"; if (Bangle.http) { diff --git a/apps/warpdrive/ChangeLog b/apps/warpdrive/ChangeLog index 62542be60..03c748ea5 100644 --- a/apps/warpdrive/ChangeLog +++ b/apps/warpdrive/ChangeLog @@ -1,2 +1,3 @@ 0.01: New app! 0.02: Minor code improvements +0.03: Minor code improvements diff --git a/apps/warpdrive/app.js b/apps/warpdrive/app.js index 3f52fba58..b16766f47 100644 --- a/apps/warpdrive/app.js +++ b/apps/warpdrive/app.js @@ -572,7 +572,7 @@ function probe() { stride = 68; } */ - stride = 68; + let stride = 68; lcdBuffer = start; print('Found lcdBuffer at ' + lcdBuffer.toString(16) + ' stride=' + stride); diff --git a/apps/warpdrive/metadata.json b/apps/warpdrive/metadata.json index 3558f517a..330166bc8 100644 --- a/apps/warpdrive/metadata.json +++ b/apps/warpdrive/metadata.json @@ -1,7 +1,7 @@ { "id": "warpdrive", "name": "warpdrive clock", - "version": "0.02", + "version": "0.03", "description": "A watchface with an animated 3D scene.", "readme": "README.md", "icon": "app.png", diff --git a/apps/waypointer/ChangeLog b/apps/waypointer/ChangeLog index 547954400..76cc04977 100644 --- a/apps/waypointer/ChangeLog +++ b/apps/waypointer/ChangeLog @@ -8,3 +8,4 @@ 0.08: Use tilt compensation from new magnav library 0.09: Convert Yes/No On/Off in settings to checkboxes 0.10: Minor code improvements +0.11: Minor code improvements diff --git a/apps/waypointer/app.js b/apps/waypointer/app.js index b71cf3270..ff2412730 100644 --- a/apps/waypointer/app.js +++ b/apps/waypointer/app.js @@ -209,13 +209,13 @@ var intervalRef; function stopdraw() { candraw=false; - prev_course = -1; + //prev_course = -1; if(intervalRef) {clearInterval(intervalRef);} } function startTimers() { candraw=true; - intervalRefSec = setInterval(function() { + /*intervalRefSec =*/ setInterval(function() { read_compass(); }, 500); } diff --git a/apps/waypointer/metadata.json b/apps/waypointer/metadata.json index 423aaa9cc..a997822fa 100644 --- a/apps/waypointer/metadata.json +++ b/apps/waypointer/metadata.json @@ -1,7 +1,7 @@ { "id": "waypointer", "name": "Way Pointer", - "version": "0.10", + "version": "0.11", "description": "Navigate to a waypoint using the GPS for bearing and compass to point way, uses the same waypoint interface as GPS Navigation", "icon": "waypointer.png", "tags": "tool,outdoors,gps", diff --git a/apps/widalt/ChangeLog b/apps/widalt/ChangeLog index ec66c5568..b7e50d38d 100644 --- a/apps/widalt/ChangeLog +++ b/apps/widalt/ChangeLog @@ -1 +1,2 @@ 0.01: Initial version +0.02: Minor code improvements diff --git a/apps/widalt/metadata.json b/apps/widalt/metadata.json index 309c5bf2c..31af738f7 100644 --- a/apps/widalt/metadata.json +++ b/apps/widalt/metadata.json @@ -2,7 +2,7 @@ { "id": "widalt", "name": "Altimeter widget", - "version": "0.01", + "version": "0.02", "description": "Displays barometric altitude", "readme": "README.md", "icon": "widalt.png", diff --git a/apps/widalt/widalt.settings.js b/apps/widalt/widalt.settings.js index 57993474e..1178c6fcf 100644 --- a/apps/widalt/widalt.settings.js +++ b/apps/widalt/widalt.settings.js @@ -2,7 +2,7 @@ var settings = Object.assign({ interval: 5000, }, require('Storage').readJSON("widalt.json", true) || {}); - o=Bangle.getOptions(); + const o=Bangle.getOptions(); Bangle.getPressure().then((p)=>{ E.showMenu({ "" : { "title" : "Altimeter Widget" }, diff --git a/apps/widbaroalarm/ChangeLog b/apps/widbaroalarm/ChangeLog index 5b30916ce..e703a7dfb 100644 --- a/apps/widbaroalarm/ChangeLog +++ b/apps/widbaroalarm/ChangeLog @@ -11,3 +11,4 @@ 0.08: Compatibility with hideable Widgets 0.09: Do not immediately measure on start, keep interval Add plot history to settings +0.10: Minor code improvements diff --git a/apps/widbaroalarm/metadata.json b/apps/widbaroalarm/metadata.json index ad2320cd5..89f6e3a4d 100644 --- a/apps/widbaroalarm/metadata.json +++ b/apps/widbaroalarm/metadata.json @@ -2,7 +2,7 @@ "id": "widbaroalarm", "name": "Barometer Alarm Widget", "shortName": "Barometer Alarm", - "version": "0.09", + "version": "0.10", "description": "A widget that can alarm on when the pressure reaches defined thresholds.", "icon": "widget.png", "type": "widget", diff --git a/apps/widbaroalarm/widget.js b/apps/widbaroalarm/widget.js index 2947b60f3..c7532f443 100644 --- a/apps/widbaroalarm/widget.js +++ b/apps/widbaroalarm/widget.js @@ -219,7 +219,7 @@ function barometerPressureHandler(e) { const pressure = e.pressure; if (isValidPressureValue(pressure)) { currentPressures.unshift(pressure); - median = currentPressures.slice().sort(); + let median = currentPressures.slice().sort(); if (median.length > 10) { var mid = median.length >> 1; diff --git a/apps/widbgjs/ChangeLog b/apps/widbgjs/ChangeLog index d328ba3be..5d92df43f 100644 --- a/apps/widbgjs/ChangeLog +++ b/apps/widbgjs/ChangeLog @@ -1,3 +1,4 @@ 0.01: First release 0.02: Fixed settings changes are actually reflected now and old values are strikethrough 0.03: Minor code improvements +0.04: Fix after regression in 0.03 \ No newline at end of file diff --git a/apps/widbgjs/metadata.json b/apps/widbgjs/metadata.json index 166a35b92..4b37dd9e3 100644 --- a/apps/widbgjs/metadata.json +++ b/apps/widbgjs/metadata.json @@ -4,7 +4,7 @@ "shortName":"BG Widget", "icon": "screenshot.png", "screenshots": [{"url":"screenshot.png"}], - "version": "0.03", + "version": "0.04", "type": "widget", "supports": ["BANGLEJS", "BANGLEJS2"], "readme": "README.md", diff --git a/apps/widbgjs/widget.js b/apps/widbgjs/widget.js index 12af79c8e..c95ecd032 100644 --- a/apps/widbgjs/widget.js +++ b/apps/widbgjs/widget.js @@ -65,8 +65,8 @@ break; } // turn the arrow thanks to (https://forum.espruino.com/conversations/344607/) - /* const p180 = Math.PI / 180; + /* // a is defined above var r = 21; var x = r * Math.sin(a * p180); @@ -116,7 +116,7 @@ console.log(settings.unitIsMmol.toString()); loadVals(); - outpt = getBG(storedData.bg); + let outpt = getBG(storedData.bg); if (outpt === null) { // this means no value has been received yet outpt = "BG"; diff --git a/apps/widcw/ChangeLog b/apps/widcw/ChangeLog index 07b8f7424..4f06d0ff6 100644 --- a/apps/widcw/ChangeLog +++ b/apps/widcw/ChangeLog @@ -1,2 +1,3 @@ 0.01: First version -0.02: Fix memory leak \ No newline at end of file +0.02: Fix memory leak +0.03: Minor code improvements diff --git a/apps/widcw/metadata.json b/apps/widcw/metadata.json index 467ab1729..b3fa5898c 100644 --- a/apps/widcw/metadata.json +++ b/apps/widcw/metadata.json @@ -1,7 +1,7 @@ { "id": "widcw", "name": "Calendar Week Widget", - "version": "0.02", + "version": "0.03", "description": "Widget which shows the current calendar week", "icon": "widget.png", "type": "widget", diff --git a/apps/widcw/widget.js b/apps/widcw/widget.js index e33ad0aad..bce6a1e92 100644 --- a/apps/widcw/widget.js +++ b/apps/widcw/widget.js @@ -7,7 +7,7 @@ var date = new Date(); // Calculate calendar week (https://stackoverflow.com/a/6117889) - getCW= function(date){ + const getCW = function(date){ var d=new Date(date.getFullYear(), date.getMonth(), date.getDate()); var dayNum = d.getDay() || 7; d.setDate(d.getDate() + 4 - dayNum); diff --git a/apps/widhwbttm/ChangeLog b/apps/widhwbttm/ChangeLog index 1fa453ff3..4e8b54a18 100644 --- a/apps/widhwbttm/ChangeLog +++ b/apps/widhwbttm/ChangeLog @@ -2,3 +2,4 @@ 0.02: Correction, intervals, dynamic color and font size depending on device 0.03: minor corrections, and color depending on theme 0.04: Minor code improvements +0.05: Minor code improvements diff --git a/apps/widhwbttm/metadata.json b/apps/widhwbttm/metadata.json index 76230c9ca..b9b99db42 100644 --- a/apps/widhwbttm/metadata.json +++ b/apps/widhwbttm/metadata.json @@ -2,7 +2,7 @@ "id": "widhwbttm", "name": "HW stats (Bottom) widget", "shortName": "Digital clock Bottom Widget", - "version": "0.04", + "version": "0.05", "description": "Displays technical info, such as model, ver, temperatura or mem stats in the bottom of the screen (may not be compatible with some apps)", "icon": "widhwbttm.png", "type": "widget", diff --git a/apps/widhwbttm/widhwbttm.wid.js b/apps/widhwbttm/widhwbttm.wid.js index e2a55c6c4..72cdd6cfe 100644 --- a/apps/widhwbttm/widhwbttm.wid.js +++ b/apps/widhwbttm/widhwbttm.wid.js @@ -26,7 +26,7 @@ } else { // text prefix has to be 4char - stor=require("Storage").getStats(); + const stor=require("Storage").getStats(); if (v_count==4) { v_str_hw="Fre "+process.memory().free; //+"/"+process.memory().total; diff --git a/apps/widmessages/ChangeLog b/apps/widmessages/ChangeLog index 507d9c13b..314b1490c 100644 --- a/apps/widmessages/ChangeLog +++ b/apps/widmessages/ChangeLog @@ -4,3 +4,4 @@ 0.03: Fix messages not showing if UI auto-open is disabled 0.04: Now shows message icons again (#2416) 0.05: Match draw() API e.g. to allow wid_edit to alter this widget +0.06: Fix bug that meant that only one widget was shown (now 3 unless changed in Settings->Apps->Messages->Widget messages) \ No newline at end of file diff --git a/apps/widmessages/metadata.json b/apps/widmessages/metadata.json index f058beacc..436b77d3e 100644 --- a/apps/widmessages/metadata.json +++ b/apps/widmessages/metadata.json @@ -1,7 +1,7 @@ { "id": "widmessages", "name": "Message Widget", - "version": "0.05", + "version": "0.06", "description": "Widget showing new messages", "icon": "app.png", "type": "widget", diff --git a/apps/widmessages/widget.js b/apps/widmessages/widget.js index 357ca06e3..0351fbead 100644 --- a/apps/widmessages/widget.js +++ b/apps/widmessages/widget.js @@ -1,13 +1,5 @@ -(() => { - if ((require("Storage").readJSON("messages.settings.json", true) || {}).maxMessages===0) return; - - function filterMessages(msgs) { - return msgs.filter(msg => msg.new && msg.id != "music") - .map(m => m.src) // we only need this for icon/color - .filter((msg, i, arr) => arr.findIndex(nmsg => msg.src == nmsg.src) == i); - } - - // NOTE when adding a custom "essages" widget: +if ((require("Storage").readJSON("messages.settings.json", true) || {}).maxMessages!==0) { + // NOTE when adding a custom "messages" widget: // the name still needs to be "messages": the library calls WIDGETS["messages'].hide()/show() // see e.g. widmsggrid WIDGETS["messages"] = { @@ -48,6 +40,9 @@ if (this.hidden) return; if (type==="music") return; if (msg.id && !msg.new && msg.t!=="remove") return; + let filterMessages = msgs => msgs.filter(msg => msg.new && msg.id != "music") + .filter((msg, i, arr) => arr.findIndex(nmsg => msg.src == nmsg.src) == i) // only include one of each type + .map(m => m.src); // we only need this for icon/color; this.srcs = filterMessages(require("messages").getMessages(msg)); const settings = Object.assign({maxMessages:3},require('Storage').readJSON("messages.settings.json", true) || {}); this.width = 24 * E.clip(this.srcs.length, 0, settings.maxMessages); @@ -66,11 +61,11 @@ Bangle.drawWidgets(); } }, show() { - delete this.hidden + delete this.hidden; this.onMsg("show", {}); // reload messages+redraw } }; Bangle.on("message", WIDGETS["messages"].onMsg.bind(WIDGETS["messages"])); WIDGETS["messages"].onMsg("init", {}); // abuse type="init" to prevent Bangle.drawWidgets(); -})(); +} \ No newline at end of file diff --git a/apps/widmnth/ChangeLog b/apps/widmnth/ChangeLog index 370f41e8a..3fee5e9ec 100644 --- a/apps/widmnth/ChangeLog +++ b/apps/widmnth/ChangeLog @@ -1 +1,2 @@ 0.01: Simple new widget! +0.02: Minor code improvements diff --git a/apps/widmnth/metadata.json b/apps/widmnth/metadata.json index 25f3a8126..d30b58861 100644 --- a/apps/widmnth/metadata.json +++ b/apps/widmnth/metadata.json @@ -1,7 +1,7 @@ { "id": "widmnth", "name": "Days left in month widget", "shortName":"Month Countdown", - "version":"0.01", + "version": "0.02", "description": "A simple widget that displays the number of days left in the month.", "icon": "widget.png", "type": "widget", diff --git a/apps/widmnth/widget.js b/apps/widmnth/widget.js index c4eca155a..472434d2b 100644 --- a/apps/widmnth/widget.js +++ b/apps/widmnth/widget.js @@ -5,7 +5,7 @@ function getDaysLeft(day) { let year = day.getMonth() == 11 ? day.getFullYear() + 1 : day.getFullYear(); // rollover if december. - next_month = new Date(year, (day.getMonth() + 1) % 12, 1, 0, 0, 0); + const next_month = new Date(year, (day.getMonth() + 1) % 12, 1, 0, 0, 0); let days_left = Math.floor((next_month - day) / 86400000); // ms left in month divided by ms in a day return days_left; } diff --git a/apps/widmpsh/ChangeLog b/apps/widmpsh/ChangeLog index e432f82e5..2fa369959 100644 --- a/apps/widmpsh/ChangeLog +++ b/apps/widmpsh/ChangeLog @@ -1 +1,2 @@ 0.01: Copied from widmp and flipped the phase directions! +0.02: Minor code improvements diff --git a/apps/widmpsh/metadata.json b/apps/widmpsh/metadata.json index e6ecf9e73..0ff44a1c8 100644 --- a/apps/widmpsh/metadata.json +++ b/apps/widmpsh/metadata.json @@ -1,7 +1,7 @@ { "id": "widmpsh", "name": "Moon Phase Widget Southern Hemisphere", - "version": "0.01", + "version": "0.02", "description": "Display the current moon phase in blueish for the southern hemisphere in eight phases", "icon": "widget.png", "type": "widget", diff --git a/apps/widmpsh/widget.js b/apps/widmpsh/widget.js index 9115a4719..0ab27001a 100644 --- a/apps/widmpsh/widget.js +++ b/apps/widmpsh/widget.js @@ -1,6 +1,6 @@ WIDGETS["widmoonsh"] = { area: "tr", width: 24, draw: function() { const MC = 29.5305882, NM = 694039.09; - var r = 11, mx = this.x + 12; my = this.y + 12; + var r = 11, mx = this.x + 12, my = this.y + 12; function moonPhase(d) { var tmp, month = d.getMonth(), year = d.getFullYear(), day = d.getDate(); diff --git a/apps/worldclock/ChangeLog b/apps/worldclock/ChangeLog index a8f26c43b..216ae40de 100644 --- a/apps/worldclock/ChangeLog +++ b/apps/worldclock/ChangeLog @@ -5,3 +5,4 @@ 0.05: Now update *on* the minute rather than every 15 secs Fix rendering of single extra timezone on Bangle.js 2 0.06: Minor code improvements +0.07: Minor code improvements diff --git a/apps/worldclock/app.js b/apps/worldclock/app.js index 91b4be4f6..81ca7c37d 100644 --- a/apps/worldclock/app.js +++ b/apps/worldclock/app.js @@ -117,7 +117,7 @@ function draw() { // Loop through offset(s) and render offsets.forEach((offset, index) => { - dx = getCurrentTimeFromOffset(gmt, offset[OFFSET_HOURS]); + const dx = getCurrentTimeFromOffset(gmt, offset[OFFSET_HOURS]); hours = doublenum(dx.getHours()); minutes = doublenum(dx.getMinutes()); diff --git a/apps/worldclock/metadata.json b/apps/worldclock/metadata.json index e3ea398ff..5b9605447 100644 --- a/apps/worldclock/metadata.json +++ b/apps/worldclock/metadata.json @@ -2,7 +2,7 @@ "id": "worldclock", "name": "World Clock - 4 time zones", "shortName": "World Clock", - "version": "0.06", + "version": "0.07", "description": "Current time zone plus up to four others", "icon": "app.png", "screenshots": [{"url":"screenshot_world.png"}], diff --git a/apps/wristlight/ChangeLog b/apps/wristlight/ChangeLog new file mode 100644 index 000000000..62542be60 --- /dev/null +++ b/apps/wristlight/ChangeLog @@ -0,0 +1,2 @@ +0.01: New app! +0.02: Minor code improvements diff --git a/apps/wristlight/app.js b/apps/wristlight/app.js index 24bc1eab2..a0e883c04 100644 --- a/apps/wristlight/app.js +++ b/apps/wristlight/app.js @@ -8,13 +8,13 @@ function draw(color) { } function draw2Pattern() { - colors = ["ff0000", "8080ff", "00ff00", + const colors = ["ff0000", "8080ff", "00ff00", "ffffff"]; drawPattern(2, colors); } function draw3Pattern() { - colors = ["ff0000", "00ff00", "0000ff", + const colors = ["ff0000", "00ff00", "0000ff", "ff00ff", "ffffff", "00ffff", "ffff00", "ff8000", "ff0080"]; drawPattern(3, colors); diff --git a/apps/wristlight/metadata.json b/apps/wristlight/metadata.json index af1d700df..a4970afed 100644 --- a/apps/wristlight/metadata.json +++ b/apps/wristlight/metadata.json @@ -2,7 +2,7 @@ "name": "Wrist Light", "shortName":"Wrist Light", "icon": "wristlight48.png", - "version":"0.01", + "version": "0.02", "description": "A flash light with different colors on your wrist", "tags": "flash,light", "allow_emulator":true, diff --git a/apps/xxlmessage/ChangeLog b/apps/xxlmessage/ChangeLog index 4c587db52..5bf9a435f 100644 --- a/apps/xxlmessage/ChangeLog +++ b/apps/xxlmessage/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! -0.02: Display icon of the message origin's app \ No newline at end of file +0.02: Display icon of the message origin's app +0.03: Minor code improvements diff --git a/apps/xxlmessage/lib-unbuffered.js b/apps/xxlmessage/lib-unbuffered.js index 68fb2a7a2..36f5392f5 100644 --- a/apps/xxlmessage/lib-unbuffered.js +++ b/apps/xxlmessage/lib-unbuffered.js @@ -66,7 +66,7 @@ var xxl = { }, draw: function() { - wh = 24; // widgets height + const wh = 24; // widgets height var gw = g.getWidth(); var h = (g.getHeight() - wh)/2; // height of drawing area per stripe diff --git a/apps/xxlmessage/metadata.json b/apps/xxlmessage/metadata.json index f8150f0e7..fce3f88cb 100644 --- a/apps/xxlmessage/metadata.json +++ b/apps/xxlmessage/metadata.json @@ -1,7 +1,7 @@ { "id": "xxlmessage", "name": "XXL Message", - "version": "0.02", + "version": "0.03", "shortName": "XXL Msg", "description": "App to display large notifications from iOS and Gadgetbridge/Android", "icon": "app.png", diff --git a/modules/Slider.js b/modules/Slider.js index 7fa2adba8..33bda1245 100644 --- a/modules/Slider.js +++ b/modules/Slider.js @@ -113,19 +113,19 @@ exports.create = function(cb, conf) { o.f.dragSlider = e=>{ "ram"; if (o.v.ebLast==0) { - exFirst = o.c.horizontal?e.y:e.x; - eyFirst = o.c.horizontal?e.x:e.y; + o.v.exFirst = o.c.horizontal?e.y:e.x; + o.v.eyFirst = o.c.horizontal?e.x:e.y; } // Only react if on allowed area. - if (o.f.wasOnDragRect(exFirst, eyFirst)) { + if (o.f.wasOnDragRect(o.v.exFirst, o.v.eyFirst)) { o.v.dragActive = true; if (!o.c.propagateDrag) E.stopEventPropagation&&E.stopEventPropagation(); if (o.v.timeoutID) {clearTimeout(o.v.timeoutID); o.v.timeoutID = undefined;} if (e.b==0 && !o.v.timeoutID && (o.c.timeout || o.c.timeout===0)) o.v.timeoutID = setTimeout(o.f.remove, 1000*o.c.timeout); - if (useMap && o.f.wasOnIndicator(exFirst)) { // If draging starts on the indicator, adjust one-to-one. + if (useMap && o.f.wasOnIndicator(o.v.exFirst)) { // If draging starts on the indicator, adjust one-to-one. let input = !o.c.horizontal? Math.min((Y_MAX-e.y)-o.c.yStart-3*o.c.rounded/4, o.c.height):