genesys: Don't perform register writes in init_regs_for_shading()

merge-requests/327/head
Povilas Kanapickas 2020-02-02 18:45:20 +02:00
rodzic 34c15b47d9
commit bdc671b58b
6 zmienionych plików z 20 dodań i 10 usunięć

Wyświetl plik

@ -2943,6 +2943,10 @@ static void genesys_flatbed_calibration(Genesys_Device* dev, Genesys_Sensor& sen
dev->interface->record_progress_message("init_regs_for_shading");
dev->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg);
if (dev->model->asic_type != AsicType::GL646) {
dev->interface->write_registers(dev->calib_reg);
}
dev->interface->record_progress_message("genesys_dark_white_shading_calibration");
genesys_dark_white_shading_calibration(dev, sensor);
} else {
@ -2953,6 +2957,10 @@ static void genesys_flatbed_calibration(Genesys_Device* dev, Genesys_Sensor& sen
dev->interface->record_progress_message("init_regs_for_shading");
dev->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg);
if (dev->model->asic_type != AsicType::GL646) {
dev->interface->write_registers(dev->calib_reg);
}
dev->interface->record_progress_message("genesys_dark_shading_calibration");
genesys_dark_shading_calibration(dev, sensor);
genesys_repark_sensor_before_shading(dev);
@ -2961,6 +2969,10 @@ static void genesys_flatbed_calibration(Genesys_Device* dev, Genesys_Sensor& sen
dev->interface->record_progress_message("init_regs_for_shading2");
dev->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg);
if (dev->model->asic_type != AsicType::GL646) {
dev->interface->write_registers(dev->calib_reg);
}
dev->interface->record_progress_message("genesys_white_shading_calibration");
genesys_white_shading_calibration(dev, sensor);
genesys_repark_sensor_after_white_shading(dev);
@ -3048,6 +3060,10 @@ static void genesys_sheetfed_calibration(Genesys_Device* dev, Genesys_Sensor& se
dev->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg);
if (dev->model->asic_type != AsicType::GL646) {
dev->interface->write_registers(dev->calib_reg);
}
try {
genesys_dark_shading_calibration(dev, sensor);
} catch (...) {
@ -3070,6 +3086,10 @@ static void genesys_sheetfed_calibration(Genesys_Device* dev, Genesys_Sensor& se
dev->cmd_set->init_regs_for_shading(dev, sensor, dev->calib_reg);
if (dev->model->asic_type != AsicType::GL646) {
dev->interface->write_registers(dev->calib_reg);
}
try {
genesys_white_shading_calibration(dev, sensor);
genesys_repark_sensor_after_white_shading(dev);

Wyświetl plik

@ -1240,8 +1240,6 @@ void CommandSetGl124::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
throw;
}
sanei_genesys_set_motor_power(regs, false);
dev->interface->write_registers(regs);
}
void CommandSetGl124::wait_for_motor_stop(Genesys_Device* dev) const

Wyświetl plik

@ -2494,8 +2494,6 @@ void CommandSetGl841::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
compute_session(dev, session, calib_sensor);
init_regs_for_scan_session(dev, calib_sensor, &regs, session);
dev->interface->write_registers(regs);
}
// set up registers for the actual scan

Wyświetl plik

@ -1782,8 +1782,6 @@ void CommandSetGl843::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
dev->calib_session = session;
dev->calib_total_bytes_to_read = session.output_total_bytes_raw;
dev->interface->write_registers(regs);
}
/** @brief set up registers for the actual scan

Wyświetl plik

@ -1012,8 +1012,6 @@ void CommandSetGl846::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
init_regs_for_scan_session(dev, calib_sensor, &regs, session);
dev->interface->write_registers(regs);
/* we use ModelFlag::SHADING_REPARK */
dev->set_head_pos_zero(ScanHeadId::PRIMARY);
}

Wyświetl plik

@ -1012,8 +1012,6 @@ void CommandSetGl847::init_regs_for_shading(Genesys_Device* dev, const Genesys_S
init_regs_for_scan_session(dev, calib_sensor, &regs, session);
dev->interface->write_registers(regs);
/* we use ModelFlag::SHADING_REPARK */
dev->set_head_pos_zero(ScanHeadId::PRIMARY);
}