Skip to content

Commit

Permalink
Merge branch 'master' into recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
thyttan committed Nov 17, 2023
2 parents 2b9ed39 + 9ea23e3 commit 36b6f97
Show file tree
Hide file tree
Showing 24 changed files with 104 additions and 74 deletions.
1 change: 1 addition & 0 deletions apps/alarm/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@
0.42: Fix date not getting saved in event edit menu when tapping Confirm
0.43: New settings: Show confirm, Show Overflow, Show Type.
0.44: Add "delete timer after expiration" setting to events.
0.45: Fix new alarm when selectedAlarm is undefined
2 changes: 1 addition & 1 deletion apps/alarm/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function showEditAlarmMenu(selectedAlarm, alarmIndex, withDate) {
var isNew = alarmIndex === undefined;

var alarm = require("sched").newDefaultAlarm();
if (withDate || selectedAlarm.date) {
if (withDate || (selectedAlarm && selectedAlarm.date)) {
alarm.del = require("sched").getSettings().defaultDeleteExpiredTimers;
}
alarm.dow = handleFirstDayOfWeek(alarm.dow);
Expand Down
2 changes: 1 addition & 1 deletion apps/alarm/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "alarm",
"name": "Alarms & Timers",
"shortName": "Alarms",
"version": "0.44",
"version": "0.45",
"description": "Set alarms and timers on your Bangle",
"icon": "app.png",
"tags": "tool,alarm",
Expand Down
2 changes: 1 addition & 1 deletion apps/gpsnav/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tags": "tool,outdoors,gps",
"supports": ["BANGLEJS","BANGLEJS2"],
"readme": "README.md",
"dependencies" : { "waypoints":"type" },
"dependencies" : { "waypoints":"app" },
"storage": [
{"name":"gpsnav.app.js","url":"app.min.js","supports":["BANGLEJS"]},
{"name":"gpsnav.app.js","url":"app_b2.js","supports":["BANGLEJS2"]},
Expand Down
2 changes: 1 addition & 1 deletion apps/gpstrek/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tags": "tool,outdoors,gps",
"supports": ["BANGLEJS2"],
"readme": "README.md",
"dependencies" : { "waypoints":"type" },
"dependencies" : { "waypoints":"app" },
"interface" : "interface.html",
"storage": [
{"name":"gpstrek.app.js","url":"app.js"},
Expand Down
2 changes: 1 addition & 1 deletion apps/kitchen/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tags": "tool,outdoors,gps",
"supports": ["BANGLEJS"],
"readme": "README.md",
"dependencies" : { "waypoints":"type" },
"dependencies" : { "waypoints":"app" },
"storage": [
{"name":"kitchen.app.js","url":"kitchen.app.js"},
{"name":"stepo2.kit.js","url":"stepo2.kit.js"},
Expand Down
3 changes: 2 additions & 1 deletion apps/messagegui/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@
On 2v18.64+ firmware, 'No Messages' now has a 'back' button
0.72: Nav message updastes don't automatically launch navigation menu unless they're new
0.73: Add sharp left+right nav icons
0.74: Add option for driving on left (affects roundabout icons in navigation)
0.74: Add option for driving on left (affects roundabout icons in navigation)
0.75: Handle text with images in messages list by just displaying the first line
14 changes: 9 additions & 5 deletions apps/messagegui/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ function checkMessages(options) {
if (options.clockIfAllRead && newMessages.length==0)
return load();
active = "list";
// Otherwise show a menu
// Otherwise show a list of messages
E.showScroller({
h : 48,
c : Math.max(MESSAGES.length,3), // workaround for 2v10.219 firmware (min 3 not needed for 2v11)
Expand All @@ -469,17 +469,21 @@ function checkMessages(options) {
.setColor(fg); // only color the icon
x += 50;
}
var m = msg.title+"\n"+msg.body, longBody=false;
if (title) g.setFontAlign(-1,-1).setFont(fontBig).drawString(title, x,r.y+2);
var longBody = false;
if (body) {
g.setFontAlign(-1,-1).setFont("6x8");
// if the body includes an image, it probably won't be small enough to allow>1 line
let maxLines = 3, pady = 0;
if (body.includes("\0")) { maxLines=1; pady=4; }
var l = g.wrapString(body, r.w-(x+14));
if (l.length>3) {
l = l.slice(0,3);
if (l.length>maxLines) {
l = l.slice(0,maxLines);
l[l.length-1]+="...";
}
longBody = l.length>2;
g.drawString(l.join("\n"), x+10,r.y+20);
// draw the body
g.drawString(l.join("\n"), x+10,r.y+20+pady);
}
if (!longBody && msg.src) g.setFontAlign(1,1).setFont("6x8").drawString(msg.src, r.x+r.w-2, r.y+r.h-2);
g.setColor("#888").fillRect(r.x,r.y+r.h-1,r.x+r.w-1,r.y+r.h-1); // dividing line between items
Expand Down
2 changes: 1 addition & 1 deletion apps/messagegui/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "messagegui",
"name": "Message UI",
"shortName": "Messages",
"version": "0.74",
"version": "0.75",
"description": "Default app to display notifications from iOS and Gadgetbridge/Android",
"icon": "app.png",
"type": "app",
Expand Down
3 changes: 2 additions & 1 deletion apps/messages_light/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
1.3: icon changed
1.4: new management of events implemented; removed code no longer used (from now the music will be managed by the Messagesgui app)
1.5: Fix graphic bug; View via popup while there are other open apps
1.6: fix for #2689; ( white screen )
1.6: fix for #2689; ( white screen )
1.7: Fix removal notification from the list of current notifications
5 changes: 4 additions & 1 deletion apps/messages_light/messages_light.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ var manageEvent = function(event) {
showMessage(event);
}
else if(event.t=="remove"){


//se non c'è niente nella queue e non c'è una chiamata in corso
if( EventQueue.length==0 && !callInProgress)
next();
Expand All @@ -104,7 +106,8 @@ var manageEvent = function(event) {
});

//non sovrascrivo, cosi uso lo stesso oggetto in memoria e dovrei avere meno problemi di memory leak
EventQueue.length=0;
//EventQueue.length=0; // non più funzionante!
EventQueue.splice(0,EventQueue.length);
newEventQueue.forEach(element => {
EventQueue.push(element);
});
Expand Down
8 changes: 4 additions & 4 deletions apps/messages_light/messages_light.listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ let overlayTimeout=undefined;
exports.listener = function(type, event) {


//salva gli eventi che arrivano su file
/* events=require("Storage").readJSON("events_log",true) || [];
//salva gli eventi che arrivano su file TOREMOVE
/*events=require("Storage").readJSON("events_log",true) || [];
events.push ( event)
require("Storage").writeJSON("events_log",events);
*/
require("Storage").writeJSON("events_log",events);*/

//if (event.handled) return; // already handled/app open
if( type=="clearAll" || type=="music" || event.id=="music") return; //lo lascio gestire a qualcun altro

Expand Down
2 changes: 1 addition & 1 deletion apps/messages_light/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "messages_light",
"name": "Messages Light",
"version": "1.6",
"version": "1.7",
"description": "A light implementation of messages App (display notifications from iOS and Gadgetbridge/Android)",
"icon": "app.png",
"type": "app",
Expand Down
3 changes: 2 additions & 1 deletion apps/setting/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ of 'Select Clock'
0.65: Prepend 'LCD->Calibration' touch listener and stop event propagation.
0.66: Fix LCD calibration bug where it would come on again after the
calibration was done.

0.67: Rename 'Wake on BTN1/Touch' to 'Wake on Button/Tap' on Bangle.js 2
0.68: Fix syntax error
2 changes: 1 addition & 1 deletion apps/setting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This is Bangle.js's settings menu
* **Rotation** allows you to rotate (or mirror) what's displayed on the screen, eg. for left-handed wearers (needs 2v16 or 2v15 cutting edge firmware to work reliably)
* **Wake on X** should the given activity wake up the Bangle.js LCD?
* On Bangle.js 2 when locked the touchscreen is turned off to save power. Because of this,
`Wake on Touch` actually uses the accelerometer, and you need to actually tap the display to wake Bangle.js.
`Wake on Touch` actually uses the accelerometer, and you need to actually tap the display to wake Bangle.js (we recently renamed the menu item to `Wake on Tap`).
* **Twist X** these options adjust the sensitivity of `Wake on Twist` to ensure Bangle.js wakes up with just the right amount of wrist movement.
* **Calibrate** on Bangle.js 2, pop up a screen allowing you to calibrate the touchscreen (calibration only works on 2v16 or 2v15 cutting edge builds)

Expand Down
2 changes: 1 addition & 1 deletion apps/setting/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "setting",
"name": "Settings",
"version": "0.66",
"version": "0.68",
"description": "A menu for setting up Bangle.js",
"icon": "settings.png",
"tags": "tool,system",
Expand Down
44 changes: 31 additions & 13 deletions apps/setting/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,35 @@ function showLCDMenu() {
g.setRotation(settings.rotate&3,settings.rotate>>2).clear();
Bangle.drawWidgets();
}
},
/*LANG*/'Wake on BTN1': {
}
});

if (BANGLEJS2)
Object.assign(lcdMenu, {
/*LANG*/'Wake on Button': {
value: settings.options.wakeOnBTN1,
onchange: () => {
settings.options.wakeOnBTN1 = !settings.options.wakeOnBTN1;
updateOptions();
}
},
/*LANG*/'Wake on Tap': {
value: settings.options.wakeOnTouch,
onchange: () => {
settings.options.wakeOnTouch = !settings.options.wakeOnTouch;
updateOptions();
}
}
});
else
Object.assign(lcdMenu, {
/*LANG*/'Wake on BTN1': {
value: settings.options.wakeOnBTN1,
onchange: () => {
settings.options.wakeOnBTN1 = !settings.options.wakeOnBTN1;
updateOptions();
}
}
});
if (!BANGLEJS2)
Object.assign(lcdMenu, {
},
/*LANG*/'Wake on BTN2': {
value: settings.options.wakeOnBTN2,
onchange: () => {
Expand All @@ -472,6 +490,13 @@ function showLCDMenu() {
settings.options.wakeOnBTN3 = !settings.options.wakeOnBTN3;
updateOptions();
}
},
/*LANG*/'Wake on Touch': {
value: settings.options.wakeOnTouch,
onchange: () => {
settings.options.wakeOnTouch = !settings.options.wakeOnTouch;
updateOptions();
}
}});
Object.assign(lcdMenu, {
/*LANG*/'Wake on FaceUp': {
Expand All @@ -481,13 +506,6 @@ function showLCDMenu() {
updateOptions();
}
},
/*LANG*/'Wake on Touch': {
value: settings.options.wakeOnTouch,
onchange: () => {
settings.options.wakeOnTouch = !settings.options.wakeOnTouch;
updateOptions();
}
},
/*LANG*/'Wake on Twist': {
value: settings.options.wakeOnTwist,
onchange: () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/speedalt/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "app",
"tags": "tool,outdoors",
"supports": ["BANGLEJS","BANGLEJS2"],
"dependencies" : { "waypoints":"type" },
"dependencies" : { "waypoints":"app" },
"readme": "README.md",
"allow_emulator": true,
"storage": [
Expand Down
2 changes: 1 addition & 1 deletion apps/speedalt2/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "app",
"tags": "tool,outdoors",
"supports": ["BANGLEJS"],
"dependencies" : { "waypoints":"type" },
"dependencies" : { "waypoints":"app" },
"readme": "README.md",
"allow_emulator": true,
"storage": [
Expand Down
2 changes: 1 addition & 1 deletion apps/waypointer/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"icon": "waypointer.png",
"tags": "tool,outdoors,gps",
"supports": ["BANGLEJS", "BANGLEJS2"],
"dependencies" : { "waypoints":"type", "magnav" : "app" },
"dependencies" : { "waypoints":"app", "magnav" : "app" },
"readme": "README.md",
"storage": [
{"name":"waypointer.app.js","url":"app.js"},
Expand Down
2 changes: 2 additions & 0 deletions apps/waypoints/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
0.01: New App!
0.02: Merge waypoint_editor here, so waypoints can be edited on device, too.
0.03: Do not register as type waypoint - show in launcher
Fixes for Bangle.js 1 & not installed textinput
3 changes: 1 addition & 2 deletions apps/waypoints/metadata.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{ "id": "waypoints",
"name": "Waypoints",
"version":"0.02",
"version":"0.03",
"description": "Provides 'waypoints.json' used by various navigation apps, as well as a way to edit it from the App Loader or from the device",
"icon": "app.png",
"tags": "tool,outdoors,gps",
"type": "waypoints",
"supports" : ["BANGLEJS","BANGLEJS2"],
"readme": "README.md",
"interface": "interface.html",
Expand Down
Loading

0 comments on commit 36b6f97

Please sign in to comment.