kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Improve motor tables on 8400F
rodzic
6d15a0da5a
commit
0b75ffdf36
|
@ -791,6 +791,16 @@ void CommandSetGl843::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool should_use_new_fast_table(const Genesys_Device& dev)
|
||||||
|
{
|
||||||
|
switch (dev.model->model_id) {
|
||||||
|
case ModelId::CANON_8600F:
|
||||||
|
case ModelId::CANON_8400F:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
||||||
const Genesys_Sensor& sensor,
|
const Genesys_Sensor& sensor,
|
||||||
|
@ -871,7 +881,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
||||||
reg->set8(REG_STEPNO, scan_table.steps_count / step_multiplier);
|
reg->set8(REG_STEPNO, scan_table.steps_count / step_multiplier);
|
||||||
reg->set8(REG_FASTNO, scan_table.steps_count / step_multiplier);
|
reg->set8(REG_FASTNO, scan_table.steps_count / step_multiplier);
|
||||||
|
|
||||||
if (dev->model->model_id == ModelId::CANON_8600F) {
|
if (should_use_new_fast_table(*dev)) {
|
||||||
// FIXME: move all models to the 8600F behavior
|
// FIXME: move all models to the 8600F behavior
|
||||||
gl843_send_slope_table(dev, STOP_TABLE, scan_table.table, scan_table.steps_count);
|
gl843_send_slope_table(dev, STOP_TABLE, scan_table.table, scan_table.steps_count);
|
||||||
reg->set8(REG_FSHDEC, scan_table.steps_count / step_multiplier);
|
reg->set8(REG_FSHDEC, scan_table.steps_count / step_multiplier);
|
||||||
|
@ -885,7 +895,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
||||||
|
|
||||||
MotorSlopeTable fast_table;
|
MotorSlopeTable fast_table;
|
||||||
|
|
||||||
if (dev->model->model_id == ModelId::CANON_8600F) {
|
if (should_use_new_fast_table(*dev)) {
|
||||||
fast_table = create_slope_table_fastest(dev->model->asic_type, step_multiplier,
|
fast_table = create_slope_table_fastest(dev->model->asic_type, step_multiplier,
|
||||||
*fast_profile);
|
*fast_profile);
|
||||||
} else {
|
} else {
|
||||||
|
@ -895,7 +905,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
||||||
*fast_profile);
|
*fast_profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->model->model_id != ModelId::CANON_8600F) {
|
if (!should_use_new_fast_table(*dev)) {
|
||||||
// FIXME: move all models to the 8600F behavior
|
// FIXME: move all models to the 8600F behavior
|
||||||
gl843_send_slope_table(dev, STOP_TABLE, fast_table.table, fast_table.steps_count);
|
gl843_send_slope_table(dev, STOP_TABLE, fast_table.table, fast_table.steps_count);
|
||||||
reg->set8(REG_FSHDEC, fast_table.steps_count / step_multiplier);
|
reg->set8(REG_FSHDEC, fast_table.steps_count / step_multiplier);
|
||||||
|
|
|
@ -254,8 +254,31 @@ void genesys_init_motor_tables()
|
||||||
motor.id = MotorId::CANON_8400F;
|
motor.id = MotorId::CANON_8400F;
|
||||||
motor.base_ydpi = 1600;
|
motor.base_ydpi = 1600;
|
||||||
motor.optical_ydpi = 6400;
|
motor.optical_ydpi = 6400;
|
||||||
motor.profiles.push_back({MotorSlope::create_from_steps(8743, 300, 794),
|
|
||||||
StepType::QUARTER, 50000});
|
profile = MotorProfile();
|
||||||
|
profile.slope = MotorSlope::create_from_steps(20202 * 4, 900 * 4, 50);
|
||||||
|
profile.step_type = StepType::QUARTER;
|
||||||
|
profile.motor_vref = 0;
|
||||||
|
profile.resolutions = ResolutionFilter::ANY;
|
||||||
|
profile.scan_methods = { ScanMethod::FLATBED };
|
||||||
|
motor.profiles.push_back(std::move(profile));
|
||||||
|
|
||||||
|
profile = MotorProfile();
|
||||||
|
profile.slope = MotorSlope::create_from_steps(65535 * 4, 900 * 4, 100);
|
||||||
|
profile.step_type = StepType::QUARTER;
|
||||||
|
profile.motor_vref = 2;
|
||||||
|
profile.resolutions = ResolutionFilter::ANY;
|
||||||
|
profile.scan_methods = { ScanMethod::TRANSPARENCY, ScanMethod::TRANSPARENCY_INFRARED };
|
||||||
|
motor.profiles.push_back(std::move(profile));
|
||||||
|
|
||||||
|
profile = MotorProfile();
|
||||||
|
profile.slope = MotorSlope::create_from_steps(65535 * 4, 333 * 4, 200);
|
||||||
|
profile.step_type = StepType::QUARTER;
|
||||||
|
profile.motor_vref = 2;
|
||||||
|
profile.resolutions = ResolutionFilter::ANY;
|
||||||
|
profile.scan_methods = ScanMethodFilter::ANY;
|
||||||
|
motor.fast_profiles.push_back(std::move(profile));
|
||||||
|
|
||||||
s_motors->push_back(std::move(motor));
|
s_motors->push_back(std::move(motor));
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue