From: Bastian Dehn Date: Sat, 20 Apr 2024 07:27:46 +0000 (+0200) Subject: change all feeder modes by get options X-Git-Tag: v1.0.0^2~4 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=816d32d4f207c02ce9d72cee31459a79e71738ac;p=sane-kds-s2000w-net.git change all feeder modes by get options --- diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index 27315de..e2fdb89 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -202,6 +202,16 @@ void kds_s2000w_handler_set_option(handler* h, int option, void* value, int* inf case 2: value_object = json_object_object_get(config, "ScanSource"); _write_string_value_to_json(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; + + if (strcmp(value, "Automatic") == 0) + h->current_scan_status->feeder = 2; + break; case 3: value_object = json_object_object_get(config, "ColorMode");