kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Rename slow_back_home() to move_back_home()
rodzic
35c8cb84f8
commit
27aea235b4
|
@ -107,7 +107,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const = 0;
|
Genesys_Register_Set& regs) const = 0;
|
||||||
|
|
||||||
virtual void wait_for_motor_stop(Genesys_Device* dev) const = 0;
|
virtual void wait_for_motor_stop(Genesys_Device* dev) const = 0;
|
||||||
virtual void slow_back_home(Genesys_Device* dev, bool wait_until_home) const = 0;
|
virtual void move_back_home(Genesys_Device* dev, bool wait_until_home) const = 0;
|
||||||
|
|
||||||
virtual void rewind(Genesys_Device* dev) const = 0;
|
virtual void rewind(Genesys_Device* dev) const = 0;
|
||||||
|
|
||||||
|
|
|
@ -1133,7 +1133,7 @@ void scanner_move(Genesys_Device& dev, unsigned steps, Direction direction)
|
||||||
dev.interface->sleep_ms(100);
|
dev.interface->sleep_ms(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scanner_slow_back_home(Genesys_Device& dev, bool wait_until_home)
|
void scanner_move_back_home(Genesys_Device& dev, bool wait_until_home)
|
||||||
{
|
{
|
||||||
DBG_HELPER_ARGS(dbg, "wait_until_home = %d", wait_until_home);
|
DBG_HELPER_ARGS(dbg, "wait_until_home = %d", wait_until_home);
|
||||||
|
|
||||||
|
@ -1149,7 +1149,7 @@ void scanner_slow_back_home(Genesys_Device& dev, bool wait_until_home)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev.needs_home_ta) {
|
if (dev.needs_home_ta) {
|
||||||
scanner_slow_back_home_ta(dev);
|
scanner_move_back_home_ta(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev.cmd_set->needs_update_home_sensor_gpio()) {
|
if (dev.cmd_set->needs_update_home_sensor_gpio()) {
|
||||||
|
@ -1236,7 +1236,7 @@ void scanner_slow_back_home(Genesys_Device& dev, bool wait_until_home)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev.interface->test_checkpoint("slow_back_home");
|
dev.interface->test_checkpoint("move_back_home");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1266,7 +1266,7 @@ void scanner_slow_back_home(Genesys_Device& dev, bool wait_until_home)
|
||||||
dbg.log(DBG_info, "scanhead is still moving");
|
dbg.log(DBG_info, "scanhead is still moving");
|
||||||
}
|
}
|
||||||
|
|
||||||
void scanner_slow_back_home_ta(Genesys_Device& dev)
|
void scanner_move_back_home_ta(Genesys_Device& dev)
|
||||||
{
|
{
|
||||||
DBG_HELPER(dbg);
|
DBG_HELPER(dbg);
|
||||||
|
|
||||||
|
@ -1872,7 +1872,7 @@ static void genesys_repark_sensor_before_shading(Genesys_Device* dev)
|
||||||
if (dev->cmd_set->has_rewind()) {
|
if (dev->cmd_set->has_rewind()) {
|
||||||
dev->cmd_set->rewind(dev);
|
dev->cmd_set->rewind(dev);
|
||||||
} else {
|
} else {
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->settings.scan_method == ScanMethod::TRANSPARENCY ||
|
if (dev->settings.scan_method == ScanMethod::TRANSPARENCY ||
|
||||||
|
@ -1887,7 +1887,7 @@ static void genesys_repark_sensor_after_white_shading(Genesys_Device* dev)
|
||||||
{
|
{
|
||||||
DBG_HELPER(dbg);
|
DBG_HELPER(dbg);
|
||||||
if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK) {
|
if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK) {
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3312,7 +3312,7 @@ static void genesys_start_scan(Genesys_Device* dev, bool lamp_off)
|
||||||
dev->cmd_set->search_start_position (dev);
|
dev->cmd_set->search_start_position (dev);
|
||||||
|
|
||||||
dev->parking = false;
|
dev->parking = false;
|
||||||
dev->cmd_set->slow_back_home (dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
dev->scanhead_position_in_steps = 0;
|
dev->scanhead_position_in_steps = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3321,7 +3321,7 @@ static void genesys_start_scan(Genesys_Device* dev, bool lamp_off)
|
||||||
/* TODO: check we can drop this since we cannot have the
|
/* TODO: check we can drop this since we cannot have the
|
||||||
scanner's head wandering here */
|
scanner's head wandering here */
|
||||||
dev->parking = false;
|
dev->parking = false;
|
||||||
dev->cmd_set->slow_back_home (dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
|
|
||||||
dev->scanhead_position_in_steps = 0;
|
dev->scanhead_position_in_steps = 0;
|
||||||
}
|
}
|
||||||
|
@ -3371,7 +3371,7 @@ static void genesys_start_scan(Genesys_Device* dev, bool lamp_off)
|
||||||
dev->cmd_set->wait_for_motor_stop(dev);
|
dev->cmd_set->wait_for_motor_stop(dev);
|
||||||
|
|
||||||
if (dev->cmd_set->needs_home_before_init_regs_for_scan(dev)) {
|
if (dev->cmd_set->needs_home_before_init_regs_for_scan(dev)) {
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->settings.scan_method == ScanMethod::TRANSPARENCY ||
|
if (dev->settings.scan_method == ScanMethod::TRANSPARENCY ||
|
||||||
|
@ -3490,7 +3490,7 @@ static void genesys_read_ordered_data(Genesys_Device* dev, SANE_Byte* destinatio
|
||||||
if (!dev->model->is_sheetfed && !(dev->model->flags & GENESYS_FLAG_MUST_WAIT) &&
|
if (!dev->model->is_sheetfed && !(dev->model->flags & GENESYS_FLAG_MUST_WAIT) &&
|
||||||
!dev->parking)
|
!dev->parking)
|
||||||
{
|
{
|
||||||
dev->cmd_set->slow_back_home(dev, false);
|
dev->cmd_set->move_back_home(dev, false);
|
||||||
dev->parking = true;
|
dev->parking = true;
|
||||||
}
|
}
|
||||||
throw SaneException(SANE_STATUS_EOF, "nothing more to scan: EOF");
|
throw SaneException(SANE_STATUS_EOF, "nothing more to scan: EOF");
|
||||||
|
@ -4829,7 +4829,7 @@ static void genesys_buffer_image(Genesys_Scanner *s)
|
||||||
* computing so we can save time
|
* computing so we can save time
|
||||||
*/
|
*/
|
||||||
if (!dev->model->is_sheetfed && !dev->parking) {
|
if (!dev->model->is_sheetfed && !dev->parking) {
|
||||||
dev->cmd_set->slow_back_home(dev, dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
dev->cmd_set->move_back_home(dev, dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
||||||
dev->parking = !(s->dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
dev->parking = !(s->dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6037,7 +6037,7 @@ void sane_read_impl(SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, SANE_
|
||||||
if (!dev->model->is_sheetfed && !(dev->model->flags & GENESYS_FLAG_MUST_WAIT) &&
|
if (!dev->model->is_sheetfed && !(dev->model->flags & GENESYS_FLAG_MUST_WAIT) &&
|
||||||
!dev->parking)
|
!dev->parking)
|
||||||
{
|
{
|
||||||
dev->cmd_set->slow_back_home(dev, false);
|
dev->cmd_set->move_back_home(dev, false);
|
||||||
dev->parking = true;
|
dev->parking = true;
|
||||||
}
|
}
|
||||||
throw SaneException(SANE_STATUS_EOF);
|
throw SaneException(SANE_STATUS_EOF);
|
||||||
|
@ -6134,7 +6134,7 @@ void sane_cancel_impl(SANE_Handle handle)
|
||||||
/* park head if flatbed scanner */
|
/* park head if flatbed scanner */
|
||||||
if (!s->dev->model->is_sheetfed) {
|
if (!s->dev->model->is_sheetfed) {
|
||||||
if (!s->dev->parking) {
|
if (!s->dev->parking) {
|
||||||
s->dev->cmd_set->slow_back_home (s->dev, s->dev->model->flags &
|
s->dev->cmd_set->move_back_home (s->dev, s->dev->model->flags &
|
||||||
GENESYS_FLAG_MUST_WAIT);
|
GENESYS_FLAG_MUST_WAIT);
|
||||||
|
|
||||||
s->dev->parking = !(s->dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
s->dev->parking = !(s->dev->model->flags & GENESYS_FLAG_MUST_WAIT);
|
||||||
|
|
|
@ -1125,9 +1125,9 @@ void CommandSetGl124::rewind(Genesys_Device* dev) const
|
||||||
* @param wait_until_home true to make the function waiting for head
|
* @param wait_until_home true to make the function waiting for head
|
||||||
* to be home before returning, if fals returne immediately
|
* to be home before returning, if fals returne immediately
|
||||||
*/
|
*/
|
||||||
void CommandSetGl124::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl124::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
scanner_slow_back_home(*dev, wait_until_home);
|
scanner_move_back_home(*dev, wait_until_home);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
||||||
|
@ -1961,7 +1961,7 @@ void CommandSetGl124::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("coarse_gain_calibration");
|
dev->interface->test_checkpoint("coarse_gain_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2022,7 +2022,7 @@ void CommandSetGl124::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
|
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
|
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for lamp warmup by scanning the same line until difference
|
// wait for lamp warmup by scanning the same line until difference
|
||||||
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
void update_hardware_sensors(struct Genesys_Scanner* s) const override;
|
void update_hardware_sensors(struct Genesys_Scanner* s) const override;
|
||||||
|
|
|
@ -1451,7 +1451,7 @@ void CommandSetGl646::end_scan(Genesys_Device* dev, Genesys_Register_Set* reg,
|
||||||
* @param dev scanner's device
|
* @param dev scanner's device
|
||||||
* @param wait_until_home true if the function waits until head parked
|
* @param wait_until_home true if the function waits until head parked
|
||||||
*/
|
*/
|
||||||
void CommandSetGl646::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl646::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
DBG_HELPER_ARGS(dbg, "wait_until_home = %d\n", wait_until_home);
|
DBG_HELPER_ARGS(dbg, "wait_until_home = %d\n", wait_until_home);
|
||||||
int i;
|
int i;
|
||||||
|
@ -1545,7 +1545,7 @@ void CommandSetGl646::slow_back_home(Genesys_Device* dev, bool wait_until_home)
|
||||||
dev->cmd_set->begin_scan(dev, sensor, &dev->reg, true);
|
dev->cmd_set->begin_scan(dev, sensor, &dev->reg, true);
|
||||||
|
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("slow_back_home");
|
dev->interface->test_checkpoint("move_back_home");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2695,7 +2695,7 @@ static void gl646_repark_head(Genesys_Device* dev)
|
||||||
while (steps < expected);
|
while (steps < expected);
|
||||||
|
|
||||||
// toggle motor flag, put an huge step number and redo move backward
|
// toggle motor flag, put an huge step number and redo move backward
|
||||||
dev->cmd_set->slow_back_home(dev, 1);
|
dev->cmd_set->move_back_home(dev, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *
|
/* *
|
||||||
|
@ -2840,7 +2840,7 @@ void CommandSetGl646::init(Genesys_Device* dev) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
bool has_rewind() const override { return false; }
|
bool has_rewind() const override { return false; }
|
||||||
|
|
|
@ -2210,7 +2210,7 @@ static void gl841_feed(Genesys_Device* dev, int steps)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moves the slider to the home (top) position slowly
|
// Moves the slider to the home (top) position slowly
|
||||||
void CommandSetGl841::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl841::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
DBG_HELPER_ARGS(dbg, "wait_until_home = %d", wait_until_home);
|
DBG_HELPER_ARGS(dbg, "wait_until_home = %d", wait_until_home);
|
||||||
Genesys_Register_Set local_reg;
|
Genesys_Register_Set local_reg;
|
||||||
|
@ -2278,7 +2278,7 @@ void CommandSetGl841::slow_back_home(Genesys_Device* dev, bool wait_until_home)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("slow_back_home");
|
dev->interface->test_checkpoint("move_back_home");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2704,7 +2704,7 @@ SensorExposure CommandSetGl841::led_calibration(Genesys_Device* dev, const Genes
|
||||||
|
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("led_calibration");
|
dev->interface->test_checkpoint("led_calibration");
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return { 0, 0, 0 };
|
return { 0, 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2809,7 +2809,7 @@ SensorExposure CommandSetGl841::led_calibration(Genesys_Device* dev, const Genes
|
||||||
|
|
||||||
DBG(DBG_info,"%s: acceptable exposure: %d,%d,%d\n", __func__, exp[0], exp[1], exp[2]);
|
DBG(DBG_info,"%s: acceptable exposure: %d,%d,%d\n", __func__, exp[0], exp[1], exp[2]);
|
||||||
|
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
|
|
||||||
return calib_sensor.exposure;
|
return calib_sensor.exposure;
|
||||||
}
|
}
|
||||||
|
@ -3378,7 +3378,7 @@ void CommandSetGl841::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("coarse_gain_calibration");
|
dev->interface->test_checkpoint("coarse_gain_calibration");
|
||||||
gl841_stop_action(dev);
|
gl841_stop_action(dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3475,7 +3475,7 @@ void CommandSetGl841::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
|
|
||||||
gl841_stop_action(dev);
|
gl841_stop_action(dev);
|
||||||
|
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for lamp warmup by scanning the same line until difference
|
// wait for lamp warmup by scanning the same line until difference
|
||||||
|
@ -3540,7 +3540,7 @@ static void sanei_gl841_repark_head(Genesys_Device* dev)
|
||||||
gl841_feed(dev,232);
|
gl841_feed(dev,232);
|
||||||
|
|
||||||
// toggle motor flag, put an huge step number and redo move backward
|
// toggle motor flag, put an huge step number and redo move backward
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3586,11 +3586,11 @@ void CommandSetGl841::init(Genesys_Device* dev) const
|
||||||
// Set analog frontend
|
// Set analog frontend
|
||||||
dev->cmd_set->set_fe(dev, sensor, AFE_INIT);
|
dev->cmd_set->set_fe(dev, sensor, AFE_INIT);
|
||||||
|
|
||||||
// FIXME: slow_back_home modifies dev->calib_reg and requires it to be filled
|
// FIXME: move_back_home modifies dev->calib_reg and requires it to be filled
|
||||||
dev->calib_reg = dev->reg;
|
dev->calib_reg = dev->reg;
|
||||||
|
|
||||||
// Move home
|
// Move home
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
|
|
||||||
// Init shading data
|
// Init shading data
|
||||||
sanei_genesys_init_shading_data(dev, sensor, sensor.sensor_pixels);
|
sanei_genesys_init_shading_data(dev, sensor, sensor.sensor_pixels);
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
bool has_rewind() const override { return false; }
|
bool has_rewind() const override { return false; }
|
||||||
|
|
|
@ -1670,9 +1670,9 @@ void CommandSetGl843::end_scan(Genesys_Device* dev, Genesys_Register_Set* reg,
|
||||||
|
|
||||||
/** @brief Moves the slider to the home (top) position slowly
|
/** @brief Moves the slider to the home (top) position slowly
|
||||||
* */
|
* */
|
||||||
void CommandSetGl843::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl843::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
scanner_slow_back_home(*dev, wait_until_home);
|
scanner_move_back_home(*dev, wait_until_home);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
||||||
|
@ -2077,7 +2077,7 @@ SensorExposure CommandSetGl843::led_calibration(Genesys_Device* dev, const Genes
|
||||||
|
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("led_calibration");
|
dev->interface->test_checkpoint("led_calibration");
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return { 0, 0, 0 };
|
return { 0, 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2150,7 +2150,7 @@ SensorExposure CommandSetGl843::led_calibration(Genesys_Device* dev, const Genes
|
||||||
|
|
||||||
DBG(DBG_info, "%s: acceptable exposure: %d,%d,%d\n", __func__, expr, expg, expb);
|
DBG(DBG_info, "%s: acceptable exposure: %d,%d,%d\n", __func__, expr, expg, expb);
|
||||||
|
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
|
|
||||||
return calib_sensor.exposure;
|
return calib_sensor.exposure;
|
||||||
}
|
}
|
||||||
|
@ -2502,7 +2502,7 @@ void CommandSetGl843::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("coarse_gain_calibration");
|
dev->interface->test_checkpoint("coarse_gain_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2556,7 +2556,7 @@ void CommandSetGl843::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
|
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
|
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait for lamp warmup by scanning the same line until difference
|
// wait for lamp warmup by scanning the same line until difference
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
bool has_rewind() const override { return false; }
|
bool has_rewind() const override { return false; }
|
||||||
|
|
|
@ -883,9 +883,9 @@ 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) postion slowly
|
||||||
void CommandSetGl846::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl846::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
scanner_slow_back_home(*dev, wait_until_home);
|
scanner_move_back_home(*dev, wait_until_home);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
||||||
|
@ -1305,7 +1305,7 @@ SensorExposure CommandSetGl846::led_calibration(Genesys_Device* dev, const Genes
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("led_calibration");
|
dev->interface->test_checkpoint("led_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return { 0, 0, 0 };
|
return { 0, 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1374,7 +1374,7 @@ SensorExposure CommandSetGl846::led_calibration(Genesys_Device* dev, const Genes
|
||||||
/* go back home */
|
/* go back home */
|
||||||
if(move>20)
|
if(move>20)
|
||||||
{
|
{
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { exp[0], exp[1], exp[2] };
|
return { exp[0], exp[1], exp[2] };
|
||||||
|
@ -2005,7 +2005,7 @@ void CommandSetGl846::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("coarse_gain_calibration");
|
dev->interface->test_checkpoint("coarse_gain_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2060,7 +2060,7 @@ void CommandSetGl846::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
|
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
|
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CommandSetGl846::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const
|
bool CommandSetGl846::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const
|
||||||
|
|
|
@ -173,7 +173,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
bool has_rewind() const override { return false; }
|
bool has_rewind() const override { return false; }
|
||||||
|
|
|
@ -926,9 +926,9 @@ static void gl847_rewind(Genesys_Device* dev)
|
||||||
* @param wait_until_home true to make the function waiting for head
|
* @param wait_until_home true to make the function waiting for head
|
||||||
* to be home before returning, if fals returne immediately
|
* to be home before returning, if fals returne immediately
|
||||||
*/
|
*/
|
||||||
void CommandSetGl847::slow_back_home(Genesys_Device* dev, bool wait_until_home) const
|
void CommandSetGl847::move_back_home(Genesys_Device* dev, bool wait_until_home) const
|
||||||
{
|
{
|
||||||
scanner_slow_back_home(*dev, wait_until_home);
|
scanner_move_back_home(*dev, wait_until_home);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi
|
||||||
|
@ -1339,7 +1339,7 @@ SensorExposure CommandSetGl847::led_calibration(Genesys_Device* dev, const Genes
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("led_calibration");
|
dev->interface->test_checkpoint("led_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return { 0, 0, 0 };
|
return { 0, 0, 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1402,7 +1402,7 @@ SensorExposure CommandSetGl847::led_calibration(Genesys_Device* dev, const Genes
|
||||||
|
|
||||||
// go back home
|
// go back home
|
||||||
if (move>20) {
|
if (move>20) {
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { exp[0], exp[1], exp[2] };
|
return { exp[0], exp[1], exp[2] };
|
||||||
|
@ -2075,7 +2075,7 @@ void CommandSetGl847::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
if (is_testing_mode()) {
|
if (is_testing_mode()) {
|
||||||
dev->interface->test_checkpoint("coarse_gain_calibration");
|
dev->interface->test_checkpoint("coarse_gain_calibration");
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2136,7 +2136,7 @@ void CommandSetGl847::coarse_gain_calibration(Genesys_Device* dev, const Genesys
|
||||||
|
|
||||||
scanner_stop_action(*dev);
|
scanner_stop_action(*dev);
|
||||||
|
|
||||||
slow_back_home(dev, true);
|
move_back_home(dev, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CommandSetGl847::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const
|
bool CommandSetGl847::needs_home_before_init_regs_for_scan(Genesys_Device* dev) const
|
||||||
|
|
|
@ -161,7 +161,7 @@ public:
|
||||||
Genesys_Register_Set& regs) const override;
|
Genesys_Register_Set& regs) const override;
|
||||||
|
|
||||||
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
||||||
void slow_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
||||||
void rewind(Genesys_Device* dev) const override;
|
void rewind(Genesys_Device* dev) const override;
|
||||||
|
|
||||||
bool has_rewind() const override { return false; }
|
bool has_rewind() const override { return false; }
|
||||||
|
|
|
@ -1582,7 +1582,7 @@ void sanei_genesys_asic_init(Genesys_Device* dev, bool /*max_regs*/)
|
||||||
dev->already_initialized = true;
|
dev->already_initialized = true;
|
||||||
|
|
||||||
// Move to home if needed
|
// Move to home if needed
|
||||||
dev->cmd_set->slow_back_home(dev, true);
|
dev->cmd_set->move_back_home(dev, true);
|
||||||
dev->scanhead_position_in_steps = 0;
|
dev->scanhead_position_in_steps = 0;
|
||||||
|
|
||||||
// Set powersaving (default = 15 minutes)
|
// Set powersaving (default = 15 minutes)
|
||||||
|
|
|
@ -355,8 +355,8 @@ extern void sanei_genesys_search_reference_point(Genesys_Device* dev, Genesys_Se
|
||||||
// moves the scan head by the specified steps at the motor base dpi
|
// moves the scan head by the specified steps at the motor base dpi
|
||||||
void scanner_move(Genesys_Device& dev, unsigned steps, Direction direction);
|
void scanner_move(Genesys_Device& dev, unsigned steps, Direction direction);
|
||||||
|
|
||||||
void scanner_slow_back_home(Genesys_Device& dev, bool wait_until_home);
|
void scanner_move_back_home(Genesys_Device& dev, bool wait_until_home);
|
||||||
void scanner_slow_back_home_ta(Genesys_Device& dev);
|
void scanner_move_back_home_ta(Genesys_Device& dev);
|
||||||
|
|
||||||
void scanner_clear_scan_and_feed_counts(Genesys_Device& dev);
|
void scanner_clear_scan_and_feed_counts(Genesys_Device& dev);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue