Ok, thanks - and it's still sending the correct data? That line might be sending the correct length, but I'm not sure if the data will be correct.
this.socket.write(E.toString(m8).substr(0,(4 + msg.length))); might be better, but it may hurt performance a bit.
this.socket.write(E.toString(m8).substr(0,(4 + msg.length)));
@Gordon started
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.
Ok, thanks - and it's still sending the correct data? That line might be sending the correct length, but I'm not sure if the data will be correct.
this.socket.write(E.toString(m8).substr(0,(4 + msg.length)));
might be better, but it may hurt performance a bit.