genesys: Add a way to create fastest motor acceleration table

merge-requests/213/head
Povilas Kanapickas 2019-12-14 10:20:19 +02:00
rodzic 83fa276b90
commit 33bfa923d5
2 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -1772,6 +1772,18 @@ MotorSlopeTable sanei_genesys_slope_table(AsicType asic_type, int dpi, int expos
return table;
}
MotorSlopeTable create_slope_table_fastest(AsicType asic_type, int dpi, int base_dpi,
unsigned step_multiplier,
const Motor_Profile& motor_profile)
{
auto table = create_slope_table(motor_profile.slope, motor_profile.slope.max_speed_w,
motor_profile.step_type,
step_multiplier, 2 * step_multiplier,
get_slope_table_max_size(asic_type));
table.final_exposure = (table.final_exposure * base_dpi) / dpi;
return table;
}
/** @brief returns the lowest possible ydpi for the device
* Parses device entry to find lowest motor dpi.
* @param dev device description

Wyświetl plik

@ -416,6 +416,10 @@ MotorSlopeTable sanei_genesys_slope_table(AsicType asic_type, int dpi, int expos
unsigned step_multiplier,
const Motor_Profile& motor_profile);
MotorSlopeTable create_slope_table_fastest(AsicType asic_type, int dpi, int base_dpi,
unsigned step_multiplier,
const Motor_Profile& motor_profile);
/** @brief find lowest motor resolution for the device.
* Parses the resolution list for motor and
* returns the lowest value.