fix button support for Canon CS8800F

merge-requests/1/head
Rolf Bensch 2013-09-30 16:22:12 +02:00
rodzic a178841287
commit e95e888c3b
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -1,3 +1,6 @@
2013-09-30 Rolf Bensch <rolf at bensch hyphen online dot de>
* backend/pixma_mp810.c: fix button support for Canon CS8800F.
2013-09-24 Rolf Bensch <rolf at bensch hyphen online dot de>
* backend/pixma_imageclass.c, doc/descriptions/pixma.desc,
doc/sane-pixma.man: New scanner Canon imageCLASS MF4770n

Wyświetl plik

@ -1120,11 +1120,15 @@ static int handle_interrupt (pixma_t * s, int timeout)
if (buf[7] & 2)
s->events = PIXMA_EV_BUTTON2 | buf[11] | buf[10]<<8 | buf[12]<<16; /* b/w scan */
}
else if (s->cfg->pid == CS9000F_PID || s->cfg->pid == CS9000F_MII_PID)
else if (s->cfg->pid == CS8800F_PID
|| s->cfg->pid == CS9000F_PID
|| s->cfg->pid == CS9000F_MII_PID)
/* button no. in buf[1]
* target = button no. */
* target = button no.
* "Finish PDF" is Button-2, all others are Button-1 */
{
if (buf[1] == 0x50)
if ((s->cfg->pid == CS8800F_PID && buf[1] == 0x70)
|| (s->cfg->pid != CS8800F_PID && buf[1] == 0x50))
s->events = PIXMA_EV_BUTTON2 | buf[1] >> 4; /* button 2 = cancel / end scan */
else
s->events = PIXMA_EV_BUTTON1 | buf[1] >> 4; /* button 1 = start scan */