1 /*  sane - Scanner Access Now Easy.
2 
3     Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
4 
5     This file is part of the SANE package.
6 
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License as
9     published by the Free Software Foundation; either version 2 of the
10     License, or (at your option) any later version.
11 
12     This program is distributed in the hope that it will be useful, but
13     WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     General Public License for more details.
16 
17     You should have received a copy of the GNU General Public License
18     along with this program.  If not, see <https://www.gnu.org/licenses/>.
19 
20     As a special exception, the authors of SANE give permission for
21     additional uses of the libraries contained in this release of SANE.
22 
23     The exception is that, if you link a SANE library with other files
24     to produce an executable, this does not by itself cause the
25     resulting executable to be covered by the GNU General Public
26     License.  Your use of that executable is in no way restricted on
27     account of linking the SANE library code into it.
28 
29     This exception does not, however, invalidate any other reasons why
30     the executable file might be covered by the GNU General Public
31     License.
32 
33     If you submit changes to SANE to the maintainers to be included in
34     a subsequent release, you agree by submitting the changes that
35     those changes may be distributed with this exception intact.
36 
37     If you write modifications of your own for SANE, it is your choice
38     whether to permit this exception to apply to your modifications.
39     If you do not wish that, delete this exception notice.
40 */
41 
42 #define DEBUG_DECLARE_ONLY
43 
44 #include "low.h"
45 
46 namespace genesys {
47 
48 StaticInit<std::vector<Genesys_Motor>> s_motors;
49 
genesys_init_motor_tables()50 void genesys_init_motor_tables()
51 {
52     s_motors.init();
53 
54     MotorProfile profile;
55 
56     Genesys_Motor motor;
57     motor.id = MotorId::UMAX;
58     motor.base_ydpi = 2400;
59     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::FULL, 0});
60     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::HALF, 0});
61     s_motors->push_back(std::move(motor));
62 
63 
64     motor = Genesys_Motor();
65     motor.id = MotorId::MD_5345; // MD5345/6228/6471
66     motor.base_ydpi = 2400;
67     motor.profiles.push_back({MotorSlope::create_from_steps(2000, 1375, 128), StepType::FULL, 0});
68     motor.profiles.push_back({MotorSlope::create_from_steps(2000, 1375, 128), StepType::HALF, 0});
69     s_motors->push_back(std::move(motor));
70 
71 
72     motor = Genesys_Motor();
73     motor.id = MotorId::ST24;
74     motor.base_ydpi = 2400;
75     motor.profiles.push_back({MotorSlope::create_from_steps(2289, 2100, 128), StepType::FULL, 0});
76     motor.profiles.push_back({MotorSlope::create_from_steps(2289, 2100, 128), StepType::HALF, 0});
77     s_motors->push_back(std::move(motor));
78 
79 
80     motor = Genesys_Motor();
81     motor.id = MotorId::HP3670;
82     motor.base_ydpi = 1200;
83     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::FULL, 0});
84     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::HALF, 0});
85     s_motors->push_back(std::move(motor));
86 
87 
88     motor = Genesys_Motor();
89     motor.id = MotorId::HP2400;
90     motor.base_ydpi = 1200;
91     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::FULL, 0});
92     motor.profiles.push_back({MotorSlope::create_from_steps(11000, 3000, 128), StepType::HALF, 0});
93     s_motors->push_back(std::move(motor));
94 
95 
96     motor = Genesys_Motor();
97     motor.id = MotorId::HP2300;
98     motor.base_ydpi = 1200;
99     motor.profiles.push_back({MotorSlope::create_from_steps(3200, 1200, 128), StepType::FULL, 0});
100     motor.profiles.push_back({MotorSlope::create_from_steps(3200, 1200, 128), StepType::HALF, 0});
101     s_motors->push_back(std::move(motor));
102 
103 
104     motor = Genesys_Motor();
105     motor.id = MotorId::CANON_LIDE_35;
106     motor.base_ydpi = 1200;
107 
108     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 150), StepType::HALF, 0};
109     profile.resolutions = { 75, 150, 200, 300, 600 };
110     motor.profiles.push_back(profile);
111 
112     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 150), StepType::QUARTER, 0};
113     profile.resolutions = { 1200, 2400 };
114     motor.profiles.push_back(profile);
115 
116     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 150), StepType::FULL, 0};
117     profile.resolutions = { 75, 150, 200, 300 };
118     motor.fast_profiles.push_back(profile);
119 
120     profile = MotorProfile{MotorSlope::create_from_steps(6000, 3000, 100), StepType::FULL, 0};
121     profile.resolutions = { 600, 1200, 2400 };
122     motor.fast_profiles.push_back(profile);
123 
124     s_motors->push_back(std::move(motor));
125 
126 
127     motor = Genesys_Motor();
128     motor.id = MotorId::CANON_LIDE_60;
129     motor.base_ydpi = 1200;
130 
131     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 150), StepType::HALF, 0};
132     motor.profiles.push_back(profile);
133 
134     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1400, 150), StepType::FULL, 0};
135     profile.resolutions = { 75, 150, 300 };
136     motor.fast_profiles.push_back(profile);
137 
138     profile = MotorProfile{MotorSlope::create_from_steps(6000, 3000, 100), StepType::FULL, 0};
139     profile.resolutions = { 600, 1200, 2400 };
140     motor.fast_profiles.push_back(profile);
141 
142     s_motors->push_back(std::move(motor));
143 
144 
145     motor = Genesys_Motor();
146     motor.id = MotorId::CANON_LIDE_90;
147     motor.base_ydpi = 1200;
148     profile = {MotorSlope::create_from_steps(8000, 3000, 200), StepType::FULL, 0};
149     profile.resolutions = { 150, 300 };
150     motor.profiles.push_back(profile);
151 
152     profile = {MotorSlope::create_from_steps(7000, 3000, 200), StepType::HALF, 0};
153     profile.resolutions = { 600, 1200 };
154     motor.profiles.push_back(profile);
155 
156     profile = {MotorSlope::create_from_steps(7000, 3000, 200), StepType::QUARTER, 0};
157     profile.resolutions = { 2400 };
158     motor.profiles.push_back(profile);
159     s_motors->push_back(std::move(motor));
160 
161 
162     motor = Genesys_Motor();
163     motor.id = MotorId::XP200;
164     motor.base_ydpi = 600;
165     motor.profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0});
166     motor.profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::HALF, 0});
167     motor.fast_profiles.push_back({MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0});
168     s_motors->push_back(std::move(motor));
169 
170 
171     motor = Genesys_Motor();
172     motor.id = MotorId::XP300;
173     motor.base_ydpi = 300;
174     // works best with GPIO10, GPIO14 off
175     profile = MotorProfile{MotorSlope::create_from_steps(3700, 3700, 2), StepType::FULL, 0};
176     profile.resolutions = {}; // used during fast moves
177     motor.profiles.push_back(profile);
178 
179     // FIXME: this motor profile is useless
180     profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
181     profile.resolutions = {75, 150, 300, 600};
182     motor.profiles.push_back(profile);
183 
184     profile = MotorProfile{MotorSlope::create_from_steps(3700, 3700, 2), StepType::FULL, 0};
185     motor.fast_profiles.push_back(profile);
186     s_motors->push_back(std::move(motor));
187 
188 
189     motor = Genesys_Motor();
190     motor.id = MotorId::DP665;
191     motor.base_ydpi = 750;
192 
193     profile = MotorProfile{MotorSlope::create_from_steps(3000, 2500, 10), StepType::FULL, 0};
194     profile.resolutions = {75, 150};
195     motor.profiles.push_back(profile);
196 
197     // FIXME: this motor profile is useless
198     profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
199     profile.resolutions = {300, 600, 1200};
200     motor.profiles.push_back(profile);
201 
202     profile = MotorProfile{MotorSlope::create_from_steps(3000, 2500, 10), StepType::FULL, 0};
203     motor.fast_profiles.push_back(profile);
204     s_motors->push_back(std::move(motor));
205 
206 
207     motor = Genesys_Motor();
208     motor.id = MotorId::ROADWARRIOR;
209     motor.base_ydpi = 750;
210 
211     profile = MotorProfile{MotorSlope::create_from_steps(3000, 2600, 10), StepType::FULL, 0};
212     profile.resolutions = {75, 150};
213     motor.profiles.push_back(profile);
214 
215     // FIXME: this motor profile is useless
216     profile = MotorProfile{MotorSlope::create_from_steps(11000, 11000, 2), StepType::HALF, 0};
217     profile.resolutions = {300, 600, 1200};
218     motor.profiles.push_back(profile);
219 
220     profile = MotorProfile{MotorSlope::create_from_steps(3000, 2600, 10), StepType::FULL, 0};
221     motor.fast_profiles.push_back(profile);
222     s_motors->push_back(std::move(motor));
223 
224 
225     motor = Genesys_Motor();
226     motor.id = MotorId::DSMOBILE_600;
227     motor.base_ydpi = 750;
228 
229     profile = MotorProfile{MotorSlope::create_from_steps(6666, 3700, 8), StepType::FULL, 0};
230     profile.resolutions = {75, 150};
231     motor.profiles.push_back(profile);
232 
233     profile = MotorProfile{MotorSlope::create_from_steps(6666, 3700, 8), StepType::HALF, 0};
234     profile.resolutions = {300, 600, 1200};
235     motor.profiles.push_back(profile);
236 
237     profile = MotorProfile{MotorSlope::create_from_steps(6666, 3700, 8), StepType::FULL, 0};
238     motor.fast_profiles.push_back(profile);
239     s_motors->push_back(std::move(motor));
240 
241 
242     motor = Genesys_Motor();
243     motor.id = MotorId::CANON_LIDE_100;
244     motor.base_ydpi = 1200;
245     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 864, 255),
246                               StepType::HALF, 1432});
247     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 864, 279),
248                               StepType::QUARTER, 2712});
249     motor.profiles.push_back({MotorSlope::create_from_steps(31680, 864, 247),
250                               StepType::EIGHTH, 5280});
251     s_motors->push_back(std::move(motor));
252 
253 
254     motor = Genesys_Motor();
255     motor.id = MotorId::CANON_LIDE_200;
256     motor.base_ydpi = 1200;
257     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 864, 255),
258                               StepType::HALF, 1432});
259     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 864, 279),
260                               StepType::QUARTER, 2712});
261     motor.profiles.push_back({MotorSlope::create_from_steps(31680, 864, 247),
262                               StepType::EIGHTH, 5280});
263     motor.profiles.push_back({MotorSlope::create_from_steps(31680, 864, 247),
264                               StepType::EIGHTH, 10416});
265     s_motors->push_back(std::move(motor));
266 
267 
268     motor = Genesys_Motor();
269     motor.id = MotorId::CANON_LIDE_700;
270     motor.base_ydpi = 1200;
271     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 534, 255),
272                               StepType::HALF, 1424});
273     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 534, 255),
274                               StepType::HALF, 1504});
275     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 2022, 127),
276                               StepType::HALF, 2696});
277     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 534, 255),
278                               StepType::HALF, 2848});
279     motor.profiles.push_back({MotorSlope::create_from_steps(46876, 15864, 2),
280                               StepType::EIGHTH, 10576});
281     s_motors->push_back(std::move(motor));
282 
283 
284     motor = Genesys_Motor();
285     motor.id = MotorId::KVSS080;
286     motor.base_ydpi = 1200;
287     motor.profiles.push_back({MotorSlope::create_from_steps(44444, 500, 489),
288                               StepType::HALF, 8000});
289     s_motors->push_back(std::move(motor));
290 
291 
292     motor = Genesys_Motor();
293     motor.id = MotorId::G4050;
294     motor.base_ydpi = 2400;
295     motor.profiles.push_back({MotorSlope::create_from_steps(7842, 320, 602),
296                               StepType::HALF, 8016});
297     motor.profiles.push_back({MotorSlope::create_from_steps(9422, 254, 1004),
298                               StepType::HALF, 15624});
299     motor.profiles.push_back({MotorSlope::create_from_steps(28032, 2238, 604),
300                               StepType::HALF, 56064});
301     motor.profiles.push_back({MotorSlope::create_from_steps(42752, 1706, 610),
302                               StepType::QUARTER, 42752});
303     s_motors->push_back(std::move(motor));
304 
305 
306     motor = Genesys_Motor();
307     motor.id = MotorId::CANON_4400F;
308     motor.base_ydpi = 2400;
309 
310     profile = MotorProfile();
311     profile.slope = MotorSlope::create_from_steps(28597 * 2, 727 * 2, 200);
312     profile.step_type = StepType::QUARTER;
313     profile.motor_vref = 1;
314     profile.resolutions = { 300, 600 };
315     motor.profiles.push_back(std::move(profile));
316 
317     profile = MotorProfile();
318     profile.slope = MotorSlope::create_from_steps(28597 * 2, 727 * 2, 200);
319     profile.step_type = StepType::QUARTER;
320     profile.motor_vref = 0;
321     profile.resolutions = { 1200, 2400, 4800, 9600 };
322     motor.profiles.push_back(std::move(profile));
323 
324     profile = MotorProfile();
325     profile.slope = MotorSlope::create_from_steps(28597 * 2, 279 * 2, 1000);
326     profile.step_type = StepType::QUARTER;
327     profile.motor_vref = 0;
328     motor.fast_profiles.push_back(std::move(profile));
329 
330     s_motors->push_back(std::move(motor));
331 
332 
333     motor = Genesys_Motor();
334     motor.id = MotorId::CANON_5600F;
335     motor.base_ydpi = 2400;
336 
337     // FIXME: real limit is 134, but for some reason the motor can't acquire that speed.
338     profile = MotorProfile();
339     profile.slope = MotorSlope::create_from_steps(2500 * 2, 134 * 2, 1000);
340     profile.step_type = StepType::HALF;
341     profile.motor_vref = 0;
342     profile.resolutions = { 75, 150 };
343     motor.profiles.push_back(std::move(profile));
344 
345     profile = MotorProfile();
346     profile.slope = MotorSlope::create_from_steps(2500 * 2, 200 * 2, 1000);
347     profile.step_type = StepType::QUARTER;
348     profile.motor_vref = 0;
349     profile.resolutions = { 300, 600, 1200, 2400, 4800 };
350     motor.profiles.push_back(std::move(profile));
351 
352     profile = MotorProfile();
353     profile.slope = MotorSlope::create_from_steps(2500 * 2, 200 * 2, 1000);
354     profile.step_type = StepType::QUARTER;
355     profile.motor_vref = 0;
356     motor.fast_profiles.push_back(std::move(profile));
357 
358     s_motors->push_back(std::move(motor));
359 
360 
361     motor = Genesys_Motor();
362     motor.id = MotorId::CANON_8400F;
363     motor.base_ydpi = 1600;
364 
365     profile = MotorProfile();
366     profile.slope = MotorSlope::create_from_steps(20202 * 4, 333 * 4, 100);
367     profile.step_type = StepType::QUARTER;
368     profile.motor_vref = 0;
369     profile.resolutions = VALUE_FILTER_ANY;
370     profile.scan_methods = { ScanMethod::FLATBED };
371     motor.profiles.push_back(std::move(profile));
372 
373     profile = MotorProfile();
374     profile.slope = MotorSlope::create_from_steps(65535 * 4, 333 * 4, 100);
375     profile.step_type = StepType::QUARTER;
376     profile.motor_vref = 2;
377     profile.resolutions = VALUE_FILTER_ANY;
378     profile.scan_methods = { ScanMethod::TRANSPARENCY, ScanMethod::TRANSPARENCY_INFRARED };
379     motor.profiles.push_back(std::move(profile));
380 
381     profile = MotorProfile();
382     profile.slope = MotorSlope::create_from_steps(65535 * 4, 333 * 4, 200);
383     profile.step_type = StepType::QUARTER;
384     profile.motor_vref = 2;
385     profile.resolutions = VALUE_FILTER_ANY;
386     profile.scan_methods = VALUE_FILTER_ANY;
387     motor.fast_profiles.push_back(std::move(profile));
388 
389     s_motors->push_back(std::move(motor));
390 
391 
392     motor = Genesys_Motor();
393     motor.id = MotorId::CANON_8600F;
394     motor.base_ydpi = 2400;
395 
396     profile = MotorProfile();
397     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
398     profile.step_type = StepType::QUARTER;
399     profile.motor_vref = 3;
400     profile.resolutions = { 300, 600 };
401     profile.scan_methods = { ScanMethod::FLATBED };
402     motor.profiles.push_back(std::move(profile));
403 
404     profile = MotorProfile();
405     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
406     profile.step_type = StepType::QUARTER;
407     profile.motor_vref = 2;
408     profile.resolutions = { 1200, 2400 };
409     profile.scan_methods = { ScanMethod::FLATBED };
410     motor.profiles.push_back(std::move(profile));
411 
412     profile = MotorProfile();
413     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
414     profile.step_type = StepType::QUARTER;
415     profile.motor_vref = 2;
416     profile.resolutions = { 4800 };
417     profile.scan_methods = { ScanMethod::FLATBED };
418     motor.profiles.push_back(std::move(profile));
419 
420     profile = MotorProfile();
421     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
422     profile.step_type = StepType::QUARTER;
423     profile.motor_vref = 2;
424     profile.resolutions = { 300, 600 };
425     profile.scan_methods = { ScanMethod::TRANSPARENCY,
426                              ScanMethod::TRANSPARENCY_INFRARED };
427     motor.profiles.push_back(std::move(profile));
428 
429     profile = MotorProfile();
430     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
431     profile.step_type = StepType::QUARTER;
432     profile.motor_vref = 1;
433     profile.resolutions = { 1200, 2400 };
434     profile.scan_methods = { ScanMethod::TRANSPARENCY,
435                              ScanMethod::TRANSPARENCY_INFRARED };
436     motor.profiles.push_back(std::move(profile));
437 
438     profile = MotorProfile();
439     profile.slope = MotorSlope::create_from_steps(54612, 1500, 219);
440     profile.step_type = StepType::QUARTER;
441     profile.motor_vref = 0;
442     profile.resolutions = { 4800 };
443     profile.scan_methods = { ScanMethod::TRANSPARENCY,
444                              ScanMethod::TRANSPARENCY_INFRARED };
445     motor.profiles.push_back(std::move(profile));
446 
447     profile = MotorProfile();
448     profile.slope = MotorSlope::create_from_steps(59240, 582, 1020);
449     profile.step_type = StepType::QUARTER;
450     profile.motor_vref = 2;
451     motor.fast_profiles.push_back(std::move(profile));
452 
453     s_motors->push_back(std::move(motor));
454 
455 
456     motor = Genesys_Motor();
457     motor.id = MotorId::CANON_LIDE_110;
458     motor.base_ydpi = 4800;
459     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 335, 255),
460                               StepType::FULL, 2768});
461     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 335, 469),
462                               StepType::HALF, 5360});
463     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 2632, 3),
464                               StepType::HALF, 10528});
465     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 10432, 3),
466                               StepType::QUARTER, 20864});
467     s_motors->push_back(std::move(motor));
468 
469 
470     motor = Genesys_Motor();
471     motor.id = MotorId::CANON_LIDE_120;
472     motor.base_ydpi = 4800;
473     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 864, 127),
474                               StepType::FULL, 4608});
475     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 2010, 63),
476                               StepType::HALF, 5360});
477     motor.profiles.push_back({MotorSlope::create_from_steps(62464, 2632, 3),
478                               StepType::QUARTER, 10528});
479     motor.profiles.push_back({MotorSlope::create_from_steps(62592, 10432, 5),
480                               StepType::QUARTER, 20864});
481     s_motors->push_back(std::move(motor));
482 
483 
484     motor = Genesys_Motor();
485     motor.id = MotorId::CANON_LIDE_210;
486     motor.base_ydpi = 4800;
487     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 335, 255),
488                               StepType::FULL, 2768});
489     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 335, 469),
490                               StepType::HALF, 5360});
491     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 2632, 3),
492                               StepType::HALF, 10528});
493     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 10432, 4),
494                               StepType::QUARTER, 20864});
495     motor.profiles.push_back({MotorSlope::create_from_steps(62496, 10432, 4),
496                               StepType::EIGHTH, 41536});
497     s_motors->push_back(std::move(motor));
498 
499 
500     motor = Genesys_Motor();
501     motor.id = MotorId::PLUSTEK_OPTICPRO_3600;
502     motor.base_ydpi = 1200;
503 
504     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0};
505     profile.resolutions = {75, 100, 150, 200};
506     motor.profiles.push_back(profile);
507 
508     // FIXME: this motor profile is almost useless
509     profile = MotorProfile{MotorSlope::create_from_steps(3500, 3250, 60), StepType::HALF, 0};
510     profile.resolutions = {300, 400, 600, 1200};
511     motor.profiles.push_back(profile);
512 
513     profile = MotorProfile{MotorSlope::create_from_steps(3500, 1300, 60), StepType::FULL, 0};
514     motor.fast_profiles.push_back(profile);
515     s_motors->push_back(std::move(motor));
516 
517 
518     motor = Genesys_Motor();
519     motor.id = MotorId::PLUSTEK_OPTICFILM_7200;
520     motor.base_ydpi = 3600;
521 
522     profile = MotorProfile();
523     profile.slope = MotorSlope::create_from_steps(20000 * 2, 600 * 2, 200);
524     profile.step_type = StepType::HALF;
525     profile.motor_vref = 0;
526     motor.profiles.push_back(std::move(profile));
527 
528     s_motors->push_back(std::move(motor));
529 
530 
531     motor = Genesys_Motor();
532     motor.id = MotorId::PLUSTEK_OPTICFILM_7200I;
533     motor.base_ydpi = 3600;
534 
535     profile = MotorProfile();
536     profile.slope = MotorSlope::create_from_steps(34722 * 2, 454 * 2, 40);
537     profile.step_type = StepType::HALF;
538     profile.motor_vref = 3;
539     motor.profiles.push_back(std::move(profile));
540 
541     profile = MotorProfile();
542     profile.slope = MotorSlope::create_from_steps(34722 * 2, 454 * 2, 40);
543     profile.step_type = StepType::HALF;
544     profile.motor_vref = 0;
545     motor.fast_profiles.push_back(std::move(profile));
546 
547     s_motors->push_back(std::move(motor));
548 
549 
550     motor = Genesys_Motor();
551     motor.id = MotorId::PLUSTEK_OPTICFILM_7300;
552     motor.base_ydpi = 3600;
553 
554     profile = MotorProfile();
555     profile.slope = MotorSlope::create_from_steps(56818 * 4, 454 * 4, 30);
556     profile.step_type = StepType::QUARTER;
557     profile.motor_vref = 3;
558     motor.profiles.push_back(std::move(profile));
559 
560     profile = MotorProfile();
561     profile.slope = MotorSlope::create_from_steps(56818 * 4, 454 * 4, 30);
562     profile.step_type = StepType::QUARTER;
563     profile.motor_vref = 0;
564     motor.fast_profiles.push_back(std::move(profile));
565 
566     s_motors->push_back(std::move(motor));
567 
568 
569     motor = Genesys_Motor();
570     motor.id = MotorId::PLUSTEK_OPTICFILM_7400;
571     motor.base_ydpi = 3600;
572 
573     profile = MotorProfile();
574     profile.slope = MotorSlope::create_from_steps(64102 * 4, 400 * 4, 30);
575     profile.step_type = StepType::QUARTER;
576     profile.motor_vref = 3;
577     motor.profiles.push_back(profile);
578     motor.fast_profiles.push_back(profile);
579     s_motors->push_back(std::move(motor));
580 
581 
582     motor = Genesys_Motor();
583     motor.id = MotorId::PLUSTEK_OPTICFILM_7500I;
584     motor.base_ydpi = 3600;
585 
586     profile = MotorProfile();
587     profile.slope = MotorSlope::create_from_steps(56818 * 4, 454 * 4, 30);
588     profile.step_type = StepType::QUARTER;
589     profile.motor_vref = 3;
590     motor.profiles.push_back(std::move(profile));
591 
592     profile = MotorProfile();
593     profile.slope = MotorSlope::create_from_steps(56818 * 4, 454 * 4, 30);
594     profile.step_type = StepType::QUARTER;
595     profile.motor_vref = 0;
596     motor.fast_profiles.push_back(std::move(profile));
597 
598     s_motors->push_back(std::move(motor));
599 
600 
601     motor = Genesys_Motor();
602     motor.id = MotorId::PLUSTEK_OPTICFILM_8200I;
603     motor.base_ydpi = 3600;
604 
605     profile = MotorProfile();
606     profile.slope = MotorSlope::create_from_steps(64102 * 4, 400 * 4, 100);
607     profile.step_type = StepType::QUARTER;
608     profile.motor_vref = 3;
609     motor.profiles.push_back(profile);
610     motor.fast_profiles.push_back(profile);
611     s_motors->push_back(std::move(motor));
612 
613 
614     motor = Genesys_Motor();
615     motor.id = MotorId::IMG101;
616     motor.base_ydpi = 600;
617     motor.profiles.push_back({MotorSlope::create_from_steps(22000, 1000, 1017),
618                               StepType::HALF, 11000});
619     s_motors->push_back(std::move(motor));
620 
621 
622     motor = Genesys_Motor();
623     motor.id = MotorId::PLUSTEK_OPTICBOOK_3800;
624     motor.base_ydpi = 600;
625     motor.profiles.push_back({MotorSlope::create_from_steps(22000, 1000, 1017),
626                               StepType::HALF, 11000});
627     s_motors->push_back(std::move(motor));
628 
629 
630     motor = Genesys_Motor();
631     motor.id = MotorId::CANON_LIDE_80;
632     motor.base_ydpi = 2400;
633     motor.profiles.push_back({MotorSlope::create_from_steps(9560, 1912, 31), StepType::FULL, 0});
634     s_motors->push_back(std::move(motor));
635 }
636 
637 } // namespace genesys
638