Skip to content

Commit

Permalink
Clarify help output a little.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeller committed Jun 24, 2024
1 parent 11ea0d9 commit 361253c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,21 @@ Options:
<connection-string> is either a path to a tty device, a host:port or '-'
* Serial connection
A path to the device name with an optional bit-rate
separated with a comma.
A path to the device name with an optional bit-rate and flow
control settings separated by comma.
If no device parameters given, default is 'b115200,+crtscts'
Examples of valid connection strings:
/dev/ttyACM0
/dev/ttyACM0,b115200
notice the 'b' prefix for the bit-rate. (any value allowed supported by system)
notice the 'b' prefix for the bit-rate (any value allowed supported by system).
Serial Flow Control
A +crtscts enables hardware flow control RTS/CTS handshaking:
/dev/ttyACM0,b115200,+crtscts
Enable hardware flow control RTS/CTS handshaking.
With a minus prefix, disable hardware flow control:
/dev/ttyACM0,b115200,-crtscts
With a minus prefix, disable hardware flow control.
* TCP connection
For devices that receive gcode via tcp (e.g. http://beagleg.org/)
Expand Down
19 changes: 11 additions & 8 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,25 @@ static int usage(const char *progname, const char *message) {
"\n<connection-string> is either a path to a tty device, a "
"host:port or '-'\n"
" * Serial connection\n"
" A path to the device name with an optional bit-rate\n"
" separated with a comma (otherwise default speed is 115200).\n"
" Examples of valid connection strings:\n"
" A path to the device name with an optional bit-rate and flow\n"
" control settings separated by comma.\n\n"
" If no device parameters given, default is 'b115200,+crtscts'\n"
"\n Examples of valid connection strings:\n"
" \t/dev/ttyACM0\n"
" \t/dev/ttyACM0,b115200\n"
" notice the 'b' prefix for the bit-rate."
" notice the 'b' prefix for the bit-rate"
#ifdef USE_TERMIOS
"\n Common bit-rates are one of [b9600, b19200, b38400, "
".\n Common bit-rates are one of [b9600, b19200, b38400, "
"b57600, b115200, b230400, b460800]\n"
#else
" (any value allowed supported by system)\n"
" (any value allowed supported by system).\n"
#endif
"\n Serial Flow Control\n"
" A +crtscts enables hardware flow control RTS/CTS handshaking:\n"
" \t/dev/ttyACM0,b115200,+crtscts\n"
" Enable hardware flow control RTS/CTS handshaking.\n"
" With a minus prefix, disable hardware flow control:\n"
" \t/dev/ttyACM0,b115200,-crtscts\n"
" With a minus prefix, disable hardware flow control.\n"

"\n"
" * TCP connection\n"
" For devices that receive gcode via tcp "
Expand Down

0 comments on commit 361253c

Please sign in to comment.