summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-01-02 20:39:16 -0500
committerSolomon Peachy <pizza@shaftnet.org>2018-01-02 20:39:16 -0500
commitf7da653d715263277e22c2bbc2e895818c9fce95 (patch)
treec6c56d25e866026662cf64cda10234464c2bdf6c
parent39aa704f6490dc34cb64f3e0c33a4712a5b1b8bc (diff)
downloadselphy_print-f7da653d715263277e22c2bbc2e895818c9fce95.tar.gz
selphy_print-f7da653d715263277e22c2bbc2e895818c9fce95.tar.bz2
selphy_print-f7da653d715263277e22c2bbc2e895818c9fce95.zip
mitsu70x: Fix 4x6*2 multicut on 6x8" media with D70x and ASK300.
**note: It is unclear if this workaround is necessary if using 6x9" media!
-rw-r--r--backend_mitsu70x.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/backend_mitsu70x.c b/backend_mitsu70x.c
index d529abc..1ea6c49 100644
--- a/backend_mitsu70x.c
+++ b/backend_mitsu70x.c
@@ -1220,7 +1220,7 @@ static int mitsu70x_get_jobs(struct mitsu70x_ctx *ctx, struct mitsu70x_jobs *res
}
#endif
-static int mitsu70x_get_memorystatus(struct mitsu70x_ctx *ctx, struct mitsu70x_memorystatus_resp *resp)
+static int mitsu70x_get_memorystatus(struct mitsu70x_ctx *ctx, uint8_t mcut, struct mitsu70x_memorystatus_resp *resp)
{
uint8_t cmdbuf[CMDBUF_LEN];
@@ -1236,7 +1236,17 @@ static int mitsu70x_get_memorystatus(struct mitsu70x_ctx *ctx, struct mitsu70x_m
cmdbuf[3] = 0x00;
tmp = cpu_to_be16(ctx->cols);
memcpy(cmdbuf + 4, &tmp, 2);
- tmp = cpu_to_be16(ctx->rows);
+
+ /* We have to lie about print sizes in 4x6*2 multicut modes */
+ tmp = ctx->rows;
+ if (tmp == 2730 && mcut == 1) {
+ if (ctx->type == P_MITSU_D70X ||
+ ctx->type == P_FUJI_ASK300) {
+ tmp = 2422;
+ }
+ }
+
+ tmp = cpu_to_be16(tmp);
memcpy(cmdbuf + 6, &tmp, 2);
cmdbuf[8] = ctx->matte ? 0x80 : 0x00;
cmdbuf[9] = 0x00;
@@ -1562,7 +1572,7 @@ skip_status:
struct mitsu70x_memorystatus_resp memory;
INFO("Checking Memory availability\n");
- ret = mitsu70x_get_memorystatus(ctx, &memory);
+ ret = mitsu70x_get_memorystatus(ctx, hdr->multicut, &memory);
if (ret)
return CUPS_BACKEND_FAILED;
@@ -1621,7 +1631,7 @@ skip_status:
DEBUG("Rewind Inhibit? %02x %02x\n", hdr->rewind[0], hdr->rewind[1]);
}
- /* Any other fixups? */
+ /* K60 and EK305 need the mcut type 1 specified for 4x6 prints! */
if ((ctx->type == P_MITSU_K60 || ctx->type == P_KODAK_305) &&
ctx->cols == 0x0748 &&
ctx->rows == 0x04c2 && !hdr->multicut) {
@@ -1981,7 +1991,7 @@ static int mitsu70x_cmdline_arg(void *vctx, int argc, char **argv)
/* Exported */
struct dyesub_backend mitsu70x_backend = {
.name = "Mitsubishi CP-D70/D707/K60/D80",
- .version = "0.73",
+ .version = "0.74",
.uri_prefix = "mitsu70x",
.cmdline_usage = mitsu70x_cmdline,
.cmdline_arg = mitsu70x_cmdline_arg,