mirror of https://github.com/espruino/BangleApps
Add gbdebug app
parent
b5fa5fb64e
commit
6baddd3b43
14
apps.json
14
apps.json
|
@ -269,6 +269,20 @@
|
|||
],
|
||||
"data": [{"name":"gbridge.json"}]
|
||||
},
|
||||
{ "id": "gbdebug",
|
||||
"name": "Gadgetbridge Debug",
|
||||
"shortName":"GB Debug",
|
||||
"version":"0.01",
|
||||
"description": "Debug info for Gadgetbridge. Run this app and when Gadgetbridge messages arrive they are displayed on-screen.",
|
||||
"icon": "app.png",
|
||||
"tags": "",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"gbdebug.app.js","url":"app.js"},
|
||||
{"name":"gbdebug.img","url":"app-icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "mclock",
|
||||
"name": "Morphing Clock",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
0.01: New App!
|
|
@ -0,0 +1,26 @@
|
|||
# Gadgetbridge Debug
|
||||
|
||||
This is useful if your Bangle isn't responding to the Gadgetbridge
|
||||
Android app properly.
|
||||
|
||||
This app disables all existing Gadgetbridge handlers and then displays the
|
||||
messages that come from Gadgetbridge on the screen
|
||||
of the watch. It also saves the last 10 messages in a variable
|
||||
called `history`.
|
||||
|
||||
More info on Gadgetbridge at http://www.espruino.com/Gadgetbridge
|
||||
|
||||
## Usage
|
||||
|
||||
* Run the `GB Debug` app on your Bangle
|
||||
* Connect your Bangle to Gadgetbridge
|
||||
* Do whatever was causing you problems (eg receiving a call)
|
||||
* The Gadgetbridge message should now be displayed on-screen
|
||||
|
||||
If you want to get the *actual* data rather than copying it from the screen.
|
||||
|
||||
* Ensure the `GB Debug` app is kept running after the above steps
|
||||
* Disconnect Gadgetbridge from the Bangle
|
||||
* Connect the Web IDE on your PC
|
||||
* Type `show()` on the left-hand side of the IDE and the
|
||||
last 10 messages from Gadgetbridge will be shown.
|
|
@ -0,0 +1 @@
|
|||
require("heatshrink").decompress(atob("mEw4cBzsE/4AClMywH680rlOW9N9kmSpICnyBBBgQRMkBUDgIRKoBoGGRYAFHBGARpARHT5MJKxQAFLgzELCIlIBQkSCIsEPRKBHCIYbGoIRFiQRJhJgFCISeEBwMQOQykCCIqlBpMEBIgRHOQYRIYQbPDhAbBNwgRJVwOCTIgRFMAJKDgQRGOQprBCIMSGogHBJwwbBkC2FCJNbUgMNwHYBYPJCIhODju0yFNCIUGCJGCoE2NwO24EAmw1FHgWCpMGgQOBBIMwCJGSpMmyAjDCI6eBCIWAhu2I4IRCUIYREk+Ah3brEB2CzFAAIRCl3b23btsNCJckjoRC1h2CyAREtoNC9oDC2isCCIgHBjdt5MtCJj2CowjD2uyCIOSCI83lu123tAQIRI4EB28/++39/0mwRCoARCgbfByU51/3rev+mWCIQwCPok0EYIRB/gRDpJ+EcYQRJkARQdgq/Bl5HE7IRDZAltwAREyXbCIbIFgEfCIXsBwQCDQAYRNLgvfCIXtCI44Dm3JCIUlYoYCGkrjBk9bxMkyy9CChICFA="))
|
|
@ -0,0 +1,21 @@
|
|||
E.showMessage("Waiting for message");
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
||||
var history = [];
|
||||
|
||||
GB = function(e) {
|
||||
if (history.length > 10)
|
||||
history = history.slice(history.length-10);
|
||||
history.push(e);
|
||||
|
||||
var s = JSON.stringify(e,null,2);
|
||||
|
||||
g.reset().clear(Bangle.appRect);
|
||||
g.setFont("6x8").setFontAlign(-1,0);
|
||||
g.drawString(s, 10, g.getHeight()/2);
|
||||
};
|
||||
|
||||
function show() {
|
||||
print(JSON.stringify(history,null,2));
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Loading…
Reference in New Issue