Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	core
master
Martin Zwigl 2025-03-20 00:47:43 +01:00
commit e8c3343224
8 changed files with 26 additions and 10 deletions

View File

@ -41,4 +41,8 @@
0.38: Don't rewrite settings file on every boot!
0.39: Move GB message handling into a library to reduce boot time from 40ms->13ms
0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26)
0.41: When using `actfetch`, fetch historical activity type too
0.41: When using `actfetch`, fetch historical activity type too
0.42: Add handling for android STREAM_MUSIC volume level info, emitting on
arrival. (Needs Gadgetbridge nightly (either flavor) for now, or stable
version 85 when it's out)

View File

@ -44,6 +44,10 @@ exports.gbHandler = (event) => {
"musicinfo" : function() {
require("messages").pushMessage(Object.assign(event, {t:"modify",id:"music",title:"Music"}));
},
// {t:"audio", v:(percentage of max volume for android STREAM_MUSIC)}
"audio" : function() {
Bangle.emit("musicVolume", event.v);
},
// {"t":"call","cmd":"incoming/end/start/outgoing","name":"Bob","number":"12421312"})
"call" : function() {
Object.assign(event, {
@ -386,4 +390,4 @@ exports.overwriteGPS = () => { // if the overwrite option is set, call this on i
setTimeout(()=>{
if (!Bangle.isGPSOn()) require("android").gbSend({ t: "gps_power", status: false });
},3000);
};
};

View File

@ -2,7 +2,7 @@
"id": "android",
"name": "Android Integration",
"shortName": "Android",
"version": "0.41",
"version": "0.42",
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
"icon": "app.png",
"tags": "tool,system,messages,notifications,gadgetbridge",

View File

@ -18,7 +18,7 @@ See below for options under each heading:
* **Clock** if you have more than one clock face, select the default one
* **Launcher** if you have more than one app launcher, select the default one
* **Date & Time** Configure the current time - Note that this can be done much more easily by choosing 'Set Time' from the App Loader
* **Altitude** On Bangle.js 2, adjust the altitude (
* **Altitude** On Bangle.js 2, calibrate the altitude (which varies depending on Air Pressure). Tap `Adjust Up`/`Adjust Down` to move the reported altitude by around 10m
## Alerts

2
core

@ -1 +1 @@
Subproject commit 1cdcb3405f78ef35f231b9c3df501721bda75525
Subproject commit 43dbadf5b9a41ff00aa6bef76d3360b510fb06a5

View File

@ -209,11 +209,15 @@
</div>
</footer>
<script src="webtools/puck.js"></script>
<script src="webtools/uart.js"></script>
<script src="core/js/utils.js"></script>
<script>
UART.ports = UART.ports.filter(e => e.includes("Bluetooth")); // all watches are Bluetooth
Const.CONNECTION_DEVICE = "Bluetooth"; // force Bluetooth because we know (don't look it up)
</script>
<script src="webtools/heatshrink.js"></script>
<script src="core/lib/marked.min.js"></script>
<script src="core/lib/espruinotools.js"></script>
<script src="core/js/utils.js"></script>
<script src="loader.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script> <!-- for backup.js -->
<script src="backup.js"></script>

View File

@ -267,12 +267,16 @@ window.addEventListener('load', (event) => {
// BLE Compatibility
var selectBLECompat = document.getElementById("settings-ble-compat");
if (selectBLECompat) {
Puck.increaseMTU = !SETTINGS.bleCompat;
function setBLECompat(compat) {
if ("undefined"!==typeof Puck) Puck.increaseMTU = !compat;
if ("undefined"!==typeof UART) UART.increaseMTU = !compat;
}
setBLECompat(SETTINGS.bleCompat);
selectBLECompat.checked = !!SETTINGS.bleCompat;
selectBLECompat.addEventListener("change",event=>{
console.log("BLE compatibility mode "+(event.target.checked?"on":"off"));
SETTINGS.bleCompat = event.target.checked;
Puck.increaseMTU = !SETTINGS.bleCompat;
setBLECompat(SETTINGS.bleCompat);
saveSettings();
});
}

@ -1 +1 @@
Subproject commit d659cfa05e66c5c770659668e8eecaecd08f91bd
Subproject commit 27939deca30abe8896a4e630e732e5cf4f9a3712