aboutsummaryrefslogtreecommitdiffstats
path: root/spo256/getspo.c
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 17:00:53 -0600
committerWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 17:00:53 -0600
commit9ea4534803e193d02d54b24d7f879050a70e47e0 (patch)
tree1ae47c6a73fa14d3618a60fac4217997e732ed64 /spo256/getspo.c
parent0cc9b20c15460213e488bf5e70963b941482f628 (diff)
Add speak.conf and updates for setting flow control. Helpful when using different speech devices using different flow control methods.HEADmaster
Diffstat (limited to 'spo256/getspo.c')
-rw-r--r--spo256/getspo.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/spo256/getspo.c b/spo256/getspo.c
index 5ff64d7..de3eeeb 100644
--- a/spo256/getspo.c
+++ b/spo256/getspo.c
@@ -37,9 +37,22 @@ int getspo(CONFIG *cfg)
fatal(EX_UNAVAILABLE, "spo256: %s: cannot access\n", p);
stty = getstty(spo);
interactive(stty, FALSE);
- setflowctrl(stty, FC_HARD);
continue;
}
+
+ if(NULL != (p = get_config(cfg, "flowctrl")))
+ {
+ if(atol(p) == 0)
+ setflowctrl(stty, FC_NONE);
+ else if(atol(p) == 1)
+ setflowctrl(stty, FC_HARD);
+ else if(atol(p) == 2)
+ setflowctrl(stty, FC_SOFT);
+ else if(atol(p) == 3)
+ setflowctrl(stty, FC_FULL);
+ else
+ setflowctrl(stty, FC_NONE);
+ }
if(NULL != (p = get_config(cfg, "speed")))
{