kopia lustrzana https://gitlab.com/sane-project/backends
spelling fixes for genesys backend
rodzic
94a9ef8250
commit
0cd9de9bef
|
@ -311,7 +311,7 @@ struct Genesys_Device
|
|||
bool already_initialized = false;
|
||||
|
||||
bool read_active = false;
|
||||
// signal wether the park command has been issued
|
||||
// signal whether the park command has been issued
|
||||
bool parking = false;
|
||||
|
||||
// for sheetfed scanner's, is TRUE when there is a document in the scanner
|
||||
|
|
|
@ -389,7 +389,7 @@ void sanei_genesys_create_default_gamma_table(Genesys_Device* dev,
|
|||
|
||||
TODO: Should also consider maximum transfer rate: ~6.5MB/s.
|
||||
Note: The enhance option of the scanners does _not_ help. It only halves
|
||||
the amount of pixels transfered.
|
||||
the amount of pixels transferred.
|
||||
*/
|
||||
SANE_Int sanei_genesys_exposure_time2(Genesys_Device * dev, const MotorProfile& profile, float ydpi,
|
||||
int endpixel, int exposure_by_led)
|
||||
|
@ -3204,7 +3204,7 @@ compute_shifted_coefficients (Genesys_Device * dev,
|
|||
unsigned int coeff,
|
||||
unsigned int target_dark,
|
||||
unsigned int target_bright,
|
||||
unsigned int patch_size) /* contigous extent */
|
||||
unsigned int patch_size) /* contiguous extent */
|
||||
{
|
||||
unsigned int x, avgpixels, basepixels, i, j, val1, val2;
|
||||
unsigned int br_tmp [3], dk_tmp [3];
|
||||
|
@ -3573,7 +3573,7 @@ static void genesys_send_shading_coefficient(Genesys_Device* dev, const Genesys_
|
|||
coeff,
|
||||
0x0001, /* target_dark */
|
||||
0xf900, /* target_bright */
|
||||
256); /* patch_size: contigous extent */
|
||||
256); /* patch_size: contiguous extent */
|
||||
break;
|
||||
default:
|
||||
throw SaneException(SANE_STATUS_UNSUPPORTED, "sensor %d not supported",
|
||||
|
@ -3598,7 +3598,7 @@ genesys_restore_calibration(Genesys_Device * dev, Genesys_Sensor& sensor)
|
|||
{
|
||||
DBG_HELPER(dbg);
|
||||
|
||||
// if no cache or no function to evaluate cache entry ther can be no match/
|
||||
// if no cache or no function to evaluate cache entry there can be no match/
|
||||
if (dev->calibration_cache.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -4061,7 +4061,7 @@ static void genesys_start_scan(Genesys_Device* dev, bool lamp_off)
|
|||
unsigned int steps, expected;
|
||||
|
||||
|
||||
/* since not all scanners are set ot wait for head to park
|
||||
/* since not all scanners are set to wait for head to park
|
||||
* we check we are not still parking before starting a new scan */
|
||||
if (dev->parking) {
|
||||
sanei_genesys_wait_for_home(dev);
|
||||
|
@ -4166,7 +4166,7 @@ static void genesys_start_scan(Genesys_Device* dev, bool lamp_off)
|
|||
return;
|
||||
}
|
||||
|
||||
/*do we really need this? the valid data check should be sufficent -- pierre*/
|
||||
/*do we really need this? the valid data check should be sufficient -- pierre*/
|
||||
/* waits for head to reach scanning position */
|
||||
expected = dev->reg.get8(0x3d) * 65536
|
||||
+ dev->reg.get8(0x3e) * 256
|
||||
|
@ -4214,7 +4214,7 @@ static void genesys_read_ordered_data(Genesys_Device* dev, SANE_Byte* destinatio
|
|||
/* is there data left to scan */
|
||||
if (dev->total_bytes_read >= dev->total_bytes_to_read)
|
||||
{
|
||||
/* issue park command immediatly in case scanner can handle it
|
||||
/* issue park command immediately in case scanner can handle it
|
||||
* so we save time */
|
||||
if (!dev->model->is_sheetfed && !has_flag(dev->model->flags, ModelFlag::MUST_WAIT) &&
|
||||
!dev->parking)
|
||||
|
@ -4374,7 +4374,7 @@ static Genesys_Settings calculate_scan_settings(Genesys_Scanner* s)
|
|||
settings.true_gray = 0;
|
||||
}
|
||||
|
||||
// brigthness and contrast only for for 8 bit scans
|
||||
// brightness and contrast only for for 8 bit scans
|
||||
if (s->bit_depth == 8) {
|
||||
settings.contrast = (s->contrast * 127) / 100;
|
||||
settings.brightness = (s->brightness * 127) / 100;
|
||||
|
@ -4479,7 +4479,7 @@ static SANE_Range create_range(float size)
|
|||
|
||||
/** @brief generate calibration cache file nam
|
||||
* Generates the calibration cache file name to use.
|
||||
* Tries to store the chache in $HOME/.sane or
|
||||
* Tries to store the cache in $HOME/.sane or
|
||||
* then fallbacks to $TMPDIR or TMP. The filename
|
||||
* uses the model name if only one scanner is plugged
|
||||
* else is uses the device name when several identical
|
||||
|
@ -4864,7 +4864,7 @@ static void init_options(Genesys_Scanner* s)
|
|||
s->opt[OPT_CALIBRATION_FILE].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
|
||||
s->opt[OPT_CALIBRATION_FILE].constraint_type = SANE_CONSTRAINT_NONE;
|
||||
s->calibration_file.clear();
|
||||
/* disable option if ran as root */
|
||||
/* disable option if run as root */
|
||||
#ifdef HAVE_GETUID
|
||||
if(geteuid()==0)
|
||||
{
|
||||
|
@ -5348,7 +5348,7 @@ void sane_init_impl(SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
#endif
|
||||
);
|
||||
|
||||
// cold-plug case :detection of allready connected scanners
|
||||
// cold-plug case :detection of already connected scanners
|
||||
s_attach_device_by_name_evaluate_bcd_device = false;
|
||||
probe_genesys_devices();
|
||||
}
|
||||
|
@ -6335,7 +6335,7 @@ SANE_Status sane_read_impl(SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len
|
|||
{
|
||||
DBG(DBG_proc, "%s: nothing more to scan: EOF\n", __func__);
|
||||
|
||||
/* issue park command immediatly in case scanner can handle it
|
||||
/* issue park command immediately in case scanner can handle it
|
||||
* so we save time */
|
||||
if (!dev->model->is_sheetfed && !has_flag(dev->model->flags, ModelFlag::MUST_WAIT) &&
|
||||
!dev->parking)
|
||||
|
|
|
@ -567,7 +567,7 @@ static void gl124_init_motor_regs_scan(Genesys_Device* dev,
|
|||
reg->set16(REG_FSHDEC, fast_table.table.size());
|
||||
reg->set16(REG_FMOVNO, fast_table.table.size());
|
||||
|
||||
/* substract acceleration distance from feedl */
|
||||
/* subtract acceleration distance from feedl */
|
||||
feedl=feed_steps;
|
||||
feedl <<= static_cast<unsigned>(motor_profile.step_type);
|
||||
|
||||
|
@ -1058,7 +1058,7 @@ void CommandSetGl124::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
for(i=0;i<3;i++)
|
||||
{
|
||||
/* copy data to work buffer and process it */
|
||||
/* coefficent destination */
|
||||
/* coefficient destination */
|
||||
ptr = buffer.data();
|
||||
|
||||
/* iterate on both sensor segment */
|
||||
|
|
|
@ -98,7 +98,7 @@ struct Motor_Master
|
|||
|
||||
/**
|
||||
* master motor settings, for a given motor and dpi,
|
||||
* it gives steps and speed informations
|
||||
* it gives steps and speed information
|
||||
*/
|
||||
static Motor_Master motor_master[] = {
|
||||
/* HP3670 motor settings */
|
||||
|
@ -1040,7 +1040,7 @@ gl646_init_regs (Genesys_Device * dev)
|
|||
dev->reg.find_reg(0x6d).value = 0x01; /* select deceleration steps whenever go home (0), accel/decel stop time (31 * LPeriod) */
|
||||
break;
|
||||
}
|
||||
dev->reg.find_reg(0x6c).value = 0x00; /* peroid times for LPeriod, expR,expG,expB, Z1MODE, Z2MODE (one period time) */
|
||||
dev->reg.find_reg(0x6c).value = 0x00; /* period times for LPeriod, expR,expG,expB, Z1MODE, Z2MODE (one period time) */
|
||||
}
|
||||
|
||||
// Set values of Analog Device type frontend
|
||||
|
@ -1480,7 +1480,7 @@ void CommandSetGl646::detect_document_end(Genesys_Device* dev) const
|
|||
* eject document from the feeder
|
||||
* currently only used by XP200
|
||||
* TODO we currently rely on AGOHOME not being set for sheetfed scanners,
|
||||
* maybe check this flag in eject to let the document being eject automaticaly
|
||||
* maybe check this flag in eject to let the document being eject automatically
|
||||
*/
|
||||
void CommandSetGl646::eject_document(Genesys_Device* dev) const
|
||||
{
|
||||
|
@ -1491,7 +1491,7 @@ void CommandSetGl646::eject_document(Genesys_Device* dev) const
|
|||
unsigned count;
|
||||
std::uint8_t gpio;
|
||||
|
||||
/* at the end there will be noe more document */
|
||||
/* at the end there will be no more document */
|
||||
dev->document = false;
|
||||
|
||||
// first check for document event
|
||||
|
@ -2512,7 +2512,7 @@ void CommandSetGl646::init_regs_for_warmup(Genesys_Device* dev, const Genesys_Se
|
|||
/* *
|
||||
* initialize ASIC : registers, motor tables, and gamma tables
|
||||
* then ensure scanner's head is at home
|
||||
* @param dev device description of the scanner to initailize
|
||||
* @param dev device description of the scanner to initialize
|
||||
*/
|
||||
void CommandSetGl646::init(Genesys_Device* dev) const
|
||||
{
|
||||
|
@ -2739,7 +2739,7 @@ static void simple_scan(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|||
|
||||
/**
|
||||
* update the status of the required sensor in the scanner session
|
||||
* the button fileds are used to make events 'sticky'
|
||||
* the button fields are used to make events 'sticky'
|
||||
*/
|
||||
void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const
|
||||
{
|
||||
|
|
|
@ -999,7 +999,7 @@ void CommandSetGl841::init_regs_for_scan_session(Genesys_Device* dev, const Gene
|
|||
int dummy = 0;
|
||||
|
||||
/* dummy */
|
||||
/* dummy lines: may not be usefull, for instance 250 dpi works with 0 or 1
|
||||
/* dummy lines: may not be useful, for instance 250 dpi works with 0 or 1
|
||||
dummy line. Maybe the dummy line adds correctness since the motor runs
|
||||
slower (higher dpi)
|
||||
*/
|
||||
|
@ -2256,7 +2256,7 @@ void CommandSetGl841::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
for(i=0;i<3;i++)
|
||||
{
|
||||
/* copy data to work buffer and process it */
|
||||
/* coefficent destination */
|
||||
/* coefficient destination */
|
||||
ptr=buffer.data();
|
||||
|
||||
/* iterate on both sensor segment, data has been averaged,
|
||||
|
|
|
@ -362,7 +362,7 @@ static void gl842_init_motor_regs_scan(Genesys_Device* dev,
|
|||
reg->set8(REG_0x80, vref);
|
||||
}
|
||||
|
||||
// substract acceleration distance from feedl
|
||||
// subtract acceleration distance from feedl
|
||||
unsigned feedl = feed_steps;
|
||||
feedl <<= static_cast<unsigned>(motor_profile.step_type);
|
||||
|
||||
|
|
|
@ -781,7 +781,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
|||
reg->set8(REG_0x80, vref);
|
||||
}
|
||||
|
||||
/* substract acceleration distance from feedl */
|
||||
/* subtract acceleration distance from feedl */
|
||||
feedl=feed_steps;
|
||||
feedl <<= static_cast<unsigned>(motor_profile.step_type);
|
||||
|
||||
|
@ -872,7 +872,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
|
|||
* scan's one
|
||||
* @param start logical start pixel coordinate
|
||||
* @param pixels logical number of pixels to use
|
||||
* @param channels number of color channles used (1 or 3)
|
||||
* @param channels number of color channels used (1 or 3)
|
||||
* @param depth bit depth of the scan (1, 8 or 16 bits)
|
||||
* @param color_filter to choose the color channel used in gray scans
|
||||
* @param flags to drive specific settings such no calibration, XPA use ...
|
||||
|
|
|
@ -823,7 +823,7 @@ void CommandSetGl846::end_scan(Genesys_Device* dev, Genesys_Register_Set* reg,
|
|||
}
|
||||
}
|
||||
|
||||
// Moves the slider to the home (top) postion slowly
|
||||
// Moves the slider to the home (top) position slowly
|
||||
void CommandSetGl846::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||
{
|
||||
scanner_move_back_home(*dev, wait_until_home);
|
||||
|
|
|
@ -761,7 +761,7 @@ void sanei_genesys_send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& s
|
|||
val &= ~(0x01 << i);
|
||||
dev->interface->write_register(0xbe, val);
|
||||
|
||||
// FIXME: currently the last word of each gamma table is not initialied, so to work around
|
||||
// FIXME: currently the last word of each gamma table is not initialized, so to work around
|
||||
// unstable data, just set it to 0 which is the most likely value of uninitialized memory
|
||||
// (proper value is probably 0xff)
|
||||
gamma[size * 2 * i + size * 2 - 2] = 0;
|
||||
|
@ -1789,7 +1789,7 @@ int sanei_genesys_get_lowest_dpi(Genesys_Device *dev)
|
|||
* true if they are compatible.
|
||||
* A calibration cache is compatible if color mode and x dpi match the user
|
||||
* requested scan. In the case of CIS scanners, dpi isn't a criteria.
|
||||
* flatbed cache entries are considred too old and then expires if they
|
||||
* flatbed cache entries are considered too old and then expires if they
|
||||
* are older than the expiration time option, forcing calibration at least once
|
||||
* then given time. */
|
||||
bool sanei_genesys_is_compatible_calibration(Genesys_Device* dev,
|
||||
|
@ -1853,7 +1853,7 @@ bool sanei_genesys_is_compatible_calibration(Genesys_Device* dev,
|
|||
return false;
|
||||
}
|
||||
|
||||
/* a cache entry expires after afetr expiration time for non sheetfed scanners */
|
||||
/* a cache entry expires after after expiration time for non sheetfed scanners */
|
||||
/* this is not taken into account when overwriting cache entries */
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
if (!for_overwrite && dev->settings.expiration_time >=0)
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace genesys {
|
|||
s - distance travelled in steps
|
||||
t - time in pixeltime
|
||||
|
||||
The physical mode defines the curve in physical quantities. We asssume that the scanner head
|
||||
The physical mode defines the curve in physical quantities. We assume that the scanner head
|
||||
accelerates from standstill to the target speed uniformly. Then:
|
||||
|
||||
v(t) = v(0) + a * t (2)
|
||||
|
|
|
@ -65,7 +65,7 @@ void genesys_init_usb_device_tables()
|
|||
/* Guidelines on calibration area sizes
|
||||
------------------------------------
|
||||
|
||||
on many scanners scanning a single line takes aroung 10ms. In order not to take excessive
|
||||
on many scanners scanning a single line takes around 10ms. In order not to take excessive
|
||||
amount of time, the sizes of the calibration area are limited as follows:
|
||||
2400 dpi or less: 4mm (would take ~4 seconds on 2400 dpi)
|
||||
4800 dpi or less: 3mm (would take ~6 seconds on 4800 dpi)
|
||||
|
|
|
@ -77,7 +77,7 @@ with brightness below that value will be scanned as black.
|
|||
.B \-\-brightness value
|
||||
.RS
|
||||
\-100..100 (in steps of 1). Set the brightness enhancement. 0 for no enhancement, negative
|
||||
values to decrease brigthness, and positive values to increase it.
|
||||
values to decrease brightness, and positive values to increase it.
|
||||
.RE
|
||||
|
||||
.B \-\-contrast value
|
||||
|
@ -119,7 +119,7 @@ next scan will happen.
|
|||
.B \-\-calibration\-file
|
||||
.RS
|
||||
Specify the calibration file name to use. At least the directory containing the file
|
||||
must exist, since it won't be created. This option is disabled if the backend is ran
|
||||
must exist, since it won't be created. This option is disabled if the backend is run
|
||||
as root. It maybe used in case of sheet-fed scanners to share a calibration file for several
|
||||
users.
|
||||
.RE
|
||||
|
|
|
@ -29,7 +29,7 @@ size_t s_num_failures = 0;
|
|||
|
||||
int finish_tests()
|
||||
{
|
||||
std::cerr << "Finished tests. Sucessses: " << s_num_successes
|
||||
std::cerr << "Finished tests. Successes: " << s_num_successes
|
||||
<< " failures: " << s_num_failures << "\n";
|
||||
if (s_num_failures > 0)
|
||||
return 1;
|
||||
|
|
Ładowanie…
Reference in New Issue