kopia lustrzana https://gitlab.com/sane-project/backends
Porównaj commity
6 Commity
2d0d4d1272
...
532d96c88e
Autor | SHA1 | Data |
---|---|---|
ThierryFR | 532d96c88e | |
Ordissimo | ce29bc714a | |
Ordissimo | 7cf2add3e3 | |
Ralph Little | bf99345ae2 | |
Cyp | c918dba927 | |
Cyp | bc54b0990f |
|
@ -38,6 +38,31 @@ write_callback(void __sane_unused__*str,
|
|||
return nmemb;
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn void escl_scanner(const ESCL_Device *device, char *result)
|
||||
* \brief Function that resets the scanner after each scan, using curl.
|
||||
* This function is called in the 'sane_cancel' function.
|
||||
*/
|
||||
void
|
||||
escl_delete(const ESCL_Device *device, char *uri)
|
||||
{
|
||||
CURL *curl_handle = NULL;
|
||||
long answer = 0;
|
||||
|
||||
if (uri == NULL)
|
||||
return;
|
||||
curl_handle = curl_easy_init();
|
||||
if (curl_handle != NULL) {
|
||||
escl_curl_url(curl_handle, device, uri);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_CUSTOMREQUEST, "DELETE");
|
||||
if (curl_easy_perform(curl_handle) == CURLE_OK) {
|
||||
curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &answer);
|
||||
return;
|
||||
}
|
||||
curl_easy_cleanup(curl_handle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn void escl_scanner(const ESCL_Device *device, char *result)
|
||||
* \brief Function that resets the scanner after each scan, using curl.
|
||||
|
@ -70,6 +95,9 @@ CURL_CALL:
|
|||
if (i >= 15) return;
|
||||
}
|
||||
curl_easy_cleanup(curl_handle);
|
||||
char* end = strrchr(scan_cmd, '/');
|
||||
*end = 0;
|
||||
escl_delete(device, scan_cmd);
|
||||
if (status) {
|
||||
if (SANE_STATUS_GOOD != escl_status(device,
|
||||
PLATEN,
|
||||
|
|
|
@ -312,26 +312,24 @@ print_xml_reset_all_jobs (xmlNode *node,
|
|||
if (find_nodes_s(node)) {
|
||||
if (strcmp((const char *)node->name, "JobUri") == 0) {
|
||||
DBG(10, "print_xml_reset_all_jobs: %s\n", node->name);
|
||||
if (device != NULL) {
|
||||
print_xml_job_finish (node, &status);
|
||||
if (status == SANE_STATUS_DEVICE_BUSY) {
|
||||
/*
|
||||
char *jobUri = (char *)xmlNodeGetContent(node);
|
||||
char *job = strrchr((const char *)jobUri, '/');
|
||||
char *scanj = NULL;
|
||||
if (job != NULL) {
|
||||
if (strstr(jobUri,"ScanJobs"))
|
||||
scanj = strdup("ScanJobs");
|
||||
else
|
||||
scanj = strdup("ScanJob");
|
||||
if (device != NULL) {
|
||||
print_xml_job_finish (node, &status);
|
||||
if (status == SANE_STATUS_DEVICE_BUSY) {
|
||||
char *jobUri = (char *)xmlNodeGetContent(node);
|
||||
char *job = strrchr((const char *)jobUri, '/');
|
||||
char *scanj = NULL;
|
||||
if (job != NULL) {
|
||||
if (strstr(jobUri,"ScanJobs"))
|
||||
scanj = strdup("ScanJobs");
|
||||
else
|
||||
scanj = strdup("ScanJob");
|
||||
DBG(10, "print_xml_reset_all_jobs: %s/%s\n", scanj, job);
|
||||
escl_scanner(device, scanj, job, SANE_FALSE);
|
||||
free(scanj);
|
||||
}*/
|
||||
free(scanj);
|
||||
}
|
||||
DBG(10, "print_xml_reset_all_jobs: sleep to finish the job\n");
|
||||
sleep (3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ gl124_init_registers (Genesys_Device * dev)
|
|||
dev->reg.init_reg(0x05, 0x00);
|
||||
|
||||
if(dev->model->sensor_id == SensorId::CIS_CANON_LIDE_120) {
|
||||
dev->reg.init_reg(0x06, 0x50);
|
||||
dev->reg.init_reg(0x07, 0x00);
|
||||
dev->reg.init_reg(0x06, 0x50);
|
||||
dev->reg.init_reg(0x07, 0x00);
|
||||
} else {
|
||||
dev->reg.init_reg(0x03, 0x50 & ~REG_0x03_AVEENB);
|
||||
dev->reg.init_reg(0x06, 0x50 | REG_0x06_GAIN4);
|
||||
|
|
|
@ -290,4 +290,4 @@ static constexpr RegAddr REG_TRUEB = 0x112;
|
|||
} // namespace gl124
|
||||
} // namespace genesys
|
||||
|
||||
#endif // BACKEND_GENESYS_GL843_REGISTERS_H
|
||||
#endif // BACKEND_GENESYS_GL124_REGISTERS_H
|
||||
|
|
|
@ -71,6 +71,12 @@
|
|||
:status :complete
|
||||
:comment "900, 1800, 3600 and 7200 dpi resolutions are supported in both regular transparency and infrared modes"
|
||||
|
||||
:model "OpticFilm 8200i"
|
||||
:interface "USB"
|
||||
:usbid "0x07b3" "0x1825"
|
||||
:status :unsupported
|
||||
:comment "GL128 based"
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
:mfg "Medion/Lifetec/Tevion/Cytron"
|
||||
|
|
|
@ -109,7 +109,7 @@ static scsiblk inquiry = {
|
|||
static void
|
||||
usage (char *msg)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [-hvqf] [devname ...]\n", prog_name);
|
||||
fprintf (stderr, "Usage: %s [-hvqfp] [devname ...]\n", prog_name);
|
||||
fprintf (stderr, "\t-h: print this help message\n");
|
||||
fprintf (stderr, "\t-v: be more verbose (can be used multiple times)\n");
|
||||
fprintf (stderr, "\t-q: be quiet (print only devices, no comments)\n");
|
||||
|
|
Ładowanie…
Reference in New Issue