genesys: Simplify move_to_ta() on gl842

merge-requests/244/head
Povilas Kanapickas 2020-05-26 01:32:42 +03:00
rodzic b8a24ee409
commit bc973a21c2
1 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -931,12 +931,8 @@ void CommandSetGl842::move_to_ta(Genesys_Device* dev) const
{
DBG_HELPER(dbg);
const auto& resolution_settings = dev->model->get_resolution_settings(dev->model->default_method);
float resolution = resolution_settings.get_min_resolution_y();
unsigned multiplier = 16;
unsigned feed = static_cast<unsigned>(multiplier * (dev->model->y_offset_sensor_to_ta * resolution) /
MM_PER_INCH);
unsigned feed = static_cast<unsigned>((dev->model->y_offset_sensor_to_ta * dev->motor.base_ydpi) /
MM_PER_INCH);
scanner_move(*dev, dev->model->default_method, feed, Direction::FORWARD);
}