kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Make scan method explicit when selecting sensor
rodzic
c96a34f4a8
commit
3137639aca
|
@ -2082,7 +2082,7 @@ gl124_feed (Genesys_Device * dev, unsigned int steps, int reverse)
|
||||||
local_reg = dev->reg;
|
local_reg = dev->reg;
|
||||||
|
|
||||||
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = resolution;
|
params.xres = resolution;
|
||||||
|
@ -2181,7 +2181,7 @@ gl124_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = dpi;
|
params.xres = dpi;
|
||||||
|
|
|
@ -2481,7 +2481,7 @@ gl646_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
|
||||||
settings.threshold = 0;
|
settings.threshold = 0;
|
||||||
settings.dynamic_lineart = SANE_FALSE;
|
settings.dynamic_lineart = SANE_FALSE;
|
||||||
|
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, settings.xres);
|
const auto& sensor = sanei_genesys_find_sensor(dev, settings.xres, ScanMethod::FLATBED);
|
||||||
|
|
||||||
status = setup_for_scan(dev, sensor, &dev->reg, settings, SANE_TRUE, SANE_TRUE, SANE_TRUE);
|
status = setup_for_scan(dev, sensor, &dev->reg, settings, SANE_TRUE, SANE_TRUE, SANE_TRUE);
|
||||||
if (status != SANE_STATUS_GOOD)
|
if (status != SANE_STATUS_GOOD)
|
||||||
|
@ -2586,7 +2586,7 @@ gl646_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, resolution);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
/* fill settings for a gray level scan */
|
/* fill settings for a gray level scan */
|
||||||
settings.scan_method = ScanMethod::FLATBED;
|
settings.scan_method = ScanMethod::FLATBED;
|
||||||
|
@ -3860,7 +3860,7 @@ gl646_repark_head (Genesys_Device * dev)
|
||||||
settings.threshold = 0;
|
settings.threshold = 0;
|
||||||
settings.dynamic_lineart = SANE_FALSE;
|
settings.dynamic_lineart = SANE_FALSE;
|
||||||
|
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, settings.xres);
|
const auto& sensor = sanei_genesys_find_sensor(dev, settings.xres, ScanMethod::FLATBED);
|
||||||
|
|
||||||
status = setup_for_scan(dev, sensor, &dev->reg, settings, SANE_FALSE, SANE_FALSE, SANE_FALSE);
|
status = setup_for_scan(dev, sensor, &dev->reg, settings, SANE_FALSE, SANE_FALSE, SANE_FALSE);
|
||||||
if (status != SANE_STATUS_GOOD)
|
if (status != SANE_STATUS_GOOD)
|
||||||
|
@ -4367,7 +4367,7 @@ simple_move (Genesys_Device * dev, SANE_Int distance)
|
||||||
|
|
||||||
int resolution = get_lowest_resolution(dev->model->ccd_type, 3);
|
int resolution = get_lowest_resolution(dev->model->ccd_type, 3);
|
||||||
|
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
/* TODO give a no AGOHOME flag */
|
/* TODO give a no AGOHOME flag */
|
||||||
settings.scan_method = ScanMethod::TRANSPARENCY;
|
settings.scan_method = ScanMethod::TRANSPARENCY;
|
||||||
|
|
|
@ -3557,7 +3557,7 @@ gl841_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = dpi;
|
params.xres = dpi;
|
||||||
|
|
|
@ -2492,7 +2492,7 @@ gl843_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
|
||||||
local_reg = dev->reg;
|
local_reg = dev->reg;
|
||||||
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
||||||
|
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
ScanSession session;
|
ScanSession session;
|
||||||
session.params.xres = resolution;
|
session.params.xres = resolution;
|
||||||
|
@ -2614,7 +2614,7 @@ gl843_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
|
||||||
|
|
||||||
ScanSession session;
|
ScanSession session;
|
||||||
session.params.xres = dpi;
|
session.params.xres = dpi;
|
||||||
|
@ -2786,7 +2786,7 @@ gl843_feed (Genesys_Device * dev, unsigned int steps)
|
||||||
|
|
||||||
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
||||||
|
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
ScanSession session;
|
ScanSession session;
|
||||||
session.params.xres = resolution;
|
session.params.xres = resolution;
|
||||||
|
|
|
@ -1807,7 +1807,7 @@ gl846_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = dpi;
|
params.xres = dpi;
|
||||||
|
@ -1974,7 +1974,7 @@ gl846_feed (Genesys_Device * dev, unsigned int steps)
|
||||||
local_reg = dev->reg;
|
local_reg = dev->reg;
|
||||||
|
|
||||||
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = resolution;
|
params.xres = resolution;
|
||||||
|
|
|
@ -1873,7 +1873,7 @@ gl847_search_start_position (Genesys_Device * dev)
|
||||||
|
|
||||||
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
// FIXME: the current approach of doing search only for one resolution does not work on scanners
|
||||||
// whith employ different sensors with potentially different settings.
|
// whith employ different sensors with potentially different settings.
|
||||||
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi);
|
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = dpi;
|
params.xres = dpi;
|
||||||
|
@ -2040,7 +2040,7 @@ gl847_feed (Genesys_Device * dev, unsigned int steps)
|
||||||
local_reg = dev->reg;
|
local_reg = dev->reg;
|
||||||
|
|
||||||
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
resolution=sanei_genesys_get_lowest_ydpi(dev);
|
||||||
const auto& sensor = sanei_genesys_find_sensor(dev, resolution);
|
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
|
||||||
|
|
||||||
SetupParams params;
|
SetupParams params;
|
||||||
params.xres = resolution;
|
params.xres = resolution;
|
||||||
|
|
|
@ -1750,9 +1750,9 @@ extern void sanei_genesys_init_structs (Genesys_Device * dev);
|
||||||
const Genesys_Sensor& sanei_genesys_find_sensor_any(Genesys_Device* dev);
|
const Genesys_Sensor& sanei_genesys_find_sensor_any(Genesys_Device* dev);
|
||||||
Genesys_Sensor& sanei_genesys_find_sensor_any_for_write(Genesys_Device* dev);
|
Genesys_Sensor& sanei_genesys_find_sensor_any_for_write(Genesys_Device* dev);
|
||||||
const Genesys_Sensor& sanei_genesys_find_sensor(Genesys_Device* dev, int dpi,
|
const Genesys_Sensor& sanei_genesys_find_sensor(Genesys_Device* dev, int dpi,
|
||||||
ScanMethod scan_method = ScanMethod::FLATBED);
|
ScanMethod scan_method);
|
||||||
Genesys_Sensor& sanei_genesys_find_sensor_for_write(Genesys_Device* dev, int dpi,
|
Genesys_Sensor& sanei_genesys_find_sensor_for_write(Genesys_Device* dev, int dpi,
|
||||||
ScanMethod scan_method = ScanMethod::FLATBED);
|
ScanMethod scan_method);
|
||||||
|
|
||||||
extern SANE_Status
|
extern SANE_Status
|
||||||
sanei_genesys_init_shading_data (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
sanei_genesys_init_shading_data (Genesys_Device * dev, const Genesys_Sensor& sensor,
|
||||||
|
|
Ładowanie…
Reference in New Issue