2024-08-05 06:20 AM
Hello,
I am using touchGFX4.16 designer, in windows 10.I want to display dynamic QR code generated from URL. I've tried to look for solutions like
1) Generating QR code from external library & then displaying it on display.
2)QR code widget is there in touchgfx4.24.Is it possible to migrate touchGFX4.16 project to touchGFX4.24. to achieve the above.
Can any one please help?
Solved! Go to Solution.
2024-08-06 07:23 AM
Hello @SC9,
Yes, you should be able to update your project from TouchGFX 4.16.0 to 4.24.0. Please create a backup of your project before updating it to the latest version of TouchGFX.
If you don't want to migrate to TouchGFX 4.24.0, there is a custom container available for QR Code that you can access from here. To be honest, I haven't tested it with TouchGFX 4.16.0, but, there shouldn't be anything special about it that causes trouble.
In order to update your project to TouchGFX 4.24.0, first you need to open your TouchGFX project with 4.24.0, then generate code. Finally, you need to open your STM32CubeMX (.ioc) project and generate code from there as well (probably, you will be prompted to install X-CUBE-TOUCHGFX 4.24.0). And now, you should have your project ready.
I hope this helps you. Don't hesitate to ask more questions!
2024-08-06 07:23 AM
Hello @SC9,
Yes, you should be able to update your project from TouchGFX 4.16.0 to 4.24.0. Please create a backup of your project before updating it to the latest version of TouchGFX.
If you don't want to migrate to TouchGFX 4.24.0, there is a custom container available for QR Code that you can access from here. To be honest, I haven't tested it with TouchGFX 4.16.0, but, there shouldn't be anything special about it that causes trouble.
In order to update your project to TouchGFX 4.24.0, first you need to open your TouchGFX project with 4.24.0, then generate code. Finally, you need to open your STM32CubeMX (.ioc) project and generate code from there as well (probably, you will be prompted to install X-CUBE-TOUCHGFX 4.24.0). And now, you should have your project ready.
I hope this helps you. Don't hesitate to ask more questions!
2024-08-09 02:09 AM
Thank you for your reply. It is working fine with TouchGFX 4.16.
2024-08-09 05:32 AM
Great to hear! :D
Good luck!
2024-08-13 11:15 PM
Hello @Mohammad MORADI ESFAHANIASL
My program runs on simulator but does not show any QR code on screen. I tried to debug the code. it hangs in exit().
2024-08-14 05:05 AM
Hello @SC9,
I tried your example and it worked fine on the simulator.
However, when you try to run the code on the target, for some reason the new command causes trouble. If you try to rewrite the code in a manner that avoids new, you should be able to run it on your board.
//Change in QRCodeWidget.hpp
uint8_t qrCodeData [qrcodegen_BUFFER_LEN_MAX];
//Change in QRCodeWidget.cpp
QRCodeWidget::QRCodeWidget(): qrCodeVersion(1),
sizeOfQRCodeSymbol(25),
scale(1),
errorCorectionLvl(qrcodegen_Ecc_LOW)
{}
//Remove
delete qrCodeData; //SN_CHANGE
qrCodeData = new uint8_t[qrcodegen_BUFFER_LEN_FOR_VERSION(qrCodeVersion)];
//Change in Screen1View.hpp
QRCodeWidget QRCode;
//Change in Screen1View.cpp
void Screen1View::setupScreen()
{
Screen1ViewBase::setupScreen();
QRCode.setScale(2);
QRCode.setQRCodeVersion(15);
QRCode.setErrorCorrectionLevel(qrcodegen_Ecc::qrcodegen_Ecc_LOW);
QRCode.convertStringToQRCode("https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT:QTS00A1U149AC.5TJ00");
resizeTheContainer();
QRCode.setXY(38, 38);
add(QRCode);
}
void Screen1View::resizeTheContainer()
{
uint16_t newHeight = QRCode.getHeight()+10;
uint16_t newWidth = QRCode.getWidth()+10;
background.setWidthHeight(newWidth,newHeight);
background.setXY(33, 33);
}
2024-08-22 06:34 AM
2024-08-29 02:18 AM
To be honest, I am not sure why those changes did not fix your project. Is it possible to migrate to the latest versions of the tools that you are using (TouchGFX, STM32CubeMX, and STM32CubeIDE)?
2024-09-04 03:43 AM
1)For the changes you suggested- Qr code is displayed on board but to generate QR Code dynamically
undefined reference to `HAL_UART_Init
undefined reference to `HAL_UART_IRQHandler'
2)And for the project I created by studying Touchgf4.24 QRCode widget - It hangs in exit() after one QR.