Merge branch 'master' of https://github.com/espruino/BangleApps
commit
d644c09b8c
|
|
@ -6,5 +6,6 @@ Changed for individual apps are listed in `apps/appname/ChangeLog`
|
||||||
* `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong
|
* `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong
|
||||||
* Added optional `README.md` file for apps
|
* Added optional `README.md` file for apps
|
||||||
* Remove 2v04 version warning, add links in About to official/developer versions
|
* Remove 2v04 version warning, add links in About to official/developer versions
|
||||||
* Fix issue removing an app that was just installed (Fix #253)
|
* Fix issue removing an app that was just installed (fix #253)
|
||||||
* Add `Favourite` functionality
|
* Add `Favourite` functionality
|
||||||
|
* Version number now clickable even when you're at the latest version (fix #291)
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
{ "id": "setting",
|
{ "id": "setting",
|
||||||
"name": "Settings",
|
"name": "Settings",
|
||||||
"icon": "settings.png",
|
"icon": "settings.png",
|
||||||
"version":"0.13",
|
"version":"0.14",
|
||||||
"description": "A menu for setting up Bangle.js",
|
"description": "A menu for setting up Bangle.js",
|
||||||
"tags": "tool,system",
|
"tags": "tool,system",
|
||||||
"storage": [
|
"storage": [
|
||||||
|
|
@ -1191,7 +1191,7 @@
|
||||||
"name": "Numerals Clock",
|
"name": "Numerals Clock",
|
||||||
"shortName": "Numerals Clock",
|
"shortName": "Numerals Clock",
|
||||||
"icon": "numerals.png",
|
"icon": "numerals.png",
|
||||||
"version":"0.01",
|
"version":"0.02",
|
||||||
"description": "A simple big numerals clock",
|
"description": "A simple big numerals clock",
|
||||||
"tags": "numerals,clock",
|
"tags": "numerals,clock",
|
||||||
"type":"clock",
|
"type":"clock",
|
||||||
|
|
@ -1209,7 +1209,7 @@
|
||||||
"version":"0.02",
|
"version":"0.02",
|
||||||
"description": "Detect BLE devices and show some informations.",
|
"description": "Detect BLE devices and show some informations.",
|
||||||
"tags": "app,bluetooth,tool",
|
"tags": "app,bluetooth,tool",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"bledetect.app.js","url":"bledetect.js"},
|
{"name":"bledetect.app.js","url":"bledetect.js"},
|
||||||
{"name":"bledetect.img","url":"bledetect-icon.js","evaluate":true}
|
{"name":"bledetect.img","url":"bledetect-icon.js","evaluate":true}
|
||||||
|
|
@ -1222,7 +1222,7 @@
|
||||||
"version":"0.01",
|
"version":"0.01",
|
||||||
"description": "The classic snake game. Eat apples and don't bite your tail:",
|
"description": "The classic snake game. Eat apples and don't bite your tail:",
|
||||||
"tags": "game,fun",
|
"tags": "game,fun",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"snake.app.js","url":"snake.js"},
|
{"name":"snake.app.js","url":"snake.js"},
|
||||||
{"name":"snake.img","url":"snake-icon.js","evaluate":true}
|
{"name":"snake.img","url":"snake-icon.js","evaluate":true}
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
|
0.02: Use BTN2 for settings menu like other clocks
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ var numerals = {
|
||||||
1:[[59,1,82,1,90,9,90,82,82,90,73,90,65,82,65,27,59,27,51,19,51,9,59,1]],
|
1:[[59,1,82,1,90,9,90,82,82,90,73,90,65,82,65,27,59,27,51,19,51,9,59,1]],
|
||||||
2:[[9,1,82,1,90,9,90,47,82,55,21,55,21,64,82,64,90,72,90,82,82,90,9,90,1,82,1,43,9,35,70,35,70,25,9,25,1,17,1,9,9,1]],
|
2:[[9,1,82,1,90,9,90,47,82,55,21,55,21,64,82,64,90,72,90,82,82,90,9,90,1,82,1,43,9,35,70,35,70,25,9,25,1,17,1,9,9,1]],
|
||||||
3:[[9,1,82,1,90,9,90,82,82,90,9,90,1,82,1,74,9,66,70,66,70,57,9,57,1,49,1,41,9,33,70,33,70,25,9,25,1,17,1,9,9,1]],
|
3:[[9,1,82,1,90,9,90,82,82,90,9,90,1,82,1,74,9,66,70,66,70,57,9,57,1,49,1,41,9,33,70,33,70,25,9,25,1,17,1,9,9,1]],
|
||||||
4:[[9,1,14,1,22,9,22,34,69,34,69,9,77,1,82,1,90,9,90,82,82,90,78,90,70,82,70,55,9,55,1,47,1,9,9,1]],
|
4:[[9,1,14,1,22,9,22,34,69,34,69,9,77,1,82,1,90,9,90,82,82,90,78,90,70,82,70,55,9,55,1,47,1,9,9,1]],
|
||||||
5:[[9,1,82,1,90,9,90,17,82,25,21,25,21,35,82,35,90,43,90,82,82,90,9,90,1,82,1,72,9,64,71,64,71,55,9,55,1,47,1,9,9,1]],
|
5:[[9,1,82,1,90,9,90,17,82,25,21,25,21,35,82,35,90,43,90,82,82,90,9,90,1,82,1,72,9,64,71,64,71,55,9,55,1,47,1,9,9,1]],
|
||||||
6:[[9,1,82,1,90,9,90,14,82,22,22,22,22,36,82,36,90,44,90,82,82,90,9,90,1,82,1,9,9,1],[22,55,69,55,69,69,22,69,22,55]],
|
6:[[9,1,82,1,90,9,90,14,82,22,22,22,22,36,82,36,90,44,90,82,82,90,9,90,1,82,1,9,9,1],[22,55,69,55,69,69,22,69,22,55]],
|
||||||
7:[[9,1,82,1,90,9,90,15,15,90,9,90,1,82,1,76,54,23,9,23,1,15,1,9,9,1]],
|
7:[[9,1,82,1,90,9,90,15,15,90,9,90,1,82,1,76,54,23,9,23,1,15,1,9,9,1]],
|
||||||
|
|
@ -47,7 +47,7 @@ if (!settings) {
|
||||||
function drawNum(num,col,x,y,func){
|
function drawNum(num,col,x,y,func){
|
||||||
g.setColor(col);
|
g.setColor(col);
|
||||||
let tx = x*100+35;
|
let tx = x*100+35;
|
||||||
let ty = y*100+35;
|
let ty = y*100+35;
|
||||||
for (let i=0;i<numerals[num].length;i++){
|
for (let i=0;i<numerals[num].length;i++){
|
||||||
if (i>0) g.setColor((func==fill)?"#000000":col);
|
if (i>0) g.setColor((func==fill)?"#000000":col);
|
||||||
func(translate(tx, ty,numerals[num][i]));
|
func(translate(tx, ty,numerals[num][i]));
|
||||||
|
|
@ -57,7 +57,7 @@ function drawNum(num,col,x,y,func){
|
||||||
function draw(drawMode){
|
function draw(drawMode){
|
||||||
let d = new Date();
|
let d = new Date();
|
||||||
let h1 = Math.floor(d.getHours()/10);
|
let h1 = Math.floor(d.getHours()/10);
|
||||||
let h2 = d.getHours()%10;
|
let h2 = d.getHours()%10;
|
||||||
let m1 = Math.floor(d.getMinutes()/10);
|
let m1 = Math.floor(d.getMinutes()/10);
|
||||||
let m2 = d.getMinutes()%10;
|
let m2 = d.getMinutes()%10;
|
||||||
g.clearRect(0,24,240,240);
|
g.clearRect(0,24,240,240);
|
||||||
|
|
@ -70,9 +70,9 @@ function draw(drawMode){
|
||||||
Bangle.setLCDMode();
|
Bangle.setLCDMode();
|
||||||
|
|
||||||
clearWatch();
|
clearWatch();
|
||||||
setWatch(Bangle.showLauncher, BTN1, {repeat:false,edge:"falling"});
|
setWatch(Bangle.showLauncher, BTN2, {repeat:false,edge:"falling"});
|
||||||
|
|
||||||
g.clear();
|
g.clear();
|
||||||
clearInterval();
|
clearInterval();
|
||||||
if (settings.color>0) _rCol=settings.color-1;
|
if (settings.color>0) _rCol=settings.color-1;
|
||||||
interval=setInterval(draw, REFRESH_RATE, settings.drawMode);
|
interval=setInterval(draw, REFRESH_RATE, settings.drawMode);
|
||||||
|
|
@ -80,7 +80,7 @@ draw(settings.drawMode);
|
||||||
|
|
||||||
Bangle.on('lcdPower', function(on) {
|
Bangle.on('lcdPower', function(on) {
|
||||||
if (on) {
|
if (on) {
|
||||||
if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length);
|
if (settings.color==0) _rCol = Math.floor(Math.random()*_hCol.length);
|
||||||
draw(settings.drawMode);
|
draw(settings.drawMode);
|
||||||
interval=setInterval(draw, REFRESH_RATE, settings.drawMode);
|
interval=setInterval(draw, REFRESH_RATE, settings.drawMode);
|
||||||
}else
|
}else
|
||||||
|
|
@ -90,4 +90,4 @@ Bangle.on('lcdPower', function(on) {
|
||||||
});
|
});
|
||||||
|
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,5 @@
|
||||||
Move LCD Timeout to wakeup menu
|
Move LCD Timeout to wakeup menu
|
||||||
0.13: Fix memory leak for App settings
|
0.13: Fix memory leak for App settings
|
||||||
Make capitalization more consistent
|
Make capitalization more consistent
|
||||||
Move LCD Brightness menu into more general LCD menu
|
Move LCD Brightness menu into more general LCD menu
|
||||||
|
0.14: Reduce memory usage when running app settings page
|
||||||
|
|
|
||||||
|
|
@ -325,8 +325,6 @@ function showClockMenu() {
|
||||||
return E.showMenu(clockMenu);
|
return E.showMenu(clockMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function showSetTimeMenu() {
|
function showSetTimeMenu() {
|
||||||
d = new Date();
|
d = new Date();
|
||||||
const timemenu = {
|
const timemenu = {
|
||||||
|
|
@ -419,8 +417,8 @@ function showAppSettingsMenu() {
|
||||||
'< Back': ()=>showMainMenu(),
|
'< Back': ()=>showMainMenu(),
|
||||||
}
|
}
|
||||||
const apps = storage.list(/\.info$/)
|
const apps = storage.list(/\.info$/)
|
||||||
.map(app => storage.readJSON(app, 1))
|
.map(app => {var a=storage.readJSON(app, 1);return (a&&a.settings)?a:undefined})
|
||||||
.filter(app => app && app.settings)
|
.filter(app => app) // filter out any undefined apps
|
||||||
.sort((a, b) => a.sortorder - b.sortorder)
|
.sort((a, b) => a.sortorder - b.sortorder)
|
||||||
if (apps.length === 0) {
|
if (apps.length === 0) {
|
||||||
appmenu['No app has settings'] = () => { };
|
appmenu['No app has settings'] = () => { };
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ uploadApp : (app,skipReset) => { // expects an apps.json structure (i.e. with `s
|
||||||
currentBytes += f.content.length;
|
currentBytes += f.content.length;
|
||||||
// Chould check CRC here if needed instead of returning 'OK'...
|
// Chould check CRC here if needed instead of returning 'OK'...
|
||||||
// E.CRC32(require("Storage").read(${JSON.stringify(app.name)}))
|
// E.CRC32(require("Storage").read(${JSON.stringify(app.name)}))
|
||||||
Puck.write(`\x10${f.cmd};Bluetooth.println("OK")\n`,(result) => {
|
Puck.write(`${f.cmd};Bluetooth.println("OK")\n`,(result) => {
|
||||||
if (!result || result.trim()!="OK") {
|
if (!result || result.trim()!="OK") {
|
||||||
Progress.hide({sticky:true});
|
Progress.hide({sticky:true});
|
||||||
return reject("Unexpected response "+(result||""));
|
return reject("Unexpected response "+(result||""));
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ function getVersionInfo(appListing, appInstalled) {
|
||||||
if (appListing.version)
|
if (appListing.version)
|
||||||
versionText = clicky("v"+appListing.version);
|
versionText = clicky("v"+appListing.version);
|
||||||
} else {
|
} else {
|
||||||
versionText = (appInstalled.version ? ("v"+appInstalled.version) : "Unknown version");
|
versionText = (appInstalled.version ? (clicky("v"+appInstalled.version)) : "Unknown version");
|
||||||
if (appListing.version != appInstalled.version) {
|
if (appListing.version != appInstalled.version) {
|
||||||
if (appListing.version) versionText += ", latest "+clicky("v"+appListing.version);
|
if (appListing.version) versionText += ", latest "+clicky("v"+appListing.version);
|
||||||
canUpdate = true;
|
canUpdate = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue