the widget gbridge registers the global.GB function. Where is this function called?
This sort-of explains it: http://www.espruino.com/Gadgetbridge
Basically Bangle.js provides a REPL over Bluetooth (basically the left-hand side of the IDE). Gadgetbridge connects to that and sends the command to execute GB directly. It's like a poor man's remote procedure call.
The nice side-effect is it's easy to test because you can just manually call the function using the left-hand side of the IDE
© Espruino, powered by microcosm.
Report a problem