2021-02-19 11:16 PM
The chip is:STM32F429
When I was using the downloaded QRcode program, I found that the program crashed. The use method is as follows:
Solved! Go to Solution.
2021-02-21 06:20 PM
Hello JJIAN.2,
I've done a UI example to use the QRCode, you can refer to it.
The example was done for F746-DISCO so the resolution is 480x272. You can adapt accordingly.
Since it's only the UI part, to make it run on a board you need to open your Application Template .touchgfx project in Designer. Click on Edit-> Import GUI -> Browse -> Select the .touchgfx file enclosed.
Hope this will help,
When your question is answered, please close this topic by choosing Select as Best.
/Alexandre
2021-02-21 06:20 PM
Hello JJIAN.2,
I've done a UI example to use the QRCode, you can refer to it.
The example was done for F746-DISCO so the resolution is 480x272. You can adapt accordingly.
Since it's only the UI part, to make it run on a board you need to open your Application Template .touchgfx project in Designer. Click on Edit-> Import GUI -> Browse -> Select the .touchgfx file enclosed.
Hope this will help,
When your question is answered, please close this topic by choosing Select as Best.
/Alexandre
2021-02-21 07:17 PM
Thank you very much,I run the code as you said,it worked.
2021-02-22 01:25 AM
Hi lexandre RENOUX,
There is another problem,when i change the Screen display orientation from portrait to landscape the QRcode display is not normal,just like as below:
normal:abnormality:
What should i do ?
2021-02-22 07:26 PM
Hello JJIAN.2,
The fact that it does not work in vertical mode is normal because it's not supported. Since we directly write into the framebuffer, no rotation is done by TouchGFX. When you switch to vertical when the default is horizontal, TouchGFX performs a 90 degrees rotation of the widgets before filling the framebuffer. Why ? Because the framebuffer is still horizontal. The framebuffer is still exactly the same as in horizontal orientation.
If you want to make the QRCode work with vertical orientation, you need to modify the draw function to do the 90 degrees rotation when filling the framebuffer. Here is the code you need to change :
It's not that easy to perform but it's definitely doable. I don't have time to give you an example right now and I can't tell you when I will have a working example so you probably need to do it yourself.
/Alexandre
2021-02-23 04:34 AM
Got it,thank you!
2021-02-23 06:31 PM
Hi Alexandre
How do I fix the size of the QR code instead of following its size change.
2021-02-23 10:48 PM
Hello JJIAN.2,
I'm not sure I understand your question. Can you be more precise ?
/Alexandre
2021-02-23 11:03 PM
Hi Alexandre
I'm sorry.
here are details:
i want they are all the same size,no matter what the QR code.
2021-02-24 03:35 AM
I'm guessing here, but it the size might be calculated from the data that it needs to store. If you want the same size you'd need to know the maximum length of data you want to store and just pad smaller amounts with dummy data (if possible?)