Hello again,
I ran into another difference while using Web IDE vs Espruino Tools. My programming flow for Bangle.js 2 bracelets involves building a single 'output file' for later download to multiple bracelets. It is mentioned on https://github.com/espruino/EspruinoTools that programming is as simple as :
This file can then be sent directly to Espruino at some later time - sometimes just cat file.js > /dev/ttyACM0 is enough.
Unfortunately I ran into an issue with 'special character strings'. Consider the following code (this the double arrow image used in Bangle's menu) :
When downloading this to the bracelet, the error 'Too much data for file size' is returned. After some tracing it turns out the download is 69 byte, not 67 (attached image). The image on the bracelet is - obviously - 'mangled'. A dump() looks messed up :
The difference are the codes for the 'ùð' characters. The strange thing is that the console dumps in Web IDE (development tools) show the same characters in the 'Sending' prompt, but result in a correct file being stored.
So obviously 'someone' is altering the output of the minified source before sending it down BLE. How then is it possible to just 'cat' an output file to a bracelet ? What are the additional modifications a minified source needs before 'just copying' to a Bangle.js 2 ?
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.
Hello again,
I ran into another difference while using Web IDE vs Espruino Tools. My programming flow for Bangle.js 2 bracelets involves building a single 'output file' for later download to multiple bracelets. It is mentioned on https://github.com/espruino/EspruinoTools that programming is as simple as :
Unfortunately I ran into an issue with 'special character strings'. Consider the following code (this the double arrow image used in Bangle's menu) :
This is prepared for download with :
'testOut.js' looks like :
When downloading this to the bracelet, the error 'Too much data for file size' is returned. After some tracing it turns out the download is 69 byte, not 67 (attached image). The image on the bracelet is - obviously - 'mangled'. A dump() looks messed up :
Using the Web IDE and 'Send to Espruino' Flash, the file downloads OK and is 67 byte in size (attached). The dump () :
The difference are the codes for the 'ùð' characters. The strange thing is that the console dumps in Web IDE (development tools) show the same characters in the 'Sending' prompt, but result in a correct file being stored.
So obviously 'someone' is altering the output of the minified source before sending it down BLE. How then is it possible to just 'cat' an output file to a bracelet ? What are the additional modifications a minified source needs before 'just copying' to a Bangle.js 2 ?
2 Attachments