Can anyone think of a reason why setConsole shouldn't just override the automatic changeover? (the changeover happens if USB connects and you're on Serial1, or if USB disconnects while you're on USB)
Perhaps Device.setConsole(true) could force the console to stay in place, and Device.setConsole() would have the existing behaviour.
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.
I guess one way is to assign the console to Loopback:
But things like Ctrl-C to break won't work then.
Can anyone think of a reason why
setConsole
shouldn't just override the automatic changeover? (the changeover happens if USB connects and you're on Serial1, or if USB disconnects while you're on USB)Perhaps
Device.setConsole(true)
could force the console to stay in place, andDevice.setConsole()
would have the existing behaviour.