Porównaj commity

...

6 Commity

Autor SHA1 Wiadomość Data
ThierryFR 532d96c88e Merge branch 'escl-force-idle-status' into 'master'
Escl force idle status

See merge request sane-project/backends!835
2024-04-16 20:38:45 +00:00
Ordissimo ce29bc714a Delete unused variable 2024-04-16 22:38:19 +02:00
Ordissimo 7cf2add3e3 Using the HTTP DELETE method to free resources 2024-04-16 22:30:35 +02:00
Ralph Little bf99345ae2 Merge branch '8200i-1825-unsupported' into 'master'
Mark OpticFilm 8200i 0x07b3/0x1825 unsupported for now.

See merge request sane-project/backends!836
2024-04-02 22:51:47 +00:00
Cyp c918dba927 Mark OpticFilm 8200i 0x07b3/0x1825 unsupported for now.
Confusingly, there seem to be (at least) two different scanners with the same
name.
2024-04-02 19:57:01 +02:00
Cyp bc54b0990f Random minor cleanup. 2024-04-02 19:56:11 +02:00
6 zmienionych plików z 53 dodań i 21 usunięć

Wyświetl plik

@ -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,

Wyświetl plik

@ -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);
}
}
}
}
}
}
}

Wyświetl plik

@ -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);

Wyświetl plik

@ -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

Wyświetl plik

@ -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"

Wyświetl plik

@ -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");