* doc/plustek/Plustek-USB.changes: Update.

* backend/plustek.c: Bumped build number.
* backend/plustek-usb.c backend/plustek-usbscan.c: Fixed problem,
  when trying to scan at resolutions beyond the optical one
  (sensor stops too early).
merge-requests/1/head
Gerhard Jaeger 2005-08-22 07:29:45 +00:00
rodzic e65d96c5b0
commit db5cdf8c42
4 zmienionych plików z 23 dodań i 6 usunięć

Wyświetl plik

@ -1127,6 +1127,17 @@ static int usbDev_Prepare( Plustek_Device *dev, SANE_Byte *buf )
usleep( 10 * 1000 );
/* need to preset that here, as we need it during parameter setting
*/
scan->bLinesToSkip = (u_char)(scan->sParam.PhyDpi.y / 50);
scan->dwLinesDiscard = 0;
if( scan->sParam.bChannels == 3 ) {
scan->dwLinesDiscard = (u_long)scaps->bSensorDistance *
scan->sParam.PhyDpi.y / scaps->OpticDpi.y;
scan->dwLinesDiscard <<= 1;
}
if( !usb_SetScanParameters( dev, &scan->sParam )) {
DBG( _DBG_ERROR, "Setting Scan Parameters failed!\n" );
return 0;
@ -1135,7 +1146,7 @@ static int usbDev_Prepare( Plustek_Device *dev, SANE_Byte *buf )
/* if we bypass the calibration step, we wait on lamp warmup here...
*/
if( scaps->workaroundFlag & _WAF_BYPASS_CALIBRATION ) {
if( !usb_Wait4Warmup( dev )) {
if( !usb_Wait4Warmup( dev )) {
DBG( _DBG_INFO, "usbDev_Prepare() - Cancel detected...\n" );
return 0;
}
@ -1256,7 +1267,6 @@ static int usbDev_Prepare( Plustek_Device *dev, SANE_Byte *buf )
/* set a funtion to process the RAW data... */
usb_GetImageProc( dev );
scan->bLinesToSkip = (u_char)(scan->sParam.PhyDpi.y / 50);
if( scan->sParam.bSource == SOURCE_ADF )
scan->dwFlag |= SCANFLAG_StillModule;

Wyświetl plik

@ -1250,10 +1250,12 @@ static SANE_Bool usb_SetScanParameters( Plustek_Device *dev, ScanParam *pParam )
*/
if(pParam->bCalibration == PARAM_Scan && pParam->bSource != SOURCE_ADF) {
u_short scansteps = (u_short)ceil((double)(pParam->Size.dwPhyLines + 10)*
u_long lines = pParam->Size.dwPhyLines + scan->bLinesToSkip +
scan->dwLinesDiscard + 5;
u_short scansteps = (u_short)ceil((double)lines*
hw->wMotorDpi / pParam->PhyDpi.y);
DBG( _DBG_INFO, "* Scansteps=%u (%lu*%u/%u)\n", scansteps,
pParam->Size.dwPhyLines, hw->wMotorDpi, pParam->PhyDpi.y );
DBG( _DBG_INFO, "* Scansteps=%u (%lu*%u/%u)\n", scansteps, lines,
hw->wMotorDpi, pParam->PhyDpi.y );
regs[0x4c] = _HIBYTE(scansteps);
regs[0x4d] = _LOBYTE(scansteps);
}

Wyświetl plik

@ -153,7 +153,7 @@
#include "../include/sane/sanei.h"
#include "../include/sane/saneopts.h"
#define BACKEND_VERSION "0.50-2"
#define BACKEND_VERSION "0.50-3"
#define BACKEND_NAME plustek
#include "../include/sane/sanei_access.h"

Wyświetl plik

@ -3,6 +3,11 @@ Plustek.changes - Gerhard J
Note: All other not mentioned builds have never been released.
V 0.50-3 (2005-08-22)
---------------------
Fixed problem, when trying to scan at resolutions beyond the
optical one (sensor stops too early)
V 0.50-2 (2005-08-19)
---------------------
More cleanup.