From 49a606d5a8518c1113e98fd8df9e054af51eacdc Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 29 Oct 2022 10:53:25 -0400 Subject: [PATCH] hiti: Fix data length specified in CMD_SEPD It should be buffer_len + 8, not + 5. For some reason the P520L (and supposedly the P510L) worked just fine but apparently the P510S doesn't. Fingers crossed that this is the main problem. --- backend_hiti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend_hiti.c b/backend_hiti.c index d6097ce..96fe04a 100644 --- a/backend_hiti.c +++ b/backend_hiti.c @@ -1340,7 +1340,7 @@ static int hiti_seht2(struct hiti_ctx *ctx, uint8_t plane, struct hiti_seht2 *cmd = (struct hiti_seht2 *)cmdbuf; int ret, num = 0; - buf_len += 5; + buf_len += 8; cmd->hdr = 0xa5; cmd->len = cpu_to_be16(buf_len >> 8); @@ -1349,7 +1349,7 @@ static int hiti_seht2(struct hiti_ctx *ctx, uint8_t plane, cmd->lenb = buf_len & 0xff; cmd->plane = plane; - buf_len -= 5; + buf_len -= 8; /* Send over command */ if ((ret = send_data(ctx->conn, (uint8_t*) cmd, sizeof(*cmd)))) { @@ -2807,7 +2807,7 @@ static const char *hiti_prefixes[] = { const struct dyesub_backend hiti_backend = { .name = "HiTi Photo Printers", - .version = "0.47", + .version = "0.48", .uri_prefixes = hiti_prefixes, .cmdline_usage = hiti_cmdline, .cmdline_arg = hiti_cmdline_arg,