mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Remove options --response-wait, --response-timeout
Remove options and rework input handling so it is possible to do the
same thing but via script which is much more flexible.
These options were always a bit of a hardcoded solution. With the new
script expect feature we can wait for any type of response.
For example, pipe command to serial device and wait for line response within 1 second:
$ echo "*IDN?" | tio /dev/ttyACM0 --script "expect('\r\n', 1000)" --mute
This commit is contained in:
parent
e1e3e298bf
commit
97537853a8
9 changed files with 46 additions and 116 deletions
|
|
@ -276,14 +276,6 @@ static int data_handler(void *user, const char *section, const char *name,
|
|||
option.prefix_key = value[0];
|
||||
}
|
||||
}
|
||||
else if (!strcmp(name, "response-wait"))
|
||||
{
|
||||
option.response_wait = read_boolean(value, name);
|
||||
}
|
||||
else if (!strcmp(name, "response-timeout"))
|
||||
{
|
||||
option.response_timeout = read_integer(value, name, 0, LONG_MAX);
|
||||
}
|
||||
else if (!strcmp(name, "rs-485"))
|
||||
{
|
||||
option.rs485 = read_boolean(value, name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue