Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/lcars/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
0.30: Add many new colors to the settings and allows random colors on startup if enabled.
0.31: Replace degree symbol in temperature by '.
0.32: Fix settings - permit CoreT as an option for the rows.
0.33: Stop deleting the timer alarm when switching away from clock (bug introduced in v0.29).
0.34: Fix lint warnings. Harmonise file names with rest of repository.
17 changes: 4 additions & 13 deletions apps/lcars/lcars.app.js → apps/lcars/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ for (const key in saved_settings) {
settings[key] = saved_settings[key];
}


//Colors to use
var color_options = [
'Green', 'Orange', 'Cyan', 'Purple', 'Red', 'Blue', 'Yellow', 'White',
'Purple', 'Pink', 'Light Green', 'Brown', 'Turquoise', 'Magenta', 'Lime',
'Gold', 'Sky Blue', 'Rose', 'Lavender', 'Amber', 'Indigo', 'Teal',
'Crimson', 'Maroon', 'Firebrick', 'Dark Red', 'Aqua', 'Emerald', 'Royal Blue',
'Sunset Orange', 'Turquoise Blue', 'Hot Pink', 'Goldenrod', 'Deep Sky Blue'
];

var bg_code = [
'#00ff00', '#FF9900', '#0094FF', '#FF00DC', '#ff0000', '#0000ff', '#ffef00', '#FFFFFF',
'#FF00FF', '#6C00FF', '#99FF00', '#8B4513', '#40E0D0', '#FF00FF', '#00FF00', '#FFD700',
Expand Down Expand Up @@ -78,6 +68,7 @@ let convert24to16 = function(input)

//Converting colors to the correct format.

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

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

// Plot text
width = g.stringWidth(value);
const WIDTH = g.stringWidth(value);
g.setColor(cBlack);
g.fillRect(130-width-8, y-2, 130, y+18);
g.fillRect(130-WIDTH-8, y-2, 130, y+18);
g.setColor(c);
g.setFontAlign(1,-1,0);
g.drawString(value, 126, y);
Expand Down Expand Up @@ -853,9 +844,9 @@ Bangle.setUI({mode:"clock",remove:function() {
Bangle.removeListener("lock",onLock);
Bangle.removeListener("charging",onCharge);
Bangle.removeListener("touch",onTouch);
require('sched').setAlarm(TIMER_IDX, undefined);
g.setTheme(themeBefore);
widget_utils.cleanup();
// NB: Leave TIMER_IDX alarm alone; timer should persist while leaving and returning to clock.
}});
Bangle.loadWidgets();
// Clear the screen once, at startup and draw clock
Expand Down
File renamed without changes
File renamed without changes.
10 changes: 5 additions & 5 deletions apps/lcars/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"id": "lcars",
"name": "LCARS Clock",
"shortName":"LCARS",
"icon": "lcars.png",
"version":"0.32",
"icon": "app.png",
"version":"0.34",
"readme": "README.md",
"supports": ["BANGLEJS2","BANGLEJS3_COMPAT"],
"description": "Library Computer Access Retrieval System (LCARS) clock.",
Expand All @@ -15,9 +15,9 @@
{"url":"screenshot_3.png"}],
"allow_emulator":true,
"storage": [
{"name":"lcars.app.js","url":"lcars.app.js"},
{"name":"lcars.img","url":"lcars.icon.js","evaluate":true},
{"name":"lcars.settings.js","url":"lcars.settings.js"}
{"name":"lcars.app.js","url":"app.js"},
{"name":"lcars.img","url":"icon.js","evaluate":true},
{"name":"lcars.settings.js","url":"settings.js"}
],
"data":[{"name":"lcars.setting.json"}]
}
File renamed without changes.
7 changes: 0 additions & 7 deletions apps/lint_exemptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ module.exports = {
"no-undef"
]
},
"apps/lcars/lcars.app.js": {
"hash": "297b92373c9e8db3ba31cb3aa42909d18a1951eef9bd7e8e0847957aa411765d",
"rules": [
"no-unused-vars",
"no-undef"
]
},
"apps/widagps/widget.js": {
"hash": "a58cdc481962575ef0aa0bfaedcc1f9de3ce966218c5b16168d8ed8b4b9672b8",
"rules": [
Expand Down
Loading