kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Use fast motor tables on all gl843 models
rodzic
2a3d5150cb
commit
b70b305d27
|
@ -738,21 +738,6 @@ 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_4400F:
|
||||
case ModelId::CANON_8600F:
|
||||
case ModelId::CANON_8400F:
|
||||
case ModelId::PLUSTEK_OPTICFILM_7200I:
|
||||
case ModelId::PLUSTEK_OPTICFILM_7300:
|
||||
case ModelId::PLUSTEK_OPTICFILM_7500I:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
||||
const Genesys_Sensor& sensor,
|
||||
const ScanSession& session,
|
||||
|
@ -828,15 +813,11 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
|||
|
||||
gl843_send_slope_table(dev, SCAN_TABLE, scan_table.table, scan_table.steps_count);
|
||||
gl843_send_slope_table(dev, BACKTRACK_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_STEPNO, scan_table.steps_count / step_multiplier);
|
||||
reg->set8(REG_FASTNO, scan_table.steps_count / step_multiplier);
|
||||
|
||||
if (should_use_new_fast_table(*dev)) {
|
||||
// FIXME: move all models to the 8600F behavior
|
||||
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);
|
||||
|
||||
// fast table
|
||||
const auto* fast_profile = get_motor_profile_ptr(dev->motor.fast_profiles, 0, session);
|
||||
|
@ -844,23 +825,9 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
|||
fast_profile = &motor_profile;
|
||||
}
|
||||
|
||||
MotorSlopeTable fast_table;
|
||||
auto fast_table = create_slope_table_fastest(dev->model->asic_type, step_multiplier,
|
||||
*fast_profile);
|
||||
|
||||
if (should_use_new_fast_table(*dev)) {
|
||||
fast_table = create_slope_table_fastest(dev->model->asic_type, step_multiplier,
|
||||
*fast_profile);
|
||||
} else {
|
||||
unsigned fast_yres = sanei_genesys_get_lowest_ydpi(dev);
|
||||
fast_table = sanei_genesys_slope_table(dev->model->asic_type, fast_yres, exposure,
|
||||
dev->motor.base_ydpi, step_multiplier,
|
||||
*fast_profile);
|
||||
}
|
||||
|
||||
if (!should_use_new_fast_table(*dev)) {
|
||||
// FIXME: move all models to the 8600F behavior
|
||||
gl843_send_slope_table(dev, STOP_TABLE, fast_table.table, fast_table.steps_count);
|
||||
reg->set8(REG_FSHDEC, fast_table.steps_count / step_multiplier);
|
||||
}
|
||||
gl843_send_slope_table(dev, FAST_TABLE, fast_table.table, fast_table.steps_count);
|
||||
gl843_send_slope_table(dev, HOME_TABLE, fast_table.table, fast_table.steps_count);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue