Pārlūkot izejas kodu

Readme to markdown

Francois PONSARD 2 gadi atpakaļ
vecāks
revīzija
7d6edd508f
1 mainītis faili ar 32 papildinājumiem un 40 dzēšanām
  1. 32 40
      README

+ 32 - 40
README

@@ -1,6 +1,7 @@
-pertd2 - A daemon that displays information on the Pertelian USB LCD display
+# pertd2 - A daemon that displays information on the Pertelian USB LCD display
+
+## Overview
 
-Overview:
 This program creates a fifo and listens to it for commands.  The commands
 can be used to turn the backlight on/off, set the data of each line to
 display, stop the program, etc.
@@ -27,37 +28,18 @@ of /dev/ttyUSB0 goes back to root.  So it's probably a good idea to run
 this daemon as root.  See the service directory for turning pertd2 into
 a service that runs when the system boots.
 
-Configuration:
-delay_time -
-   The interval between screen refreshes in ms.  (1000000ms = 1 second)
-   This will basically control how fast the Pertelian scrolls the data
-   across the screen.
-   Default: 500000 (1/2 second)
-
-char_delay -
-   The delay between each character sent to the Pertelian.  This delay prevents
-   the program from sending data too fast and causing garbled output on the
-   display.  Newer systems may not need any delay, so I made this configurable.
-   The delay is in ms.  1 ms is usually needed for old systems.  If your
-   display is very slow, reduce this to 0.  If the output is garbled, put it
-   to 1.
-   Default: 1
-
-device - 
-   The device the Pertelian is on.
-   Default: /dev/ttyUSB0
-
-fifo_name -
-   The name of the fifo that pertd2 creates.
-
-backlight_mgt -
-   Backlight management.  This indicates whether you want pertd2 to
-   manage the backlight or not.  Basically it manages it by turning the
-   backlight on when there is data to display and off when there is no data.
-   1 = pertd2 manages the backlight.  0 = it doesn't.
-   Default: 0
-
-Commands:
+## Configuration
+
+* `delay_time` :  The interval between screen refreshes in ms.  (1000000ms = 1 second) This will basically control how fast the Pertelian scrolls the data across the screen.  Default: 500000 (1/2 second)
+* `char_delay` : The delay between each character sent to the Pertelian.  This delay prevents the program from sending data too fast and causing garbled output on the display.  Newer systems may not need any delay, so I made this configurable.  The delay is in ms.  1 ms is usually needed for old systems.  If your display is very slow, reduce this to 0.  If the output is garbled, put it to 1.  Default: 1
+* `device` : The device the Pertelian is on.  Default: /dev/ttyUSB0
+* `fifo_name` : The name of the fifo that pertd2 creates.
+* `backlight_mgt` : Backlight management.  This indicates whether you want pertd2 to manage the backlight or not.  Basically it manages it by turning the backlight on when there is data to display and off when there is no data.  1 = pertd2 manages the backlight.  0 = it doesn't.  Default: 0
+
+
+### Commands
+
+```
 backlight on
 backlight off
 stop
@@ -69,34 +51,43 @@ delay time
 char delay
 backlight mgt on
 backlight mgt off
+```
 
-You communicate by sending the command to the fifo.  ex:
-echo "backlight on" > /tmp/pertd2.fifo
+You communicate by sending the command to the fifo.  ex: `echo "backlight on" > /tmp/pertd2.fifo`
 
 Most of the commands should be self-explanatory.
 
-The commands:
+#### Single line commands:
 
+```
 backlight on
 backlight off
 stop
 backlight mgt on
 backlight mgt off
+```
 
-are all single line commands.
+
+#### Multiline commands 
 
 The "delay time" and "char delay" commands take a second line that specified
 the value.  ex:
 
+```
 delay time
 500000
+```
+
 
 The "line?" commands are a little more complex. ex:
+
+```
 line1
 600
 ==EOD==
 The quick brown fox jumped over the lazy dog.
 ==EOD==
+```
 
 The first line (line1) is the command, also telling pertd2 which line
 you want this data to go in.
@@ -109,6 +100,8 @@ sees another line with the EOD marker, or until it his end of file (i.e.
 the fifo is empty).
 
 So, you can put these lines into a file:
+
+```
 line1
 12
 ==EOD==
@@ -119,10 +112,9 @@ line2
 ==EOD==
 Testing
 ==EOD==
+``` 
 
-then you can
-cat file > /tmp/pertd2.fifo
-to send the commands.
+then you can `cat file > /tmp/pertd2.fifo` to send the commands.
 
 The "sendcommands" directory contains examples of programs that send commands
 to the fifo.