Wanted to use it as a "simple" file uploader, but so far I can see the current code does not support that.
As an experiment I copied the cmdInstallApp function, slashed it, and created:
function cmdUploadFile(fileName, deviceAddress) {
bangleSend(fileName, deviceAddress).then(() => process.exit(0));
}
When I executed it I got the dreaded 'Unhandled Prmise Rejection`, there's no escaping it ;-)
iMac19-9:bin gerard$ node apploadergwr.js upload heartOnScreen.js f3-2c-dc-06-01-95
Initialising Notifications
<snip>
UART: Discovering...
UART: Found device: f3-2c-dc-06-01-95 Bangle.js 0195
UART: Connecting to f3-2c-dc-06-01-95
UART: BT> Connecting
UART: BT> Connected
UART: Disconnected
(node:79575) UnhandledPromiseRejectionWarning: Disconnected but not complete
(node:79575) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:79575) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Not sure if this error message is interesting for you, but here it is.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As an intermezzo I tried the Bangle.js App Loader from https://github.com/espruino/BangleApps.
Wanted to use it as a "simple" file uploader, but so far I can see the current code does not support that.
As an experiment I copied the
cmdInstallApp
function, slashed it, and created:When I executed it I got the dreaded 'Unhandled Prmise Rejection`, there's no escaping it ;-)
Not sure if this error message is interesting for you, but here it is.