From f358854e4efc7771f342054ada7de379fb4f7217 Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Thu, 18 Apr 2019 10:03:05 -0700 Subject: [PATCH 1/2] fix issues in the examples --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d6b8b23..d7eeb81 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ API QRCode qrcode; // Allocate a chunk of memory to store the QR code -uint8_t qrcodeBytes[qrcode_getBufferSize()]; +uint8_t qrcodeBytes[qrcode_getBufferSize(1)]; qrcode_initText(&qrcode, qrcodeBytes, 3, ECC_LOW, "HELLO WORLD"); ``` @@ -48,9 +48,9 @@ The following example prints a QR code to the Serial Monitor (it likely will not be scannable, but is just for demonstration purposes). ```c -for (uint8 y = 0; y < qrcode.size; y++) { - for (uint8 x = 0; x < qrcode.size; x++) { - if (qrcode_getModule(&qrcode, x, y) { +for (uint8_t y = 0; y < qrcode.size; y++) { + for (uint8_t x = 0; x < qrcode.size; x++) { + if (qrcode_getModule(&qrcode, x, y)) { Serial.print("**"); } else { Serial.print(" "); From 257a103427af30763eac808b3929a8db66f9ed8f Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Thu, 18 Apr 2019 16:08:30 -0700 Subject: [PATCH 2/2] unify the qr version number --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7eeb81..5a21b8a 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ API QRCode qrcode; // Allocate a chunk of memory to store the QR code -uint8_t qrcodeBytes[qrcode_getBufferSize(1)]; +uint8_t qrcodeBytes[qrcode_getBufferSize(3)]; qrcode_initText(&qrcode, qrcodeBytes, 3, ECC_LOW, "HELLO WORLD"); ```