]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change converter magic number with define
authorBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 17:19:31 +0000 (19:19 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 5 May 2026 17:19:31 +0000 (19:19 +0200)
src/kds_s2000w_pixel_converter.c

index 96e8d259ec97ccce9079a2c84a6614a5a42d5607..549cee1ad974a70adc58c4d0514426acd482775a 100644 (file)
@@ -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;