File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ def getkey_patched(self):
254
254
self .menu_key = CTRL_T
255
255
self .exit_key = CTRL_RBRACKET
256
256
self .enable_time = enable_time
257
+ self .next_line = True
257
258
258
259
self .translate_eol = {
259
260
"CRLF" : lambda c : c .replace (b"\n " , b"\r \n " ),
@@ -308,15 +309,14 @@ def handle_serial_input(self, data):
308
309
# this may need to be made more efficient, as it pushes out a byte
309
310
# at a time to the console
310
311
for b in data :
312
+ if self .enable_time == 'y' and self .next_line == True :
313
+ self .console .write_bytes (get_time_stamp () + ": " )
314
+ self .next_line = False
315
+ self .console .write_bytes (b )
311
316
if b == b'\n ' : # end of line
312
- self ._read_line += '\n '
313
- if self .enable_time == 'y' :
314
- s_out = get_time_stamp () + ": " + self ._read_line
315
- else :
316
- s_out = self ._read_line
317
- self .console .write_bytes (s_out )
318
317
self .handle_serial_input_line (self ._read_line .strip ())
319
318
self ._read_line = b""
319
+ self .next_line = True
320
320
else :
321
321
self ._read_line += b
322
322
self .check_gdbstub_trigger (b )
You can’t perform that action at this time.
0 commit comments