From 48ce1ba15723ddb3807ee681729d330d3972a155 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 7 Jul 2023 23:12:47 -0700 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98--reset=E2=80=99=20command-line?= =?UTF-8?q?=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Passing this option will cause a full update command to be sent to the Inkplate instead of a partial update command. A full update cleans up any residual display from previous partial updates, but causes more wear on the eink display. It causes a big flash of all black to happen before sending the updated display. I shouldn't be used all the time. --- README.org | 4 ++++ inkplate-display | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 99842e5..1a29b8d 100644 --- a/README.org +++ b/README.org @@ -14,3 +14,7 @@ Put the =inkplate-display= script anywhere in your =$PATH=. * Usage Run the =inkplate-display= script without any arguments. This script assumes that your Inkplate is connected, running in peripheral mode, and that the file descriptor is located at =/dev/ttyUSB0=. + +The following command-line arguments are available: + +- =--reset= :: Causes a full screen update to be sent to the Inkplate instead of a partial one. Clears any artifacts from previous partial updates, but is harder on the display so shouldn't be used all the time. diff --git a/inkplate-display b/inkplate-display index 0186198..2c7b3ab 100755 --- a/inkplate-display +++ b/inkplate-display @@ -110,7 +110,9 @@ (inkplate:print my-dev (inkplate:convert-string-to-hex "email conversation")) - (inkplate:partial-update my-dev 15 800 600) + (if (member "--reset" (command-line)) + (inkplate:update my-dev) + (inkplate:partial-update my-dev 15 800 600)) (inkplate:send my-dev) (inkplate:close my-dev))