cancel
Showing results for 
Search instead for 
Did you mean: 

Why wont this seemingly simple if statement code work ? (TouchGFX)

JLeni.1
Associate II

0693W00000aHFfMQAW.png0693W00000aHFfWQAW.pngI am trying to design the code so if both flex buttons are toggled on, a container will appear on screen. To me it would appear to be a simple solution, set up an interaction to where if one of the Offer Draw buttons are pressed it will check if both are pressed and then show the container but it will not work. I have tried several solutions. TouchGFX does not like infinite loops. The project is successfully running target so it is not a typo issue, I have tried check on every N tick but to no avail. Any help would be greatly appreciated.

2 REPLIES 2
gbm
Lead III

This means "if address of src is the same as address of Offer_drawW and the same as address of Offer_drawB". I think it's not what you meant to write.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

ah okay, I wrongfully thought from the source files that &src just checks if the button is toggled. What should I use instead?