Skip to content

Commit

Permalink
Merge branch 'master' of github.com:espruino/BangleApps
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jan 5, 2022
2 parents 18fda77 + 2624588 commit 8ce8f37
Show file tree
Hide file tree
Showing 23 changed files with 1,773 additions and 54 deletions.
43 changes: 40 additions & 3 deletions apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
{
"id": "weather",
"name": "Weather",
"version": "0.14",
"version": "0.15",
"description": "Show Gadgetbridge weather report",
"icon": "icon.png",
"screenshots": [{"url":"screenshot.png"}],
Expand Down Expand Up @@ -1324,7 +1324,7 @@
"icon": "gesture.png",
"type": "app",
"tags": "gesture,ai",
"supports": ["BANGLEJS"],
"supports": ["BANGLEJS", "BANGLEJS2"],
"storage": [
{"name":"gesture.app.js","url":"gesture.js"},
{"name":".tfnames","url":"gesture-tfnames.js","evaluate":true},
Expand Down Expand Up @@ -4489,7 +4489,7 @@
"name": "LCARS Clock",
"shortName":"LCARS",
"icon": "lcars.png",
"version":"0.08",
"version":"0.09",
"readme": "README.md",
"supports": ["BANGLEJS2"],
"description": "Library Computer Access Retrieval System (LCARS) clock.",
Expand Down Expand Up @@ -5123,6 +5123,24 @@
{"name":"ltherm.img","url":"icon.js","evaluate":true}
]
},
{
"id": "presentor",
"name": "Presentor",
"version": "3.0",
"description": "Use your Bangle to present!",
"icon": "app.png",
"type": "app",
"tags": "tool,bluetooth",
"interface": "interface.html",
"readme":"README.md",
"supports": ["BANGLEJS", "BANGLEJS2"],
"allow_emulator": true,
"storage": [
{"name":"presentor.app.js","url":"app.js"},
{"name":"presentor.img","url":"app-icon.js","evaluate":true},
{"name":"presentor.json","url":"settings.json"}
]
},
{
"id": "slash",
"name": "Slash Watch",
Expand Down Expand Up @@ -5390,5 +5408,24 @@
"storage": [
{"name":"touchmenu.boot.js","url":"touchmenu.boot.js"}
]
},
{
"id": "puzzle15",
"name": "15 puzzle",
"version": "0.05",
"description": "A 15 puzzle game with drag gesture interface",
"readme":"README.md",
"icon": "puzzle15.app.png",
"screenshots": [{"url":"screenshot.png"}],
"type": "app",
"tags": "game",
"supports": ["BANGLEJS2"],
"allow_emulator": true,
"storage": [
{"name":"puzzle15.app.js","url":"puzzle15.app.js"},
{"name":"puzzle15.settings.js","url":"puzzle15.settings.js"},
{"name":"puzzle15.img","url":"puzzle15.app-icon.js","evaluate":true}
],
"data": [{"name":"puzzle15.json"}]
}
]
3 changes: 2 additions & 1 deletion apps/lcars/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
0.05: Additional icons for (1) charging and (2) bat < 30%.
0.06: Fix - Alarm disabled, if clock was closed.
0.07: Added settings to adjust data that is shown for each row.
0.08: Support for multiple screens. 24h graph for steps + HRM. Fullscreen Mode.
0.08: Support for multiple screens. 24h graph for steps + HRM. Fullscreen Mode.
0.09: Tab anywhere to open the launcher.
4 changes: 3 additions & 1 deletion apps/lcars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ To contribute you can open a PR at this [GitHub Repo]( https://github.com/peerda
* LCARS Style watch face.
* Full screen mode - widgets are still loaded.
* Supports multiple screens with different data.
* Tab anywhere to open the launcher.
* [Screen 1] Date + Time + Lock status.
* [Screen 1] Shows randomly images of real planets.
* [Screen 1] Shows different states such as (charging, out of battery, GPS on etc.)
* [Screen 1] Swipe up/down to activate an alarm.
* [Screen 1] Shows 3 customizable datapoints on the first screen.
* [Screen 1] The lower orange line indicates the battery level.
* [Screen 2] Display month graphs for steps + hrm on the second screen.
* [Screen 2] Display graphs for steps + hrm on the second screen.
* [Screen 2] Switch between day/month via swipe up/down.


## Multiple screens support
Expand Down
45 changes: 27 additions & 18 deletions apps/lcars/lcars.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ let cOrange = "#FF9900";
let cPurple = "#FF00DC";
let cWhite = "#FFFFFF";
let cBlack = "#000000";
let cGrey = "#9E9E9E";

/*
* Global lcars variables
Expand Down Expand Up @@ -147,14 +148,17 @@ function printData(key, y, c){
}

g.setColor(c);
g.fillRect(79, y-2, 87 ,y+18);

g.setFontAlign(1,-1,0);
g.drawString(value, 131, y);

g.setColor(c);
g.setFontAlign(-1,-1,0);
g.fillRect(133, y-2, 165 ,y+18);
g.fillCircle(161, y+8, 10);
g.setColor(cBlack);
g.drawString(text, 135, y);

g.setColor(c);
g.setFontAlign(1,-1,0);
g.drawString(value, 130, y);
}

function drawHorizontalBgLine(color, x1, x2, y, h){
Expand Down Expand Up @@ -191,13 +195,14 @@ function drawState(){
return;
}

g.clearRect(20, 93, 77, 170);
g.setColor(cWhite);
var bat = E.getBattery();
var current = new Date();
var hours = current.getHours();
g.clearRect(20, 93, 75, 170);
g.setFontAlign(0, 0, 0);
g.setFontAntonioMedium();

if(!isAlarmEnabled()){
var bat = E.getBattery();
var current = new Date();
var hours = current.getHours();
var iconImg =
Bangle.isCharging() ? iconCharging :
bat < 30 ? iconNoBattery :
Expand All @@ -206,16 +211,16 @@ function drawState(){
hours % 4 == 1 ? iconMars :
hours % 4 == 2 ? iconMoon :
iconEarth;
g.drawImage(iconImg, 29, 104);
g.drawImage(iconImg, 24, 118);
g.setColor(cWhite);
g.drawString("STATUS", 24+25, 108);
} else {
// Alarm within symbol
g.setFontAntonioMedium();
g.setFontAlign(0, 0, 0);
g.setColor(cOrange);
g.drawString("ALARM", 29+25, 107);
g.drawString("ALARM", 24+25, 108);
g.setColor(cWhite);
g.setFontAntonioLarge();
g.drawString(getAlarmMinutes(), 29+25, 107+35);
g.drawString(getAlarmMinutes(), 24+25, 108+35);
}

g.setFontAlign(-1, -1, 0);
Expand All @@ -236,7 +241,7 @@ function drawPosition0(){
var bat = E.getBattery() / 100.0;
var batX2 = parseInt((172 - 35) * bat + 35);
drawHorizontalBgLine(cOrange, 35, batX2, 171, 5);
drawHorizontalBgLine(cPurple, batX2+10, 172, 171, 5);
drawHorizontalBgLine(cGrey, batX2+10, 172, 171, 5);

// Draw logo
drawLock();
Expand All @@ -247,15 +252,15 @@ function drawPosition0(){
var currentDate = new Date();
var timeStr = locale.time(currentDate,1);
g.setFontAntonioLarge();
g.drawString(timeStr, 28, 10);
g.drawString(timeStr, 29, 10);

// Write date
g.setColor(cWhite);
g.setFontAntonioMedium();
var dayStr = locale.dow(currentDate, true).toUpperCase();
dayStr += " " + currentDate.getDate();
dayStr += " " + currentDate.getFullYear();
g.drawString(dayStr, 29, 56);
g.drawString(dayStr, 32, 56);

// Draw data
g.setFontAlign(-1, -1, 0);
Expand Down Expand Up @@ -401,7 +406,7 @@ function draw(){
* Step counter via widget
*/
function getSteps() {
var steps = 0
var steps = 0;
try {
health = require("health");
} catch(ex) {
Expand Down Expand Up @@ -553,6 +558,10 @@ Bangle.on("drag", e => {
}
});

Bangle.on("touch", e => {
Bangle.showLauncher();
});


/*
* Lets start widgets, listen for btn etc.
Expand Down
Binary file modified apps/lcars/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/presentor/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
0.1: Start of app.
0.5: BLE keyboard functionality.
1.0: BLE mouse functionality to scroll back/forward.
1.5: Added accelerator style mouse.
2.0: Added touchpad style mouse.
2.1: Initial internal git(hub) release. Added icon and such.
2.2: Begin work on presentation parts.
3.0: Presentation parts!
2 changes: 2 additions & 0 deletions apps/presentor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Presentor
Use your Bangle to present!
1 change: 1 addition & 0 deletions apps/presentor/app-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8ce8f37

Please sign in to comment.