From 82c72fcd9915ba9bc7a419dc234973bb0d5f0b9f Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 13 Jan 2014 05:41:48 -0500 Subject: [PATCH] Add a 'C' size test print for the Canon SELPHY ES1. --- backend_common.c | 2 +- backend_kodak1400.c | 4 ++-- backend_kodak605.c | 20 ++++++++++---------- backend_kodak6800.c | 6 +++--- backend_sonyupdr150.c | 4 ++-- testjobs/canon_es1_c.raw | 3 +++ 6 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 testjobs/canon_es1_c.raw diff --git a/backend_common.c b/backend_common.c index 0179129..b2cb697 100644 --- a/backend_common.c +++ b/backend_common.c @@ -129,7 +129,7 @@ int send_data(struct libusb_device_handle *dev, uint8_t endp, int len2 = (len > 65536) ? 65536: len; int ret = libusb_bulk_transfer(dev, endp, buf, len2, - &num, 5000); + &num, 15000); if (dyesub_debug) { int i; diff --git a/backend_kodak1400.c b/backend_kodak1400.c index 5ccb151..31ee9c7 100644 --- a/backend_kodak1400.c +++ b/backend_kodak1400.c @@ -4,9 +4,9 @@ * (c) 2013 Solomon Peachy * * The latest version of this program can be found at: - * + * * http://git.shaftnet.org/cgit/selphy_print.git - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) diff --git a/backend_kodak605.c b/backend_kodak605.c index a0766de..dead906 100644 --- a/backend_kodak605.c +++ b/backend_kodak605.c @@ -4,9 +4,9 @@ * (c) 2013 Solomon Peachy * * The latest version of this program can be found at: - * + * * http://git.shaftnet.org/cgit/selphy_print.git - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) @@ -48,7 +48,7 @@ struct kodak605_hdr { uint8_t unk2; /* always 00 */ uint16_t columns; /* BE always 0x0734 */ uint16_t rows; /* BE */ - uint8_t media; /* 0x03 for 6x8, 0x01 for 6x4 */ + uint8_t media; /* 0x03 for 6x8, 0x01 for 6x4 */ uint8_t laminate; /* 0x02 to laminate, 0x01 for not */ uint8_t unk3; /* 0x00, 0x01 [may be print mode] */ } __attribute__((packed)); @@ -88,7 +88,7 @@ static void *kodak605_init(void) return ctx; } -static void kodak605_attach(void *vctx, struct libusb_device_handle *dev, +static void kodak605_attach(void *vctx, struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, uint8_t jobid) { struct kodak605_ctx *ctx = vctx; @@ -147,7 +147,7 @@ static int kodak605_read_parse(void *vctx, int data_fd) { do { ret = read(data_fd, ptr, remain); if (ret < 0) { - ERROR("Read failed (%d/%d/%d)\n", + ERROR("Read failed (%d/%d/%d)\n", ret, remain, ctx->datalen); perror("ERROR: Read failed"); return ret; @@ -207,7 +207,7 @@ skip_query: rdbuf, READBACK_LEN, &num); if (ret < 0) return ret; - + if (num < 10) { ERROR("Short read! (%d/%d)\n", num, 10); return 4; @@ -226,7 +226,7 @@ skip_query: } last_state = state; - fflush(stderr); + fflush(stderr); pending = 0; @@ -273,7 +273,7 @@ skip_query: break; } INFO("Sending image data\n"); - if ((ret = send_data(ctx->dev, ctx->endp_down, + if ((ret = send_data(ctx->dev, ctx->endp_down, ctx->databuf, ctx->datalen))) return ret; @@ -446,7 +446,7 @@ static int kodak605_set_tonecurve(struct kodak605_ctx *ctx, char *fname) /* Send the data over! */ ret = send_data(dev, endp_up, (uint8_t*)data, sizeof(data)); - + /* We're done */ free(data); return ret; @@ -509,7 +509,7 @@ struct dyesub_backend kodak605_backend = { 00 Always 0x00 WW WW Number of columns, little endian. (Fixed at 1844) HH HH Number of rows, little endian. (1240 or 2434) - DD 0x01 (4x6) 0x03 (8x6) + DD 0x01 (4x6) 0x03 (8x6) LL Laminate, 0x01 (off) or 0x02 (on) 00 diff --git a/backend_kodak6800.c b/backend_kodak6800.c index f641f82..19a9dbc 100644 --- a/backend_kodak6800.c +++ b/backend_kodak6800.c @@ -4,9 +4,9 @@ * (c) 2013 Solomon Peachy * * The latest version of this program can be found at: - * + * * http://git.shaftnet.org/cgit/selphy_print.git - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) @@ -47,7 +47,7 @@ struct kodak6800_hdr { uint8_t copies; uint16_t columns; /* BE */ uint16_t rows; /* BE */ - uint8_t media; /* 0x06 for 6x8, 0x00 for 6x4, 0x07 for 5x7 */ + uint8_t media; /* 0x06 for 6x8, 0x00 for 6x4, 0x07 for 5x7 */ uint8_t laminate; /* 0x01 to laminate, 0x00 for not */ uint8_t unk1; /* 0x00, 0x01 [may be print mode] */ } __attribute__((packed)); diff --git a/backend_sonyupdr150.c b/backend_sonyupdr150.c index 06e9640..ddae923 100644 --- a/backend_sonyupdr150.c +++ b/backend_sonyupdr150.c @@ -4,9 +4,9 @@ * (c) 2013 Solomon Peachy * * The latest version of this program can be found at: - * + * * http://git.shaftnet.org/cgit/selphy_print.git - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) diff --git a/testjobs/canon_es1_c.raw b/testjobs/canon_es1_c.raw new file mode 100644 index 0000000..b51da3c --- /dev/null +++ b/testjobs/canon_es1_c.raw @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89d4a35569156785a5e405b46459201a45177cf4888ceea5d5d0eef3c1f83b76 +size 2096688