From d67135cf4cf149d39fab1291389b5a3eb0f9c176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Thu, 17 Feb 2011 06:44:40 +0100 Subject: [PATCH] gl847 rework : 75-600 dpi motor speed working --- backend/genesys_gl847.c | 7 ++++++- backend/genesys_gl847.h | 17 ++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/backend/genesys_gl847.c b/backend/genesys_gl847.c index 0d033cffe..bdef951f0 100644 --- a/backend/genesys_gl847.c +++ b/backend/genesys_gl847.c @@ -924,6 +924,8 @@ gl847_init_motor_regs_scan (Genesys_Device * dev, factor, dev->model->motor_type, gl847_motors); + /* manual override of high start value */ + fast_table[0]=fast_table[1]; RIE(gl847_send_slope_table (dev, STOP_TABLE, fast_table, fast_steps*factor)); RIE(gl847_send_slope_table (dev, FAST_TABLE, fast_table, fast_steps*factor)); RIE(gl847_send_slope_table (dev, HOME_TABLE, fast_table, fast_steps*factor)); @@ -2585,6 +2587,7 @@ gl847_init_regs_for_scan (Genesys_Device * dev) DBG (DBG_info, "gl847_init_regs_for_scan: move=%f steps\n", move); /* at high res we do fast move to scan area */ + /* XXX STEF XXX if(dev->settings.xres>150) { status = gl847_feed (dev, move); @@ -2594,7 +2597,7 @@ gl847_init_regs_for_scan (Genesys_Device * dev) return status; } move=0; - } + } */ /* clear scancnt and fedcnt */ val = REG0D_CLRLNCNT; @@ -3527,7 +3530,9 @@ gl847_init (Genesys_Device * dev) /* Move home if needed */ RIE (gl847_slow_back_home (dev, SANE_TRUE)); + /* XXX STEF XXX RIE (gl847_warm_scan (dev)); + */ dev->scanhead_position_in_steps = 0; /* Set powersaving (default = 15 minutes) */ diff --git a/backend/genesys_gl847.h b/backend/genesys_gl847.h index 71d16ec45..a5ad498ac 100644 --- a/backend/genesys_gl847.h +++ b/backend/genesys_gl847.h @@ -543,6 +543,7 @@ static Sensor_Profile sensors[]={ {CIS_CANONLIDE200, 150, 2848, 240, 636, 340, 5144, 0, 255, 637, 637, 637}, {CIS_CANONLIDE200, 300, 1424, 240, 636, 340, 5144, 0, 255, 637, 637, 637}, */ + {CIS_CANONLIDE200, 200, 2848, 60, 159, 85, 5144, 255, 410, 275, 203, 0x0a}, {CIS_CANONLIDE200, 600, 1432, 60, 159, 85, 5144, 255, 410, 275, 203, 0x0a}, {CIS_CANONLIDE200, 1200, 2712, 60, 159, 85, 5144, 255, 746, 478, 353, 0x08}, {CIS_CANONLIDE200, 2400, 5280, 60, 159, 85, 5144, 255, 1417, 909, 643, 0x06}, @@ -550,19 +551,21 @@ static Sensor_Profile sensors[]={ }; /* *INDENT-ON* */ - /* target=((exposure * dpi) / base_dpi)>>step_type; */ -static uint16_t lide200_ok[] = { 46876,2343,2343,2343,2343,2343,2343,2343,2343,2336,2329,2322,2314,2307,2300,2292,2285,2278,2271,2263,2256,2249,2241,2234,2227,2219,2212,2205,2198,2190,2183,2176,2168,2161,2154,2146,2139,2132,2125,2117,2110,2103,2095,2088,2081,2073,2066,2059,2052,2044,2037,2030,2022,2015,2008,2001,1993,1986,1979,1971,1964,1957,1949,1942,1935,1928,1920,1913,1906,1898,1891,1884,1876,1869,1862,1855,1847,1840,1833,1825,1818,1811,1803,1796,1789,1782,1774,1767,1760,1752,1745,1738,1731,1723,1716,1709,1701,1694,1687,1679,1672,1665,1658,1650,1643,1636,1628,1621,1614,1606,1599,1592,1585,1577,1570,1563,1555,1548,1541,1533,1526,1519,1512,1504,1497,1490,1482,1475,1468,1461,1453,1446,1439,1431,1424,1417,1409,1402,1395,1388,1380,1373,1366,1358,1351,1344,1336,1329,1322,1315,1307,1300,1293,1285,1278,1271,1263,1256,1249,1242,1234,1227,1220,1212,1205,1198,1191,1183,1176,1169,1161,1154,1147,1139,1132,1125,1118,1110,1103,1096,1088,1081,1074,1066,1059,1052,1045,1037,1030,1023,1015,1008,1001,993,986,979,972,964,957,950,942,935,928,921,913,906,899,891,884,877,869,862,855,848,840,833,826,818,811,804,796,789,782,775,767,760,753,745,738,731,723,716,709,702,694,687,680,672,665,658,651,643,636,629,621,614,607,599,592,585,578,570,563,556,534,534, - 528, 521, 513, 506, 499, 491, 484, 477, 469, 462, 455, 448, 440, 433, 426, 418, 411, 404, 397, 389, 382, 375, 367, 360, 353, 346, 338, 331, 324, 316, 309, 302, 295, 287, 280, 273, 265, 258, 251, 243, 236, 229, 222, 214, 207, 200, 192, 185, 178, 171, 163, 156, 149, 141, 134, 127, 120, 112, 105, 98, 89, 0}; +/* target=((exposure * dpi) / base_dpi)>>step_type; */ +static uint16_t lide200_fast[] = { 46876, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2334, 2325, 2316, 2306, 2297, 2288, 2279, 2270, 2261, 2252, 2243, 2233, 2224, 2215, 2206, 2197, 2188, 2179, 2170, 2160, 2151, 2142, 2133, 2124, 2115, 2106, 2096, 2087, 2078, 2069, 2060, 2051, 2042, 2033, 2023, 2014, 2005, 1996, 1987, 1978, 1969, 1960, 1950, 1941, 1932, 1923, 1914, 1905, 1896, 1887, 1877, 1868, 1859, 1850, 1841, 1832, 1823, 1813, 1804, 1795, 1786, 1777, 1768, 1759, 1750, 1740, 1731, 1722, 1713, 1704, 1695, 1686, 1677, 1667, 1658, 1649, 1640, 1631, 1622, 1613, 1603, 1594, 1585, 1576, 1567, 1558, 1549, 1540, 1530, 1521, 1512, 1503, 1494, 1485, 1476, 1467, 1457, 1448, 1439, 1430, 1421, 1412, 1403, 1393, 1384, 1375, 1366, 1357, 1348, 1339, 1330, 1320, 1311, 1302, 1293, 1284, 1275, 1266, 1257, 1247, 1238, 1229, 1220, 1211, 1202, 1193, 1183, 1174, 1165, 1156, 1147, 1138, 1129, 1120, 1110, 1101, 1092, 1083, 1074, 1065, 1056, 1047, 1037, 1028, 1019, 1010, 1001, 992, 983, 974, 964, 955, 946, 937, 928, 919, 910, 900, 891, 882, 873, 864, 855, 846, 837, 827, 818, 809, 800, 791, 782, 773, 764, 754, 745, 736, 727, 718, 709, 700, 690, 681, 672, 663, 654, 645, 636, 627, 617, 608, 599, 590, 581, 572, 563, 554, 544, 535, 526, 517, 508, 499, 490, 480, 471, 462, 453, 444, 435, 426, 417, 407, 398, 389, 380, 371, 362, 353, 344, 334, 325, 316, 307, 298, 289, 280, 270, 261, 252, 243, 234, 225, 216, 207, 197, 188, 179, 170, 161, 152, 143, 134, 124, 115, 106, 97, 88, 0 }; +static uint16_t lide200_base[] = { 46876, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2343, 2336, 2329, 2322, 2314, 2307, 2300,2292,2285,2278,2271,2263,2256,2249,2241,2234,2227,2219,2212,2205,2198,2190,2183,2176,2168,2161,2154,2146,2139,2132,2125,2117,2110,2103,2095,2088,2081,2073,2066,2059,2052,2044,2037,2030,2022,2015,2008,2001,1993,1986,1979,1971,1964,1957,1949,1942,1935,1928,1920,1913,1906,1898,1891,1884,1876,1869,1862,1855,1847,1840,1833,1825,1818,1811,1803,1796,1789,1782,1774,1767,1760,1752,1745,1738,1731,1723,1716,1709,1701,1694,1687,1679,1672,1665,1658,1650,1643,1636,1628,1621,1614,1606,1599,1592,1585,1577,1570,1563,1555,1548,1541,1533,1526,1519,1512,1504,1497,1490,1482,1475,1468,1461,1453,1446,1439,1431,1424,1417,1409,1402,1395,1388,1380,1373,1366,1358,1351,1344,1336,1329,1322,1315,1307,1300,1293,1285,1278,1271,1263,1256,1249,1242,1234,1227,1220,1212,1205,1198,1191,1183,1176,1169,1161,1154,1147,1139,1132,1125,1118,1110,1103,1096,1088,1081,1074,1066,1059,1052,1045,1037,1030,1023,1015,1008,1001,993,986,979,972,964,957,950,942,935,928,921,913,906,899,891,884,877,869,862,855,848,840,833,826,818,811,804,796,789,782,775,767,760,753,745,738,731,723,716,709,702,694,687,680,672,665,658,651,643,636,629,621,614,607,599,592,585,578,570,563,556,534,534, 0}; + /** * database of motor profiles */ /* *INDENT-OFF* */ static Motor_Profile gl847_motors[]={ - {MOTOR_CANONLIDE200, 1432, 0, lide200_ok}, - {MOTOR_CANONLIDE200, 2712, 1, lide200_ok}, - {MOTOR_CANONLIDE200, 5280, 2, lide200_ok}, - {MOTOR_CANONLIDE200, 10416, 2, lide200_ok}, + {MOTOR_CANONLIDE200, 2848, 0, lide200_base}, + {MOTOR_CANONLIDE200, 1432, 0, lide200_base}, + {MOTOR_CANONLIDE200, 2712, 1, lide200_base}, + {MOTOR_CANONLIDE200, 5280, 2, lide200_base}, + {MOTOR_CANONLIDE200, 10416, 2, lide200_base}, /* end of database entry */ {0, 0, 0, NULL}, };