Skip to content

Commit 6986d42

Browse files
authored
Merge branch 'espruino:master' into master
2 parents 79e19cf + c1788a0 commit 6986d42

7 files changed

Lines changed: 11 additions & 25 deletions

File tree

apps/lcars/ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@
3030
0.30: Add many new colors to the settings and allows random colors on startup if enabled.
3131
0.31: Replace degree symbol in temperature by '.
3232
0.32: Fix settings - permit CoreT as an option for the rows.
33+
0.33: Stop deleting the timer alarm when switching away from clock (bug introduced in v0.29).
34+
0.34: Fix lint warnings. Harmonise file names with rest of repository.
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ for (const key in saved_settings) {
2323
settings[key] = saved_settings[key];
2424
}
2525

26-
27-
//Colors to use
28-
var color_options = [
29-
'Green', 'Orange', 'Cyan', 'Purple', 'Red', 'Blue', 'Yellow', 'White',
30-
'Purple', 'Pink', 'Light Green', 'Brown', 'Turquoise', 'Magenta', 'Lime',
31-
'Gold', 'Sky Blue', 'Rose', 'Lavender', 'Amber', 'Indigo', 'Teal',
32-
'Crimson', 'Maroon', 'Firebrick', 'Dark Red', 'Aqua', 'Emerald', 'Royal Blue',
33-
'Sunset Orange', 'Turquoise Blue', 'Hot Pink', 'Goldenrod', 'Deep Sky Blue'
34-
];
35-
3626
var bg_code = [
3727
'#00ff00', '#FF9900', '#0094FF', '#FF00DC', '#ff0000', '#0000ff', '#ffef00', '#FFFFFF',
3828
'#FF00FF', '#6C00FF', '#99FF00', '#8B4513', '#40E0D0', '#FF00FF', '#00FF00', '#FFD700',
@@ -78,6 +68,7 @@ let convert24to16 = function(input)
7868

7969
//Converting colors to the correct format.
8070

71+
let color1C, color2C, color3C; // fix lint warning no-undef
8172
let randomColors = function () {
8273

8374
if (settings.randomColors) {
@@ -290,9 +281,9 @@ let printRow = function(text, value, y, c){
290281
g.drawString(text, 135, y);
291282

292283
// Plot text
293-
width = g.stringWidth(value);
284+
const WIDTH = g.stringWidth(value);
294285
g.setColor(cBlack);
295-
g.fillRect(130-width-8, y-2, 130, y+18);
286+
g.fillRect(130-WIDTH-8, y-2, 130, y+18);
296287
g.setColor(c);
297288
g.setFontAlign(1,-1,0);
298289
g.drawString(value, 126, y);
@@ -853,9 +844,9 @@ Bangle.setUI({mode:"clock",remove:function() {
853844
Bangle.removeListener("lock",onLock);
854845
Bangle.removeListener("charging",onCharge);
855846
Bangle.removeListener("touch",onTouch);
856-
require('sched').setAlarm(TIMER_IDX, undefined);
857847
g.setTheme(themeBefore);
858848
widget_utils.cleanup();
849+
// NB: Leave TIMER_IDX alarm alone; timer should persist while leaving and returning to clock.
859850
}});
860851
Bangle.loadWidgets();
861852
// Clear the screen once, at startup and draw clock
File renamed without changes.

apps/lcars/metadata.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"id": "lcars",
33
"name": "LCARS Clock",
44
"shortName":"LCARS",
5-
"icon": "lcars.png",
6-
"version":"0.32",
5+
"icon": "app.png",
6+
"version":"0.34",
77
"readme": "README.md",
88
"supports": ["BANGLEJS2","BANGLEJS3_COMPAT"],
99
"description": "Library Computer Access Retrieval System (LCARS) clock.",
@@ -15,9 +15,9 @@
1515
{"url":"screenshot_3.png"}],
1616
"allow_emulator":true,
1717
"storage": [
18-
{"name":"lcars.app.js","url":"lcars.app.js"},
19-
{"name":"lcars.img","url":"lcars.icon.js","evaluate":true},
20-
{"name":"lcars.settings.js","url":"lcars.settings.js"}
18+
{"name":"lcars.app.js","url":"app.js"},
19+
{"name":"lcars.img","url":"icon.js","evaluate":true},
20+
{"name":"lcars.settings.js","url":"settings.js"}
2121
],
2222
"data":[{"name":"lcars.setting.json"}]
2323
}

apps/lint_exemptions.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,6 @@ module.exports = {
183183
"no-undef"
184184
]
185185
},
186-
"apps/lcars/lcars.app.js": {
187-
"hash": "297b92373c9e8db3ba31cb3aa42909d18a1951eef9bd7e8e0847957aa411765d",
188-
"rules": [
189-
"no-unused-vars",
190-
"no-undef"
191-
]
192-
},
193186
"apps/widagps/widget.js": {
194187
"hash": "a58cdc481962575ef0aa0bfaedcc1f9de3ce966218c5b16168d8ed8b4b9672b8",
195188
"rules": [

0 commit comments

Comments
 (0)