From ed2e8e8081b2b7d2e2c402e58e7755b5e4d3aff5 Mon Sep 17 00:00:00 2001 From: Foad Sojoodi Farimani Date: Sun, 3 Mar 2019 11:35:34 +0100 Subject: [PATCH] why binary scan? I'm not sure why you have used the binary scan? --- macros/readserial.sci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/readserial.sci b/macros/readserial.sci index 67470dd..634a808 100644 --- a/macros/readserial.sci +++ b/macros/readserial.sci @@ -3,7 +3,7 @@ function buf=readserial(h,n) if ~exists("n","local") then N=serialstatus(h); n=N(1) end - TCL_EvalStr("binary scan [read "+h+" "+string(n)+"] cu* ttybuf") - buf=ascii(evstr(TCL_GetVar("ttybuf"))); + TCL_EvalStr("set ttybuf [read " + h + " " + string(n) + "]") + buf = TCL_GetVar("ttybuf"); endfunction