kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Set calib_session on all chipsets
rodzic
3b27241e07
commit
9b1fe59c2a
|
@ -1233,6 +1233,8 @@ void CommandSetGl124::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
throw;
|
||||
}
|
||||
sanei_genesys_set_motor_power(regs, false);
|
||||
|
||||
dev->calib_session = session;
|
||||
}
|
||||
|
||||
void CommandSetGl124::wait_for_motor_stop(Genesys_Device* dev) const
|
||||
|
|
|
@ -1705,7 +1705,8 @@ void CommandSetGl646::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
|
||||
// we don't want top offset, but we need right margin to be the same than the one for the final
|
||||
// scan
|
||||
setup_for_scan(dev, calib_sensor, &dev->reg, settings, true, false, false, false);
|
||||
dev->calib_session = setup_for_scan(dev, calib_sensor, &dev->reg, settings,
|
||||
true, false, false, false);
|
||||
|
||||
/* used when sending shading calibration data */
|
||||
dev->calib_pixels = settings.pixels;
|
||||
|
@ -1772,14 +1773,14 @@ void CommandSetGl646::init_regs_for_scan(Genesys_Device* dev, const Genesys_Sens
|
|||
* @param xcorrection take x geometry correction into account (fixed and detected offsets)
|
||||
* @param ycorrection take y geometry correction into account
|
||||
*/
|
||||
static void setup_for_scan(Genesys_Device* dev,
|
||||
const Genesys_Sensor& sensor,
|
||||
Genesys_Register_Set*regs,
|
||||
Genesys_Settings settings,
|
||||
bool split,
|
||||
bool xcorrection,
|
||||
bool ycorrection,
|
||||
bool reverse)
|
||||
static ScanSession setup_for_scan(Genesys_Device* dev,
|
||||
const Genesys_Sensor& sensor,
|
||||
Genesys_Register_Set*regs,
|
||||
Genesys_Settings settings,
|
||||
bool split,
|
||||
bool xcorrection,
|
||||
bool ycorrection,
|
||||
bool reverse)
|
||||
{
|
||||
DBG_HELPER(dbg);
|
||||
|
||||
|
@ -1842,6 +1843,8 @@ static void setup_for_scan(Genesys_Device* dev,
|
|||
compute_session(dev, session, sensor);
|
||||
|
||||
dev->cmd_set->init_regs_for_scan_session(dev, sensor, regs, session);
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,14 +68,14 @@ static void gl646_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
|
|||
* @param ycorrection true if scanner's Y geometry must be taken into account to
|
||||
* compute Y, ie add top margins
|
||||
*/
|
||||
static void setup_for_scan(Genesys_Device* device,
|
||||
const Genesys_Sensor& sensor,
|
||||
Genesys_Register_Set*regs,
|
||||
Genesys_Settings settings,
|
||||
bool split,
|
||||
bool xcorrection,
|
||||
bool ycorrection,
|
||||
bool reverse);
|
||||
static ScanSession setup_for_scan(Genesys_Device* device,
|
||||
const Genesys_Sensor& sensor,
|
||||
Genesys_Register_Set*regs,
|
||||
Genesys_Settings settings,
|
||||
bool split,
|
||||
bool xcorrection,
|
||||
bool ycorrection,
|
||||
bool reverse);
|
||||
|
||||
/**
|
||||
* Does a simple move of the given distance by doing a scan at lowest resolution
|
||||
|
|
|
@ -2485,6 +2485,8 @@ void CommandSetGl841::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
compute_session(dev, session, calib_sensor);
|
||||
|
||||
init_regs_for_scan_session(dev, calib_sensor, ®s, session);
|
||||
|
||||
dev->calib_session = session;
|
||||
}
|
||||
|
||||
// set up registers for the actual scan
|
||||
|
|
|
@ -1006,6 +1006,8 @@ void CommandSetGl846::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
|
||||
/* we use ModelFlag::SHADING_REPARK */
|
||||
dev->set_head_pos_zero(ScanHeadId::PRIMARY);
|
||||
|
||||
dev->calib_session = session;
|
||||
}
|
||||
|
||||
/** @brief set up registers for the actual scan
|
||||
|
|
|
@ -1006,6 +1006,8 @@ void CommandSetGl847::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
|
|||
|
||||
/* we use ModelFlag::SHADING_REPARK */
|
||||
dev->set_head_pos_zero(ScanHeadId::PRIMARY);
|
||||
|
||||
dev->calib_session = session;
|
||||
}
|
||||
|
||||
/** @brief set up registers for the actual scan
|
||||
|
|
Ładowanie…
Reference in New Issue