summaryrefslogtreecommitdiff
path: root/backend/genesys/tables_model.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
commit7e9455b3b15671ff99ed168638c405e2acedb6df (patch)
tree444e59ece236e09dc153f665e42160aeb0208c24 /backend/genesys/tables_model.cpp
parentbc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff)
parentbce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff)
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'backend/genesys/tables_model.cpp')
-rw-r--r--backend/genesys/tables_model.cpp1391
1 files changed, 685 insertions, 706 deletions
diff --git a/backend/genesys/tables_model.cpp b/backend/genesys/tables_model.cpp
index 0b3a0af..2c5e6a3 100644
--- a/backend/genesys/tables_model.cpp
+++ b/backend/genesys/tables_model.cpp
@@ -58,10 +58,44 @@
namespace genesys {
-StaticInit<std::vector<Genesys_USB_Device_Entry>> s_usb_devices;
+StaticInit<std::vector<UsbDeviceEntry>> s_usb_devices;
void genesys_init_usb_device_tables()
{
+ /* Guidelines on calibration area sizes
+ ------------------------------------
+
+ on many scanners scanning a single line takes aroung 10ms. In order not to take excessive
+ amount of time, the sizes of the calibration area are limited as follows:
+ 2400 dpi or less: 4mm (would take ~4 seconds on 2400 dpi)
+ 4800 dpi or less: 3mm (would take ~6 seconds on 4800 dpi)
+ anything more: 2mm (would take ~7 seconds on 9600 dpi)
+
+ Optional properties
+ -------------------
+
+ All fields of the Genesys_Model class are defined even if they use default value, with
+ the following exceptions:
+
+ If the scanner does not have ScanMethod::TRANSPARENCY or ScanMethod::TRANSPARENCY_INFRARED,
+ the following properties are optional:
+
+ model.x_offset_ta = 0.0;
+ model.y_offset_ta = 0.0;
+ model.x_size_ta = 0.0;
+ model.y_size_ta = 0.0;
+
+ model.y_offset_sensor_to_ta = 0.0;
+ model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 0.0;
+
+ If the scanner does not have ModelFlag::DARK_WHITE_CALIBRATION, then the following
+ properties are optional:
+
+ model.y_offset_calib_dark_white_mm = 0.0;
+ model.y_size_calib_dark_white_mm = 0.0;
+ */
+
s_usb_devices.init();
Genesys_Model model;
@@ -87,15 +121,9 @@ void genesys_init_usb_device_tables()
model.y_size = 299.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 228.6;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -112,10 +140,8 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_UMAX;
model.gpio_id = GpioId::UMAX;
model.motor_id = MotorId::UMAX;
- model.flags = GENESYS_FLAG_UNTESTED;
+ model.flags = ModelFlag::UNTESTED;
model.buttons = GENESYS_HAS_NO_BUTTONS;
- model.shading_lines = 20;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x0638, 0x0a10, model);
@@ -144,17 +170,13 @@ void genesys_init_usb_device_tables()
model.x_size = 218.0;
model.y_size = 299.0;
- model.y_offset_calib_white = 6.0;
+ model.y_offset_calib_white = 3.0;
+ model.y_size_calib_mm = 3.0;
+ model.y_offset_calib_dark_white_mm = 1.0;
+ model.y_size_calib_dark_white_mm = 6.0;
+ model.x_size_calib_mm = 220.13334;
model.x_offset_calib_black = 0.0;
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
-
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -170,16 +192,12 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_35;
model.gpio_id = GpioId::CANON_LIDE_35;
model.motor_id = MotorId::CANON_LIDE_35;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_WHITE_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_WHITE_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_FILE_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_COPY_SW;
- model.shading_lines = 280;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x2213, model);
@@ -209,15 +227,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 9.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 0.0;
- model.y_size_ta = 0.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 227.584;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -234,12 +246,8 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::KVSS080;
model.gpio_id = GpioId::KVSS080;
model.motor_id = MotorId::KVSS080;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x04da, 0x100f, model);
@@ -269,15 +277,9 @@ void genesys_init_usb_device_tables()
model.y_size = 314.5;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 226.9067;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -294,13 +296,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::G4050;
model.gpio_id = GpioId::G4050;
model.motor_id = MotorId::G4050;
- model.flags = GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x03f0, 0x1b05, model);
@@ -329,15 +328,9 @@ void genesys_init_usb_device_tables()
model.y_size = 315.0;
model.y_offset_calib_white = 3.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 226.9067;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -353,13 +346,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::G4050;
model.gpio_id = GpioId::G4050;
model.motor_id = MotorId::G4050;
- model.flags = GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x03f0, 0x4505, model);
@@ -389,15 +379,9 @@ void genesys_init_usb_device_tables()
model.y_size = 315.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 8.0;
- model.y_offset_ta = 13.00;
- model.x_size_ta = 217.9;
- model.y_size_ta = 250.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 40.0;
+ model.x_size_calib_mm = 226.9067;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -414,13 +398,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::G4050;
model.gpio_id = GpioId::G4050;
model.motor_id = MotorId::G4050;
- model.flags = GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x03f0, 0x4605, model);
@@ -438,6 +419,10 @@ void genesys_init_usb_device_tables()
{ ScanMethod::FLATBED },
{ 1200, 600, 300 },
{ 1200, 600, 300 },
+ }, {
+ { ScanMethod::TRANSPARENCY },
+ { 4800, 2400, 1200 },
+ { 9600, 4800, 2400, 1200 },
}
};
@@ -445,20 +430,23 @@ void genesys_init_usb_device_tables()
model.bpp_color_values = { 8, 16 };
model.x_offset = 6.0;
- model.y_offset = 12.00;
+ model.y_offset = 10.00;
model.x_size = 215.9;
model.y_size = 297.0;
- model.y_offset_calib_white = 0.0;
+ model.y_offset_calib_white = 2.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
+ model.x_size_calib_mm = 241.3;
- model.x_offset_ta = 8.0;
- model.y_offset_ta = 13.00;
- model.x_size_ta = 217.9;
- model.y_size_ta = 250.0;
+ model.x_offset_ta = 115.0;
+ model.y_offset_ta = 37.0;
+ model.x_size_ta = 35.0;
+ model.y_size_ta = 230.0;
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 40.0;
+ model.y_offset_sensor_to_ta = 23.0;
+ model.y_offset_calib_white_ta = 24.0;
+ model.y_size_calib_ta_mm = 2.0;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -475,15 +463,13 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_4400F;
model.gpio_id = GpioId::CANON_4400F;
model.motor_id = MotorId::CANON_4400F;
- model.flags = GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_FULL_HWDPI_MODE |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SHADING_REPARK;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::UTA_NO_SECONDARY_MOTOR;
+
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x04a9, 0x2228, model);
@@ -515,13 +501,15 @@ void genesys_init_usb_device_tables()
model.bpp_gray_values = { 8, 16 };
model.bpp_color_values = { 8, 16 };
- model.x_offset = 3.5;
+ model.x_offset = 5.5;
model.y_offset = 17.00;
model.x_size = 219.9;
model.y_size = 300.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 10.0;
+ model.x_size_calib_mm = 225.425;
model.x_offset_ta = 75.0;
model.y_offset_ta = 45.00;
@@ -530,6 +518,7 @@ void genesys_init_usb_device_tables()
model.y_offset_sensor_to_ta = 22.0;
model.y_offset_calib_white_ta = 25.0;
+ model.y_size_calib_ta_mm = 3.0;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -546,17 +535,11 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_8400F;
model.gpio_id = GpioId::CANON_8400F;
model.motor_id = MotorId::CANON_8400F;
- model.flags = GENESYS_FLAG_HAS_UTA |
- GENESYS_FLAG_HAS_UTA_INFRARED |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_FULL_HWDPI_MODE |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SHADING_REPARK;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::SHADING_REPARK;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 100;
- model.shading_ta_lines = 50;
model.search_lines = 100;
s_usb_devices->emplace_back(0x04a9, 0x221e, model);
@@ -590,15 +573,18 @@ void genesys_init_usb_device_tables()
model.y_size = 297.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 8.0;
+ model.x_size_calib_mm = 240.70734;
- model.x_offset_ta = 85.0;
- model.y_offset_ta = 26.0;
+ model.x_offset_ta = 97.0;
+ model.y_offset_ta = 38.5;
model.x_size_ta = 70.0;
model.y_size_ta = 230.0;
- model.y_offset_sensor_to_ta = 11.5;
- model.y_offset_calib_white_ta = 14.0;
+ model.y_offset_sensor_to_ta = 23.0;
+ model.y_offset_calib_white_ta = 25.5;
+ model.y_size_calib_ta_mm = 3.0;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -615,17 +601,11 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_8600F;
model.gpio_id = GpioId::CANON_8600F;
model.motor_id = MotorId::CANON_8600F;
- model.flags = GENESYS_FLAG_HAS_UTA |
- GENESYS_FLAG_HAS_UTA_INFRARED |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_FULL_HWDPI_MODE |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SHADING_REPARK;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::SHADING_REPARK;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 50;
- model.shading_ta_lines = 50;
model.search_lines = 100;
s_usb_devices->emplace_back(0x04a9, 0x2229, model);
@@ -654,16 +634,10 @@ void genesys_init_usb_device_tables()
model.x_size = 216.07;
model.y_size = 299.0;
- model.y_offset_calib_white = 1.0;
+ model.y_offset_calib_white = 0.4233334;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 217.4241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -680,18 +654,14 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_200;
model.gpio_id = GpioId::CANON_LIDE_200;
model.motor_id = MotorId::CANON_LIDE_100;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_SIS_SENSOR |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::SIS_SENSOR |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 50;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x1904, model);
@@ -721,15 +691,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 218.7787;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -745,17 +709,13 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_110;
model.gpio_id = GpioId::CANON_LIDE_110;
model.motor_id = MotorId::CANON_LIDE_110;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 25;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x1909, model);
@@ -785,15 +745,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 1.0;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 216.0694;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -808,17 +762,13 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_120;
model.gpio_id = GpioId::CANON_LIDE_120;
model.motor_id = MotorId::CANON_LIDE_120;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 50;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x190e, model);
@@ -834,30 +784,23 @@ void genesys_init_usb_device_tables()
model.resolutions = {
{
{ ScanMethod::FLATBED },
- // BUG: 4800 resolution crashes
- { /*4800,*/ 2400, 1200, 600, /* 400,*/ 300, 150, 100, 75 },
- { /*4800,*/ 2400, 1200, 600, /* 400,*/ 300, 150, 100, 75 },
+ { 4800, 2400, 1200, 600, /* 400,*/ 300, 150, 100, 75 },
+ { 4800, 2400, 1200, 600, /* 400,*/ 300, 150, 100, 75 },
}
};
model.bpp_gray_values = { 8, 16 };
model.bpp_color_values = { 8, 16 };
- model.x_offset = 2.2;
+ model.x_offset = 2.1;
model.y_offset = 8.7;
model.x_size = 216.70;
model.y_size = 297.5;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 218.7787;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -874,18 +817,14 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_110;
model.gpio_id = GpioId::CANON_LIDE_210;
model.motor_id = MotorId::CANON_LIDE_210;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW |
GENESYS_HAS_EXTRA_SW;
- model.shading_lines = 60;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x190a, model);
@@ -901,30 +840,23 @@ void genesys_init_usb_device_tables()
model.resolutions = {
{
{ ScanMethod::FLATBED },
- // BUG: 4800 resolution crashes
- { /*4800,*/ 2400, 1200, 600, 300, 150, 100, 75 },
- { /*4800,*/ 2400, 1200, 600, 300, 150, 100, 75 },
+ { 4800, 2400, 1200, 600, 300, 150, 100, 75 },
+ { 4800, 2400, 1200, 600, 300, 150, 100, 75 },
}
};
model.bpp_gray_values = { 8, 16 };
model.bpp_color_values = { 8, 16 };
- model.x_offset = 2.2;
+ model.x_offset = 2.1;
model.y_offset = 8.7;
model.x_size = 216.70;
model.y_size = 297.5;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 218.7787;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -940,84 +872,84 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_110;
model.gpio_id = GpioId::CANON_LIDE_210;
model.motor_id = MotorId::CANON_LIDE_210;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW |
GENESYS_HAS_EXTRA_SW;
- model.shading_lines = 60;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x190f, model);
model = Genesys_Model();
- model.name = "canon-5600f";
+ model.name = "canon-canoscan-5600f";
model.vendor = "Canon";
- model.model = "5600F";
+ model.model = "CanoScan 5600F";
model.model_id = ModelId::CANON_5600F;
model.asic_type = AsicType::GL847;
model.resolutions = {
{
- { ScanMethod::FLATBED },
- { 4800, 2400, 1200, 600, 400, 300, 200, 150, 100, 75 },
- { 4800, 2400, 1200, 600, 400, 300, 200, 150, 100, 75 },
+ { ScanMethod::FLATBED, ScanMethod::TRANSPARENCY },
+ { 4800, 2400, 1200, 600, 300, /*150*/ },
+ { 4800, 2400, 1200, 600, 300, /*150*/ },
}
};
model.bpp_gray_values = { 8, 16 };
model.bpp_color_values = { 8, 16 };
- model.x_offset = 1.1;
- model.y_offset = 8.3;
- model.x_size = 216.07;
- model.y_size = 299.0;
+ model.x_offset = 1.5;
+ model.y_offset = 10.4;
+ model.x_size = 219.00;
+ model.y_size = 305.0;
- model.y_offset_calib_white = 3.0;
+ model.y_offset_calib_white = 2.0;
+ model.y_size_calib_mm = 2.0;
model.x_offset_calib_black = 0.0;
+ model.x_size_calib_mm = 220.5;
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
+ model.x_offset_ta = 93.0;
+ model.y_offset_ta = 42.4;
+ model.x_size_ta = 35.0;
+ model.y_size_ta = 230.0;
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.y_offset_sensor_to_ta = 0;
+ model.y_offset_calib_white_ta = 21.4;
+ model.y_size_calib_ta_mm = 1.0;
model.post_scan = 0.0;
model.eject_feed = 0.0;
model.ld_shift_r = 0;
- model.ld_shift_g = 0;
- model.ld_shift_b = 0;
+ model.ld_shift_g = 32;
+ model.ld_shift_b = 64;
model.line_mode_color_order = ColorOrder::RGB;
- model.is_cis = true;
+ model.is_cis = false;
model.is_sheetfed = false;
- model.sensor_id = SensorId::CIS_CANON_LIDE_200;
- model.adc_id = AdcId::CANON_LIDE_200;
- model.gpio_id = GpioId::CANON_LIDE_200;
- model.motor_id = MotorId::CANON_LIDE_200;
- model.flags = GENESYS_FLAG_UNTESTED |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_SIS_SENSOR |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.sensor_id = SensorId::CCD_CANON_5600F;
+ model.adc_id = AdcId::CANON_5600F;
+ model.gpio_id = GpioId::CANON_5600F;
+ model.motor_id = MotorId::CANON_5600F;
+ model.flags = ModelFlag::SIS_SENSOR |
+ ModelFlag::INVERT_PIXEL_DATA |
+ ModelFlag::DISABLE_ADC_CALIBRATION |
+ ModelFlag::DISABLE_EXPOSURE_CALIBRATION |
+ ModelFlag::HOST_SIDE_CALIBRATION_COMPLETE_SCAN |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::UTA_NO_SECONDARY_MOTOR |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 50;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x1906, model);
@@ -1032,9 +964,10 @@ void genesys_init_usb_device_tables()
model.resolutions = {
{
+ // FIXME: support 2400 ad 4800 dpi
{ ScanMethod::FLATBED },
- { 4800, 2400, 1200, 600, 300, 200, 150, 100, 75 },
- { 4800, 2400, 1200, 600, 300, 200, 150, 100, 75 },
+ { 1200, 600, 300, 200, 150, 100, 75 },
+ { 1200, 600, 300, 200, 150, 100, 75 },
}
};
@@ -1046,16 +979,11 @@ void genesys_init_usb_device_tables()
model.x_size = 216.07;
model.y_size = 297.0;
- model.y_offset_calib_white = 1.0;
+ model.y_offset_calib_white = 0.4233334;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
+ model.x_size_calib_mm = 219.6254;
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1071,18 +999,14 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_700F;
model.gpio_id = GpioId::CANON_LIDE_700F;
model.motor_id = MotorId::CANON_LIDE_700;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_SIS_SENSOR |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::SIS_SENSOR |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 70;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x1907, model);
@@ -1111,16 +1035,10 @@ void genesys_init_usb_device_tables()
model.x_size = 216.07;
model.y_size = 299.0;
- model.y_offset_calib_white = 0.0;
+ model.y_offset_calib_white = 0.4233334;
+ model.y_size_calib_mm = 3.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 217.4241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1136,18 +1054,14 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_200;
model.gpio_id = GpioId::CANON_LIDE_200;
model.motor_id = MotorId::CANON_LIDE_200;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_SIS_SENSOR |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::SIS_SENSOR |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_FILE_SW;
- model.shading_lines = 50;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x1905, model);
@@ -1176,16 +1090,12 @@ void genesys_init_usb_device_tables()
model.x_size = 218.0;
model.y_size = 299.0;
- model.y_offset_calib_white = 6.0;
+ model.y_offset_calib_white = 3.0;
+ model.y_size_calib_mm = 3.0;
+ model.y_offset_calib_dark_white_mm = 1.0;
+ model.y_size_calib_dark_white_mm = 6.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.13334;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1197,23 +1107,18 @@ void genesys_init_usb_device_tables()
model.is_cis = true;
model.is_sheetfed = false;
- model.sensor_id = SensorId::CIS_CANON_LIDE_35;
+ model.sensor_id = SensorId::CIS_CANON_LIDE_60;
model.adc_id = AdcId::CANON_LIDE_35;
model.gpio_id = GpioId::CANON_LIDE_35;
- model.motor_id = MotorId::CANON_LIDE_35;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_WHITE_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.motor_id = MotorId::CANON_LIDE_60;
+ model.flags = ModelFlag::DARK_WHITE_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW |
GENESYS_HAS_SCAN_SW |
GENESYS_HAS_FILE_SW |
GENESYS_HAS_EMAIL_SW;
- model.shading_lines = 300;
- model.shading_ta_lines = 0;
model.search_lines = 400;
- // this is completely untested
s_usb_devices->emplace_back(0x04a9, 0x221c, model);
@@ -1240,15 +1145,11 @@ void genesys_init_usb_device_tables()
model.y_size = 299.0;
model.y_offset_calib_white = 4.5;
+ model.y_size_calib_mm = 3.0;
+ model.y_offset_calib_dark_white_mm = 1.0;
+ model.y_size_calib_dark_white_mm = 6.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 216.7467;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1265,22 +1166,77 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_80;
model.gpio_id = GpioId::CANON_LIDE_80;
model.motor_id = MotorId::CANON_LIDE_80;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_WHITE_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_WHITE_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW |
GENESYS_HAS_FILE_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_COPY_SW;
- model.shading_lines = 160;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a9, 0x2214, model);
model = Genesys_Model();
+ model.name = "canon-lide-90";
+ model.vendor = "Canon";
+ model.model = "LiDE 90";
+ model.model_id = ModelId::CANON_LIDE_90;
+ model.asic_type = AsicType::GL842;
+
+ model.resolutions = {
+ {
+ { ScanMethod::FLATBED },
+ { 2400, 1200, 600, 300 },
+ { 2400, 1200, 600, 300 },
+ }
+ };
+
+ model.bpp_gray_values = { 8, 16 };
+ model.bpp_color_values = { 8, 16 };
+ model.x_offset = 3.50;
+ model.y_offset = 9.0;
+ model.x_size = 219.0;
+ model.y_size = 299.0;
+
+ model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 2.0;
+ model.y_offset_calib_dark_white_mm = 0.0;
+ model.y_size_calib_dark_white_mm = 0.0;
+ model.x_offset_calib_black = 0.0;
+ model.x_size_calib_mm = 221.5;
+
+ model.post_scan = 0.0;
+ model.eject_feed = 0.0;
+
+ model.ld_shift_r = 0;
+ model.ld_shift_g = 0;
+ model.ld_shift_b = 0;
+
+ model.line_mode_color_order = ColorOrder::RGB;
+
+ model.is_cis = true;
+ model.is_sheetfed = false;
+ model.sensor_id = SensorId::CIS_CANON_LIDE_90;
+ model.adc_id = AdcId::CANON_LIDE_90;
+ model.gpio_id = GpioId::CANON_LIDE_90;
+ model.motor_id = MotorId::CANON_LIDE_90;
+ model.flags = ModelFlag::DISABLE_ADC_CALIBRATION |
+ ModelFlag::HOST_SIDE_CALIBRATION_COMPLETE_SCAN |
+ ModelFlag::USE_CONSTANT_FOR_DARK_CALIBRATION |
+ ModelFlag::DISABLE_FAST_FEEDING |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::CUSTOM_GAMMA;
+ model.buttons = GENESYS_HAS_SCAN_SW |
+ GENESYS_HAS_FILE_SW |
+ GENESYS_HAS_EMAIL_SW |
+ GENESYS_HAS_COPY_SW;
+ model.search_lines = 400;
+
+ s_usb_devices->emplace_back(0x04a9, 0x1900, model);
+
+
+ model = Genesys_Model();
model.name = "hewlett-packard-scanjet-2300c";
model.vendor = "Hewlett Packard";
model.model = "ScanJet 2300c";
@@ -1298,27 +1254,21 @@ void genesys_init_usb_device_tables()
model.bpp_gray_values = { 8, 16 };
model.bpp_color_values = { 8, 16 };
- model.x_offset = 2.0;
- model.y_offset = 7.5;
+ model.x_offset = 6.5;
+ model.y_offset = 8;
model.x_size = 215.9;
model.y_size = 295.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 227.2454;
model.post_scan = 0.0;
model.eject_feed = 0.0;
- model.ld_shift_r = 16;
- model.ld_shift_g = 8;
+ model.ld_shift_r = 32;
+ model.ld_shift_g = 16;
model.ld_shift_b = 0;
model.line_mode_color_order = ColorOrder::RGB;
@@ -1328,15 +1278,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_HP2300;
model.gpio_id = GpioId::HP2300;
model.motor_id = MotorId::HP2300;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_SEARCH_START |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_COPY_SW;
- model.shading_lines = 40;
- model.shading_ta_lines = 0;
model.search_lines = 132;
s_usb_devices->emplace_back(0x03f0, 0x0901, model);
@@ -1366,15 +1311,9 @@ void genesys_init_usb_device_tables()
model.y_size = 297.2;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 2.0; // FIXME: check if white area is really so small
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 230.1241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1391,14 +1330,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_HP2400;
model.gpio_id = GpioId::HP2400;
model.motor_id = MotorId::HP2400;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW;
- model.shading_lines = 20;
- model.shading_ta_lines = 0;
model.search_lines = 132;
s_usb_devices->emplace_back(0x03f0, 0x0a01, model);
@@ -1428,15 +1363,9 @@ void genesys_init_usb_device_tables()
model.y_size = 297.2;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1453,14 +1382,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::AD_XP200;
model.gpio_id = GpioId::XP200;
model.motor_id = MotorId::XP200;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION;
+ model.flags = ModelFlag::GAMMA_14BIT |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 120;
- model.shading_ta_lines = 0;
model.search_lines = 132;
s_usb_devices->emplace_back(0x04a7, 0x0426, model);
@@ -1490,15 +1415,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 104.0;
- model.y_offset_ta = 55.6;
- model.x_size_ta = 25.6;
- model.y_size_ta = 78.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 76.0;
+ model.x_size_calib_mm = 230.1241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1515,14 +1434,11 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_HP3670;
model.gpio_id = GpioId::HP3670;
model.motor_id = MotorId::HP3670;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_XPA |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_SCAN_SW;
- model.shading_lines = 20;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x03f0, 0x1405, model);
@@ -1552,15 +1468,9 @@ void genesys_init_usb_device_tables()
model.y_size = 299.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 229.2774;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1577,10 +1487,8 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_ST12;
model.gpio_id = GpioId::ST12;
model.motor_id = MotorId::UMAX;
- model.flags = GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA;
+ model.flags = ModelFlag::UNTESTED | ModelFlag::GAMMA_14BIT;
model.buttons = GENESYS_HAS_NO_BUTTONS;
- model.shading_lines = 20;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0600, model);
@@ -1604,20 +1512,14 @@ void genesys_init_usb_device_tables()
model.bpp_color_values = { 8, 16 };
model.x_offset = 3.5;
- model.y_offset = 7.5;
+ model.y_offset = 7.5; // FIXME: incorrect, needs updating
model.x_size = 218.0;
model.y_size = 299.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 1.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 228.6;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -1634,14 +1536,10 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_ST24;
model.gpio_id = GpioId::ST24;
model.motor_id = MotorId::ST24;
- model.flags = GENESYS_FLAG_UNTESTED |
- GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SEARCH_START |
- GENESYS_FLAG_OFFSET_CALIBRATION;
+ model.flags = ModelFlag::UNTESTED |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_NO_BUTTONS;
- model.shading_lines = 20;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0601, model);
@@ -1665,26 +1563,20 @@ void genesys_init_usb_device_tables()
model.bpp_color_values = { 8, 16 };
model.x_offset = 0.30;
- model.y_offset = 0.80;
+ model.y_offset = 4.0; // FIXME: incorrect, needs updating
model.x_size = 220.0;
model.y_size = 296.4;
model.y_offset_calib_white = 0.00;
+ model.y_size_calib_mm = 2.0;
model.x_offset_calib_black = 0.00;
-
- model.x_offset_ta = 0.00;
- model.y_offset_ta = 0.00;
- model.x_size_ta = 0.00;
- model.y_size_ta = 0.00;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.00;
+ model.x_size_calib_mm = 230.1241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
- model.ld_shift_r = 48;
- model.ld_shift_g = 24;
+ model.ld_shift_r = 96;
+ model.ld_shift_g = 48;
model.ld_shift_b = 0;
model.line_mode_color_order = ColorOrder::RGB;
@@ -1694,19 +1586,15 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_5345;
model.gpio_id = GpioId::MD_5345;
model.motor_id = MotorId::MD_5345;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_SEARCH_START |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_SHADING_NO_MOVE |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_POWER_SW |
GENESYS_HAS_OCR_SW |
GENESYS_HAS_SCAN_SW;
- model.shading_lines = 40;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x0461, 0x0377, model);
@@ -1735,15 +1623,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 433.4934;
model.post_scan = 26.5;
// this is larger than needed -- accounts for second sensor head, which is a calibration item
@@ -1760,13 +1642,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::XP300;
model.motor_id = MotorId::XP300;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a7, 0x0474, model);
@@ -1795,15 +1673,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 105.664;
model.post_scan = 17.5;
model.eject_feed = 0.0;
@@ -1820,13 +1692,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::DP665;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x0a82, 0x4803, model);
@@ -1855,15 +1723,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -1880,13 +1742,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::ROADWARRIOR;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a7, 0x0494, model);
@@ -1915,15 +1773,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -1940,13 +1792,12 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::ROADWARRIOR;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_NO_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_UNTESTED;
+ model.flags = ModelFlag::DISABLE_ADC_CALIBRATION |
+ ModelFlag::DISABLE_EXPOSURE_CALIBRATION |
+ ModelFlag::DISABLE_SHADING_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::UNTESTED;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW;
- model.shading_lines = 300;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x0a82, 0x4802, model);
@@ -1976,15 +1827,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -2001,13 +1846,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::ROADWARRIOR;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a7, 0x049b, model);
@@ -2036,15 +1877,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -2061,13 +1896,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_DSM600;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::DSMOBILE_600;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x0a17, 0x3210, model);
@@ -2098,15 +1929,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -2122,13 +1947,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_DSM600;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::DSMOBILE_600;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x1dcc, 0x4812, model);
@@ -2157,15 +1978,9 @@ void genesys_init_usb_device_tables()
model.y_size = 500;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 212.5134;
model.post_scan = 26.5;
// this is larger than needed -- accounts for second sensor head, which is a calibration item
@@ -2182,13 +1997,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_DSM600;
model.gpio_id = GpioId::DP685;
model.motor_id = MotorId::XP300;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
@@ -2219,15 +2030,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 433.4934;
model.post_scan = 26.5;
// this is larger than needed -- accounts for second sensor head, which is a calibration item
@@ -2244,13 +2049,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::XP300;
model.motor_id = MotorId::XP300;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x0a82, 0x4800, model);
@@ -2280,19 +2081,14 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 433.4934;
model.post_scan = 26.5;
// this is larger than needed -- accounts for second sensor head, which is a calibration item
model.eject_feed = 0.0;
+
model.ld_shift_r = 0;
model.ld_shift_g = 0;
model.ld_shift_b = 0;
@@ -2301,18 +2097,14 @@ void genesys_init_usb_device_tables()
model.is_cis = true;
model.is_sheetfed = true;
- model.sensor_id = SensorId::CCD_XP300;
+ model.sensor_id = SensorId::CCD_DOCKETPORT_487;
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::XP300;
model.motor_id = MotorId::XP300;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_UNTESTED;
+ model.flags = ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::UNTESTED;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x1dcc, 0x4810, model);
@@ -2337,26 +2129,20 @@ void genesys_init_usb_device_tables()
model.bpp_color_values = { 8, 16 };
model.x_offset = 4.00;
- model.y_offset = 0.80;
+ model.y_offset = 5.0; // FIXME: incorrect, needs updating
model.x_size = 215.9;
model.y_size = 296.4;
model.y_offset_calib_white = 0.00;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.00;
-
- model.x_offset_ta = 0.00;
- model.y_offset_ta = 0.00;
- model.x_size_ta = 0.00;
- model.y_size_ta = 0.00;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.00;
+ model.x_size_calib_mm = 230.1241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
- model.ld_shift_r = 48;
- model.ld_shift_g = 24;
+ model.ld_shift_r = 96;
+ model.ld_shift_g = 48;
model.ld_shift_b = 0;
model.line_mode_color_order = ColorOrder::RGB;
@@ -2366,18 +2152,15 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_5345;
model.gpio_id = GpioId::MD_5345;
model.motor_id = MotorId::MD_5345;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_SEARCH_START |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_POWER_SW |
GENESYS_HAS_OCR_SW |
GENESYS_HAS_SCAN_SW;
- model.shading_lines = 40;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x04a7, 0x0229, model);
@@ -2402,26 +2185,20 @@ void genesys_init_usb_device_tables()
model.bpp_color_values = { 8, 16 };
model.x_offset = 4.00;
- model.y_offset = 0.80;
+ model.y_offset = 5.0; // FIXME: incorrect, needs updating
model.x_size = 215.9;
model.y_size = 296.4;
model.y_offset_calib_white = 0.00;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.00;
-
- model.x_offset_ta = 0.00;
- model.y_offset_ta = 0.00;
- model.x_size_ta = 0.00;
- model.y_size_ta = 0.00;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.00;
+ model.x_size_calib_mm = 230.1241;
model.post_scan = 0.0;
model.eject_feed = 0.0;
- model.ld_shift_r = 48;
- model.ld_shift_g = 24;
+ model.ld_shift_r = 96;
+ model.ld_shift_g = 48;
model.ld_shift_b = 0;
model.line_mode_color_order = ColorOrder::RGB;
@@ -2431,18 +2208,15 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_5345;
model.gpio_id = GpioId::MD_5345;
model.motor_id = MotorId::MD_5345;
- model.flags = GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_SEARCH_START |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_COPY_SW |
GENESYS_HAS_EMAIL_SW |
GENESYS_HAS_POWER_SW |
GENESYS_HAS_OCR_SW |
GENESYS_HAS_SCAN_SW;
- model.shading_lines = 40;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x0461, 0x038b, model);
@@ -2472,15 +2246,9 @@ void genesys_init_usb_device_tables()
model.y_size = 511;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 220.1334;
model.post_scan = 16.0;
model.eject_feed = 0.0;
@@ -2497,13 +2265,9 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::WOLFSON_XP300;
model.gpio_id = GpioId::DP665;
model.motor_id = MotorId::ROADWARRIOR;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_SCAN_SW | GENESYS_HAS_PAGE_LOADED_SW | GENESYS_HAS_CALIBRATE;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 400;
s_usb_devices->emplace_back(0x04a7, 0x04ac, model);
@@ -2533,15 +2297,9 @@ void genesys_init_usb_device_tables()
model.y_size = 297.0;
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 0.0;
- model.y_size_ta = 0.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 213.7834;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2558,19 +2316,81 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::PLUSTEK_OPTICPRO_3600;
model.gpio_id = GpioId::PLUSTEK_OPTICPRO_3600;
model.motor_id = MotorId::PLUSTEK_OPTICPRO_3600;
- model.flags = GENESYS_FLAG_UNTESTED | // not fully working yet
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION;
+ model.flags = ModelFlag::UNTESTED | // not fully working yet
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION;
model.buttons = GENESYS_HAS_NO_BUTTONS;
- model.shading_lines = 7;
- model.shading_ta_lines = 0;
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0900, model);
+
+ model = Genesys_Model();
+ model.name = "plustek-opticfilm-7200";
+ model.vendor = "PLUSTEK";
+ model.model = "OpticFilm 7200";
+ model.model_id = ModelId::PLUSTEK_OPTICFILM_7200;
+ model.asic_type = AsicType::GL842;
+
+ model.resolutions = {
+ {
+ { ScanMethod::TRANSPARENCY },
+ { 7200, 3600, 1800, 900 },
+ { 7200, 3600, 1800, 900 },
+ }
+ };
+
+ model.bpp_gray_values = { 16 };
+ model.bpp_color_values = { 16 };
+ model.default_method = ScanMethod::TRANSPARENCY;
+
+ model.x_offset = 0.0;
+ model.y_offset = 0.0;
+ model.x_size = 36.0;
+ model.y_size = 44.0;
+
+ model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
+ model.x_offset_calib_black = 6.5;
+ model.x_size_calib_mm = 35.9834;
+
+ model.x_offset_ta = 0.7f;
+ model.y_offset_ta = 28.0;
+ model.x_size_ta = 36.0;
+ model.y_size_ta = 25.0;
+
+ model.y_offset_sensor_to_ta = 0.0;
+ model.y_offset_calib_black_ta = 6.5;
+ model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
+ model.post_scan = 0.0;
+ model.eject_feed = 0.0;
+
+ model.ld_shift_r = 0;
+ model.ld_shift_g = 12;
+ model.ld_shift_b = 24;
+
+ model.line_mode_color_order = ColorOrder::RGB;
+
+ model.is_cis = false;
+ model.is_sheetfed = false;
+
+ model.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7200;
+ model.adc_id = AdcId::PLUSTEK_OPTICFILM_7200;
+ model.gpio_id = GpioId::PLUSTEK_OPTICFILM_7200;
+ model.motor_id = MotorId::PLUSTEK_OPTICFILM_7200;
+
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK;
+
+ model.search_lines = 200;
+ s_usb_devices->emplace_back(0x07b3, 0x0807, model);
+
+
model = Genesys_Model();
model.name = "plustek-opticfilm-7200i";
model.vendor = "PLUSTEK";
@@ -2594,16 +2414,22 @@ void genesys_init_usb_device_tables()
model.y_offset = 0.0;
model.x_size = 36.0;
model.y_size = 44.0;
+
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
model.x_offset_calib_black = 6.5;
+ model.x_size_calib_mm = 35.9834;
model.x_offset_ta = 0.0;
model.y_offset_ta = 29.0;
model.x_size_ta = 36.0;
model.y_size_ta = 24.0;
+
model.y_offset_sensor_to_ta = 0.0;
model.y_offset_calib_black_ta = 6.5;
model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2621,23 +2447,29 @@ void genesys_init_usb_device_tables()
model.gpio_id = GpioId::PLUSTEK_OPTICFILM_7200I;
model.motor_id = MotorId::PLUSTEK_OPTICFILM_7200I;
- model.flags = GENESYS_FLAG_HAS_UTA |
- GENESYS_FLAG_HAS_UTA_INFRARED |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_HAS_NO_BUTTONS |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CALIBRATION_HOST_SIDE |
- GENESYS_FLAG_16BIT_DATA_INVERTED;
-
- model.shading_lines = 7;
- model.shading_ta_lines = 50;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK |
+ ModelFlag::SWAP_16BIT_DATA;
+
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0c04, model);
+ // same as 7200i, just without the infrared channel
+ model.name = "plustek-opticfilm-7200-v2";
+ model.model = "OpticFilm 7200 v2";
+ model.resolutions = {
+ {
+ { ScanMethod::TRANSPARENCY },
+ { 7200, 3600, 1800, 900 },
+ { 7200, 3600, 1800, 900 },
+ }
+ };
+ s_usb_devices->emplace_back(0x07b3, 0x0c07, model);
+
+
model = Genesys_Model();
model.name = "plustek-opticfilm-7300";
model.vendor = "PLUSTEK";
@@ -2661,16 +2493,22 @@ void genesys_init_usb_device_tables()
model.y_offset = 0.0;
model.x_size = 36.0;
model.y_size = 44.0;
+
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
model.x_offset_calib_black = 6.5;
+ model.x_size_calib_mm = 35.9834;
model.x_offset_ta = 0.0;
model.y_offset_ta = 29.0;
model.x_size_ta = 36.0;
model.y_size_ta = 24.0;
+
model.y_offset_sensor_to_ta = 0.0;
model.y_offset_calib_black_ta = 6.5;
model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2688,21 +2526,91 @@ void genesys_init_usb_device_tables()
model.gpio_id = GpioId::PLUSTEK_OPTICFILM_7300;
model.motor_id = MotorId::PLUSTEK_OPTICFILM_7300;
- model.flags = GENESYS_FLAG_HAS_UTA |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_HAS_NO_BUTTONS |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CALIBRATION_HOST_SIDE;
-
- model.shading_lines = 7;
- model.shading_ta_lines = 50;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK;
+
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0c12, model);
+ // same as 7300, same USB ID as 7400-v2
+ model.name = "plustek-opticfilm-7400-v1";
+ model.model = "OpticFilm 7400 (v1)";
+ s_usb_devices->emplace_back(0x07b3, 0x0c3a, 0x0400, model);
+
+
+ model = Genesys_Model();
+ model.name = "plustek-opticfilm-7400-v2";
+ model.vendor = "PLUSTEK";
+ model.model = "OpticFilm 7400 (v2)";
+ model.model_id = ModelId::PLUSTEK_OPTICFILM_7400;
+ model.asic_type = AsicType::GL845;
+
+ model.resolutions = {
+ {
+ { ScanMethod::TRANSPARENCY },
+ { 7200, 3600, 2400, 1200, 600 },
+ { 7200, 3600, 2400, 1200, 600 },
+ }
+ };
+
+ model.bpp_gray_values = { 16 };
+ model.bpp_color_values = { 16 };
+ model.default_method = ScanMethod::TRANSPARENCY;
+
+ model.x_offset = 0.0;
+ model.y_offset = 0.0;
+ model.x_size = 36.0;
+ model.y_size = 44.0;
+
+ model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
+ model.x_offset_calib_black = 6.5;
+ model.x_size_calib_mm = 36.83;
+
+ model.x_offset_ta = 0.5;
+ model.y_offset_ta = 29.0;
+ model.x_size_ta = 36.33;
+ model.y_size_ta = 25.0;
+
+ model.y_offset_sensor_to_ta = 0.0;
+ model.y_offset_calib_black_ta = 6.5;
+ model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
+ model.post_scan = 0.0;
+ model.eject_feed = 0.0;
+
+ model.ld_shift_r = 0;
+ model.ld_shift_g = 12;
+ model.ld_shift_b = 24;
+
+ model.line_mode_color_order = ColorOrder::RGB;
+
+ model.is_cis = false;
+ model.is_sheetfed = false;
+
+ model.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_7400;
+ model.adc_id = AdcId::PLUSTEK_OPTICFILM_7400;
+ model.gpio_id = GpioId::PLUSTEK_OPTICFILM_7400;
+ model.motor_id = MotorId::PLUSTEK_OPTICFILM_7400;
+
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK;
+
+ model.search_lines = 200;
+ s_usb_devices->emplace_back(0x07b3, 0x0c3a, 0x0605, model);
+
+
+ // same as 7400-v2
+ model.name = "plustek-opticfilm-8100";
+ model.model = "OpticFilm 8100";
+ s_usb_devices->emplace_back(0x07b3, 0x130c, model);
+
+
model = Genesys_Model();
model.name = "plustek-opticfilm-7500i";
model.vendor = "PLUSTEK";
@@ -2726,16 +2634,22 @@ void genesys_init_usb_device_tables()
model.y_offset = 0.0;
model.x_size = 36.0;
model.y_size = 44.0;
+
model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
model.x_offset_calib_black = 6.5;
model.x_offset_ta = 0.0;
model.y_offset_ta = 29.0;
model.x_size_ta = 36.0;
model.y_size_ta = 24.0;
+ model.x_size_calib_mm = 35.9834;
+
model.y_offset_sensor_to_ta = 0.0;
model.y_offset_calib_black_ta = 6.5;
model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2753,22 +2667,91 @@ void genesys_init_usb_device_tables()
model.gpio_id = GpioId::PLUSTEK_OPTICFILM_7500I;
model.motor_id = MotorId::PLUSTEK_OPTICFILM_7500I;
- model.flags = GENESYS_FLAG_HAS_UTA |
- GENESYS_FLAG_HAS_UTA_INFRARED |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_HAS_NO_BUTTONS |
- GENESYS_FLAG_SHADING_REPARK |
- GENESYS_FLAG_CALIBRATION_HOST_SIDE;
-
- model.shading_lines = 7;
- model.shading_ta_lines = 50;
+ model.flags = ModelFlag::WARMUP |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK;
+
model.search_lines = 200;
s_usb_devices->emplace_back(0x07b3, 0x0c13, model);
+ // same as 7500i
+ model.name = "plustek-opticfilm-7600i-v1";
+ model.model = "OpticFilm 7600i (v1)";
+ s_usb_devices->emplace_back(0x07b3, 0x0c3b, 0x0400, model);
+
+
+ model = Genesys_Model();
+ model.name = "plustek-opticfilm-8200i";
+ model.vendor = "PLUSTEK";
+ model.model = "OpticFilm 8200i";
+ model.model_id = ModelId::PLUSTEK_OPTICFILM_8200I;
+ model.asic_type = AsicType::GL845;
+
+ model.resolutions = {
+ {
+ { ScanMethod::TRANSPARENCY, ScanMethod::TRANSPARENCY_INFRARED },
+ { 7200, 3600, 1800, 900 },
+ { 7200, 3600, 1800, 900 },
+ }
+ };
+
+ model.bpp_gray_values = { 16 };
+ model.bpp_color_values = { 16 };
+ model.default_method = ScanMethod::TRANSPARENCY;
+
+ model.x_offset = 0.0;
+ model.y_offset = 0.0;
+ model.x_size = 36.0;
+ model.y_size = 44.0;
+
+ model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 0.0;
+ model.x_offset_calib_black = 6.5;
+ model.x_size_calib_mm = 36.83;
+
+ model.x_offset_ta = 0.5;
+ model.y_offset_ta = 28.5;
+ model.x_size_ta = 36.33;
+ model.y_size_ta = 25.0;
+
+ model.y_offset_sensor_to_ta = 0.0;
+ model.y_offset_calib_black_ta = 6.5;
+ model.y_offset_calib_white_ta = 0.0;
+ model.y_size_calib_ta_mm = 2.0;
+
+ model.post_scan = 0.0;
+ model.eject_feed = 0.0;
+
+ model.ld_shift_r = 0;
+ model.ld_shift_g = 12;
+ model.ld_shift_b = 24;
+
+ model.line_mode_color_order = ColorOrder::RGB;
+
+ model.is_cis = false;
+ model.is_sheetfed = false;
+
+ model.sensor_id = SensorId::CCD_PLUSTEK_OPTICFILM_8200I;
+ model.adc_id = AdcId::PLUSTEK_OPTICFILM_8200I;
+ model.gpio_id = GpioId::PLUSTEK_OPTICFILM_8200I;
+ model.motor_id = MotorId::PLUSTEK_OPTICFILM_8200I;
+
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::SHADING_REPARK;
+
+ model.search_lines = 200;
+ s_usb_devices->emplace_back(0x07b3, 0x130d, model);
+
+
+ // same as 8200i
+ model.name = "plustek-opticfilm-7600i-v2";
+ model.model = "OpticFilm 7600i (v2)";
+ s_usb_devices->emplace_back(0x07b3, 0x0c3b, 0x0605, model);
+
+
model = Genesys_Model();
model.name = "hewlett-packard-scanjet-N6310";
model.vendor = "Hewlett Packard";
@@ -2792,16 +2775,10 @@ void genesys_init_usb_device_tables()
model.x_size = 216;
model.y_size = 511;
- model.y_offset_calib_white = 3.0;
+ model.y_offset_calib_white = 0.0;
+ model.y_size_calib_mm = 4.0; // FIXME: y_offset is liely incorrect
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 100.0;
- model.y_size_ta = 100.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0;
+ model.x_size_calib_mm = 452.12;
model.post_scan = 0;
model.eject_feed = 0;
@@ -2818,17 +2795,15 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::CANON_LIDE_200; // Not defined yet for N6310
model.gpio_id = GpioId::HP_N6310;
model.motor_id = MotorId::CANON_LIDE_200; // Not defined yet for N6310
- model.flags = GENESYS_FLAG_UNTESTED |
- GENESYS_FLAG_14BIT_GAMMA |
- GENESYS_FLAG_DARK_CALIBRATION |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_NO_CALIBRATION;
+ model.flags = ModelFlag::UNTESTED |
+ ModelFlag::GAMMA_14BIT |
+ ModelFlag::DARK_CALIBRATION |
+ ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::DISABLE_ADC_CALIBRATION |
+ ModelFlag::DISABLE_EXPOSURE_CALIBRATION |
+ ModelFlag::DISABLE_SHADING_CALIBRATION;
model.buttons = GENESYS_HAS_NO_BUTTONS;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x03f0, 0x4705, model);
@@ -2858,15 +2833,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 9.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 0.0;
- model.y_size_ta = 0.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 215.9;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2883,12 +2852,8 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::PLUSTEK_OPTICBOOK_3800;
model.gpio_id = GpioId::PLUSTEK_OPTICBOOK_3800;
model.motor_id = MotorId::PLUSTEK_OPTICBOOK_3800;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA;
+ model.flags = ModelFlag::CUSTOM_GAMMA;
model.buttons = GENESYS_HAS_NO_BUTTONS; // TODO there are 4 buttons to support
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x07b3, 0x1300, model);
@@ -2918,15 +2883,9 @@ void genesys_init_usb_device_tables()
model.y_size = 300.0;
model.y_offset_calib_white = 9.0;
+ model.y_size_calib_mm = 4.0;
model.x_offset_calib_black = 0.0;
-
- model.x_offset_ta = 0.0;
- model.y_offset_ta = 0.0;
- model.x_size_ta = 0.0;
- model.y_size_ta = 0.0;
-
- model.y_offset_sensor_to_ta = 0.0;
- model.y_offset_calib_white_ta = 0.0;
+ model.x_size_calib_mm = 228.6;
model.post_scan = 0.0;
model.eject_feed = 0.0;
@@ -2943,16 +2902,36 @@ void genesys_init_usb_device_tables()
model.adc_id = AdcId::IMG101;
model.gpio_id = GpioId::IMG101;
model.motor_id = MotorId::IMG101;
- model.flags = GENESYS_FLAG_SKIP_WARMUP |
- GENESYS_FLAG_OFFSET_CALIBRATION |
- GENESYS_FLAG_CUSTOM_GAMMA |
- GENESYS_FLAG_UNTESTED;
+ model.flags = ModelFlag::CUSTOM_GAMMA |
+ ModelFlag::UNTESTED;
model.buttons = GENESYS_HAS_NO_BUTTONS ;
- model.shading_lines = 100;
- model.shading_ta_lines = 0;
model.search_lines = 100;
s_usb_devices->emplace_back(0x1083, 0x162e, model);
- }
+}
+
+void verify_usb_device_tables()
+{
+ for (const auto& device : *s_usb_devices) {
+ const auto& model = device.model();
+
+ if (model.x_size_calib_mm == 0.0f) {
+ throw SaneException("Calibration width can't be zero");
+ }
+
+ if (model.has_method(ScanMethod::FLATBED)) {
+ if (model.y_size_calib_mm == 0.0f) {
+ throw SaneException("Calibration size can't be zero");
+ }
+ }
+ if (model.has_method(ScanMethod::TRANSPARENCY) ||
+ model.has_method(ScanMethod::TRANSPARENCY_INFRARED))
+ {
+ if (model.y_size_calib_ta_mm == 0.0f) {
+ throw SaneException("Calibration size can't be zero");
+ }
+ }
+ }
+}
} // namespace genesys