better handlings of logs
This commit is contained in:
parent
5a670f3291
commit
6576f7bd66
@ -596,8 +596,8 @@ namespace ks.rt {
|
|||||||
writeSerial(s: string) {
|
writeSerial(s: string) {
|
||||||
for (let i = 0; i < s.length; ++i) {
|
for (let i = 0; i < s.length; ++i) {
|
||||||
let c = s[i];
|
let c = s[i];
|
||||||
switch (c) {
|
this.serialOutBuffer += c;
|
||||||
case '\n':
|
if (c == '\n') {
|
||||||
Runtime.postMessage(<SimulatorSerialMessage>{
|
Runtime.postMessage(<SimulatorSerialMessage>{
|
||||||
type: 'serial',
|
type: 'serial',
|
||||||
data: this.serialOutBuffer,
|
data: this.serialOutBuffer,
|
||||||
@ -605,8 +605,6 @@ namespace ks.rt {
|
|||||||
})
|
})
|
||||||
this.serialOutBuffer = ''
|
this.serialOutBuffer = ''
|
||||||
break;
|
break;
|
||||||
case '\r': continue;
|
|
||||||
default: this.serialOutBuffer += c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user