Makeblock-official / mBlock

base on scratch offline v2.0 by MIT, Learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v2.0
320 stars 228 forks source link

Serial monitor doesn't display in char mode #34

Closed edwin-n-johnson closed 7 years ago

edwin-n-johnson commented 8 years ago

The code is missing to display incoming data bytes from arduino in character mode. I'd like to get the following change made.

src/ui/parts/ScriptsParts.as public function onSerialDataReceived(bytes:ByteArray):void{ if(isByteDisplayMode) { appendMsgWithTimestamp(HexUtil.bytesToString(bytes), false); } else { bytes.position = 0; var str:String = bytes.readUTFBytes(bytes.length); appendMsgWithTimestamp(str, false); } }