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.
master
Solomon Peachy 1 month ago
parent f753005e7e
commit 49a606d5a8
  1. 6
      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,

Loading…
Cancel
Save