kopia lustrzana https://gitlab.com/sane-project/backends
* 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
rodzic
e65d96c5b0
commit
db5cdf8c42
|
@ -1127,6 +1127,17 @@ static int usbDev_Prepare( Plustek_Device *dev, SANE_Byte *buf )
|
||||||
|
|
||||||
usleep( 10 * 1000 );
|
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 )) {
|
if( !usb_SetScanParameters( dev, &scan->sParam )) {
|
||||||
DBG( _DBG_ERROR, "Setting Scan Parameters failed!\n" );
|
DBG( _DBG_ERROR, "Setting Scan Parameters failed!\n" );
|
||||||
return 0;
|
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 we bypass the calibration step, we wait on lamp warmup here...
|
||||||
*/
|
*/
|
||||||
if( scaps->workaroundFlag & _WAF_BYPASS_CALIBRATION ) {
|
if( scaps->workaroundFlag & _WAF_BYPASS_CALIBRATION ) {
|
||||||
if( !usb_Wait4Warmup( dev )) {
|
if( !usb_Wait4Warmup( dev )) {
|
||||||
DBG( _DBG_INFO, "usbDev_Prepare() - Cancel detected...\n" );
|
DBG( _DBG_INFO, "usbDev_Prepare() - Cancel detected...\n" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1256,7 +1267,6 @@ static int usbDev_Prepare( Plustek_Device *dev, SANE_Byte *buf )
|
||||||
/* set a funtion to process the RAW data... */
|
/* set a funtion to process the RAW data... */
|
||||||
usb_GetImageProc( dev );
|
usb_GetImageProc( dev );
|
||||||
|
|
||||||
scan->bLinesToSkip = (u_char)(scan->sParam.PhyDpi.y / 50);
|
|
||||||
if( scan->sParam.bSource == SOURCE_ADF )
|
if( scan->sParam.bSource == SOURCE_ADF )
|
||||||
scan->dwFlag |= SCANFLAG_StillModule;
|
scan->dwFlag |= SCANFLAG_StillModule;
|
||||||
|
|
||||||
|
|
|
@ -1250,10 +1250,12 @@ static SANE_Bool usb_SetScanParameters( Plustek_Device *dev, ScanParam *pParam )
|
||||||
*/
|
*/
|
||||||
if(pParam->bCalibration == PARAM_Scan && pParam->bSource != SOURCE_ADF) {
|
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);
|
hw->wMotorDpi / pParam->PhyDpi.y);
|
||||||
DBG( _DBG_INFO, "* Scansteps=%u (%lu*%u/%u)\n", scansteps,
|
DBG( _DBG_INFO, "* Scansteps=%u (%lu*%u/%u)\n", scansteps, lines,
|
||||||
pParam->Size.dwPhyLines, hw->wMotorDpi, pParam->PhyDpi.y );
|
hw->wMotorDpi, pParam->PhyDpi.y );
|
||||||
regs[0x4c] = _HIBYTE(scansteps);
|
regs[0x4c] = _HIBYTE(scansteps);
|
||||||
regs[0x4d] = _LOBYTE(scansteps);
|
regs[0x4d] = _LOBYTE(scansteps);
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
#include "../include/sane/sanei.h"
|
#include "../include/sane/sanei.h"
|
||||||
#include "../include/sane/saneopts.h"
|
#include "../include/sane/saneopts.h"
|
||||||
|
|
||||||
#define BACKEND_VERSION "0.50-2"
|
#define BACKEND_VERSION "0.50-3"
|
||||||
|
|
||||||
#define BACKEND_NAME plustek
|
#define BACKEND_NAME plustek
|
||||||
#include "../include/sane/sanei_access.h"
|
#include "../include/sane/sanei_access.h"
|
||||||
|
|
|
@ -3,6 +3,11 @@ Plustek.changes - Gerhard J
|
||||||
|
|
||||||
Note: All other not mentioned builds have never been released.
|
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)
|
V 0.50-2 (2005-08-19)
|
||||||
---------------------
|
---------------------
|
||||||
More cleanup.
|
More cleanup.
|
||||||
|
|
Ładowanie…
Reference in New Issue