From 9ea4534803e193d02d54b24d7f879050a70e47e0 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 14 Jan 2025 17:00:53 -0600 Subject: Add speak.conf and updates for setting flow control. Helpful when using different speech devices using different flow control methods. --- spo256/getspo.c | 15 +++++++++++++- spo256/speak.conf | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ spo256/spo256.8 | 4 +++- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 spo256/speak.conf 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"))) { diff --git a/spo256/speak.conf b/spo256/speak.conf new file mode 100644 index 0000000..2f76c30 --- /dev/null +++ b/spo256/speak.conf @@ -0,0 +1,59 @@ +[interface] +# Serial device for card +device=/dev/ttyS1 + +# Baud rate for card +speed=9600 + +# Parity (odd, even, or none) for card +parity=none + +# Set flow control 0=NONE 1=HARD 2=SOFT 3=FULL +flowctrl=0 + +[vmon] +# Where is server running +server = localhost + +# Time of day to mute +mute = 20-6 + +# How many minutes before checking for new mail, etc. +interval = 5 + +# How many times per hour should vmon announce system status? +frequency = 1 + +# Mailbox prefix directory +maildir = /var/spool/mail + +# Mailboxes to monitor for new mail announcements +mailbox = root dragonfyr + +[down] +# How many seconds in count-down +timer = 10 + +# Program to halt +halt = /sbin/reboot + +# Where is our server? +server = localhost + +[words] +broadcast=brawdcast +online=on lyne +offline=off lyne +dragonfyr=dragonfire +tycho=tyko +nineteen=9 teen +drives=dryves +www=w w w + +[abbrev] +dr.=doctor +mr.=mister +mrs.=misses +ms.=miss + + diff --git a/spo256/spo256.8 b/spo256/spo256.8 index a0826ad..7c30f86 100644 --- a/spo256/spo256.8 +++ b/spo256/spo256.8 @@ -47,7 +47,9 @@ edited before you start \fBspo256\fP for the first time. The entry for \fIdevice\fP should be given the correct tty serial port where your SPO board is attached. The speed I choose to use is 2400bps, which is the maximum speed the board is capable of. Valid values for parity include -"odd", "even", and "none". Also verify board jumpers +"odd", "even", and "none". Flow control should be configured for the +connected serial device. Valid values for \fIflowctrl\fP include 0, 1, +2 and 3. 0=NONE 1=HARD 2=SOFT 3=FULL. Also verify board jumpers are set for the speed and data format specified in [\fIinterface\fP]. .PP .SH "CORRECTIVE SPEECH" -- cgit v1.2.3-54-g00ecf