kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Add model option to disable fast feeding
rodzic
86c15ff4a0
commit
02782651a3
|
@ -519,6 +519,9 @@ enum class ModelFlag : unsigned
|
|||
// allow custom gamma tables
|
||||
CUSTOM_GAMMA = 1 << 13,
|
||||
|
||||
// disable fast feeding mode on this scanner
|
||||
DISABLE_FAST_FEEDING = 1 << 14,
|
||||
|
||||
// the scanner uses multi-segment sensors that must be handled during calibration
|
||||
SIS_SENSOR = 1 << 16,
|
||||
|
||||
|
|
|
@ -575,6 +575,9 @@ static void gl841_init_motor_regs_feed(Genesys_Device* dev, const Genesys_Sensor
|
|||
// BUG: fast table is counted in base_ydpi / 4
|
||||
feedl = feed_steps - fast_table.table.size() * 2;
|
||||
use_fast_fed = 1;
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
reg->set8(0x3d, (feedl >> 16) & 0xf);
|
||||
reg->set8(0x3e, (feedl >> 8) & 0xff);
|
||||
|
@ -713,6 +716,10 @@ static void gl841_init_motor_regs_scan(Genesys_Device* dev, const Genesys_Sensor
|
|||
use_fast_fed = fast_time < slow_time;
|
||||
}
|
||||
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
if (use_fast_fed) {
|
||||
feedl = feed_steps - fast_table.table.size() * 2 -
|
||||
(slow_table.table.size() >> static_cast<unsigned>(motor_profile.step_type));
|
||||
|
|
|
@ -256,6 +256,9 @@ static void gl842_init_motor_regs_scan(Genesys_Device* dev,
|
|||
if ((scan_yres >= 300 && feed_steps > 900) || (has_flag(flags, ScanFlag::FEEDING))) {
|
||||
use_fast_fed = true;
|
||||
}
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
reg->set24(REG_LINCNT, scan_lines);
|
||||
|
||||
|
|
|
@ -710,6 +710,9 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
|||
if ((scan_yres >= 300 && feed_steps > 900) || (has_flag(flags, ScanFlag::FEEDING))) {
|
||||
use_fast_fed = true;
|
||||
}
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
reg->set24(REG_LINCNT, scan_lines);
|
||||
|
||||
|
|
|
@ -380,6 +380,9 @@ static void gl846_init_motor_regs_scan(Genesys_Device* dev,
|
|||
if (dev->settings.yres == 4444 && feed_steps > 100 && !has_flag(flags, ScanFlag::FEEDING)) {
|
||||
use_fast_fed = true;
|
||||
}
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
reg->set24(REG_LINCNT, scan_lines);
|
||||
|
||||
|
|
|
@ -344,6 +344,9 @@ static void gl847_init_motor_regs_scan(Genesys_Device* dev,
|
|||
if (dev->settings.yres == 4444 && feed_steps > 100 && !has_flag(flags, ScanFlag::FEEDING)) {
|
||||
use_fast_fed = true;
|
||||
}
|
||||
if (has_flag(dev->model->flags, ModelFlag::DISABLE_FAST_FEEDING)) {
|
||||
use_fast_fed = false;
|
||||
}
|
||||
|
||||
reg->set24(REG_LINCNT, scan_lines);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue