genesys: Don't rely on motor profile fallbacks

merge-requests/318/head
Povilas Kanapickas 2020-01-31 20:13:10 +02:00
rodzic 1942c5fd32
commit 2d0fc3ce55
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -1767,8 +1767,7 @@ const Motor_Profile& sanei_genesys_get_motor_profile(const std::vector<Motor_Pro
/* default fallback */
if(idx<0)
{
DBG (DBG_warn,"%s: using default motor profile\n",__func__);
idx=0;
throw SaneException("Motor slope is not configured");
}
return motors[idx];

Wyświetl plik

@ -102,6 +102,13 @@ void genesys_init_motor_profile_tables_gl843()
profile.slope = MotorSlope::create_from_steps(8743, 300, 794);
gl843_motor_profiles->push_back(profile);
profile = Motor_Profile(); // BUG: this is a fallback slope that was selected previously
profile.motor_id = MotorId::CANON_8600F;
profile.exposure = 0;
profile.step_type = StepType::HALF;
profile.slope = MotorSlope::create_from_steps(44444, 500, 489);
gl843_motor_profiles->push_back(profile);
profile = Motor_Profile();
profile.motor_id = MotorId::CANON_8600F;
profile.exposure = 0x59d8;