mirror of
https://github.com/eddyem/tsys01.git
synced 2026-03-20 16:50:57 +03:00
save under kicad 8, add little changes to sources
This commit is contained in:
@@ -67,7 +67,10 @@ static int formfile(char *fname, double data[2][NCHANNEL_MAX+1][NCTRLR_MAX+1], i
|
||||
}
|
||||
}
|
||||
fclose(F);
|
||||
if(!nonzero_values) return 0;
|
||||
if(!nonzero_values){
|
||||
LOGERR("Can't form file: no non-zero T values");
|
||||
return 0;
|
||||
}
|
||||
DBG("File %s ready", fname);
|
||||
return 1;
|
||||
}
|
||||
@@ -97,6 +100,7 @@ static void gnuplot(char *path, char *fname){
|
||||
DBG("Run %s", buf);
|
||||
if(system(buf)){
|
||||
WARNX(_("Can't run `%s`"), buf);
|
||||
LOGERR("Can't run %s", buf);
|
||||
}else LOGMSG("created chart %s", fname);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ static char *read_string(){
|
||||
}
|
||||
buf[n] = 0;
|
||||
if(buf[n-1] == '\n') buf[n-1] = 0;
|
||||
LOGDBG("SERIAL: %s", buf);
|
||||
DBG("SERIAL: %s", buf);
|
||||
LOGDBG("GOT : %s", buf);
|
||||
DBG("receive %s", buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -194,8 +194,9 @@ static int send_cmd(int N, char cmd){
|
||||
}
|
||||
// clear all incomint data
|
||||
while(read_string());
|
||||
LOGDBG("SEND: %s", buf);
|
||||
DBG("send cmd %s", buf);
|
||||
if(n != send(sock, buf, n, 0)) return 1;
|
||||
if(n != send(sock, buf, n, MSG_NOSIGNAL)) return 1;
|
||||
if(N == 0) return 0;
|
||||
double t0 = dtime();
|
||||
while(dtime() - t0 < T_POLLING_TMOUT){
|
||||
|
||||
Reference in New Issue
Block a user