Closed the0ne closed 5 years ago
@the0ne,
Just starting testing this PR. It's amazing!.
One question, I'm using a 1.8" TFT display, and running this:
gdisplay.attach(gdisplay.ST7735G_18, gdisplay.LANDSCAPE_FLIP, false)
gdisplay.clear(gdisplay.BLACK)
gdisplay.qrcode(0,0,"whitecatboard.org",gdisplay.ECC_HIGH)
The resulting image is:
Maybe is too small. Is there any way to set the width to use in generating the QR?.
Also, do you have the wiki for this new feature to merge it in master?
Is there any way to set the width to use in generating the QR?.
absolutely - that's what the parameter after the ECC type is for. try a value greater than 1 to double (2) or triple (3) the size, etc.
Also, do you have the wiki for this new feature to merge it in master?
Not yet finished. I plan to provide a wiki update for all of the new PRs together here so you can update the master wiki from there as you wish.
Is there any way to set the width to use in generating the QR?.
absolutely - that's what the parameter after the ECC type is for. try a value greater than 1 to double (2) or triple (3) the size, etc.
@jolivepetrus did you succeed?
I once noticed that the refresh rates of the display vs. the camera may lead to scanning issues. So I ordered some e-paper display for more tests (still being on its way from china).
@the0ne,
I will check later.
Also, do you have the wiki for this new feature to merge it in master?
Not yet finished. I plan to provide a wiki update for all of the new PRs together here so you can update the master wiki from there as you wish.
@jolivepetrus i've added it at the bottom of https://github.com/the0ne/Lua-RTOS-ESP32/wiki/GDISPLAY-module
@the0ne,
About the wiki, this part is not explained, and maybe it's the most important:
{{mode=gdisplay.MODE_ALPHANUM,val="WIFI:S:MY-EXTRA-LONG-NAME"},{mode=gdisplay.MODE_BYTE,val=";T:WPA;P:87654321;;"}}
Hmm. I've put there:
This function supports qr code segmentation which can save a lot of qr-space and so make the qr-code smaller: https://www.nayuki.io/page/optimal-text-segmentation-for-qr-codes
gdisplay.qrcode(0,0,{{mode=gdisplay.MODE_ALPHANUM,val="WIFI:S:MY-EXTRA-LONG-NAME"},{mode=gdisplay.MODE_BYTE,val=";T:WPA;P:87654321;;"}})
Well, I guess I could add a description of the supported modes and now to build up the list. Is that what you are missing?
changed mixed-spacing in gdisplay.c lua module to tab-only spacing changed shadowed-variables in gdisplay.c to static_-named variables to avoid possibly dangerous shadowing
usage example: gdisplay.qrcode(x,y,"text-to-encode"[,gdisplay.ECC_HIGH[, 1]]) gdisplay.qrcode({x,y},"text-to-encode"[,gdisplay.ECC_LOW[, 2]])
... where the last optional parameter is a multi-size factor, hence 2 will double height and width of the qr-code to make it scan-able better on small displays or from large distance
also supports qr code segmentation which can save a lot of qr-space and so make the qr-code smaller: https://www.nayuki.io/page/optimal-text-segmentation-for-qr-codes
gdisplay.qrcode(0,0,{{mode=gdisplay.MODE_ALPHANUM,val="WIFI:S:MY-EXTRA-LONG-NAME"},{mode=gdisplay.MODE_BYTE,val=";T:WPA;P:87654321;;"}})