Some documentation improvements

pull/8/head
Ben Sartori 8 months ago
parent 105e23b187
commit 83fefd2404
  1. 13
      README.md
  2. 1
      lednamebadge.py
  3. 28
      photos/bitmap_data_descr.puml

@ -66,6 +66,13 @@ To reuse the venv again at a later point:
sudo dnf install hidapi python3-hidapi python3-pillow python3-pyusb sudo dnf install hidapi python3-hidapi python3-pillow python3-pyusb
### Manual link the HID API lib for some Linuxes
For some distributions there is a discrepancy between the where pyhidapi searches for the lib and where the package
hidapi places it. A simple solution is to link the libraray to the needed place, e.g.
ln -s /usr/lib/libhidapi-hidraw.so.0 /usr/local/lib/
### Required dependencies on Mac Systems ### Required dependencies on Mac Systems
sudo easy_install pip sudo easy_install pip
@ -146,7 +153,7 @@ prints the list of builtin icon names, including :happy: :happy2: :heart: :HEART
prints some condensed help: prints some condensed help:
<pre> <pre>
usage: led-badge-11x44.py [-h] [-t TYPE] [-s SPEED] [-B BRIGHTNESS] [-m MODE] [-b BLINK] [-a ANTS] [-l] MESSAGE [MESSAGE ...] usage: led-badge-11x44.py [-h] [-t TYPE] [-H HID] [-s SPEED] [-B BRIGHTNESS] [-m MODE] [-b BLINK] [-a ANTS] [-l] MESSAGE [MESSAGE ...]
Upload messages or graphics to a 11x44 led badge via USB HID. Upload messages or graphics to a 11x44 led badge via USB HID.
Version 0.12 from https://github.com/jnweiger/led-name-badge-ls32 Version 0.12 from https://github.com/jnweiger/led-name-badge-ls32
@ -158,6 +165,7 @@ positional arguments:
options: options:
-h, --help show this help message and exit -h, --help show this help message and exit
-t TYPE, --type TYPE Type of display: supported values are 12x48 or (default) 11x44. Rename the program to led-badge-12x48, to switch the default. -t TYPE, --type TYPE Type of display: supported values are 12x48 or (default) 11x44. Rename the program to led-badge-12x48, to switch the default.
-H HID, --hid HID' Set to 1 to ensure connect via HID API, program will then not fallback to usb.core library
-s SPEED, --speed SPEED -s SPEED, --speed SPEED
Scroll speed (Range 1..8). Up to 8 comma-separated values Scroll speed (Range 1..8). Up to 8 comma-separated values
-B BRIGHTNESS, --brightness BRIGHTNESS -B BRIGHTNESS, --brightness BRIGHTNESS
@ -175,9 +183,10 @@ Example combining image and text:
There are some options defining the default type: There are some options defining the default type:
- use lednamebadge.py directly: default type is 11x44 - use lednamebadge.py directly: default type is 11x44
- rename lednamebadge.py to something with '12' and use that: default type is 12x48 - rename lednamebadge.py to something with '12' (e.g. badge12.py) and use that: default type is 12x48
- use led-badge-11x44.py: default type is 11x44 - use led-badge-11x44.py: default type is 11x44
- use led-badge-12x48.py: default type is 12x48 - use led-badge-12x48.py: default type is 12x48
For all these options you can override the default type with -t For all these options you can override the default type with -t
### Animations ### Animations

@ -551,6 +551,7 @@ or
print("No led tag with vendorID 0x0416 and productID 0x5020 found.") print("No led tag with vendorID 0x0416 and productID 0x5020 found.")
print("Connect the led tag and run this tool as root.") print("Connect the led tag and run this tool as root.")
sys.exit(1) sys.exit(1)
for i in range(int(len(buf)/64)): for i in range(int(len(buf)/64)):
# sendbuf must contain "report ID" as first byte. "0" does the job here. # sendbuf must contain "report ID" as first byte. "0" does the job here.
sendbuf=array('B',[0]) sendbuf=array('B',[0])

@ -1,9 +1,11 @@
' Using <U+002E>.. for three dots / ellipsis, els it would be a dotted line
@startuml bitmap_data_onebyte @startuml bitmap_data_onebyte
salt salt
title One byte title One byte
{# {#
{ most significant bit 7 { most significant bit 7
leftmost pixel } | bit 6 | ... | bit 1 | { least significant bit 0 leftmost pixel } | bit 6 | <U+002E>.. | bit 1 | { least significant bit 0
rightmost pixel } rightmost pixel }
} }
@enduml @enduml
@ -12,17 +14,17 @@ title One byte
salt salt
title One scene title One scene
{# {#
byte 0 == 8 pixel | byte 11 == 8 pixel | byte 22 == 8 pixel | ... byte 0 == 8 pixel | byte 11 == 8 pixel | byte 22 == 8 pixel | <U+002E>..
byte 1 ... | byte 12 ... | byte 23 ... | ... byte 1 ... | byte 12 ... | byte 23 ... | <U+002E>..
byte 2 ... | byte 13 ... | byte 24 ... | ... byte 2 ... | byte 13 ... | byte 24 ... | <U+002E>..
byte 3 ... | byte 14 ... | byte 25 ... | ... byte 3 ... | byte 14 ... | byte 25 ... | <U+002E>..
byte 4 ... | byte 15 ... | byte 26 ... | ... byte 4 ... | byte 15 ... | byte 26 ... | <U+002E>..
byte 5 ... | byte 16 ... | byte 27 ... | ... byte 5 ... | byte 16 ... | byte 27 ... | <U+002E>..
byte 6 ... | byte 17 ... | byte 28 ... | ... byte 6 ... | byte 17 ... | byte 28 ... | <U+002E>..
byte 7 ... | byte 18 ... | byte 29 ... | ... byte 7 ... | byte 18 ... | byte 29 ... | <U+002E>..
byte 8 ... | byte 19 ... | byte 30 ... | ... byte 8 ... | byte 19 ... | byte 30 ... | <U+002E>..
byte 9 ... | byte 20 ... | byte 31 ... | ... byte 9 ... | byte 20 ... | byte 31 ... | <U+002E>..
byte 10 ... | byte 21 ... | byte 32 ... | ... byte 10 ... | byte 21 ... | byte 32 ... | <U+002E>..
} }
@enduml @enduml
@ -30,6 +32,6 @@ title One scene
salt salt
title Complete bitmap data title Complete bitmap data
{# {#
scene 0 == x bytes | ... | scene n == z bytes scene 0 == x bytes | <U+002E>.. | scene n == z bytes
} }
@enduml @enduml

Loading…
Cancel
Save