kodak70xx: >4x6 pruints need 2 banks.
This commit is contained in:
parent
361c19579b
commit
f41852da72
|
@ -95,7 +95,7 @@ struct kodak605_status {
|
|||
uint16_t b4_complete;
|
||||
uint16_t b4_total;
|
||||
uint8_t b4_sts; /* see BANK_STATUS_* */
|
||||
/*@70*/ uint8_t banks[4]; /* ?? EK605 has 01/00/00/00, EK7000 has 01/01/01/01 */
|
||||
/*@70*/ uint8_t unk[4]; /* XXX EK605 has 01/00/00/00, EK7000 has 01/01/01/01 */
|
||||
/*@74*/ uint8_t null_2[2]; /* 00 00 */
|
||||
/*@76*/ uint8_t null_3[1]; /* EK7000 only */
|
||||
} __attribute__((packed));
|
||||
|
@ -440,7 +440,14 @@ static int kodak605_main_loop(void *vctx, const void *vjob) {
|
|||
return CUPS_BACKEND_HOLD;
|
||||
}
|
||||
|
||||
INFO("Waiting for printer idle\n");
|
||||
/* > 4x6 jobs need two banks */
|
||||
int banks_needed;
|
||||
if (job->jp.rows > 1240)
|
||||
banks_needed = 2;
|
||||
else
|
||||
banks_needed = 1;
|
||||
|
||||
INFO("Waiting for printer idle (%d banks needed)\n", banks_needed);
|
||||
|
||||
while(1) {
|
||||
if ((ret = kodak605_get_status(ctx, &sts)))
|
||||
|
@ -474,11 +481,18 @@ static int kodak605_main_loop(void *vctx, const void *vjob) {
|
|||
ctx->jobid++;
|
||||
}
|
||||
|
||||
/* Wait for a free buffer */
|
||||
if (sts.b1_sts == BANK_STATUS_FREE ||
|
||||
sts.b2_sts == BANK_STATUS_FREE ||
|
||||
sts.b3_sts == BANK_STATUS_FREE ||
|
||||
sts.b4_sts == BANK_STATUS_FREE) {
|
||||
int banks_free = 0;
|
||||
if (sts.b1_sts == BANK_STATUS_FREE)
|
||||
banks_free++;
|
||||
if (sts.b2_sts == BANK_STATUS_FREE)
|
||||
banks_free++;
|
||||
if (sts.b3_sts == BANK_STATUS_FREE)
|
||||
banks_free++;
|
||||
if (sts.b4_sts == BANK_STATUS_FREE)
|
||||
banks_free++;
|
||||
|
||||
/* Do we have enough free buffers? */
|
||||
if (banks_free < banks_needed) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -590,22 +604,18 @@ static void kodak605_dump_status(struct kodak605_ctx *ctx, struct kodak605_statu
|
|||
sts->hdr.printer_major, sts->hdr.printer_minor,
|
||||
error_codes(sts->hdr.printer_major, sts->hdr.printer_minor));
|
||||
|
||||
if (sts->banks[0])
|
||||
INFO("Bank 1: %s Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b1_sts), sts->b1_id,
|
||||
le16_to_cpu(sts->b1_complete), le16_to_cpu(sts->b1_total));
|
||||
if (sts->banks[1])
|
||||
INFO("Bank 2: %s Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b2_sts), sts->b2_id,
|
||||
le16_to_cpu(sts->b2_complete), le16_to_cpu(sts->b2_total));
|
||||
if (sts->banks[2])
|
||||
INFO("Bank 3: %s Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b3_sts), sts->b3_id,
|
||||
le16_to_cpu(sts->b3_complete), le16_to_cpu(sts->b3_total));
|
||||
if (sts->banks[3])
|
||||
INFO("Bank 4: %s Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b4_sts), sts->b4_id,
|
||||
le16_to_cpu(sts->b4_complete), le16_to_cpu(sts->b4_total));
|
||||
INFO("Bank 1: %s - Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b1_sts), sts->b1_id,
|
||||
le16_to_cpu(sts->b1_complete), le16_to_cpu(sts->b1_total));
|
||||
INFO("Bank 2: %s - Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b2_sts), sts->b2_id,
|
||||
le16_to_cpu(sts->b2_complete), le16_to_cpu(sts->b2_total));
|
||||
INFO("Bank 3: %s - Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b3_sts), sts->b3_id,
|
||||
le16_to_cpu(sts->b3_complete), le16_to_cpu(sts->b3_total));
|
||||
INFO("Bank 4: %s - Job %03u @ %03u/%03u\n",
|
||||
sinfonia_bank_statuses(sts->b4_sts), sts->b4_id,
|
||||
le16_to_cpu(sts->b4_complete), le16_to_cpu(sts->b4_total));
|
||||
|
||||
INFO("Lifetime prints : %u\n", le32_to_cpu(sts->ctr_life));
|
||||
INFO("Cutter actuations : %u\n", le32_to_cpu(sts->ctr_cut));
|
||||
|
|
Loading…
Reference in New Issue