From 375aed9243c21b34b420c84e40878fa30b5d6b6d Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 28 Jan 2014 21:23:24 -0500 Subject: [PATCH] canonselphy: Theoretically add support for the CP790 --- backend_canonselphy.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend_canonselphy.c b/backend_canonselphy.c index 666429f..6aeedbe 100644 --- a/backend_canonselphy.c +++ b/backend_canonselphy.c @@ -106,11 +106,11 @@ static struct printer_data selphy_printers[] = { .model = "SELPHY ES40/CP790", .init_length = 16, .foot_length = 12, - .init_readback = { 0x00, 0x00, -1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, - .ready_y_readback = { 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, - .ready_m_readback = { 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, - .ready_c_readback = { 0x00, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, - .done_c_readback = { 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, + .init_readback = { 0x00, 0x00, -1, 0x00, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00, -1 }, + .ready_y_readback = { 0x00, 0x01, 0x01, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, + .ready_m_readback = { 0x00, 0x03, 0x02, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, + .ready_c_readback = { 0x00, 0x05, 0x03, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, + .done_c_readback = { 0x00, 0x00, 0x10, 0x00, -1, -1, 0x00, 0x00, 0x00, 0x00, 0x00, -1 }, // .clear_error // .paper_codes .pgcode_offset = 2, @@ -223,7 +223,7 @@ static int fancy_memcmp(const uint8_t *buf_a, const int16_t *buf_b, uint len, in if (papercode_offset != -1 && i == (uint) papercode_offset) { if (papercode_val == -1) continue; - else if (buf_a[i] != papercode_val) + else if ((buf_a[i] & 0xf) != (papercode_val & 0xf)) return INCORRECT_PAPER; } else if (buf_b[i] == -1) continue; @@ -666,7 +666,7 @@ top: struct dyesub_backend canonselphy_backend = { .name = "Canon SELPHY CP/ES", - .version = "0.67", + .version = "0.68", .multipage_capable = 1, .uri_prefix = "canonselphy", .init = canonselphy_init,