From: Bastian Dehn Date: Tue, 5 May 2026 17:19:31 +0000 (+0200) Subject: change converter magic number with define X-Git-Tag: v1.1.30^2~6 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=2ac0a70e654b5f3a3ead42c527c34e8145d11147;p=sane-kds-s2000w-net.git change converter magic number with define --- diff --git a/src/kds_s2000w_pixel_converter.c b/src/kds_s2000w_pixel_converter.c index 96e8d25..549cee1 100644 --- a/src/kds_s2000w_pixel_converter.c +++ b/src/kds_s2000w_pixel_converter.c @@ -5,9 +5,9 @@ uint32_t _kds_s2000w_pixel_converter_round_pixel(uint32_t pixel) { - uint32_t diff = pixel % 30; + uint32_t diff = pixel % ROUND_STEP; diff = ROUND_STEP - diff; - if (diff < 30) + if (diff < ROUND_STEP) pixel = pixel + diff; return pixel;