[Hp5400backend-cvs-update] hp5400/hp5400 Makefile,1.7,1.8 hp5400.c,1.24,1.25 hp5400.h,1.10,1.11 hp54
Status: Alpha
Brought to you by:
soumarmt
|
From: <sou...@us...> - 2004-01-06 17:09:26
|
Update of /cvsroot/hp5400backend/hp5400/hp5400
In directory sc8-pr-cvs1:/tmp/cvs-serv13761
Modified Files:
Makefile hp5400.c hp5400.h hp5400_internal.c hp5400_internal.h
hp5400_sane.c
Log Message:
*Applied patch from Martin to get XPA work. ( This is still beta code and should be more tested )\n*Beautified a litle manually
Index: Makefile
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Makefile 4 Jun 2003 19:25:01 -0000 1.7
--- Makefile 6 Jan 2004 17:09:22 -0000 1.8
***************
*** 8,12 ****
#
#SANE_BACKEND_SRC=/usr/local/src/sane/sane-backends-1.0.12
! SANE_BACKEND_SRC=/usr/local/src/sane/sane-cvs/sane-backends
#SANE_BACKEND_SRC=/home/kleptog/debian/sane-backends-1.0.10
--- 8,13 ----
#
#SANE_BACKEND_SRC=/usr/local/src/sane/sane-backends-1.0.12
! SANE_BACKEND_SRC=/usr/local/src/sane/sane-backends-1.0.13
! #SANE_BACKEND_SRC=/usr/local/src/sane/sane-cvs/sane-backends
#SANE_BACKEND_SRC=/home/kleptog/debian/sane-backends-1.0.10
***************
*** 23,28 ****
#version of the backend
V_MAJOR =1
! V_MINOR =0
! BUILD =3
--- 24,29 ----
#version of the backend
V_MAJOR =1
! V_MINOR =1
! BUILD =0
***************
*** 38,42 ****
-DV_MAJOR=$(V_MAJOR) -DV_MINOR=$(V_MINOR) -DBUILD=$(BUILD) \
-DDEBUG_NOT_STATIC -DDEBUG_DECLARE_ONLY \
! -I$(SANE_BACKEND_SRC)/include
--- 39,44 ----
-DV_MAJOR=$(V_MAJOR) -DV_MINOR=$(V_MINOR) -DBUILD=$(BUILD) \
-DDEBUG_NOT_STATIC -DDEBUG_DECLARE_ONLY \
! -I$(SANE_BACKEND_SRC)/include \
! $(STANDALONE_FLAGS)
***************
*** 90,94 ****
$(EXEC): $(EXEC_OBJECTS)
$(RM) *.o
! $(CC) $(LDFLAGS) $(CFLAGS) $(STANDALONE_FLAGS) -o $(EXEC) $(EXEC_OBJECTS)
# SANE library (We remove the .o to be sure they are compiled with the right flags)
--- 92,96 ----
$(EXEC): $(EXEC_OBJECTS)
$(RM) *.o
! $(CC) $(LDFLAGS) $(CFLAGS) -o $(EXEC) $(EXEC_OBJECTS)
# SANE library (We remove the .o to be sure they are compiled with the right flags)
Index: hp5400.c
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** hp5400.c 4 Jun 2003 19:25:01 -0000 1.24
--- hp5400.c 6 Jan 2004 17:09:22 -0000 1.25
***************
*** 70,74 ****
#define HP5400_CONFIG_FILE "hp5400.conf"
! #define BUILD 2
/* (source) includes for data transfer methods */
--- 70,74 ----
#define HP5400_CONFIG_FILE "hp5400.conf"
! #define BUILD 3
/* (source) includes for data transfer methods */
Index: hp5400.h
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** hp5400.h 26 May 2003 13:46:15 -0000 1.10
--- hp5400.h 6 Jan 2004 17:09:22 -0000 1.11
***************
*** 70,73 ****
--- 70,81 ----
};
+ enum ScanSource
+ {
+ SRC_FLATBED,
+ SRC_XPA,
+ SRC_NOLAMP
+ };
+
+
/* In case we ever need to track multiple models */
typedef struct
***************
*** 78,81 ****
--- 86,90 ----
TScannerModel;
+
typedef struct
{
***************
*** 136,139 ****
--- 145,154 ----
* internally. Leave it for the time being as it
* may be needed later. */
+ int iLamp; /* experimental setting, do not use.
+ * Should the lamp be turned off (iLamp=1)
+ * or not (iLamp=0) */
+ int iSource; /* scan_source
+ * Normal or
+ * Transparenty adapter (=XPA) */
}
TScanParams;
Index: hp5400_internal.c
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400_internal.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** hp5400_internal.c 4 Jun 2003 19:25:02 -0000 1.2
--- hp5400_internal.c 6 Jan 2004 17:09:22 -0000 1.3
***************
*** 99,108 ****
WriteByte (int iHandle, int cmd, char data)
{
! if (hp5400_command_write (iHandle, cmd, 1, &data) < 0)
! {
! HP5400_DBG (DBG_MSG, "failed to send byte (cmd=%04X)\n", cmd);
! return -1;
! }
! return 0;
}
[...2495 lines suppressed...]
! fseek (temp, 0, SEEK_SET);
! DecodeImage (temp, planes, bpp, planes * bpp * width, height,
! argv[5]);
! fclose (temp);
! }
! return 1;
}
! if (HP5400Open (&scanner, NULL,SRC_FLATBED) < 0)
! {
! return 1;
! }
! PreviewScan (scanner.iXferHandle);
! HP5400Close (&scanner);
! fprintf (stderr, "Note: output is in output.ppm\n");
! return 0;
}
Index: hp5400_internal.h
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400_internal.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** hp5400_internal.h 26 May 2003 13:46:15 -0000 1.1
--- hp5400_internal.h 6 Jan 2004 17:09:22 -0000 1.2
***************
*** 78,86 ****
#define CMD_STOPSCAN 0x1B01 /* 0x40 = lamp in on, 0x00 = lamp is off */
#define CMD_STARTSCAN 0x1B05 /* 0x40 = lamp in on, 0x00 = lamp is off */
#define CMD_UNKNOWN 0x2300 /* Send fixed string */
- #define CMD_UNKNOWN2 0xD600 /* ??? Set to 0x04 */
#define CMD_UNKNOWN3 0xC000 /* ??? Set to 02 03 03 3C */
#define CMD_SETOFFSET 0xE700 /* two ints in network order. X-offset, Y-offset of full scan */
/* Given values seem to be 0x0054 (=4.57mm) and 0x0282 (=54.36mm) */
#define CMD_INITBULK1 0x0087 /* send 0x14 */
--- 78,88 ----
#define CMD_STOPSCAN 0x1B01 /* 0x40 = lamp in on, 0x00 = lamp is off */
#define CMD_STARTSCAN 0x1B05 /* 0x40 = lamp in on, 0x00 = lamp is off */
+ #define CMD_SWITCHLAMP 0xD600 /* 0x04 for normal scan 0x02 for XPA */
#define CMD_UNKNOWN 0x2300 /* Send fixed string */
#define CMD_UNKNOWN3 0xC000 /* ??? Set to 02 03 03 3C */
#define CMD_SETOFFSET 0xE700 /* two ints in network order. X-offset, Y-offset of full scan */
/* Given values seem to be 0x0054 (=4.57mm) and 0x0282 (=54.36mm) */
+ #define CMD_SETOFFSET2 0xE701 /* same as 0xe700 but used for xpa */
+ /* Given values seem to be 0x0474==1140(=9,652 cm) and 0x05de=1502(=12,7169333 cm)*/
#define CMD_INITBULK1 0x0087 /* send 0x14 */
***************
*** 88,95 ****
#define CMD_INITBULK3 0x0082 /* transfer length 0xf000 */
-
struct ScanRequest
{
! u_int8_t x1; /* Set to 0x08 */
u_int16_t dpix, dpiy; /* Set to 75, 150 or 300 in network order */
u_int16_t offx, offy; /* Offset to scan, in 1/300th of dpi, in network order */
--- 90,96 ----
#define CMD_INITBULK3 0x0082 /* transfer length 0xf000 */
struct ScanRequest
{
! u_int8_t x1; /* Set to 0x08 for normal scan 0x01 for XPA scan*/
u_int16_t dpix, dpiy; /* Set to 75, 150 or 300 in network order */
u_int16_t offx, offy; /* Offset to scan, in 1/300th of dpi, in network order */
***************
*** 105,108 ****
--- 106,110 ----
6th & 7th like 2nd and 3rd
True colour scan 0x0080, 0x0040, 0x18E8 = 24bpp
+
*/
u_int8_t zero; /* Seems to always be zero */
***************
*** 142,146 ****
InitScan2 (enum ScanType type, struct ScanRequest *req,
THWParams * pHWParams, struct ScanResponse *res,
! int iColourOffset, int code);
void
--- 144,148 ----
InitScan2 (enum ScanType type, struct ScanRequest *req,
THWParams * pHWParams, struct ScanResponse *res,
! int iColourOffset, int iSource, int code);
void
***************
*** 154,163 ****
int
! WarmupLamp (int iHandle);
int
SetCalibration (int iHandle, int numPixels,
unsigned int *low_vals[3],
! unsigned int *high_vals[3], int dpi);
void
--- 156,166 ----
int
! WarmupLamp (int iHandle, int iSource);
int
SetCalibration (int iHandle, int numPixels,
unsigned int *low_vals[3],
! unsigned int *high_vals[3], int dpi,
! int iSource);
void
***************
*** 189,200 ****
int
DoAverageScan (int iHandle, struct ScanRequest *req, int code,
! unsigned int **array);
int
DoScan (int iHandle, struct ScanRequest *req, const char *filename, int code,
! struct ScanResponse *res);
int
! Calibrate (int iHandle, int dpi);
int
--- 192,203 ----
int
DoAverageScan (int iHandle, struct ScanRequest *req, int code,
! unsigned int **array, int iSource);
int
DoScan (int iHandle, struct ScanRequest *req, const char *filename, int code,
! struct ScanResponse *res, int iSource);
int
! Calibrate (int iHandle, int dpi, int iSource);
int
***************
*** 216,220 ****
int
! HP5400Open (THWParams * params, char *filename);
void
--- 219,223 ----
int
! HP5400Open (THWParams * params, char *filename, int iSource);
void
***************
*** 226,229 ****
--- 229,233 ----
char *pszDeviceName));
+ void SwitchSource(int iHandle,int iSource);
Index: hp5400_sane.c
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400_sane.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** hp5400_sane.c 4 Jun 2003 19:25:02 -0000 1.1
--- hp5400_sane.c 6 Jan 2004 17:09:22 -0000 1.2
***************
*** 69,74 ****
#define HP5400_CONFIG_FILE "hp5400.conf"
- #include "hp5400.h"
-
/* includes for data transfer methods */
#include "hp5400.h"
--- 69,72 ----
***************
*** 115,118 ****
--- 113,119 ----
optCount = 0,
+ optGroupSource,
+ optSource,
+
optGroupGeometry,
optTLX, optTLY, optBRX, optBRY,
***************
*** 125,128 ****
--- 126,132 ----
optGammaTableBlue,
+ #if 0
+ optLamp,
+ #endif
optLast, /* Disable the offset code */
***************
*** 132,138 ****
/* put temporarily disabled options here after optLast */
! /*
! optLamp,
! */
}
--- 136,140 ----
/* put temporarily disabled options here after optLast */
!
}
***************
*** 143,147 ****
SANE_Word w;
SANE_Word *wa; /* word array */
! SANE_String s;
}
TOptionValue;
--- 145,150 ----
SANE_Word w;
SANE_Word *wa; /* word array */
! /*SANE_String s;*/
! char* s;
}
TOptionValue;
***************
*** 177,181 ****
TDevListEntry;
!
/* Device filename for USB access */
--- 180,187 ----
TDevListEntry;
! static SANE_String_Const source_list[] = {
! SANE_I18N ("Flatbed"), SANE_I18N ("Transparency Adapter"),
! 0
! };
/* Device filename for USB access */
***************
*** 193,204 ****
static const SANE_Int setResolutions[] = {5, 75, 150, 300, 600, 1200};
#endif
- static const SANE_Range rangeXmm = {0, 220, 1};
- static const SANE_Range rangeYmm = {0, 300, 1};
- static const SANE_Range rangeXoffset = {0, 20, 1};
- static const SANE_Range rangeYoffset = {0, 70, 1};
- static const SANE_Int offsetX = 5;
- static const SANE_Int offsetY = 52;
static void _InitOptions(TScanner *s)
{
--- 199,283 ----
static const SANE_Int setResolutions[] = {5, 75, 150, 300, 600, 1200};
#endif
+ /*mdvh: hack */
+
+ static const SANE_Range rangeXmm_xpa = {0, 43, 1};/* This value is probably determined by an extra calibration scan which the windows driver does but we do not have implemented yet */
+ static const SANE_Range rangeYmm_xpa = {0, 152, 1};/* This value is probably determined by an extra calibration scan which the windows driver does but we do not have implemented yet*/
+ static const SANE_Range rangeXoffset_xpa = {0, 20, 1};
+ static const SANE_Range rangeYoffset_xpa = {0, 70, 1};
+ static const SANE_Int offsetX_xpa = 0;
+ static const SANE_Int offsetY_xpa = 0;
+
+ static const SANE_Range rangeXmm_flatbed = {0, 220, 1};
+ static const SANE_Range rangeYmm_flatbed = {0, 300, 1};
+ static const SANE_Range rangeXoffset_flatbed = {0, 20, 1};
+ static const SANE_Range rangeYoffset_flatbed = {0, 70, 1};
+ static const SANE_Int offsetX_flatbed = 5;
+ static const SANE_Int offsetY_flatbed = 52;
+
+ static const SANE_Range rangeXmm = {0, 0, 1};
+ static const SANE_Range rangeYmm = {0, 0, 1};
+ static const SANE_Range rangeXoffset = {0, 0, 1};
+ static const SANE_Range rangeYoffset = {0, 0, 1};
+ static const SANE_Int offsetX = 0;
+ static const SANE_Int offsetY = 0;
+
+ static size_t
+ max_string_size (const SANE_String_Const strings[])
+ {
+ size_t size, max_size = 0;
+ SANE_Int i;
+ for (i = 0; strings[i]; ++i)
+ {
+ size = strlen (strings[i]) + 1;
+ if (size > max_size)
+ max_size = size;
+ }
+ return max_size;
+ }
+
+ static const SANE_String_Const *
+ search_string_list (const SANE_String_Const * list, SANE_String value)
+
+ {
+ while( *list != NULL && strcmp( value, *list) != 0) {
+ ++list;
+ }
+
+ return( (*list == NULL) ? NULL : list );
+ }
+
+ static void _SetScanRange(TScanner *s)
+ {
+ if (s->aValues[optSource].w==SRC_XPA)
+ {
+ HP5400_DBG (DBG_MSG,"_SetScanRange: (re)setting scanrange to XPA values\n");
+ /* mdvh: Maybe this is not compliant with SANE Standard */
+ /* The definition of sane_get_option_descriptor says:
+ * "... The returned option descriptor is guaranteed to remain valid (and
+ * at the returned address) until the device is closed." */
+ s->aOptions[ optTLX ].constraint.range = &rangeXmm_xpa;
+ s->aValues[optTLX].w = rangeXmm_xpa.min + offsetX_xpa;
+ s->aOptions[ optTLY ].constraint.range = &rangeYmm_xpa;
+ s->aValues[optTLY].w = rangeYmm_xpa.min + offsetY_xpa;
+ s->aOptions[optBRX].constraint.range = &rangeXmm_xpa;
+ s->aValues[optBRX].w = rangeXmm_xpa.max + offsetX_xpa;
+ s->aOptions[optBRY].constraint.range= &rangeYmm_xpa;
+ s->aValues[optBRY].w = rangeYmm_xpa.max + offsetY_xpa;
+
+ } else
+ {
+ HP5400_DBG (DBG_MSG,"_SetScanRange: (re)setting scanrange to FLATBED values\n");
+ s->aOptions[ optTLX ].constraint.range = &rangeXmm_flatbed;
+ s->aValues[optTLX].w = rangeXmm_flatbed.min + offsetX_flatbed;
+ s->aOptions[ optTLY ].constraint.range = &rangeYmm_flatbed;
+ s->aValues[optTLY].w = rangeYmm_flatbed.min + offsetY_flatbed;
+ s->aOptions[optBRX].constraint.range = &rangeXmm_flatbed;
+ s->aValues[optBRX].w = rangeXmm_flatbed.max + offsetX_flatbed;
+ s->aOptions[optBRY].constraint.range= &rangeYmm_flatbed;
+ s->aValues[optBRY].w = rangeYmm_flatbed.max + offsetY_flatbed;
+ }
+ }
static void _InitOptions(TScanner *s)
{
***************
*** 245,248 ****
--- 324,351 ----
break;
+ case optGroupSource:
+ pDesc->title = "Source";
+ pDesc->type = SANE_TYPE_GROUP;
+ pDesc->size = 0;
+ break;
+
+
+ case optSource:
+ /* source */
+ pDesc->name = SANE_NAME_SCAN_SOURCE;
+ pDesc->title = SANE_TITLE_SCAN_SOURCE;
+ pDesc->desc = SANE_DESC_SCAN_SOURCE;
+ pDesc->type = SANE_TYPE_STRING;
+ pDesc->size = max_string_size (source_list);
+ pDesc->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ pDesc->constraint.string_list = source_list;
+ /*pVal->s = strdup ("Flatbed");*/
+ pVal->w =SRC_FLATBED;/* default start with scansource flatbed */
+ /*if (!pVal->s)
+ return;*//*nomem*/
+ pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+ /*pDesc->cap |= SANE_CAP_INACTIVE;*/
+ break;
+
case optGroupGeometry:
pDesc->title = "Geometry";
***************
*** 376,382 ****
pDesc->name = "lamp";
pDesc->title = SANE_I18N("Lamp status");
! pDesc->desc = SANE_I18N("Switches the lamp on or off.");
pDesc->type = SANE_TYPE_BOOL;
! pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
/* switch the lamp on when starting for first the time */
pVal->w = SANE_TRUE;
--- 479,487 ----
pDesc->name = "lamp";
pDesc->title = SANE_I18N("Lamp status");
! pDesc->desc = SANE_I18N("Switches the lamp on or off during scan.");
pDesc->type = SANE_TYPE_BOOL;
! /*pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;*/
! pDesc->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT| SANE_CAP_ADVANCED;
! pDesc->constraint_type = SANE_CONSTRAINT_NONE;
/* switch the lamp on when starting for first the time */
pVal->w = SANE_TRUE;
***************
*** 398,401 ****
--- 503,507 ----
}
}
+ _SetScanRange(s);/*mdvh scanrange is dependent on scansource */
}
***************
*** 602,606 ****
memset (s, 0, sizeof (TScanner)); /* Clear everything to zero */
! if (HP5400Open (&s->HWParams, (char *) name) < 0)
{
/* is this OK ? */
--- 708,712 ----
memset (s, 0, sizeof (TScanner)); /* Clear everything to zero */
! if (HP5400Open (&s->HWParams, (char *) name,SRC_FLATBED) < 0)
{
/* is this OK ? */
***************
*** 663,670 ****
--- 769,778 ----
TScanner *s;
SANE_Int info;
+ const SANE_String_Const * optval;
HP5400_DBG (DBG_MSG, "sane_control_option: option %d, action %d\n", n, Action);
s = (TScanner *) h;
+
info = 0;
***************
*** 675,679 ****
--- 783,795 ----
{
+ case optSource:
+
+ strcpy( (char *)pVal, s->aOptions[n].constraint.string_list[s->aValues[n].w]);
+ HP5400_DBG (DBG_MSG,
+ "sane_control_option: SANE_ACTION_GET_VALUE %d = %s\n", n,
+ (char*) pVal);
+
/* Get options of type SANE_Word */
+ break;
case optBRX:
case optTLX:
***************
*** 713,718 ****
/* Get options of type SANE_Bool */
case optLamp:
! GetLamp (&s->HWParams, &fLampIsOn);
! *(SANE_Bool *) pVal = fLampIsOn;
break;
#endif
--- 829,833 ----
/* Get options of type SANE_Bool */
case optLamp:
! *(SANE_Bool *) pVal = s->aValues[n].w;
break;
#endif
***************
*** 742,745 ****
--- 857,878 ----
return SANE_STATUS_INVAL;
break;
+ case optSource:
+ optval = NULL;
+ if( s->aOptions[n].constraint_type == SANE_CONSTRAINT_STRING_LIST) {
+ optval = search_string_list( s->aOptions[n].constraint.string_list,
+ (char *) pVal);
+
+ if( optval == NULL) return SANE_STATUS_INVAL;
+ s->aValues[n].w = optval - s->aOptions[n].constraint.string_list;
+ } else
+ {
+ HP5400_DBG (DBG_ERR,"s->aOptions[optSource]->constraint_type != SANE_CONSTRAINT_STRING_LIST\n");
+ return SANE_STATUS_INVAL;
+ }
+ _SetScanRange(s);/*mdvh: scanrange is dependent on scansource*/
+ info|= SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS;
+ s->ScanParams.iLines = 0; /* Forget actual image settings */
+ SwitchSource(s->HWParams.iXferHandle, s->aValues[n].w);
+ break;
case optBRX:
***************
*** 747,751 ****
info |= SANE_INFO_RELOAD_PARAMS;
s->ScanParams.iLines = 0; /* Forget actual image settings */
! s->aValues[n].w = *(SANE_Word *) pVal; /* Not needed anymore - + s->aValues[optOffsetX].w; */
break;
--- 880,893 ----
info |= SANE_INFO_RELOAD_PARAMS;
s->ScanParams.iLines = 0; /* Forget actual image settings */
! if (*(SANE_Word *) pVal > s->aOptions[n].constraint.range->max)
! {
! s->aValues[n].w=s->aOptions[n].constraint.range->max;
! } else if (*(SANE_Word *) pVal < s->aOptions[n].constraint.range->min)
! {
! s->aValues[n].w=s->aOptions[n].constraint.range->min;
! } else
! {
! s->aValues[n].w = *(SANE_Word *) pVal; /* Not needed anymore - + s->aValues[optOffsetX].w; */
! }
break;
***************
*** 754,758 ****
info |= SANE_INFO_RELOAD_PARAMS;
s->ScanParams.iLines = 0; /* Forget actual image settings */
! s->aValues[n].w = *(SANE_Word *) pVal; /* Not needed anymore - + s->aValues[optOffsetY].w; */
break;
case optDPI:
--- 896,909 ----
info |= SANE_INFO_RELOAD_PARAMS;
s->ScanParams.iLines = 0; /* Forget actual image settings */
! if (*(SANE_Word *) pVal > s->aOptions[n].constraint.range->max)
! {
! s->aValues[n].w=s->aOptions[n].constraint.range->max;
! } else if (*(SANE_Word *) pVal < s->aOptions[n].constraint.range->min)
! {
! s->aValues[n].w=s->aOptions[n].constraint.range->min;
! } else
! {
! s->aValues[n].w = *(SANE_Word *) pVal; /* Not needed anymore - + s->aValues[optOffsetY].w; */
! }
break;
case optDPI:
***************
*** 772,782 ****
memcpy (s->aValues[n].wa, pVal, s->aOptions[n].size);
break;
! /*
! case optLamp:
! fVal = *(SANE_Bool *)pVal;
! HP5400_DBG(DBG_MSG, "lamp %s\n", fVal ? "on" : "off");
! SetLamp(&s->HWParams, fVal);
! break;
! */
#if 0
case optCalibrate:
--- 923,933 ----
memcpy (s->aValues[n].wa, pVal, s->aOptions[n].size);
break;
!
! #if 0
! case optLamp:
! HP5400_DBG(DBG_MSG, "setting lamp to%i\n", pVal);
! (s->aValues[n].w) = *(SANE_Word *) pVal;
! break;
! #endif
#if 0
case optCalibrate:
***************
*** 891,895 ****
/* After the scanning, the iLines and iBytesPerLine will be filled in */
!
/* copy gamma table */
WriteGammaCalibTable (s->HWParams.iXferHandle, s->aGammaTableR,
--- 1042,1053 ----
/* After the scanning, the iLines and iBytesPerLine will be filled in */
! #if 0
! /* should the lamp be turned off during scan*/
! s->ScanParams.iLamp=s->aValues[optLamp].w;/*mdvh: experimental setting, do not use*/
! HP5400_DBG (DBG_MSG, "lampoption = %i\n",s->ScanParams.iLamp);
! #endif
! s->ScanParams.iSource=s->aValues[optSource].w;
! HP5400_DBG (DBG_MSG, "s->ScanParams.iSource=%i\n",s->ScanParams.iSource);
! WarmupLamp (s->HWParams.iXferHandle,s->ScanParams.iSource );/*mdvh: warmuplamp needs to be before anything else, strange behaviour if you don't*/
/* copy gamma table */
WriteGammaCalibTable (s->HWParams.iXferHandle, s->aGammaTableR,
|