genesys: Store the calibration session into device struct

merge-requests/196/head
Povilas Kanapickas 2019-09-18 23:31:46 +03:00
rodzic 17fe9d8393
commit 60534b89ae
3 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -1594,6 +1594,9 @@ static void genesys_shading_calibration_impl(Genesys_Device* dev, const Genesys_
bool is_dark, const std::string& log_filename_prefix)
{
DBG_HELPER(dbg);
debug_dump(DBG_info, dev->calib_session);
size_t size;
uint32_t pixels_per_line;
uint8_t channels;

Wyświetl plik

@ -257,6 +257,10 @@ struct Genesys_Device
size_t calib_resolution = 0;
// bytes to read from USB when calibrating. If 0, this is not set
size_t calib_total_bytes_to_read = 0;
// the session that was configured for calibration
ScanSession calib_session;
// certain scanners support much higher resolution when scanning transparency, but we can't
// read whole width of the scanner as a single line at that resolution. Thus for stuff like
// calibration we want to read only the possible calibration area.

Wyświetl plik

@ -2269,6 +2269,7 @@ static void gl843_init_regs_for_shading(Genesys_Device* dev, const Genesys_Senso
// the pixel number may be updated to conform to scanner constraints
dev->calib_pixels = dev->current_setup.pixels;
dev->calib_session = session;
dev->calib_total_bytes_to_read = session.output_total_bytes_raw;
dev->scanhead_position_in_steps += dev->calib_lines + move;