aboutsummaryrefslogtreecommitdiff
path: root/label-exp
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2019-04-12 03:00:17 +0200
committerPřemysl Janouch <p@janouch.name>2019-04-12 03:47:36 +0200
commit43b5536c4d6f90fdd0125928a0c2a44c89122c8b (patch)
treec00e0c579cf15f3b554c97d2b9324bb22adfbc6e /label-exp
parentc9e5b4d1e9affe3309fc2eae2aed73bc554117b9 (diff)
downloadsklad-43b5536c4d6f90fdd0125928a0c2a44c89122c8b.tar.gz
sklad-43b5536c4d6f90fdd0125928a0c2a44c89122c8b.tar.xz
sklad-43b5536c4d6f90fdd0125928a0c2a44c89122c8b.zip
Fix status decoding
Mainly to reflect a real-world printer.
Diffstat (limited to 'label-exp')
-rw-r--r--label-exp/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/label-exp/main.go b/label-exp/main.go
index d1c203f..1f15266 100644
--- a/label-exp/main.go
+++ b/label-exp/main.go
@@ -109,9 +109,9 @@ func printStatusInformation(d []byte) {
switch b := d[11]; b {
case 0x00:
log.Println("media: no media")
- case 0x4a:
+ case 0x4a, 0x0a: // 0x4a = J, in reality we get 0x0a as in QL-1100 docs
log.Println("media: continuous length tape")
- case 0x4b:
+ case 0x4b, 0x0b: // 0x4b = K, in reality we get 0x0b as in QL-1100 docs
log.Println("media: die-cut labels")
default:
log.Println("media:", b)
@@ -121,7 +121,7 @@ func printStatusInformation(d []byte) {
log.Println("mode:", d[15])
// Media length.
- log.Println("media width:", d[17], "mm")
+ log.Println("media length:", d[17], "mm")
// Status type.
switch b := d[18]; b {