add various speeds and uart format selection

This commit is contained in:
2023-09-28 17:20:12 +03:00
parent c3f6a033fb
commit 08e99e0063
7 changed files with 158 additions and 25 deletions

9
main.c
View File

@@ -61,13 +61,12 @@ int main(int argc, char **argv){
signals(0);
}
conndev.name = strdup(G->ttyname);
conndev.speed = G->speed;
conndev.port = strdup(G->port);
if(G->socket){
if(!G->port) conndev.type = DEV_UNIXSOCKET;
else{
conndev.type = DEV_NETSOCKET;
conndev.port = strdup(G->port);
}
else conndev.type = DEV_NETSOCKET;
}else{
conndev.speed = G->speed;
}
if(!opendev(&conndev, G->dumpfile)){
signals(0);