kopia lustrzana https://gitlab.com/sane-project/backends
Added speedup parameters and TPA autodetection for UMAX3400/3450,
added disableSpeedup option.merge-requests/1/head
rodzic
ab64285ff9
commit
2a1b6bd853
|
@ -1811,7 +1811,7 @@ static HWDef Hw0x1606_0x0060 =
|
||||||
{
|
{
|
||||||
1.5, /* dMaxMotorSpeed (Max_Speed) */
|
1.5, /* dMaxMotorSpeed (Max_Speed) */
|
||||||
0.8, /* dMaxMoveSpeed (Max_Speed) */
|
0.8, /* dMaxMoveSpeed (Max_Speed) */
|
||||||
0.0, /* dHighSpeed */
|
3.5, /* dHighSpeed */
|
||||||
9, /* dIntegrationTimeLowLamp */
|
9, /* dIntegrationTimeLowLamp */
|
||||||
9, /* dIntegrationTimeHighLamp */
|
9, /* dIntegrationTimeHighLamp */
|
||||||
600, /* wMotorDpi (Full step DPI) */
|
600, /* wMotorDpi (Full step DPI) */
|
||||||
|
@ -1863,7 +1863,7 @@ static HWDef Hw0x1606_0x0060 =
|
||||||
0x0d, /* Paper sense (reg 0x58) */
|
0x0d, /* Paper sense (reg 0x58) */
|
||||||
|
|
||||||
0x44, /* misc io12 (reg 0x59) */
|
0x44, /* misc io12 (reg 0x59) */
|
||||||
0x45, /* misc io34 (reg 0x5a) */
|
0x4a, /* misc io34 (reg 0x5a) */
|
||||||
0x7c, /* misc io56 (reg 0x5b) */
|
0x7c, /* misc io56 (reg 0x5b) */
|
||||||
0, /* test mode ADC Output CODE MSB (reg 0x5c) */
|
0, /* test mode ADC Output CODE MSB (reg 0x5c) */
|
||||||
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
|
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
* - changed usb_Wait4Warmup()
|
* - changed usb_Wait4Warmup()
|
||||||
* - added usb_WaitPos()
|
* - added usb_WaitPos()
|
||||||
* - added usb_FillLampRegs() - sets also PWMDutyCylce now
|
* - added usb_FillLampRegs() - sets also PWMDutyCylce now
|
||||||
|
* - added UMAX3450 TPA autodetection
|
||||||
* .
|
* .
|
||||||
* <hr>
|
* <hr>
|
||||||
* This file is part of the SANE package.
|
* This file is part of the SANE package.
|
||||||
|
@ -263,11 +264,12 @@ static SANE_Bool usb_WaitPos( Plustek_Device *dev, u_long to, SANE_Bool stay )
|
||||||
DBG( _DBG_INFO2, ">>>> CURRENT MCLK_DIV= %u\n", mclk_div );
|
DBG( _DBG_INFO2, ">>>> CURRENT MCLK_DIV= %u\n", mclk_div );
|
||||||
DBG( _DBG_INFO2, ">>>> MCH = %u\n", mch );
|
DBG( _DBG_INFO2, ">>>> MCH = %u\n", mch );
|
||||||
DBG( _DBG_INFO2, ">>>> FFS = %u\n", ffs );
|
DBG( _DBG_INFO2, ">>>> FFS = %u\n", ffs );
|
||||||
DBG( _DBG_INFO2, ">>>> FASTSPEED = %.3f (%.3f)\n", speed,
|
DBG( _DBG_INFO2, ">>>> HIGH-SPEED = %.3f (%.3f)\n",
|
||||||
hw->dMaxMotorSpeed);
|
speed, hw->dHighSpeed);
|
||||||
|
|
||||||
/* disabled ? */
|
/* disabled ? */
|
||||||
if( hw->dHighSpeed == 0.0 ) {
|
if((hw->dHighSpeed == 0.0) || (dev->adj.disableSpeedup != 0)) {
|
||||||
|
DBG( _DBG_INFO2, " * Speedup disabled or not available!\n" );
|
||||||
min_ffs = 0xffff;
|
min_ffs = 0xffff;
|
||||||
maxf = 0.0;
|
maxf = 0.0;
|
||||||
if( !stay )
|
if( !stay )
|
||||||
|
@ -1519,6 +1521,23 @@ static SANE_Bool usb_HasTPA( Plustek_Device *dev )
|
||||||
|
|
||||||
if((dev->usbDev.product == 0x0050) || (dev->usbDev.product == 0x0060)) {
|
if((dev->usbDev.product == 0x0050) || (dev->usbDev.product == 0x0060)) {
|
||||||
|
|
||||||
|
usbio_ReadReg ( dev->fd, 0x02, &val );
|
||||||
|
DBG( _DBG_INFO, "REG[0x02] = 0x%02x\n", val );
|
||||||
|
|
||||||
|
usbio_WriteReg ( dev->fd, 0x58, dev->usbDev.HwSetting.bReg_0x58 );
|
||||||
|
usbio_WriteReg ( dev->fd, 0x5a, dev->usbDev.HwSetting.bReg_0x5a );
|
||||||
|
usbio_WriteReg ( dev->fd, 0x5b, dev->usbDev.HwSetting.bReg_0x5b );
|
||||||
|
|
||||||
|
usbio_ReadReg ( dev->fd, 0x02, &val );
|
||||||
|
DBG( _DBG_INFO, "REG[0x02] = 0x%02x\n", val );
|
||||||
|
|
||||||
|
if( val & 0x02 ) {
|
||||||
|
DBG( _DBG_INFO, "UMAX-TPA detected\n" );
|
||||||
|
dev->usbDev.ModelStr = model;
|
||||||
|
return SANE_TRUE;
|
||||||
|
} else
|
||||||
|
DBG( _DBG_INFO, "UMAX-TPA NOT detected\n" );
|
||||||
|
|
||||||
if( dev->adj.enableTpa ) {
|
if( dev->adj.enableTpa ) {
|
||||||
DBG( _DBG_INFO, "UMAX-TPA usage forced\n" );
|
DBG( _DBG_INFO, "UMAX-TPA usage forced\n" );
|
||||||
dev->usbDev.ModelStr = model;
|
dev->usbDev.ModelStr = model;
|
||||||
|
|
|
@ -2295,7 +2295,7 @@ static SANE_Bool usb_AutoWarmup( Plustek_Device *dev )
|
||||||
* when the diffs are less than thresh for at least 3 loops
|
* when the diffs are less than thresh for at least 3 loops
|
||||||
*/
|
*/
|
||||||
if((diffR < thresh) && (diffG < thresh) && (diffB < thresh)) {
|
if((diffR < thresh) && (diffG < thresh) && (diffB < thresh)) {
|
||||||
if( stable_count >= 3 )
|
if( stable_count > 3 )
|
||||||
break;
|
break;
|
||||||
stable_count++;
|
stable_count++;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -145,7 +145,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.48-3"
|
#define BACKEND_VERSION "0.48-4"
|
||||||
#define BACKEND_NAME plustek
|
#define BACKEND_NAME plustek
|
||||||
#include "../include/sane/sanei_backend.h"
|
#include "../include/sane/sanei_backend.h"
|
||||||
#include "../include/sane/sanei_config.h"
|
#include "../include/sane/sanei_config.h"
|
||||||
|
@ -265,6 +265,7 @@ static void show_cnf( pCnfDef cnf )
|
||||||
DBG( _DBG_SANE_INIT,"skipFine : %s\n", _YN(cnf->adj.skipFine ));
|
DBG( _DBG_SANE_INIT,"skipFine : %s\n", _YN(cnf->adj.skipFine ));
|
||||||
DBG( _DBG_SANE_INIT,"skipFineWhite: %s\n", _YN(cnf->adj.skipFineWhite ));
|
DBG( _DBG_SANE_INIT,"skipFineWhite: %s\n", _YN(cnf->adj.skipFineWhite ));
|
||||||
DBG( _DBG_SANE_INIT,"invertNegs. : %s\n", _YN(cnf->adj.invertNegatives));
|
DBG( _DBG_SANE_INIT,"invertNegs. : %s\n", _YN(cnf->adj.invertNegatives));
|
||||||
|
DBG( _DBG_SANE_INIT,"dis.Speedup : %s\n", _YN(cnf->adj.disableSpeedup ));
|
||||||
DBG( _DBG_SANE_INIT,"pos_x : %d\n", cnf->adj.pos.x );
|
DBG( _DBG_SANE_INIT,"pos_x : %d\n", cnf->adj.pos.x );
|
||||||
DBG( _DBG_SANE_INIT,"pos_y : %d\n", cnf->adj.pos.y );
|
DBG( _DBG_SANE_INIT,"pos_y : %d\n", cnf->adj.pos.y );
|
||||||
DBG( _DBG_SANE_INIT,"pos_shading_y: %d\n", cnf->adj.posShadingY );
|
DBG( _DBG_SANE_INIT,"pos_shading_y: %d\n", cnf->adj.posShadingY );
|
||||||
|
@ -1357,6 +1358,8 @@ sane_init( SANE_Int *version_code, SANE_Auth_Callback authorize )
|
||||||
_INT, &config.adj.skipFineWhite,&ival);
|
_INT, &config.adj.skipFineWhite,&ival);
|
||||||
decodeVal( str, "invertNegatives",
|
decodeVal( str, "invertNegatives",
|
||||||
_INT, &config.adj.invertNegatives,&ival);
|
_INT, &config.adj.invertNegatives,&ival);
|
||||||
|
decodeVal( str, "disableSpeedup",
|
||||||
|
_INT, &config.adj.disableSpeedup,&ival);
|
||||||
|
|
||||||
decodeVal( str, "posOffX", _INT, &config.adj.pos.x, &ival );
|
decodeVal( str, "posOffX", _INT, &config.adj.pos.x, &ival );
|
||||||
decodeVal( str, "posOffY", _INT, &config.adj.pos.y, &ival );
|
decodeVal( str, "posOffY", _INT, &config.adj.pos.y, &ival );
|
||||||
|
|
|
@ -83,6 +83,12 @@ option negShadingY -1
|
||||||
#
|
#
|
||||||
option invertNegatives 0
|
option invertNegatives 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# to disable the internal sensor speedup function,
|
||||||
|
# 1 disables the feature
|
||||||
|
#
|
||||||
|
option disableSpeedup 0
|
||||||
|
|
||||||
#
|
#
|
||||||
# to save/restore coarse calibration data
|
# to save/restore coarse calibration data
|
||||||
# (can also be set via frontend)
|
# (can also be set via frontend)
|
||||||
|
|
|
@ -245,6 +245,7 @@ typedef struct {
|
||||||
int skipCalibration;
|
int skipCalibration;
|
||||||
int skipFine;
|
int skipFine;
|
||||||
int skipFineWhite;
|
int skipFineWhite;
|
||||||
|
int disableSpeedup;
|
||||||
int invertNegatives;
|
int invertNegatives;
|
||||||
int cacheCalData;
|
int cacheCalData;
|
||||||
int altCalibrate; /* force use of the alternate canoscan autocal;
|
int altCalibrate; /* force use of the alternate canoscan autocal;
|
||||||
|
|
Ładowanie…
Reference in New Issue