mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2024-10-18 01:00:36 -04:00
Add utility examples
This commit is contained in:
parent
da3d4cc8d7
commit
42c5717ef3
1 changed files with 7 additions and 0 deletions
|
@ -128,6 +128,13 @@ printer = epson_print_conf.EpsonPrinter()
|
|||
|
||||
# Decode write_key:
|
||||
printer.reverse_caesar(bytes.fromhex("48 62 7B 62 6F 6A 62 2B")) # last 8 bytes
|
||||
'Gazania*'
|
||||
|
||||
printer.reverse_caesar(b'Hpttzqjv')
|
||||
'Gossypiu'
|
||||
|
||||
"".join(chr(b + 1) for b in b'Gossypiu')
|
||||
'Hpttzqjv'
|
||||
|
||||
# Decode status:
|
||||
pprint.pprint(printer.status_parser(bytes.fromhex("40 42 44 43 20 53 54 32 0D 0A ....")))
|
||||
|
|
Loading…
Reference in a new issue