]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change background smoothing aggressivness position
authorBastian Dehn <hhaalo@arcor.de>
Mon, 17 Feb 2025 15:41:42 +0000 (16:41 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 17 Feb 2025 15:41:58 +0000 (16:41 +0100)
src/kds_s2000w_handler_opts.c
src/kds_s2000w_option_descriptors.c
tests/kds_s2000w_option_descriptor_tests.c

index 29925c3057f57d136e9fc0dd6c76d24f43b7931f..b2c323e871890843170faa7d1cda5560767ae346 100644 (file)
@@ -195,7 +195,7 @@ void kds_s2000w_handler_opts_get_option(handler* h, uint32_t option, void* value
                        _kds_s2000w_handler_opts_write_string_value(value_object, value);
                        break;
                case 17:
-                       value_object = json_object_object_get(config, "ColorBalanceRed");
+                       value_object = json_object_object_get(config, "BackgroundSmoothingAggressiveness");
                        _kds_s2000w_handler_opts_write_int_value(value_object, value);
                        break;
                case 18:
@@ -207,7 +207,7 @@ void kds_s2000w_handler_opts_get_option(handler* h, uint32_t option, void* value
                        _kds_s2000w_handler_opts_write_int_value(value_object, value);
                        break;
                case 20:
-                       value_object = json_object_object_get(config, "BackgroundSmoothingAggressiveness");
+                       value_object = json_object_object_get(config, "ColorBalanceRed");
                        _kds_s2000w_handler_opts_write_int_value(value_object, value);
                        break;
                case 21:
@@ -389,7 +389,7 @@ void kds_s2000w_handler_opts_set_option(handler* h, uint32_t option, void* value
                        _kds_s2000w_handler_opts_write_string_value_to_json(value_object, value);
                        break;
                case 17:
-                       value_object = json_object_object_get(config, "ColorBalanceRed");
+                       value_object = json_object_object_get(config, "BackgroundSmoothingAggressiveness");
                        _kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
                        break;
                case 18:
@@ -401,7 +401,7 @@ void kds_s2000w_handler_opts_set_option(handler* h, uint32_t option, void* value
                        _kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
                        break;
                case 20:
-                       value_object = json_object_object_get(config, "BackgroundSmoothingAggressiveness");
+                       value_object = json_object_object_get(config, "ColorBalanceRed");
                        _kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
                        break;
                case 21:
index cc968a7760a720baa0e2b086b0f415dcc455bf59..02f34f72194ce351714c6db8fe72d455ca97b194 100644 (file)
@@ -1077,10 +1077,10 @@ void kds_s2000w_option_descriptors_init()
        descriptor_array[14] = _kds_s2000w_option_descriptor_foreground_boldness_mode();
        descriptor_array[15] = _kds_s2000w_option_descriptor_foreground_boldness_aggressiveness();
        descriptor_array[16] = _kds_s2000w_option_descriptor_background_smoothing_mode();
-       descriptor_array[17] = _kds_s2000w_option_descriptor_color_balance_red();
+       descriptor_array[17] = _kds_s2000w_option_descriptor_background_smoothing_aggressiveness();
        descriptor_array[18] = _kds_s2000w_option_descriptor_color_balance_green();
        descriptor_array[19] = _kds_s2000w_option_descriptor_color_balance_blue();
-       descriptor_array[20] = _kds_s2000w_option_descriptor_background_smoothing_aggressiveness();
+       descriptor_array[20] = _kds_s2000w_option_descriptor_color_balance_red();
        descriptor_array[21] = _kds_s2000w_option_descriptor_binarization_contrast();
        descriptor_array[22] = _kds_s2000w_option_descriptor_multifeed_sensitivity();
        descriptor_array[23] = _kds_s2000w_option_descriptor_multifeed_response();
index 01ab6a080781d38e0f01a2702e2ebd911086ebce..2d008b6fa789741cc59683ef106ff0ba4c367766 100644 (file)
@@ -309,16 +309,16 @@ void kds_s2000w_option_get_descriptor_seventeen_test()
 {
        SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(17);
 
-       assert_string_equal("colorbalancered", option->name);
-       assert_string_equal("colorbalancered", option->title);
-       assert_string_equal("colorbalancered", option->desc);
+       assert_string_equal("background-smoothing-aggressiveness", option->name);
+       assert_string_equal("Background Smoothing Aggressiveness", option->title);
+       assert_string_equal("Background Smoothing Aggressiveness", option->desc);
        assert_int_equal(SANE_TYPE_INT, option->type);
        assert_int_equal(SANE_UNIT_NONE, option->unit);
-       assert_int_equal(sizeof(SANE_Int),  option->size);
+       assert_int_equal(sizeof(SANE_Int), option->size);
        assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap);
        assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type);
-       assert_int_equal(-50, option->constraint.range->min);
-       assert_int_equal(50, option->constraint.range->max);
+       assert_int_equal(-10, option->constraint.range->min);
+       assert_int_equal(10, option->constraint.range->max);
        assert_int_equal(1, option->constraint.range->quant);
 }
 
@@ -360,16 +360,16 @@ void kds_s2000w_option_get_descriptor_twenty_test()
 {
        SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(20);
 
-       assert_string_equal("background-smoothing-aggressiveness", option->name);
-       assert_string_equal("Background Smoothing Aggressivenes", option->title);
-       assert_string_equal("Background Smoothing Aggressivenes", option->desc);
+       assert_string_equal("colorbalancered", option->name);
+       assert_string_equal("colorbalancered", option->title);
+       assert_string_equal("colorbalancered", option->desc);
        assert_int_equal(SANE_TYPE_INT, option->type);
        assert_int_equal(SANE_UNIT_NONE, option->unit);
-       assert_int_equal(sizeof(SANE_Int), option->size);
+       assert_int_equal(sizeof(SANE_Int),  option->size);
        assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap);
        assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type);
-       assert_int_equal(-10, option->constraint.range->min);
-       assert_int_equal(10, option->constraint.range->max);
+       assert_int_equal(-50, option->constraint.range->min);
+       assert_int_equal(50, option->constraint.range->max);
        assert_int_equal(1, option->constraint.range->quant);
 }