]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change all feeder modes by get options
authorBastian Dehn <hhaalo@arcor.de>
Sat, 20 Apr 2024 07:26:41 +0000 (09:26 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 20 Apr 2024 07:26:41 +0000 (09:26 +0200)
src/kds_s2000w_handler_opts.c
src/kds_s2000w_net.c

index 257c9764fa2167329b3ea310c1acbf7f023cd87e..27315dedb8fcebd4855f479cb664d48a3c985390 100644 (file)
@@ -81,10 +81,14 @@ void kds_s2000w_handler_get_option(handler* h, int option, void* value, int* inf
                        value_object = json_object_object_get(config, "ScanSource");
                        _write_string_value(value_object, value);
 
+                       if (strcmp(value, "Flatbed") == 0)
+                               h->current_scan_status->feeder = 0;
+
                        if (strcmp(value, "DocumentFeeder") == 0)
                                h->current_scan_status->feeder = 1;
-                       else
-                               h->current_scan_status->feeder = 0;
+
+                       if (strcmp(value, "Automatic") == 0)
+                               h->current_scan_status->feeder = 2;
 
                        break;
                case 3:
index 57cb5274f3eb77a3eae519b799ec0e38e97b38b9..8c1764eab5c8fc35e34541870dcdb14c1d612382 100644 (file)
@@ -181,7 +181,7 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle)
                return SANE_STATUS_NO_DOCS;
        }
 
-       if (h->current_scan_status->feeder
+       if (h->current_scan_status->feeder > 0
                && h->current_scan_status->complete_scanned
                && h->current_scan_status->available_images <= 0) {
                kds_s2000w_handler_recreate_session(h);
@@ -193,7 +193,7 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle)
                return SANE_STATUS_GOOD;
        }
 
-       if (!h->current_scan_status->feeder
+       if (h->current_scan_status->feeder != 1
                && h->current_scan_status->available_images <= 0) {
                kds_s2000w_handler_recreate_session(h);
                return SANE_STATUS_GOOD;