kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Make sure full-step tables are used on gl841
rodzic
e5fa8dd3cc
commit
96a5f963a3
|
@ -259,6 +259,7 @@ std::ostream& operator<<(std::ostream& out, MotorId id)
|
|||
case MotorId::CANON_LIDE_200: out << "CANON_LIDE_200"; break;
|
||||
case MotorId::CANON_LIDE_210: out << "CANON_LIDE_210"; break;
|
||||
case MotorId::CANON_LIDE_35: out << "CANON_LIDE_35"; break;
|
||||
case MotorId::CANON_LIDE_60: out << "CANON_LIDE_60"; break;
|
||||
case MotorId::CANON_LIDE_700: out << "CANON_LIDE_700"; break;
|
||||
case MotorId::CANON_LIDE_80: out << "CANON_LIDE_80"; break;
|
||||
case MotorId::CANON_4400F: out << "CANON_4400F"; break;
|
||||
|
|
|
@ -398,6 +398,7 @@ enum class MotorId : unsigned
|
|||
CANON_LIDE_200,
|
||||
CANON_LIDE_210,
|
||||
CANON_LIDE_35,
|
||||
CANON_LIDE_60,
|
||||
CANON_LIDE_700,
|
||||
CANON_LIDE_80,
|
||||
CANON_4400F,
|
||||
|
|
|
@ -651,6 +651,7 @@ static void gl841_init_motor_regs_scan(Genesys_Device* dev, const Genesys_Sensor
|
|||
allowed to use.
|
||||
*/
|
||||
|
||||
// At least in LiDE 50, 60 the fast movement table is counted in full steps.
|
||||
const auto* fast_profile = get_motor_profile_ptr(dev->motor.fast_profiles, 0, session);
|
||||
if (fast_profile == nullptr) {
|
||||
fast_profile = &motor_profile;
|
||||
|
|
|
@ -1096,7 +1096,7 @@ void genesys_init_usb_device_tables()
|
|||
model.sensor_id = SensorId::CIS_CANON_LIDE_60;
|
||||
model.adc_id = AdcId::CANON_LIDE_35;
|
||||
model.gpio_id = GpioId::CANON_LIDE_35;
|
||||
model.motor_id = MotorId::CANON_LIDE_35;
|
||||
model.motor_id = MotorId::CANON_LIDE_60;
|
||||
model.flags = ModelFlag::DARK_WHITE_CALIBRATION |
|
||||
ModelFlag::CUSTOM_GAMMA;
|
||||
|
||||
|
|
|
@ -107,16 +107,30 @@ void genesys_init_motor_tables()
|
|||
motor.id = MotorId::CANON_LIDE_35;
|
||||
motor.base_ydpi = 1200;
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0};
|
||||
profile.resolutions = {75, 100, 150, 200};
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::HALF, 0};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 60), StepType::HALF, 0};
|
||||
profile.resolutions = {300, 600, 1200, 2400};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0};
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 60), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.id = MotorId::CANON_LIDE_60;
|
||||
motor.base_ydpi = 1200;
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 150), StepType::HALF, 0};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 150), StepType::FULL, 0};
|
||||
profile.resolutions = { 75, 150, 300 };
|
||||
motor.fast_profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(6000, 3000, 100), StepType::FULL, 0};
|
||||
profile.resolutions = { 600, 1200, 2400 };
|
||||
motor.fast_profiles.push_back(profile);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -125,6 +139,7 @@ void genesys_init_motor_tables()
|
|||
motor.base_ydpi = 600;
|
||||
motor.profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0});
|
||||
motor.profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::HALF, 0});
|
||||
motor.fast_profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0});
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -140,6 +155,9 @@ void genesys_init_motor_tables()
|
|||
profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
|
||||
profile.resolutions = {75, 150, 300, 600};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3700, 3700, 2), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -155,6 +173,9 @@ void genesys_init_motor_tables()
|
|||
profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
|
||||
profile.resolutions = {300, 600, 1200};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3000, 2500, 10), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -170,6 +191,9 @@ void genesys_init_motor_tables()
|
|||
profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
|
||||
profile.resolutions = {300, 600, 1200};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3000, 2600, 10), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -184,6 +208,9 @@ void genesys_init_motor_tables()
|
|||
profile = MotorProfile{MotorSlope::create_from_steps(6666, 3700, 8), StepType::HALF, 0};
|
||||
profile.resolutions = {300, 600, 1200};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(6666, 3700, 8), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
@ -429,6 +456,9 @@ void genesys_init_motor_tables()
|
|||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 3250, 60), StepType::HALF, 0};
|
||||
profile.resolutions = {300, 400, 600, 1200};
|
||||
motor.profiles.push_back(profile);
|
||||
|
||||
profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0};
|
||||
motor.fast_profiles.push_back(profile);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue