gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-mdb] 64/93: qr gen


From: gnunet
Subject: [taler-taler-mdb] 64/93: qr gen
Date: Mon, 18 Nov 2019 21:13:27 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository taler-mdb.

commit 0cbf05f4bf4db06f05a81553adfd59c2f3c8bb3a
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 16 10:29:27 2019 +0100

    qr gen
---
 src/main.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main.c b/src/main.c
index 9800eb2..dbdffa9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -140,7 +140,7 @@ struct Display
 {
   int devicefd;
 
-  uint8_t *memory;
+  uint16_t *memory;
 
   struct fb_var_screeninfo orig_vinfo;
 
@@ -260,7 +260,7 @@ show_qrcode (const char *uri)
         ((x - xOff) * qrc->width / size) + ((y - yOff) * qrc->width / size)
         * qrc->width;
       qrDisplay.memory[y * qrDisplay.var_info.xres + x] =
-        (0 == (qrc->data[off] & 1)) ? 0xFF : 0x00;
+        (0 == (qrc->data[off] & 1)) ? 0xFFFF : 0x00;
     }
 
   QRcode_free (qrc);
@@ -1096,16 +1096,16 @@ run (void *cls,
             &qrDisplay.var_info,
             sizeof(struct fb_var_screeninfo));
 
-    if (8 != qrDisplay.var_info.bits_per_pixel)
+    if (16 != qrDisplay.var_info.bits_per_pixel)
     {
-      /* Change variable info to 8bit per pixel */
-      qrDisplay.var_info.bits_per_pixel = 8;
+      /* Change variable info to 16 bit per pixel */
+      qrDisplay.var_info.bits_per_pixel = 16;
       if (0 > ioctl (qrDisplay.devicefd,
                      FBIOPUT_VSCREENINFO,
                      &qrDisplay.var_info))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                    "Error setting display bpp to 8\n");
+                    "Error setting display bpp to 16\n");
         return;
       }
     }
@@ -1121,11 +1121,11 @@ run (void *cls,
     }
 
     /* get pointer onto frame buffer */
-    qrDisplay.memory = (uint8_t *) mmap (NULL,
-                                         qrDisplay.fix_info.smem_len,
-                                         PROT_READ | PROT_WRITE, MAP_SHARED,
-                                         qrDisplay.devicefd,
-                                         0);
+    qrDisplay.memory =  mmap (NULL,
+                              qrDisplay.fix_info.smem_len,
+                              PROT_READ | PROT_WRITE, MAP_SHARED,
+                              qrDisplay.devicefd,
+                              0);
     if (0 > qrDisplay.devicefd)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]