kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Split genesys_devices.cc file to separate files for each table
rodzic
6592692448
commit
aa4ee9c49e
|
@ -484,7 +484,6 @@ libgenesys_la_SOURCES = genesys.cc genesys.h \
|
|||
genesys_buffer.h genesys_buffer.cc \
|
||||
genesys_calibration.h \
|
||||
genesys_device.h genesys_device.cc \
|
||||
genesys_devices.cc \
|
||||
genesys_enums.h \
|
||||
genesys_error.h genesys_error.cc \
|
||||
genesys_gl646.cc genesys_gl646.h genesys_gl841.cc genesys_gl841.h \
|
||||
|
@ -496,6 +495,11 @@ libgenesys_la_SOURCES = genesys.cc genesys.h \
|
|||
genesys_sensor.h \
|
||||
genesys_settings.h \
|
||||
genesys_serialize.h \
|
||||
genesys_tables_frontend.cc \
|
||||
genesys_tables_gpo.cc \
|
||||
genesys_tables_model.cc \
|
||||
genesys_tables_motor.cc \
|
||||
genesys_tables_sensor.cc \
|
||||
genesys_low.cc genesys_low.h
|
||||
|
||||
libgenesys_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=genesys
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,571 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
|
||||
|
||||
This file is part of the SANE package.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
|
||||
As a special exception, the authors of SANE give permission for
|
||||
additional uses of the libraries contained in this release of SANE.
|
||||
|
||||
The exception is that, if you link a SANE library with other files
|
||||
to produce an executable, this does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public
|
||||
License. Your use of that executable is in no way restricted on
|
||||
account of linking the SANE library code into it.
|
||||
|
||||
This exception does not, however, invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public
|
||||
License.
|
||||
|
||||
If you submit changes to SANE to the maintainers to be included in
|
||||
a subsequent release, you agree by submitting the changes that
|
||||
those changes may be distributed with this exception intact.
|
||||
|
||||
If you write modifications of your own for SANE, it is your choice
|
||||
whether to permit this exception to apply to your modifications.
|
||||
If you do not wish that, delete this exception notice.
|
||||
*/
|
||||
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
|
||||
#include "genesys_low.h"
|
||||
|
||||
StaticInit<std::vector<Genesys_Frontend>> s_frontends;
|
||||
|
||||
void genesys_init_frontend_tables()
|
||||
{
|
||||
s_frontends.init();
|
||||
|
||||
GenesysFrontendLayout wolfson_layout;
|
||||
wolfson_layout.offset_addr = { 0x20, 0x21, 0x22 };
|
||||
wolfson_layout.gain_addr = { 0x28, 0x29, 0x2a };
|
||||
|
||||
Genesys_Frontend fe;
|
||||
fe.fe_id = DAC_WOLFSON_UMAX;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x11 },
|
||||
{ 0x20, 0x80 },
|
||||
{ 0x21, 0x80 },
|
||||
{ 0x22, 0x80 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x02 },
|
||||
{ 0x29, 0x02 },
|
||||
{ 0x2a, 0x02 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_ST12;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x03 },
|
||||
{ 0x20, 0xc8 },
|
||||
{ 0x21, 0xc8 },
|
||||
{ 0x22, 0xc8 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x04 },
|
||||
{ 0x29, 0x04 },
|
||||
{ 0x2a, 0x04 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_ST24;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x21 },
|
||||
{ 0x20, 0xc8 },
|
||||
{ 0x21, 0xc8 },
|
||||
{ 0x22, 0xc8 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x06 },
|
||||
{ 0x29, 0x06 },
|
||||
{ 0x2a, 0x06 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_5345;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x12 },
|
||||
{ 0x20, 0xb8 },
|
||||
{ 0x21, 0xb8 },
|
||||
{ 0x22, 0xb8 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x04 },
|
||||
{ 0x29, 0x04 },
|
||||
{ 0x2a, 0x04 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
// reg3=0x02 for 50-600 dpi, 0x32 (0x12 also works well) at 1200
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_HP2400;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x02 },
|
||||
{ 0x20, 0xb4 },
|
||||
{ 0x21, 0xb6 },
|
||||
{ 0x22, 0xbc },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x06 },
|
||||
{ 0x29, 0x09 },
|
||||
{ 0x2a, 0x08 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_HP2300;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x04 },
|
||||
{ 0x03, 0x02 },
|
||||
{ 0x20, 0xbe },
|
||||
{ 0x21, 0xbe },
|
||||
{ 0x22, 0xbe },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x04 },
|
||||
{ 0x29, 0x04 },
|
||||
{ 0x2a, 0x04 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE35;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x3d },
|
||||
{ 0x02, 0x08 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0xe1 },
|
||||
{ 0x21, 0xe1 },
|
||||
{ 0x22, 0xe1 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x93 },
|
||||
{ 0x29, 0x93 },
|
||||
{ 0x2a, 0x93 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x19, 0x06};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_AD_XP200;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x58 },
|
||||
{ 0x01, 0x80 },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x09 },
|
||||
{ 0x21, 0x09 },
|
||||
{ 0x22, 0x09 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x09 },
|
||||
{ 0x29, 0x09 },
|
||||
{ 0x2a, 0x09 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_XP300;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x35 },
|
||||
{ 0x02, 0x20 },
|
||||
{ 0x03, 0x14 },
|
||||
{ 0x20, 0xe1 },
|
||||
{ 0x21, 0xe1 },
|
||||
{ 0x22, 0xe1 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x93 },
|
||||
{ 0x29, 0x93 },
|
||||
{ 0x2a, 0x93 },
|
||||
};
|
||||
fe.reg2 = {0x07, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_HP3670;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x03 },
|
||||
{ 0x02, 0x05 },
|
||||
{ 0x03, 0x32 },
|
||||
{ 0x20, 0xba },
|
||||
{ 0x21, 0xb8 },
|
||||
{ 0x22, 0xb8 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x06 },
|
||||
{ 0x29, 0x05 },
|
||||
{ 0x2a, 0x04 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_WOLFSON_DSM600;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x35 },
|
||||
{ 0x02, 0x20 },
|
||||
{ 0x03, 0x14 },
|
||||
{ 0x20, 0x85 },
|
||||
{ 0x21, 0x85 },
|
||||
{ 0x22, 0x85 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0xa0 },
|
||||
{ 0x29, 0xa0 },
|
||||
{ 0x2a, 0xa0 },
|
||||
};
|
||||
fe.reg2 = {0x07, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE200;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x9d },
|
||||
{ 0x01, 0x91 },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x3f },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x32 },
|
||||
{ 0x29, 0x04 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE700;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x9d },
|
||||
{ 0x01, 0x9e },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x3f },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x2f },
|
||||
{ 0x29, 0x04 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_KVSS080;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x23 },
|
||||
{ 0x02, 0x24 },
|
||||
{ 0x03, 0x0f },
|
||||
{ 0x20, 0x80 },
|
||||
{ 0x21, 0x80 },
|
||||
{ 0x22, 0x80 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x4b },
|
||||
{ 0x29, 0x4b },
|
||||
{ 0x2a, 0x4b },
|
||||
};
|
||||
fe.reg2 = {0x00,0x00,0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_G4050;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x23 },
|
||||
{ 0x02, 0x24 },
|
||||
{ 0x03, 0x1f },
|
||||
{ 0x20, 0x45 },
|
||||
{ 0x21, 0x45 },
|
||||
{ 0x22, 0x45 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x4b },
|
||||
{ 0x29, 0x4b },
|
||||
{ 0x2a, 0x4b },
|
||||
};
|
||||
fe.reg2 = {0x00,0x00,0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE110;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x80 },
|
||||
{ 0x01, 0x8a },
|
||||
{ 0x02, 0x23 },
|
||||
{ 0x03, 0x4c },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0xca },
|
||||
{ 0x26, 0x94 },
|
||||
{ 0x28, 0x00 },
|
||||
{ 0x29, 0x00 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
/** @brief GL124 special case
|
||||
* for GL124 based scanners, this struct is "abused"
|
||||
* in fact the fields are map like below to AFE registers
|
||||
* (from Texas Instrument or alike ?)
|
||||
*/
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE120;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x80 },
|
||||
{ 0x01, 0xa3 },
|
||||
{ 0x02, 0x2b },
|
||||
{ 0x03, 0x4c },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 }, // actual address 0x05
|
||||
{ 0x25, 0xca }, // actual address 0x06
|
||||
{ 0x26, 0x95 }, // actual address 0x07
|
||||
{ 0x28, 0x00 },
|
||||
{ 0x29, 0x00 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_PLUSTEK_3600;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x70 },
|
||||
{ 0x01, 0x80 },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x3f },
|
||||
{ 0x29, 0x3d },
|
||||
{ 0x2a, 0x3d },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CS8400F;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x23 },
|
||||
{ 0x02, 0x24 },
|
||||
{ 0x03, 0x0f },
|
||||
{ 0x20, 0x60 },
|
||||
{ 0x21, 0x5c },
|
||||
{ 0x22, 0x6c },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x8a },
|
||||
{ 0x29, 0x9f },
|
||||
{ 0x2a, 0xc2 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CS8600F;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x00 },
|
||||
{ 0x01, 0x23 },
|
||||
{ 0x02, 0x24 },
|
||||
{ 0x03, 0x2f },
|
||||
{ 0x20, 0x67 },
|
||||
{ 0x21, 0x69 },
|
||||
{ 0x22, 0x68 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0xdb },
|
||||
{ 0x29, 0xda },
|
||||
{ 0x2a, 0xd7 },
|
||||
};
|
||||
fe.reg2 = { 0x00, 0x00, 0x00 };
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_IMG101;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x78 },
|
||||
{ 0x01, 0xf0 },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x00 },
|
||||
{ 0x29, 0x00 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_PLUSTEK3800;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x78 },
|
||||
{ 0x01, 0xf0 },
|
||||
{ 0x02, 0x00 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x00 },
|
||||
{ 0x29, 0x00 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
|
||||
|
||||
/* reg0: control 74 data, 70 no data
|
||||
* reg3: offset
|
||||
* reg6: gain
|
||||
* reg0 , reg3, reg6 */
|
||||
fe = Genesys_Frontend();
|
||||
fe.fe_id = DAC_CANONLIDE80;
|
||||
fe.layout = wolfson_layout;
|
||||
fe.regs = {
|
||||
{ 0x00, 0x70 },
|
||||
{ 0x01, 0x16 },
|
||||
{ 0x02, 0x60 },
|
||||
{ 0x03, 0x00 },
|
||||
{ 0x20, 0x00 },
|
||||
{ 0x21, 0x00 },
|
||||
{ 0x22, 0x00 },
|
||||
{ 0x24, 0x00 },
|
||||
{ 0x25, 0x00 },
|
||||
{ 0x26, 0x00 },
|
||||
{ 0x28, 0x00 },
|
||||
{ 0x29, 0x00 },
|
||||
{ 0x2a, 0x00 },
|
||||
};
|
||||
fe.reg2 = {0x00, 0x00, 0x00};
|
||||
s_frontends->push_back(fe);
|
||||
}
|
|
@ -0,0 +1,349 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
|
||||
|
||||
This file is part of the SANE package.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
|
||||
As a special exception, the authors of SANE give permission for
|
||||
additional uses of the libraries contained in this release of SANE.
|
||||
|
||||
The exception is that, if you link a SANE library with other files
|
||||
to produce an executable, this does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public
|
||||
License. Your use of that executable is in no way restricted on
|
||||
account of linking the SANE library code into it.
|
||||
|
||||
This exception does not, however, invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public
|
||||
License.
|
||||
|
||||
If you submit changes to SANE to the maintainers to be included in
|
||||
a subsequent release, you agree by submitting the changes that
|
||||
those changes may be distributed with this exception intact.
|
||||
|
||||
If you write modifications of your own for SANE, it is your choice
|
||||
whether to permit this exception to apply to your modifications.
|
||||
If you do not wish that, delete this exception notice.
|
||||
*/
|
||||
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
|
||||
#include "genesys_low.h"
|
||||
|
||||
StaticInit<std::vector<Genesys_Gpo>> s_gpo;
|
||||
|
||||
void genesys_init_gpo_tables()
|
||||
{
|
||||
s_gpo.init();
|
||||
|
||||
Genesys_Gpo gpo;
|
||||
gpo.gpo_id = GPO_UMAX;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x11 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x51 },
|
||||
{ 0x69, 0x20 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_ST12;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x11 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x51 },
|
||||
{ 0x69, 0x20 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_ST24;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x00 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x51 },
|
||||
{ 0x69, 0x20 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_5345; // bits 11-12 are for bipolar V-ref input voltage
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x30 },
|
||||
{ 0x67, 0x18 },
|
||||
{ 0x68, 0xa0 },
|
||||
{ 0x69, 0x18 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_HP2400;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x30 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x31 },
|
||||
{ 0x69, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_HP2300;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x00 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x00 },
|
||||
{ 0x69, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE35;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x02 },
|
||||
{ 0x6d, 0x80 },
|
||||
{ 0x6e, 0xef },
|
||||
{ 0x6f, 0x80 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_XP200;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x30 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0xb0 },
|
||||
{ 0x69, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_HP3670;
|
||||
gpo.regs = {
|
||||
{ 0x66, 0x00 },
|
||||
{ 0x67, 0x00 },
|
||||
{ 0x68, 0x00 },
|
||||
{ 0x69, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_XP300;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x09 },
|
||||
{ 0x6d, 0xc6 },
|
||||
{ 0x6e, 0xbb },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_DP665;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x18 },
|
||||
{ 0x6d, 0x00 },
|
||||
{ 0x6e, 0xbb },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_DP685;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x3f },
|
||||
{ 0x6d, 0x46 },
|
||||
{ 0x6e, 0xfb },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE200;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xfb }, // 0xfb when idle , 0xf9/0xe9 (1200) when scanning
|
||||
{ 0x6d, 0x20 },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE700;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xdb },
|
||||
{ 0x6d, 0xff },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x80 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_KVSS080;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xf5 },
|
||||
{ 0x6d, 0x20 },
|
||||
{ 0x6e, 0x7e },
|
||||
{ 0x6f, 0xa1 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_G4050;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x20 },
|
||||
{ 0x6d, 0x00 },
|
||||
{ 0x6e, 0xfc },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_HP_N6310;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xa3 },
|
||||
{ 0x6d, 0x00 },
|
||||
{ 0x6e, 0x7f },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE110;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xfb },
|
||||
{ 0x6d, 0x20 },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE120;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xfb },
|
||||
{ 0x6d, 0x20 },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE210;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0xfb },
|
||||
{ 0x6d, 0x20 },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_PLUSTEK_3600;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x02 },
|
||||
{ 0x6d, 0x00 },
|
||||
{ 0x6e, 0x1e },
|
||||
{ 0x6f, 0x80 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CS4400F;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x01 },
|
||||
{ 0x6d, 0x7f },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CS8400F;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x9a },
|
||||
{ 0x6d, 0xdf },
|
||||
{ 0x6e, 0xfe },
|
||||
{ 0x6f, 0x60 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CS8600F;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x20 },
|
||||
{ 0x6d, 0x7c },
|
||||
{ 0x6e, 0xff },
|
||||
{ 0x6f, 0x00 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_IMG101;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x41 },
|
||||
{ 0x6d, 0xa4 },
|
||||
{ 0x6e, 0x13 },
|
||||
{ 0x6f, 0xa7 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_PLUSTEK3800;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x41 },
|
||||
{ 0x6d, 0xa4 },
|
||||
{ 0x6e, 0x13 },
|
||||
{ 0x6f, 0xa7 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
|
||||
|
||||
gpo = Genesys_Gpo();
|
||||
gpo.gpo_id = GPO_CANONLIDE80;
|
||||
gpo.regs = {
|
||||
{ 0x6c, 0x28 },
|
||||
{ 0x6d, 0x90 },
|
||||
{ 0x6e, 0x75 },
|
||||
{ 0x6f, 0x80 },
|
||||
};
|
||||
s_gpo->push_back(gpo);
|
||||
}
|
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,674 @@
|
|||
/* sane - Scanner Access Now Easy.
|
||||
|
||||
Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
|
||||
|
||||
This file is part of the SANE package.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
|
||||
As a special exception, the authors of SANE give permission for
|
||||
additional uses of the libraries contained in this release of SANE.
|
||||
|
||||
The exception is that, if you link a SANE library with other files
|
||||
to produce an executable, this does not by itself cause the
|
||||
resulting executable to be covered by the GNU General Public
|
||||
License. Your use of that executable is in no way restricted on
|
||||
account of linking the SANE library code into it.
|
||||
|
||||
This exception does not, however, invalidate any other reasons why
|
||||
the executable file might be covered by the GNU General Public
|
||||
License.
|
||||
|
||||
If you submit changes to SANE to the maintainers to be included in
|
||||
a subsequent release, you agree by submitting the changes that
|
||||
those changes may be distributed with this exception intact.
|
||||
|
||||
If you write modifications of your own for SANE, it is your choice
|
||||
whether to permit this exception to apply to your modifications.
|
||||
If you do not wish that, delete this exception notice.
|
||||
*/
|
||||
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
|
||||
#include "genesys_low.h"
|
||||
|
||||
StaticInit<std::vector<Genesys_Motor>> s_motors;
|
||||
|
||||
void genesys_init_motor_tables()
|
||||
{
|
||||
s_motors.init();
|
||||
|
||||
Genesys_Motor_Slope slope;
|
||||
|
||||
Genesys_Motor motor;
|
||||
motor.motor_id = MOTOR_UMAX;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 1.0;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 1.0;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_5345; // MD5345/6228/6471
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 2000;
|
||||
slope.maximum_speed = 1375;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 2000;
|
||||
slope.maximum_speed = 1375;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_ST24;
|
||||
motor.base_ydpi = 2400;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 2289;
|
||||
slope.maximum_speed = 2100;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.3;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 2289;
|
||||
slope.maximum_speed = 2100;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.3;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_HP3670;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.25;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_HP2400;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 1200;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.25;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 3000;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_HP2300;
|
||||
motor.base_ydpi = 600;
|
||||
motor.optical_ydpi = 1200;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3200;
|
||||
slope.maximum_speed = 1200;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3200;
|
||||
slope.maximum_speed = 1200;
|
||||
slope.minimum_steps = 128;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE35;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1300;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1400;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_XP200;
|
||||
motor.base_ydpi = 600;
|
||||
motor.optical_ydpi = 600;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1300;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.25;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1400;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_XP300;
|
||||
motor.base_ydpi = 300;
|
||||
motor.optical_ydpi = 600;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
// works best with GPIO10, GPIO14 off
|
||||
slope.maximum_start_speed = 3700;
|
||||
slope.maximum_speed = 3700;
|
||||
slope.minimum_steps = 2;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 11000;
|
||||
slope.minimum_steps = 2;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_DP665;
|
||||
motor.base_ydpi = 750;
|
||||
motor.optical_ydpi = 1500;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 2500;
|
||||
slope.minimum_steps = 10;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 11000;
|
||||
slope.minimum_steps = 2;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_ROADWARRIOR;
|
||||
motor.base_ydpi = 750;
|
||||
motor.optical_ydpi = 1500;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 2600;
|
||||
slope.minimum_steps = 10;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 11000;
|
||||
slope.maximum_speed = 11000;
|
||||
slope.minimum_steps = 2;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_DSMOBILE_600;
|
||||
motor.base_ydpi = 750;
|
||||
motor.optical_ydpi = 1500;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 6666;
|
||||
slope.maximum_speed = 3700;
|
||||
slope.minimum_steps = 8;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 6666;
|
||||
slope.maximum_speed = 3700;
|
||||
slope.minimum_steps = 8;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE100;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 6400;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1500;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step 0.75*2712
|
||||
slope.maximum_start_speed = 3*2712;
|
||||
slope.maximum_speed = 3*2712;
|
||||
slope.minimum_steps = 16;
|
||||
slope.g = 0.80;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE200;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 6400;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1500;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step 0.75*2712
|
||||
slope.maximum_start_speed = 3*2712;
|
||||
slope.maximum_speed = 3*2712;
|
||||
slope.minimum_steps = 16;
|
||||
slope.g = 0.80;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE700;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 6400;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1500;
|
||||
slope.minimum_steps = 127;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step 0.75*2712
|
||||
slope.maximum_start_speed = 3*2712;
|
||||
slope.maximum_speed = 3*2712;
|
||||
slope.minimum_steps = 16;
|
||||
slope.g = 0.80;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_KVSS080;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 1200;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // max speed / dpi * base dpi => exposure
|
||||
slope.maximum_start_speed = 22222;
|
||||
slope.maximum_speed = 500;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 22222;
|
||||
slope.maximum_speed = 500;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 22222;
|
||||
slope.maximum_speed = 500;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.5;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_G4050;
|
||||
motor.base_ydpi = 2400;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CS8400F;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CS8600F;
|
||||
motor.base_ydpi = 2400;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 2;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // half step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope(); // quarter step
|
||||
slope.maximum_start_speed = 3961;
|
||||
slope.maximum_speed = 240;
|
||||
slope.minimum_steps = 246;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE110;
|
||||
motor.base_ydpi = 4800;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope(); // full step
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 256;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE120;
|
||||
motor.base_ydpi = 4800;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 256;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE210;
|
||||
motor.base_ydpi = 4800;
|
||||
motor.optical_ydpi = 9600;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3000;
|
||||
slope.maximum_speed = 1000;
|
||||
slope.minimum_steps = 256;
|
||||
slope.g = 0.50;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_PLUSTEK_3600;
|
||||
motor.base_ydpi = 1200;
|
||||
motor.optical_ydpi = 2400;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1300;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 3250;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_IMG101;
|
||||
motor.base_ydpi = 600;
|
||||
motor.optical_ydpi = 1200;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1300;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 3250;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_PLUSTEK3800;
|
||||
motor.base_ydpi = 600;
|
||||
motor.optical_ydpi = 1200;
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 1300;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 3500;
|
||||
slope.maximum_speed = 3250;
|
||||
slope.minimum_steps = 60;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
|
||||
|
||||
motor = Genesys_Motor();
|
||||
motor.motor_id = MOTOR_CANONLIDE80;
|
||||
motor.base_ydpi = 2400;
|
||||
motor.optical_ydpi = 4800, // 9600
|
||||
motor.max_step_type = 1;
|
||||
|
||||
slope = Genesys_Motor_Slope();
|
||||
slope.maximum_start_speed = 9560;
|
||||
slope.maximum_speed = 1912;
|
||||
slope.minimum_steps = 31;
|
||||
slope.g = 0.8;
|
||||
motor.slopes.push_back(slope);
|
||||
|
||||
s_motors->push_back(std::move(motor));
|
||||
}
|
Plik diff jest za duży
Load Diff
Ładowanie…
Reference in New Issue