genesys: Prefer not to use ccd_size_divisor on gl841

merge-requests/401/head
Povilas Kanapickas 2020-04-13 07:19:49 +03:00
rodzic 48c377b5f0
commit 12269c5ad4
1 zmienionych plików z 7 dodań i 8 usunięć

Wyświetl plik

@ -1055,22 +1055,21 @@ static void gl841_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* gpio part.*/
if (dev->model->gpio_id == GpioId::CANON_LIDE_35) {
if (session.ccd_size_divisor > 1) {
if (session.params.xres <= 600) {
reg->find_reg(REG_0x6C).value &= ~0x80;
} else {
reg->find_reg(REG_0x6C).value |= 0x80;
}
}
if (dev->model->gpio_id == GpioId::CANON_LIDE_80) {
if (session.ccd_size_divisor > 1) {
reg->find_reg(REG_0x6C).value &= ~0x40;
reg->find_reg(REG_0x6C).value |= 0x20;
if (session.params.xres <= 600) {
reg->find_reg(REG_0x6C).value &= ~0x40;
reg->find_reg(REG_0x6C).value |= 0x20;
} else {
reg->find_reg(REG_0x6C).value &= ~0x20;
reg->find_reg(REG_0x6C).value |= 0x40;
reg->find_reg(REG_0x6C).value &= ~0x20;
reg->find_reg(REG_0x6C).value |= 0x40;
}
}
}
/* enable shading */
reg->find_reg(0x01).value |= REG_0x01_SCAN;