Now I realize fully that this is hacky as hell, but it does result in the (painfully slow) printing of full 160x144 images

This commit is contained in:
XANTRONIX 2016-06-05 17:24:25 -05:00
parent 0a92613528
commit 663b11e37d

View file

@ -230,12 +230,27 @@ int tabby_printer_send_sheet(int fd, void *data,
goto error_packet_send;
}
offset += TABBY_PRINTER_BAND_SIZE;
}
init_header(&header, TABBY_PRINTER_PACKET_DATA, 0);
return tabby_printer_packet_send(fd, &header, NULL, response);
tabby_printer_packet_send(fd, &header, NULL, response);
if (i == 0) {
tabby_printer_job_start(fd, 1, 0x10, 0x00, 0x40, &current);
} else if (i < TABBY_PRINTER_SHEET_BANDS - 1) {
tabby_printer_job_start(fd, 1, 0x00, 0x00, 0x40, &current);
} else if (i == TABBY_PRINTER_SHEET_BANDS - 1) {
tabby_printer_job_start(fd, 1, 0x03, 0x00, 0x40, &current);
}
offset += TABBY_PRINTER_BAND_SIZE;
while (current.status) {
tabby_printer_send_inquiry(fd, &current);
usleep(1000000);
}
}
return 0;
error_packet_send:
return -1;