genesys: Rename Genesys_Motor::{get_slope -> get_slope_with_step_type}

merge-requests/318/head
Povilas Kanapickas 2020-01-31 20:13:12 +02:00
rodzic 7dca191b14
commit 879587f303
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -339,8 +339,8 @@ MotorSlopeTable sanei_genesys_create_slope_table3(AsicType asic_type, const Gene
{
unsigned target_speed_w = (exposure_time * yres) / motor.base_ydpi;
return create_slope_table(motor.get_slope(step_type), target_speed_w, step_type, 1, 1,
get_slope_table_max_size(asic_type));
return create_slope_table(motor.get_slope_with_step_type(step_type), target_speed_w,
step_type, 1, 1, get_slope_table_max_size(asic_type));
}
/** @brief computes gamma table
@ -415,7 +415,7 @@ SANE_Int sanei_genesys_exposure_time2(Genesys_Device * dev, float ydpi,
StepType step_type, int endpixel, int exposure_by_led)
{
int exposure_by_ccd = endpixel + 32;
unsigned max_speed_motor_w = dev->motor.get_slope(step_type).max_speed_w;
unsigned max_speed_motor_w = dev->motor.get_slope_with_step_type(step_type).max_speed_w;
int exposure_by_motor = static_cast<int>((max_speed_motor_w * dev->motor.base_ydpi) / ydpi);
int exposure = exposure_by_ccd;

Wyświetl plik

@ -860,7 +860,7 @@ static void gl841_init_motor_regs(Genesys_Device* dev, const Genesys_Sensor& sen
if (action == MOTOR_ACTION_HOME_FREE) {
/* HOME_FREE must be able to stop in one step, so do not try to get faster */
fast_exposure = dev->motor.get_slope(StepType::FULL).max_speed_w;
fast_exposure = dev->motor.get_slope_with_step_type(StepType::FULL).max_speed_w;
}
auto fast_table = sanei_genesys_create_slope_table3(dev->model->asic_type, dev->motor,

Wyświetl plik

@ -151,12 +151,12 @@ struct Genesys_Motor
// slopes to derive individual slopes from
std::vector<MotorSlope> slopes;
MotorSlope& get_slope(StepType step_type)
MotorSlope& get_slope_with_step_type(StepType step_type)
{
return slopes[static_cast<unsigned>(step_type)];
}
const MotorSlope& get_slope(StepType step_type) const
const MotorSlope& get_slope_with_step_type(StepType step_type) const
{
return slopes[static_cast<unsigned>(step_type)];
}