Merge branch '7-discolored-bar-on-scan-canolide-200-from-1-0-25-onwards' into 'master'

Restore slow_back_home use, disable rewind for gl847

Closes #7

See merge request sane-project/backends!34
merge-requests/37/head
Olaf Meeuwissen 2019-01-21 11:51:48 +00:00
commit 4354fc7f6d
2 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -2070,11 +2070,15 @@ genesys_white_shading_calibration (Genesys_Device * dev)
dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE); dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE);
dev->model->cmd_set->set_motor_power (dev->calib_reg, motor); dev->model->cmd_set->set_motor_power (dev->calib_reg, motor);
/* if needed, go back before doin next scan, by using rewind, registers and /* if needed, go back before doing next scan */
* slopes table are kept intact from previous scan */ if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK)
if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK && dev->model->cmd_set->rewind)
{ {
status = dev->model->cmd_set->rewind (dev); /* rewind keeps registers and slopes table intact from previous
scan but is not available on all supported chipsets (or may
cause scan artifacts, see #7) */
status = (dev->model->cmd_set->rewind
? dev->model->cmd_set->rewind (dev)
: dev->model->cmd_set->slow_back_home (dev, SANE_TRUE));
} }
status = status =

Wyświetl plik

@ -1934,6 +1934,7 @@ gl847_end_scan (Genesys_Device * dev, Genesys_Register_Set * reg,
* @param dev device to rewind * @param dev device to rewind
* @returns SANE_STATUS_GOOD on success * @returns SANE_STATUS_GOOD on success
*/ */
#if 0 /* disabled to fix #7 */
GENESYS_STATIC GENESYS_STATIC
SANE_Status gl847_rewind(Genesys_Device * dev) SANE_Status gl847_rewind(Genesys_Device * dev)
{ {
@ -1965,6 +1966,7 @@ SANE_Status gl847_rewind(Genesys_Device * dev)
DBGCOMPLETED; DBGCOMPLETED;
return SANE_STATUS_GOOD; return SANE_STATUS_GOOD;
} }
#endif
/** Park head /** Park head
* Moves the slider to the home (top) position slowly * Moves the slider to the home (top) position slowly
@ -3793,7 +3795,7 @@ static Genesys_Command_Set gl847_cmd_set = {
gl847_led_calibration, gl847_led_calibration,
gl847_slow_back_home, gl847_slow_back_home,
gl847_rewind, NULL, /* disable gl847_rewind, see #7 */
sanei_genesys_bulk_write_register, sanei_genesys_bulk_write_register,
NULL, NULL,