From 5f365632c0822882ff7bb99fa25aff6df52b20ef Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 21 Oct 2023 18:01:46 +0200 Subject: [PATCH] Reinitialize printer --- print_image.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/print_image.sh b/print_image.sh index 5d0e09a..c58c337 100755 --- a/print_image.sh +++ b/print_image.sh @@ -15,9 +15,12 @@ size="$(hex_size "$(("$size" + 10))")" size_x="$(hex_size "$(echo "$data_header" | cut -d' ' -f 1)")" size_y="$(hex_size "$(echo "$data_header" | cut -d' ' -f 2)")" +# Initialize printer +printf '\x1B@' > $dev + # Set print speed printf '\x1D(K\2\0' > $dev -printf '21' > $dev +printf '22' > $dev # Upload graphics data printf '\x1D(L' > $dev