diff --git a/backend/genesys.cc b/backend/genesys.cc index f36dd3242..d8bbf5706 100644 --- a/backend/genesys.cc +++ b/backend/genesys.cc @@ -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; diff --git a/backend/genesys_device.h b/backend/genesys_device.h index 25078ce3a..00414a840 100644 --- a/backend/genesys_device.h +++ b/backend/genesys_device.h @@ -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. diff --git a/backend/genesys_gl843.cc b/backend/genesys_gl843.cc index 15b643438..fd254f819 100644 --- a/backend/genesys_gl843.cc +++ b/backend/genesys_gl843.cc @@ -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;