genesys: Remove debug messages that are no longer useful

merge-requests/463/merge
Povilas Kanapickas 2020-05-16 23:43:10 +03:00
rodzic 41facc7dd4
commit d6570c86ff
10 zmienionych plików z 53 dodań i 213 usunięć

Wyświetl plik

@ -146,9 +146,7 @@ void genesys_gray_lineart(Genesys_Device* dev,
{ {
DBG_HELPER(dbg); DBG_HELPER(dbg);
std::size_t y; std::size_t y;
(void) threshold;
DBG(DBG_io2, "%s: converting %zu lines of %zu pixels\n", __func__, lines, pixels);
DBG(DBG_io2, "%s: threshold=%d\n", __func__, threshold);
for (y = 0; y < lines; y++) for (y = 0; y < lines; y++)
{ {

Wyświetl plik

@ -439,16 +439,15 @@ SANE_Int sanei_genesys_exposure_time2(Genesys_Device * dev, float ydpi,
int exposure = exposure_by_ccd; int exposure = exposure_by_ccd;
if (exposure < exposure_by_motor) if (exposure < exposure_by_motor) {
exposure = exposure_by_motor; exposure = exposure_by_motor;
}
if (exposure < exposure_by_led && dev->model->is_cis) if (exposure < exposure_by_led && dev->model->is_cis) {
exposure = exposure_by_led; exposure = exposure_by_led;
}
DBG(DBG_info, "%s: ydpi=%d, step=%d, endpixel=%d led=%d => exposure=%d\n", __func__, return exposure;
static_cast<int>(ydpi), static_cast<unsigned>(step_type), endpixel,
exposure_by_led, exposure);
return exposure;
} }
@ -1417,8 +1416,6 @@ void scanner_offset_calibration(Genesys_Device& dev, const Genesys_Sensor& senso
unsigned start_pixel = 0; unsigned start_pixel = 0;
unsigned black_pixels = (sensor.black_pixels * sensor.optical_res) / sensor.optical_res; unsigned black_pixels = (sensor.black_pixels * sensor.optical_res) / sensor.optical_res;
DBG(DBG_io2, "%s: black_pixels=%d\n", __func__, black_pixels);
unsigned channels = 3; unsigned channels = 3;
unsigned lines = 1; unsigned lines = 1;
unsigned resolution = sensor.optical_res; unsigned resolution = sensor.optical_res;
@ -1538,7 +1535,7 @@ void scanner_offset_calibration(Genesys_Device& dev, const Genesys_Sensor& senso
for (unsigned ch = 0; ch < 3; ch++) { for (unsigned ch = 0; ch < 3; ch++) {
bottomavg[ch] = dark_average_channel(first_line, black_pixels, ch); bottomavg[ch] = dark_average_channel(first_line, black_pixels, ch);
DBG(DBG_io2, "%s: bottom avg %d=%d\n", __func__, ch, bottomavg[ch]); DBG(DBG_info, "%s: bottom avg %d=%d\n", __func__, ch, bottomavg[ch]);
} }
// now top value // now top value
@ -1567,7 +1564,7 @@ void scanner_offset_calibration(Genesys_Device& dev, const Genesys_Sensor& senso
for (unsigned ch = 0; ch < 3; ch++){ for (unsigned ch = 0; ch < 3; ch++){
topavg[ch] = dark_average_channel(second_line, black_pixels, ch); topavg[ch] = dark_average_channel(second_line, black_pixels, ch);
DBG(DBG_io2, "%s: top avg %d=%d\n", __func__, ch, topavg[ch]); DBG(DBG_info, "%s: top avg %d=%d\n", __func__, ch, topavg[ch]);
} }
unsigned pass = 0; unsigned pass = 0;
@ -3815,8 +3812,6 @@ static void genesys_warmup_lamp(Genesys_Device* dev)
std::vector<uint8_t> second_line(total_size); std::vector<uint8_t> second_line(total_size);
do { do {
DBG(DBG_info, "%s: one more loop\n", __func__);
first_line = second_line; first_line = second_line;
dev->cmd_set->begin_scan(dev, sensor, &dev->reg, false); dev->cmd_set->begin_scan(dev, sensor, &dev->reg, false);
@ -3862,9 +3857,10 @@ static void genesys_warmup_lamp(Genesys_Device* dev)
DBG(DBG_info, "%s: average 1 = %.2f, average 2 = %.2f\n", __func__, first_average, DBG(DBG_info, "%s: average 1 = %.2f, average 2 = %.2f\n", __func__, first_average,
second_average); second_average);
if (second_average > 0 && float average_difference = std::fabs(first_average - second_average) / second_average;
std::fabs(first_average - second_average) / second_average < 0.005) if (second_average > 0 && average_difference < 0.005)
{ {
dbg.vlog(DBG_info, "difference: %f, exiting", average_difference);
break; break;
} }

Wyświetl plik

@ -386,7 +386,6 @@ static void gl124_send_slope_table(Genesys_Device* dev, int table_nr,
{ {
DBG_HELPER_ARGS(dbg, "table_nr = %d, steps = %d", table_nr, steps); DBG_HELPER_ARGS(dbg, "table_nr = %d, steps = %d", table_nr, steps);
int i; int i;
char msg[10000];
/* sanity check */ /* sanity check */
if(table_nr<0 || table_nr>4) if(table_nr<0 || table_nr>4)
@ -401,15 +400,6 @@ static void gl124_send_slope_table(Genesys_Device* dev, int table_nr,
table[i * 2 + 1] = slope_table[i] >> 8; table[i * 2 + 1] = slope_table[i] >> 8;
} }
if (DBG_LEVEL >= DBG_io)
{
std::sprintf(msg, "write slope %d (%d)=", table_nr, steps);
for (i = 0; i < steps; i++) {
std::sprintf(msg + std::strlen(msg), ",%d", slope_table[i]);
}
DBG (DBG_io, "%s: %s\n", __func__, msg);
}
if (dev->interface->is_mock()) { if (dev->interface->is_mock()) {
dev->interface->record_slope_table(table_nr, slope_table); dev->interface->record_slope_table(table_nr, slope_table);
} }
@ -428,12 +418,8 @@ static void gl124_set_ti_fe(Genesys_Device* dev, uint8_t set)
DBG_HELPER(dbg); DBG_HELPER(dbg);
int i; int i;
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s: setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial;
} }
// start writing to DAC // start writing to DAC
@ -472,11 +458,8 @@ void CommandSetGl124::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
(void) sensor; (void) sensor;
uint8_t val; uint8_t val;
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial;
} }
val = dev->interface->read_register(REG_0x0A); val = dev->interface->read_register(REG_0x0A);
@ -564,11 +547,8 @@ static void gl124_init_motor_regs_scan(Genesys_Device* dev,
linesel=0; linesel=0;
} }
DBG(DBG_io2, "%s: final yres=%d, linesel=%d\n", __func__, yres, linesel);
lincnt=scan_lines*(linesel+1); lincnt=scan_lines*(linesel+1);
reg->set24(REG_LINCNT, lincnt); reg->set24(REG_LINCNT, lincnt);
DBG (DBG_io, "%s: lincnt=%d\n", __func__, lincnt);
/* compute register 02 value */ /* compute register 02 value */
uint8_t r02 = REG_0x02_NOTHOME; uint8_t r02 = REG_0x02_NOTHOME;
@ -633,7 +613,6 @@ static void gl124_init_motor_regs_scan(Genesys_Device* dev,
if (use_fast_fed) { if (use_fast_fed) {
dist += fast_table.steps_count * 2; dist += fast_table.steps_count * 2;
} }
DBG (DBG_io2, "%s: acceleration distance=%d\n", __func__, dist);
/* get sure we don't use insane value */ /* get sure we don't use insane value */
if (dist < feedl) { if (dist < feedl) {
@ -643,7 +622,6 @@ static void gl124_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_FEEDL, feedl); reg->set24(REG_FEEDL, feedl);
DBG (DBG_io, "%s: feedl=%d\n", __func__, feedl);
/* doesn't seem to matter that much */ /* doesn't seem to matter that much */
sanei_genesys_calculate_zmod(use_fast_fed, sanei_genesys_calculate_zmod(use_fast_fed,
@ -656,10 +634,7 @@ static void gl124_init_motor_regs_scan(Genesys_Device* dev,
&z2); &z2);
reg->set24(REG_Z1MOD, z1); reg->set24(REG_Z1MOD, z1);
DBG(DBG_info, "%s: z1 = %d\n", __func__, z1);
reg->set24(REG_Z2MOD, z2); reg->set24(REG_Z2MOD, z2);
DBG(DBG_info, "%s: z2 = %d\n", __func__, z2);
/* LINESEL */ /* LINESEL */
reg->set8_mask(REG_0x1D, linesel, REG_0x1D_LINESEL); reg->set8_mask(REG_0x1D, linesel, REG_0x1D_LINESEL);
@ -708,12 +683,9 @@ static void gl124_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
if ((dev->model->sensor_id != SensorId::CIS_CANON_LIDE_120) && (session.params.xres>=600)) { if ((dev->model->sensor_id != SensorId::CIS_CANON_LIDE_120) && (session.params.xres>=600)) {
reg->find_reg(REG_0x03).value &= ~REG_0x03_AVEENB; reg->find_reg(REG_0x03).value &= ~REG_0x03_AVEENB;
DBG (DBG_io, "%s: disabling AVEENB\n", __func__); } else {
} // BUG: the following is likely incorrect
else
{
reg->find_reg(REG_0x03).value |= ~REG_0x03_AVEENB; reg->find_reg(REG_0x03).value |= ~REG_0x03_AVEENB;
DBG (DBG_io, "%s: enabling AVEENB\n", __func__);
} }
sanei_genesys_set_lamp_power(dev, sensor, *reg, sanei_genesys_set_lamp_power(dev, sensor, *reg,
@ -807,10 +779,7 @@ static void gl124_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
// BUG: we shouldn't multiply by channels here // BUG: we shouldn't multiply by channels here
reg->set24(REG_MAXWD, session.output_line_bytes_raw / session.ccd_size_divisor * session.params.channels); reg->set24(REG_MAXWD, session.output_line_bytes_raw / session.ccd_size_divisor * session.params.channels);
reg->set24(REG_LPERIOD, exposure_time); reg->set24(REG_LPERIOD, exposure_time);
DBG (DBG_io2, "%s: exposure_time used=%d\n", __func__, exposure_time);
reg->set16(REG_DUMMY, sensor.dummy_pixel); reg->set16(REG_DUMMY, sensor.dummy_pixel);
} }
@ -821,7 +790,6 @@ void CommandSetGl124::init_regs_for_scan_session(Genesys_Device* dev, const Gene
DBG_HELPER(dbg); DBG_HELPER(dbg);
session.assert_computed(); session.assert_computed();
int move;
int exposure_time; int exposure_time;
int dummy = 0; int dummy = 0;
@ -851,13 +819,10 @@ void CommandSetGl124::init_regs_for_scan_session(Genesys_Device* dev, const Gene
// now _LOGICAL_ optical values used are known, setup registers // now _LOGICAL_ optical values used are known, setup registers
gl124_init_optical_regs_scan(dev, sensor, reg, exposure_time, session); gl124_init_optical_regs_scan(dev, sensor, reg, exposure_time, session);
/* add tl_y to base movement */
move = session.params.starty;
DBG(DBG_info, "%s: move=%d steps\n", __func__, move);
gl124_init_motor_regs_scan(dev, sensor, reg, motor_profile, exposure_time, slope_dpi, gl124_init_motor_regs_scan(dev, sensor, reg, motor_profile, exposure_time, slope_dpi,
session.optical_line_count, session.optical_line_count,
dummy, move, session.params.scan_mode, session.params.flags); dummy, session.params.starty, session.params.scan_mode,
session.params.flags);
/*** prepares data reordering ***/ /*** prepares data reordering ***/
@ -1060,7 +1025,6 @@ void CommandSetGl124::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
move = static_cast<int>(dev->model->y_offset_calib_white); move = static_cast<int>(dev->model->y_offset_calib_white);
move = static_cast<int>((move * (dev->motor.base_ydpi/4)) / MM_PER_INCH); move = static_cast<int>((move * (dev->motor.base_ydpi/4)) / MM_PER_INCH);
} }
DBG (DBG_io, "%s: move=%d steps\n", __func__, move);
ScanSession session; ScanSession session;
session.params.xres = resolution; session.params.xres = resolution;

Wyświetl plik

@ -458,7 +458,6 @@ static int get_cksel(SensorId sensor_id, int required, unsigned channels)
sensor.matches_channel_count(channels)) sensor.matches_channel_count(channels))
{ {
unsigned cksel = sensor.ccd_pixels_per_system_pixel(); unsigned cksel = sensor.ccd_pixels_per_system_pixel();
DBG(DBG_io, "%s: match found for %d (cksel=%d)\n", __func__, required, cksel);
return cksel; return cksel;
} }
} }
@ -723,8 +722,6 @@ void CommandSetGl646::init_regs_for_scan_session(Genesys_Device* dev, const Gene
/* but head has moved due to shading calibration => dev->scanhead_position_primary */ /* but head has moved due to shading calibration => dev->scanhead_position_primary */
if (feedl > 0) if (feedl > 0)
{ {
DBG(DBG_info, "%s: initial move=%d\n", __func__, feedl);
/* TODO clean up this when I'll fully understand. /* TODO clean up this when I'll fully understand.
* for now, special casing each motor */ * for now, special casing each motor */
switch (dev->model->motor_id) { switch (dev->model->motor_id) {
@ -819,7 +816,6 @@ void CommandSetGl646::init_regs_for_scan_session(Genesys_Device* dev, const Gene
feedl = 0; feedl = 0;
} }
DBG(DBG_info, "%s: final move=%d\n", __func__, feedl);
regs->set24(REG_FEEDL, feedl); regs->set24(REG_FEEDL, feedl);
regs->find_reg(0x65).value = motor->mtrpwm; regs->find_reg(0x65).value = motor->mtrpwm;
@ -1104,12 +1100,9 @@ static void gl646_set_ad_fe(Genesys_Device* dev, uint8_t set)
DBG_HELPER(dbg); DBG_HELPER(dbg);
int i; int i;
if (set == AFE_INIT) if (set == AFE_INIT) {
{
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial; dev->frontend = dev->frontend_initial;
// write them to analog frontend // write them to analog frontend
dev->interface->write_fe_register(0x00, dev->frontend.regs.get_value(0x00)); dev->interface->write_fe_register(0x00, dev->frontend.regs.get_value(0x00));
@ -1221,11 +1214,8 @@ static void gl646_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint
} }
/* initialize analog frontend */ /* initialize analog frontend */
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial;
// reset only done on init // reset only done on init
dev->interface->write_fe_register(0x04, 0x80); dev->interface->write_fe_register(0x04, 0x80);
@ -1566,9 +1556,8 @@ void CommandSetGl646::eject_document(Genesys_Device* dev) const
// home sensor is set when document is inserted // home sensor is set when document is inserted
if (status.is_at_home) { if (status.is_at_home) {
dev->document = false; dev->document = false;
DBG(DBG_info, "%s: no more document to eject\n", __func__); DBG(DBG_info, "%s: no more document to eject\n", __func__);
DBG(DBG_proc, "%s: end\n", __func__); return;
return;
} }
// there is a document inserted, eject it // there is a document inserted, eject it
@ -1794,8 +1783,7 @@ void CommandSetGl646::move_back_home(Genesys_Device* dev, bool wait_until_home)
/* registers are restored to an iddl state, give up if no head to park */ /* registers are restored to an iddl state, give up if no head to park */
if (dev->model->is_sheetfed) { if (dev->model->is_sheetfed) {
DBG(DBG_proc, "%s: end \n", __func__); return;
return;
} }
// starts scan // starts scan
@ -1828,7 +1816,6 @@ void CommandSetGl646::move_back_home(Genesys_Device* dev, bool wait_until_home)
if (status.is_at_home) { if (status.is_at_home) {
DBG(DBG_info, "%s: reached home position\n", __func__); DBG(DBG_info, "%s: reached home position\n", __func__);
DBG(DBG_proc, "%s: end\n", __func__);
dev->interface->sleep_ms(500); dev->interface->sleep_ms(500);
dev->set_head_pos_zero(ScanHeadId::PRIMARY); dev->set_head_pos_zero(ScanHeadId::PRIMARY);
return; return;
@ -1907,9 +1894,6 @@ void CommandSetGl646::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
dev->reg.find_reg(0x02).value |= REG_0x02_ACDCDIS; /* ease backtracking */ dev->reg.find_reg(0x02).value |= REG_0x02_ACDCDIS; /* ease backtracking */
dev->reg.find_reg(0x02).value &= ~REG_0x02_FASTFED; dev->reg.find_reg(0x02).value &= ~REG_0x02_FASTFED;
sanei_genesys_set_motor_power(dev->reg, false); sanei_genesys_set_motor_power(dev->reg, false);
DBG(DBG_info, "%s:\n\tdev->settings.xres=%d\n\tdev->settings.yres=%d\n", __func__,
resolution, resolution);
} }
bool CommandSetGl646::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const bool CommandSetGl646::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const
@ -2176,7 +2160,6 @@ static void ad_fe_offset_calibration(Genesys_Device* dev, const Genesys_Sensor&
const auto& calib_sensor = sanei_genesys_find_sensor(dev, sensor.optical_res, 3, const auto& calib_sensor = sanei_genesys_find_sensor(dev, sensor.optical_res, 3,
ScanMethod::FLATBED); ScanMethod::FLATBED);
black_pixels = (calib_sensor.black_pixels * sensor.optical_res) / calib_sensor.optical_res; black_pixels = (calib_sensor.black_pixels * sensor.optical_res) / calib_sensor.optical_res;
DBG(DBG_io2, "%s: black_pixels=%d\n", __func__, black_pixels);
unsigned pixels = dev->model->x_size_calib_mm * sensor.optical_res / MM_PER_INCH; unsigned pixels = dev->model->x_size_calib_mm * sensor.optical_res / MM_PER_INCH;
unsigned lines = CALIBRATION_LINES; unsigned lines = CALIBRATION_LINES;
@ -2245,7 +2228,7 @@ static void ad_fe_offset_calibration(Genesys_Device* dev, const Genesys_Sensor&
} }
} }
DBG(DBG_io2, "%s: pass=%d, min=%d\n", __func__, pass, min); DBG(DBG_info, "%s: pass=%d, min=%d\n", __func__, pass, min);
bottom++; bottom++;
} }
while (pass < 128 && min == 0); while (pass < 128 && min == 0);
@ -2282,8 +2265,6 @@ void CommandSetGl646::offset_calibration(Genesys_Device* dev, const Genesys_Sens
return; return;
} }
DBG(DBG_proc, "%s: start\n", __func__); // TODO
/* setup for a RGB scan, one full sensor's width line */ /* setup for a RGB scan, one full sensor's width line */
/* resolution is the one from the final scan */ /* resolution is the one from the final scan */
unsigned resolution = dev->settings.xres; unsigned resolution = dev->settings.xres;
@ -2293,8 +2274,6 @@ void CommandSetGl646::offset_calibration(Genesys_Device* dev, const Genesys_Sens
ScanMethod::FLATBED); ScanMethod::FLATBED);
black_pixels = (calib_sensor.black_pixels * resolution) / calib_sensor.optical_res; black_pixels = (calib_sensor.black_pixels * resolution) / calib_sensor.optical_res;
DBG(DBG_io2, "%s: black_pixels=%d\n", __func__, black_pixels);
unsigned pixels = dev->model->x_size_calib_mm * resolution / MM_PER_INCH; unsigned pixels = dev->model->x_size_calib_mm * resolution / MM_PER_INCH;
unsigned lines = CALIBRATION_LINES; unsigned lines = CALIBRATION_LINES;
if (dev->model->is_cis) { if (dev->model->is_cis) {
@ -2342,7 +2321,7 @@ void CommandSetGl646::offset_calibration(Genesys_Device* dev, const Genesys_Sens
sanei_genesys_write_pnm_file(title, first_line.data(), 8, channels, pixels, lines); sanei_genesys_write_pnm_file(title, first_line.data(), 8, channels, pixels, lines);
} }
bottomavg = dark_average(first_line.data(), pixels, lines, channels, black_pixels); bottomavg = dark_average(first_line.data(), pixels, lines, channels, black_pixels);
DBG(DBG_io2, "%s: bottom avg=%d\n", __func__, bottomavg); DBG(DBG_info, "%s: bottom avg=%d\n", __func__, bottomavg);
/* now top value */ /* now top value */
top = 231; top = 231;
@ -2358,7 +2337,7 @@ void CommandSetGl646::offset_calibration(Genesys_Device* dev, const Genesys_Sens
sanei_genesys_write_pnm_file (title, second_line.data(), 8, channels, pixels, lines); sanei_genesys_write_pnm_file (title, second_line.data(), 8, channels, pixels, lines);
} }
topavg = dark_average(second_line.data(), pixels, lines, channels, black_pixels); topavg = dark_average(second_line.data(), pixels, lines, channels, black_pixels);
DBG(DBG_io2, "%s: top avg=%d\n", __func__, topavg); DBG(DBG_info, "%s: top avg=%d\n", __func__, topavg);
if (is_testing_mode()) { if (is_testing_mode()) {
return; return;
@ -2534,7 +2513,7 @@ void CommandSetGl646::coarse_gain_calibration(Genesys_Device* dev, const Genesys
dev->frontend.set_gain(k, dev->frontend.get_gain(k) + 1); dev->frontend.set_gain(k, dev->frontend.get_gain(k) + 1);
} }
DBG(DBG_proc, "%s: channel %d, average = %.2f, gain = %d\n", __func__, k, average[k], DBG(DBG_info, "%s: channel %d, average = %.2f, gain = %d\n", __func__, k, average[k],
dev->frontend.get_gain(k)); dev->frontend.get_gain(k));
} }
} }
@ -2715,9 +2694,6 @@ void CommandSetGl646::init(Genesys_Device* dev) const
} catch (...) { } catch (...) {
dev->interface->bulk_read_data(0x45, dev->control, len); dev->interface->bulk_read_data(0x45, dev->control, len);
} }
DBG(DBG_info, "%s: control read=0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", __func__,
dev->control[0], dev->control[1], dev->control[2], dev->control[3], dev->control[4],
dev->control[5]);
sanei_usb_set_timeout (30 * 1000); sanei_usb_set_timeout (30 * 1000);
} }
else else
@ -2763,8 +2739,6 @@ static void simple_scan(Genesys_Device* dev, const Genesys_Sensor& sensor,
data.clear(); data.clear();
data.resize(size); data.resize(size);
DBG(DBG_io, "%s: allocated %zu bytes of memory for %d lines\n", __func__, size, lines);
// initialize frontend // initialize frontend
gl646_set_fe(dev, sensor, AFE_SET, session.params.xres); gl646_set_fe(dev, sensor, AFE_SET, session.params.xres);
@ -2993,16 +2967,11 @@ void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const
case GpioId::HP3670: case GpioId::HP3670:
case GpioId::HP2400: case GpioId::HP2400:
/* test if XPA is plugged-in */ /* test if XPA is plugged-in */
if ((value & 0x40) == 0) if ((value & 0x40) == 0) {
{ session->opt[OPT_SOURCE].cap &= ~SANE_CAP_INACTIVE;
DBG(DBG_io, "%s: enabling XPA\n", __func__); } else {
session->opt[OPT_SOURCE].cap &= ~SANE_CAP_INACTIVE; session->opt[OPT_SOURCE].cap |= SANE_CAP_INACTIVE;
} }
else
{
DBG(DBG_io, "%s: disabling XPA\n", __func__);
session->opt[OPT_SOURCE].cap |= SANE_CAP_INACTIVE;
}
break; break;
default: default:
throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type");
@ -3060,8 +3029,6 @@ static void write_control(Genesys_Device* dev, const Genesys_Sensor& sensor, int
break; break;
} }
DBG(DBG_info, "%s: control write=0x%02x 0x%02x 0x%02x 0x%02x\n", __func__, control[0], control[1],
control[2], control[3]);
dev->interface->write_buffer(0x3c, addr, control, 4); dev->interface->write_buffer(0x3c, addr, control, 4);
} }

Wyświetl plik

@ -378,14 +378,11 @@ static void gl841_set_lide80_fe(Genesys_Device* dev, uint8_t set)
{ {
DBG_HELPER(dbg); DBG_HELPER(dbg);
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial; // BUG: the following code does not make sense. The addresses are different than AFE_SET
// case
// write them to analog frontend
dev->interface->write_fe_register(0x00, dev->frontend.regs.get_value(0x00)); dev->interface->write_fe_register(0x00, dev->frontend.regs.get_value(0x00));
dev->interface->write_fe_register(0x03, dev->frontend.regs.get_value(0x01)); dev->interface->write_fe_register(0x03, dev->frontend.regs.get_value(0x01));
dev->interface->write_fe_register(0x06, dev->frontend.regs.get_value(0x02)); dev->interface->write_fe_register(0x06, dev->frontend.regs.get_value(0x02));
@ -410,11 +407,7 @@ static void gl841_set_ad_fe(Genesys_Device* dev, uint8_t set)
return; return;
} }
if (set == AFE_INIT) if (set == AFE_INIT) {
{
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial; dev->frontend = dev->frontend_initial;
// write them to analog frontend // write them to analog frontend
@ -473,15 +466,11 @@ void CommandSetGl841::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
throw SaneException("unsupported frontend type %d", frontend_type); throw SaneException("unsupported frontend type %d", frontend_type);
} }
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial;
// reset only done on init // reset only done on init
dev->interface->write_fe_register(0x04, 0x80); dev->interface->write_fe_register(0x04, 0x80);
DBG(DBG_proc, "%s(): frontend reset complete\n", __func__);
} }
@ -691,8 +680,6 @@ static void gl841_init_motor_regs_scan(Genesys_Device* dev, const Genesys_Sensor
0, 0,
0); 0);
DBG(DBG_info, "%s : fast_exposure=%d pixels\n", __func__, fast_exposure);
{ {
std::vector<uint16_t> table; std::vector<uint16_t> table;
table.resize(256, 0xffff); table.resize(256, 0xffff);
@ -772,10 +759,7 @@ static void gl841_init_motor_regs_scan(Genesys_Device* dev, const Genesys_Sensor
(feed_steps - (slow_table.steps_count >> static_cast<unsigned>(motor_profile.step_type))) (feed_steps - (slow_table.steps_count >> static_cast<unsigned>(motor_profile.step_type)))
+ slow_table.pixeltime_sum; + slow_table.pixeltime_sum;
DBG(DBG_info, "%s: Time for slow move: %d\n", __func__, slow_time); use_fast_fed = fast_time < slow_time;
DBG(DBG_info, "%s: Time for fast move: %d\n", __func__, fast_time);
use_fast_fed = fast_time < slow_time;
} }
if (use_fast_fed) { if (use_fast_fed) {
@ -1113,24 +1097,20 @@ dummy \ scanned lines
motor_profile.step_type, motor_profile.step_type,
session.pixel_startx, session.pixel_startx,
session.optical_pixels); session.optical_pixels);
DBG(DBG_info, "%s : exposure_time=%d pixels\n", __func__, exposure_time);
gl841_init_optical_regs_scan(dev, sensor, reg, exposure_time, session); gl841_init_optical_regs_scan(dev, sensor, reg, exposure_time, session);
move = session.params.starty; move = session.params.starty;
DBG(DBG_info, "%s: move=%d steps\n", __func__, move);
/* subtract current head position */ /* subtract current head position */
move -= (dev->head_pos(ScanHeadId::PRIMARY) * session.params.yres) / dev->motor.base_ydpi; move -= (dev->head_pos(ScanHeadId::PRIMARY) * session.params.yres) / dev->motor.base_ydpi;
DBG(DBG_info, "%s: move=%d steps\n", __func__, move);
if (move < 0) if (move < 0)
move = 0; move = 0;
/* round it */ /* round it */
/* the move is not affected by dummy -- pierre */ /* the move is not affected by dummy -- pierre */
/* move = ((move + dummy) / (dummy + 1)) * (dummy + 1); /* move = ((move + dummy) / (dummy + 1)) * (dummy + 1);*/
DBG(DBG_info, "%s: move=%d steps\n", __func__, move);*/
if (has_flag(session.params.flags, ScanFlag::SINGLE_LINE)) { if (has_flag(session.params.flags, ScanFlag::SINGLE_LINE)) {
gl841_init_motor_regs_off(reg, session.optical_line_count); gl841_init_motor_regs_off(reg, session.optical_line_count);
@ -1197,7 +1177,6 @@ ScanSession CommandSetGl841::calculate_scan_session(const Genesys_Device* dev,
dev->model->sensor_id != SensorId::CIS_CANON_LIDE_80) dev->model->sensor_id != SensorId::CIS_CANON_LIDE_80)
{ {
// on Lide 80 the LEDADD bit results in only red LED array being lit // on Lide 80 the LEDADD bit results in only red LED array being lit
DBG(DBG_io, "%s: activating LEDADD\n", __func__);
flags |= ScanFlag::ENABLE_LEDADD; flags |= ScanFlag::ENABLE_LEDADD;
} }
@ -1400,7 +1379,6 @@ void CommandSetGl841::eject_document(Genesys_Device* dev) const
if (!dev->model->is_sheetfed) { if (!dev->model->is_sheetfed) {
DBG(DBG_proc, "%s: there is no \"eject sheet\"-concept for non sheet fed\n", __func__); DBG(DBG_proc, "%s: there is no \"eject sheet\"-concept for non sheet fed\n", __func__);
DBG(DBG_proc, "%s: finished\n", __func__);
return; return;
} }
@ -1449,10 +1427,9 @@ void CommandSetGl841::eject_document(Genesys_Device* dev) const
{ {
if (!gl841_get_paper_sensor(dev)) { if (!gl841_get_paper_sensor(dev)) {
DBG(DBG_info, "%s: reached home position\n", __func__); DBG(DBG_info, "%s: reached home position\n", __func__);
DBG(DBG_proc, "%s: finished\n", __func__); break;
break; }
}
dev->interface->sleep_ms(100); dev->interface->sleep_ms(100);
--loop; --loop;
} }
@ -1587,8 +1564,6 @@ void CommandSetGl841::detect_document_end(Genesys_Device* dev) const
auto skip_lines = scan_end_lines - output_lines; auto skip_lines = scan_end_lines - output_lines;
if (remaining_lines > skip_lines) { if (remaining_lines > skip_lines) {
DBG(DBG_io, "%s: skip_lines=%zu\n", __func__, skip_lines);
remaining_lines -= skip_lines; remaining_lines -= skip_lines;
dev->get_pipeline_source().set_remaining_bytes(remaining_lines * dev->get_pipeline_source().set_remaining_bytes(remaining_lines *
dev->session.output_line_bytes_raw); dev->session.output_line_bytes_raw);
@ -2321,7 +2296,6 @@ void CommandSetGl841::send_shading_data(Genesys_Device* dev, const Genesys_Senso
// calibration. Currently only cases handled are full and half ccd resolution. // calibration. Currently only cases handled are full and half ccd resolution.
unsigned beginpixel = dev->session.params.startx * dev->session.optical_resolution / unsigned beginpixel = dev->session.params.startx * dev->session.optical_resolution /
dev->session.params.xres; dev->session.params.xres;
DBG(DBG_io2, "%s: ORIGIN PIXEL=%d\n", __func__, beginpixel);
beginpixel *= 4; beginpixel *= 4;
beginpixel /= sensor.shading_factor; beginpixel /= sensor.shading_factor;

Wyświetl plik

@ -225,10 +225,7 @@ void CommandSetGl842::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
set == AFE_POWER_SAVE ? "powersave" : "huh?"); set == AFE_POWER_SAVE ? "powersave" : "huh?");
(void) sensor; (void) sensor;
if (set == AFE_INIT) if (set == AFE_INIT) {
{
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial; dev->frontend = dev->frontend_initial;
} }
@ -243,8 +240,6 @@ void CommandSetGl842::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
throw SaneException(SANE_STATUS_UNSUPPORTED, "unsupported frontend type %d", fe_type); throw SaneException(SANE_STATUS_UNSUPPORTED, "unsupported frontend type %d", fe_type);
} }
DBG(DBG_proc, "%s(): frontend reset complete\n", __func__);
for (unsigned i = 1; i <= 3; i++) { for (unsigned i = 1; i <= 3; i++) {
dev->interface->write_fe_register(i, dev->frontend.regs.get_value(0x00 + i)); dev->interface->write_fe_register(i, dev->frontend.regs.get_value(0x00 + i));
} }
@ -367,7 +362,6 @@ static void gl842_init_motor_regs_scan(Genesys_Device* dev,
if (use_fast_fed) { if (use_fast_fed) {
dist += (fast_table.steps_count / step_multiplier) * 2; dist += (fast_table.steps_count / step_multiplier) * 2;
} }
DBG(DBG_io2, "%s: acceleration distance=%d\n", __func__, dist);
// make sure when don't insane value : XXX STEF XXX in this case we should // make sure when don't insane value : XXX STEF XXX in this case we should
// fall back to single table move // fall back to single table move
@ -550,10 +544,6 @@ void CommandSetGl842::init_regs_for_scan_session(Genesys_Device* dev, const Gene
} }
const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure, session); const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure, session);
DBG(DBG_info, "%s : exposure=%d pixels\n", __func__, exposure);
DBG(DBG_info, "%s : scan_step_type=%d\n", __func__,
static_cast<unsigned>(motor_profile.step_type));
// now _LOGICAL_ optical values used are known, setup registers // now _LOGICAL_ optical values used are known, setup registers
gl842_init_optical_regs_scan(dev, sensor, reg, exposure, session); gl842_init_optical_regs_scan(dev, sensor, reg, exposure, session);
gl842_init_motor_regs_scan(dev, sensor, session, reg, motor_profile, exposure, slope_dpi, gl842_init_motor_regs_scan(dev, sensor, session, reg, motor_profile, exposure, slope_dpi,

Wyświetl plik

@ -671,10 +671,7 @@ void CommandSetGl843::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
set == AFE_POWER_SAVE ? "powersave" : "huh?"); set == AFE_POWER_SAVE ? "powersave" : "huh?");
(void) sensor; (void) sensor;
if (set == AFE_INIT) if (set == AFE_INIT) {
{
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial; dev->frontend = dev->frontend_initial;
} }
@ -689,8 +686,6 @@ void CommandSetGl843::set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor,
throw SaneException(SANE_STATUS_UNSUPPORTED, "unsupported frontend type %d", fe_type); throw SaneException(SANE_STATUS_UNSUPPORTED, "unsupported frontend type %d", fe_type);
} }
DBG(DBG_proc, "%s(): frontend reset complete\n", __func__);
for (unsigned i = 1; i <= 3; i++) { for (unsigned i = 1; i <= 3; i++) {
dev->interface->write_fe_register(i, dev->frontend.regs.get_value(0x00 + i)); dev->interface->write_fe_register(i, dev->frontend.regs.get_value(0x00 + i));
} }
@ -742,7 +737,6 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_LINCNT, scan_lines); reg->set24(REG_LINCNT, scan_lines);
DBG(DBG_io, "%s: lincnt=%d\n", __func__, scan_lines);
reg->set8(REG_0x02, 0); reg->set8(REG_0x02, 0);
sanei_genesys_set_motor_power(*reg, true); sanei_genesys_set_motor_power(*reg, true);
@ -818,7 +812,6 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
if (use_fast_fed) { if (use_fast_fed) {
dist += (fast_table.steps_count / step_multiplier) * 2; dist += (fast_table.steps_count / step_multiplier) * 2;
} }
DBG(DBG_io2, "%s: acceleration distance=%d\n", __func__, dist);
/* get sure when don't insane value : XXX STEF XXX in this case we should /* get sure when don't insane value : XXX STEF XXX in this case we should
* fall back to single table move */ * fall back to single table move */
@ -829,7 +822,6 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_FEEDL, feedl); reg->set24(REG_FEEDL, feedl);
DBG(DBG_io, "%s: feedl=%d\n", __func__, feedl);
// doesn't seem to matter that much // doesn't seem to matter that much
std::uint32_t z1, z2; std::uint32_t z1, z2;
@ -848,10 +840,7 @@ static void gl843_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_Z1MOD, z1); reg->set24(REG_Z1MOD, z1);
DBG(DBG_info, "%s: z1 = %d\n", __func__, z1);
reg->set24(REG_Z2MOD, z2); reg->set24(REG_Z2MOD, z2);
DBG(DBG_info, "%s: z2 = %d\n", __func__, z2);
reg->set8_mask(REG_0x1E, scan_dummy, 0x0f); reg->set8_mask(REG_0x1E, scan_dummy, 0x0f);
@ -1044,10 +1033,7 @@ static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* nousedspace = (mem_bank_range * 1024 / 256 -1 ) * 4; */ /* nousedspace = (mem_bank_range * 1024 / 256 -1 ) * 4; */
// BUG: the division by ccd_size_divisor likely does not make sense // BUG: the division by ccd_size_divisor likely does not make sense
reg->set24(REG_MAXWD, (session.output_line_bytes / session.ccd_size_divisor) >> 1); reg->set24(REG_MAXWD, (session.output_line_bytes / session.ccd_size_divisor) >> 1);
reg->set16(REG_LPERIOD, exposure / tgtime); reg->set16(REG_LPERIOD, exposure / tgtime);
DBG(DBG_io2, "%s: exposure used=%d\n", __func__, exposure/tgtime);
reg->set8(REG_DUMMY, sensor.dummy_pixel); reg->set8(REG_DUMMY, sensor.dummy_pixel);
} }
@ -1087,10 +1073,6 @@ void CommandSetGl843::init_regs_for_scan_session(Genesys_Device* dev, const Gene
} }
const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure, session); const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure, session);
DBG(DBG_info, "%s : exposure=%d pixels\n", __func__, exposure);
DBG(DBG_info, "%s : scan_step_type=%d\n", __func__,
static_cast<unsigned>(motor_profile.step_type));
// now _LOGICAL_ optical values used are known, setup registers // now _LOGICAL_ optical values used are known, setup registers
gl843_init_optical_regs_scan(dev, sensor, reg, exposure, session); gl843_init_optical_regs_scan(dev, sensor, reg, exposure, session);
gl843_init_motor_regs_scan(dev, sensor, session, reg, motor_profile, exposure, slope_dpi, gl843_init_motor_regs_scan(dev, sensor, session, reg, motor_profile, exposure, slope_dpi,
@ -1259,8 +1241,6 @@ void CommandSetGl843::detect_document_end(Genesys_Device* dev) const
auto skip_lines = scan_end_lines - output_lines; auto skip_lines = scan_end_lines - output_lines;
if (remaining_lines > skip_lines) { if (remaining_lines > skip_lines) {
DBG(DBG_io, "%s: skip_lines=%zu\n", __func__, skip_lines);
remaining_lines -= skip_lines; remaining_lines -= skip_lines;
dev->get_pipeline_source().set_remaining_bytes(remaining_lines * dev->get_pipeline_source().set_remaining_bytes(remaining_lines *
dev->session.output_line_bytes_raw); dev->session.output_line_bytes_raw);

Wyświetl plik

@ -354,11 +354,8 @@ static void gl846_set_adi_fe(Genesys_Device* dev, uint8_t set)
status = scanner_read_status(*dev); status = scanner_read_status(*dev);
}; };
if (set == AFE_INIT) if (set == AFE_INIT) {
{ dev->frontend = dev->frontend_initial;
DBG(DBG_proc, "%s(): setting DAC %u\n", __func__,
static_cast<unsigned>(dev->model->adc_id));
dev->frontend = dev->frontend_initial;
} }
// write them to analog frontend // write them to analog frontend
@ -497,7 +494,6 @@ static void gl846_init_motor_regs_scan(Genesys_Device* dev,
dist *= 2; dist *= 2;
} }
} }
DBG(DBG_io2, "%s: acceleration distance=%d\n", __func__, dist);
// check for overflow // check for overflow
if (dist < feedl) { if (dist < feedl) {
@ -507,7 +503,6 @@ static void gl846_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_FEEDL, feedl); reg->set24(REG_FEEDL, feedl);
DBG(DBG_io, "%s: feedl=%d\n", __func__, feedl);
unsigned ccdlmt = (reg->get8(REG_0x0C) & REG_0x0C_CCDLMT) + 1; unsigned ccdlmt = (reg->get8(REG_0x0C) & REG_0x0C_CCDLMT) + 1;
unsigned tgtime = 1 << (reg->get8(REG_0x1C) & REG_0x1C_TGTIME); unsigned tgtime = 1 << (reg->get8(REG_0x1C) & REG_0x1C_TGTIME);
@ -562,10 +557,7 @@ static void gl846_init_motor_regs_scan(Genesys_Device* dev,
&z1, &z1,
&z2); &z2);
DBG(DBG_info, "%s: z1 = %d\n", __func__, z1);
reg->set24(REG_0x60, z1 | (static_cast<unsigned>(motor_profile.step_type) << (16 + REG_0x60S_STEPSEL))); reg->set24(REG_0x60, z1 | (static_cast<unsigned>(motor_profile.step_type) << (16 + REG_0x60S_STEPSEL)));
DBG(DBG_info, "%s: z2 = %d\n", __func__, z2);
reg->set24(REG_0x63, z2 | (static_cast<unsigned>(motor_profile.step_type) << (16 + REG_0x63S_FSTPSEL))); reg->set24(REG_0x63, z2 | (static_cast<unsigned>(motor_profile.step_type) << (16 + REG_0x63S_FSTPSEL)));
reg->set8_mask(REG_0x1E, scan_dummy, 0x0f); reg->set8_mask(REG_0x1E, scan_dummy, 0x0f);
@ -694,10 +686,7 @@ static void gl846_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* MAXWD is expressed in 4 words unit */ /* MAXWD is expressed in 4 words unit */
// BUG: we shouldn't multiply by channels here // BUG: we shouldn't multiply by channels here
reg->set24(REG_MAXWD, (session.output_line_bytes_raw * session.params.channels >> 2)); reg->set24(REG_MAXWD, (session.output_line_bytes_raw * session.params.channels >> 2));
reg->set16(REG_LPERIOD, exposure_time); reg->set16(REG_LPERIOD, exposure_time);
DBG (DBG_io2, "%s: exposure_time used=%d\n", __func__, exposure_time);
reg->set8(0x34, sensor.dummy_pixel); reg->set8(0x34, sensor.dummy_pixel);
} }
@ -729,10 +718,6 @@ void CommandSetGl846::init_regs_for_scan_session(Genesys_Device* dev, const Gene
exposure_time = sensor.exposure_lperiod; exposure_time = sensor.exposure_lperiod;
const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure_time, session); const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure_time, session);
DBG(DBG_info, "%s : exposure_time=%d pixels\n", __func__, exposure_time);
DBG(DBG_info, "%s : scan_step_type=%d\n", __func__,
static_cast<unsigned>(motor_profile.step_type));
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */

Wyświetl plik

@ -311,7 +311,6 @@ static void gl847_init_motor_regs_scan(Genesys_Device* dev,
} }
reg->set24(REG_LINCNT, scan_lines); reg->set24(REG_LINCNT, scan_lines);
DBG(DBG_io, "%s: lincnt=%d\n", __func__, scan_lines);
reg->set8(REG_0x02, 0); reg->set8(REG_0x02, 0);
sanei_genesys_set_motor_power(*reg, true); sanei_genesys_set_motor_power(*reg, true);
@ -379,7 +378,6 @@ static void gl847_init_motor_regs_scan(Genesys_Device* dev,
dist *= 2; dist *= 2;
} }
} }
DBG(DBG_io2, "%s: acceleration distance=%d\n", __func__, dist);
// check for overflow // check for overflow
if (dist < feedl) { if (dist < feedl) {
@ -430,10 +428,7 @@ static void gl847_init_motor_regs_scan(Genesys_Device* dev,
&z1, &z1,
&z2); &z2);
DBG(DBG_info, "%s: z1 = %d\n", __func__, z1);
reg->set24(REG_0x60, z1 | (static_cast<unsigned>(motor_profile.step_type) << (16+REG_0x60S_STEPSEL))); reg->set24(REG_0x60, z1 | (static_cast<unsigned>(motor_profile.step_type) << (16+REG_0x60S_STEPSEL)));
DBG(DBG_info, "%s: z2 = %d\n", __func__, z2);
reg->set24(REG_0x63, z2 | (static_cast<unsigned>(motor_profile.step_type) << (16+REG_0x63S_FSTPSEL))); reg->set24(REG_0x63, z2 | (static_cast<unsigned>(motor_profile.step_type) << (16+REG_0x63S_FSTPSEL)));
reg->set8_mask(REG_0x1E, scan_dummy, 0x0f); reg->set8_mask(REG_0x1E, scan_dummy, 0x0f);
@ -569,10 +564,7 @@ static void gl847_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
/* MAXWD is expressed in 4 words unit */ /* MAXWD is expressed in 4 words unit */
// BUG: we shouldn't multiply by channels here // BUG: we shouldn't multiply by channels here
reg->set24(REG_MAXWD, (session.output_line_bytes_raw * session.params.channels >> 2)); reg->set24(REG_MAXWD, (session.output_line_bytes_raw * session.params.channels >> 2));
reg->set16(REG_LPERIOD, exposure_time); reg->set16(REG_LPERIOD, exposure_time);
DBG(DBG_io2, "%s: exposure_time used=%d\n", __func__, exposure_time);
reg->set8(0x34, sensor.dummy_pixel); reg->set8(0x34, sensor.dummy_pixel);
} }
@ -604,10 +596,6 @@ void CommandSetGl847::init_regs_for_scan_session(Genesys_Device* dev, const Gene
exposure_time = sensor.exposure_lperiod; exposure_time = sensor.exposure_lperiod;
const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure_time, session); const auto& motor_profile = get_motor_profile(dev->motor.profiles, exposure_time, session);
DBG(DBG_info, "%s : exposure_time=%d pixels\n", __func__, exposure_time);
DBG(DBG_info, "%s : scan_step_type=%d\n", __func__,
static_cast<unsigned>(motor_profile.step_type));
/* we enable true gray for cis scanners only, and just when doing /* we enable true gray for cis scanners only, and just when doing
* scan since color calibration is OK for this mode * scan since color calibration is OK for this mode
*/ */

Wyświetl plik

@ -101,8 +101,6 @@ std::uint8_t ScannerInterfaceUsb::read_register(std::uint16_t address)
usb_dev_.control_msg(REQUEST_TYPE_IN, REQUEST_REGISTER, VALUE_READ_REGISTER, INDEX, usb_dev_.control_msg(REQUEST_TYPE_IN, REQUEST_REGISTER, VALUE_READ_REGISTER, INDEX,
1, &value); 1, &value);
} }
DBG(DBG_proc, "%s (0x%02x, 0x%02x) completed\n", __func__, address, value);
return value; return value;
} }