pixma: for Canon LiDE300 and LiDE400 map target 06 to cancel/end button

see issue sane-project/backends#259
pixma-axis-driver
Rolf Bensch 2020-03-19 16:09:38 +01:00
rodzic 120d8c0bd3
commit b113ef1285
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -919,11 +919,13 @@ handle_interrupt (pixma_t * s, int timeout)
else if (s->cfg->pid == LIDE300_PID else if (s->cfg->pid == LIDE300_PID
|| s->cfg->pid == LIDE400_PID) || s->cfg->pid == LIDE400_PID)
/* unknown value in buf[4] /* unknown value in buf[4]
* target in buf[0x13] * target in buf[0x13] 01=copy; 02=auto; 03=send; 05=start PDF; 06=finish PDF
* always set button-1 */ * "Finish PDF" is Button-2, all others are Button-1 */
{ {
if (buf[0x13]) if (buf[0x13] == 0x06)
s->events = PIXMA_EV_BUTTON1 | buf[0x13]; s->events = PIXMA_EV_BUTTON2 | buf[0x13]; /* button 2 = cancel / end scan */
else if (buf[0x13])
s->events = PIXMA_EV_BUTTON1 | buf[0x13]; /* button 1 = start scan */
} }
else else
/* button no. in buf[0] /* button no. in buf[0]