genesys: Enable more infrared resolutions on 8600F

merge-requests/276/head
Povilas Kanapickas 2019-12-22 23:23:18 +02:00
rodzic d1a0c1589a
commit e437f17b40
2 zmienionych plików z 18 dodań i 33 usunięć

Wyświetl plik

@ -575,13 +575,9 @@ void genesys_init_usb_device_tables()
{ 1200, 600, 300 },
{ 1200, 600, 300 },
}, {
{ ScanMethod::TRANSPARENCY },
{ ScanMethod::TRANSPARENCY, ScanMethod::TRANSPARENCY_INFRARED },
{ 4800, 2400, 1200, 600, 300 },
{ 4800, 2400, 1200, 600, 300 },
}, {
{ ScanMethod::TRANSPARENCY_INFRARED },
{ 1200 },
{ 1200 },
}
};

Wyświetl plik

@ -2656,13 +2656,13 @@ void genesys_init_sensor_tables()
struct CustomSensorSettings {
ResolutionFilter resolutions;
int exposure_lperiod;
ScanMethod method;
std::vector<ScanMethod> methods;
GenesysRegisterSettingSet extra_custom_regs;
GenesysRegisterSettingSet custom_fe_regs;
};
CustomSensorSettings custom_settings[] = {
{ { 300, 600, 1200 }, 24000, ScanMethod::FLATBED, {
{ { 300, 600, 1200 }, 24000, { ScanMethod::FLATBED }, {
{ 0x0c, 0x00 },
{ 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a },
{ 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b },
@ -2677,7 +2677,8 @@ void genesys_init_sensor_tables()
},
{},
},
{ { 300, 600, 1200 }, 45000, ScanMethod::TRANSPARENCY, {
{ { 300, 600, 1200 }, 45000, { ScanMethod::TRANSPARENCY,
ScanMethod::TRANSPARENCY_INFRARED }, {
{ 0x0c, 0x00 },
{ 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a },
{ 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b },
@ -2692,7 +2693,8 @@ void genesys_init_sensor_tables()
},
{},
},
{ { 2400 }, 45000, ScanMethod::TRANSPARENCY, {
{ { 2400 }, 45000, { ScanMethod::TRANSPARENCY,
ScanMethod::TRANSPARENCY_INFRARED }, {
{ 0x0c, 0x00 },
{ 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a },
{ 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x01 }, { 0x1d, 0x75 },
@ -2707,7 +2709,8 @@ void genesys_init_sensor_tables()
},
{},
},
{ { 4800 }, 45000, ScanMethod::TRANSPARENCY, {
{ { 4800 }, 45000, { ScanMethod::TRANSPARENCY,
ScanMethod::TRANSPARENCY_INFRARED }, {
{ 0x0c, 0x00 },
{ 0x16, 0x13 }, { 0x17, 0x15 }, { 0x18, 0x10 }, { 0x19, 0x2a },
{ 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x61 }, { 0x1d, 0x75 },
@ -2723,33 +2726,19 @@ void genesys_init_sensor_tables()
{ { 0x03, 0x1f },
},
},
{ { 1200 }, 45000, ScanMethod::TRANSPARENCY_INFRARED, {
{ 0x0c, 0x00 },
{ 0x16, 0x13 }, { 0x17, 0x0a }, { 0x18, 0x10 }, { 0x19, 0x2a },
{ 0x1a, 0x30 }, { 0x1b, 0x00 }, { 0x1c, 0x00 }, { 0x1d, 0x6b },
{ 0x52, 0x0c }, { 0x53, 0x0f }, { 0x54, 0x00 }, { 0x55, 0x03 },
{ 0x56, 0x06 }, { 0x57, 0x09 }, { 0x58, 0x6b }, { 0x59, 0x00 }, { 0x5a, 0x40 },
{ 0x70, 0x00 }, { 0x71, 0x02 },
{ 0x74, 0x03 }, { 0x75, 0xf0 }, { 0x76, 0xf0 },
{ 0x77, 0x03 }, { 0x78, 0xfe }, { 0x79, 0x00 },
{ 0x7a, 0x00 }, { 0x7b, 0x92 }, { 0x7c, 0x49 },
{ 0x9e, 0x2d },
{ 0xaa, 0x00 },
},
{},
},
};
for (const CustomSensorSettings& setting : custom_settings)
{
for (const CustomSensorSettings& setting : custom_settings) {
for (auto method : setting.methods) {
sensor.resolutions = setting.resolutions;
sensor.method = setting.method;
sensor.method = method;
sensor.exposure_lperiod = setting.exposure_lperiod;
sensor.custom_regs = setting.extra_custom_regs;
sensor.custom_fe_regs = setting.custom_fe_regs;
s_sensors->push_back(sensor);
}
}
}
sensor = Genesys_Sensor();