diff --git a/backend/genesys.cc b/backend/genesys.cc index 4edbdc0ee..368a55e3d 100644 --- a/backend/genesys.cc +++ b/backend/genesys.cc @@ -3257,6 +3257,10 @@ genesys_flatbed_calibration(Genesys_Device * dev, Genesys_Sensor& sensor) return status; } + if (dev->settings.scan_method == ScanMethod::TRANSPARENCY) { + RIE(dev->model->cmd_set->move_to_ta(dev)); + } + /* shading calibration */ status = dev->model->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg); if (status != SANE_STATUS_GOOD) @@ -3894,6 +3898,10 @@ genesys_start_scan (Genesys_Device * dev, SANE_Bool lamp_off) RIE(dev->model->cmd_set->slow_back_home(dev, SANE_TRUE)); } + if (dev->settings.scan_method == ScanMethod::TRANSPARENCY) { + RIE(dev->model->cmd_set->move_to_ta(dev)); + } + status = dev->model->cmd_set->init_regs_for_scan(dev, sensor); if (status != SANE_STATUS_GOOD) { diff --git a/backend/genesys_gl843.cc b/backend/genesys_gl843.cc index 95c065cd9..cb2f1f14f 100644 --- a/backend/genesys_gl843.cc +++ b/backend/genesys_gl843.cc @@ -2868,9 +2868,8 @@ gl843_init_regs_for_shading(Genesys_Device * dev, const Genesys_Sensor& sensor, if (dev->settings.scan_method == ScanMethod::TRANSPARENCY) { - // FIXME: we should handle moving to TA in the caller, this function should only setup the - // registers. - gl843_move_to_ta(dev); + // note: move_to_ta() function has already been called and the sensor is at the + // transparency adapter move = 0; // already at dev->model->y_offset_calib_ta implicitly flags |= SCAN_FLAG_USE_XPA; } @@ -2955,9 +2954,8 @@ gl843_init_regs_for_scan (Genesys_Device * dev, const Genesys_Sensor& sensor) flags = 0; if (dev->settings.scan_method == ScanMethod::TRANSPARENCY) { - // FIXME: we should handle moving to TA in the caller, this function should only setup the - // registers. - gl843_move_to_ta(dev); + // note: move_to_ta() function has already been called and the sensor is at the + // transparency adapter move = SANE_UNFIX(dev->model->y_offset_ta) - SANE_UNFIX(dev->model->y_offset_calib_ta); flags |= SCAN_FLAG_USE_XPA; }