From f272b8fb43ee1de541446b22ec535534165bce1a Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 21 Oct 2023 17:53:40 +0200 Subject: [PATCH] Fix printer speed setting --- cut_paper.sh | 2 +- print_image.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cut_paper.sh b/cut_paper.sh index dc7c901..97940bc 100755 --- a/cut_paper.sh +++ b/cut_paper.sh @@ -2,4 +2,4 @@ set -e dev=/dev/usb/lp0 -printf '\x1DVA\1' > $dev +printf '\x1DVA\0' > $dev diff --git a/print_image.sh b/print_image.sh index ae4bc06..5d0e09a 100755 --- a/print_image.sh +++ b/print_image.sh @@ -17,7 +17,7 @@ size_y="$(hex_size "$(echo "$data_header" | cut -d' ' -f 2)")" # Set print speed printf '\x1D(K\2\0' > $dev -printf '51' > $dev +printf '21' > $dev # Upload graphics data printf '\x1D(L' > $dev @@ -34,4 +34,5 @@ printf '\x1D(L\2\0' > $dev printf '02' > $dev # Cut paper -printf '\n\n\n\x1DVA\0' > $dev +printf '\n\n\n' > $dev +printf '\x1DVA\0' > $dev