Skip to main content
Roman REITER
Associate III
January 5, 2023
Solved

Custom-Trigger more than one type

  • January 5, 2023
  • 4 replies
  • 1922 views

Is it possible to create 2 or more types in a custom trigger? i tried it with a komma, but i doesn't work.0693W00000Y7TxMQAV.png

This topic has been closed for replies.
Best answer by Yoann KLEIN

Hello @Roman REITER​,

Yes, that is possible.

Select <custom> as your Action type and rename whatever you want (in my example I named it ThreeThings):

0693W00000Y7Z8jQAF.pngIn the Includes tab, create a struct and insert your variables, with different types if you want, like this :

0693W00000Y7ZA1QAN.pngThen, you can link an interaction with your Custom Trigger, e.g. :

0693W00000Y7ZALQA3.png 

I attach my TouchGFX project example to this post, so you can look at it in details if you want.

/Yoann

4 replies

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
January 6, 2023

Hello @Roman REITER​,

Yes, that is possible.

Select <custom> as your Action type and rename whatever you want (in my example I named it ThreeThings):

0693W00000Y7Z8jQAF.pngIn the Includes tab, create a struct and insert your variables, with different types if you want, like this :

0693W00000Y7ZA1QAN.pngThen, you can link an interaction with your Custom Trigger, e.g. :

0693W00000Y7ZALQA3.png 

I attach my TouchGFX project example to this post, so you can look at it in details if you want.

/Yoann

Yoann KLEINST Software Developer | TouchGFX
Roman REITER
Associate III
January 10, 2023

Thanks, but I knew that. would have thought of something like this: <custom>, <custom>

Yoann KLEIN
ST Employee
January 11, 2023

Hello,

I'm not sure to fully understand, why doing that when you can just pass a struct with as much parameters as you want ?

/Yoann

Yoann KLEINST Software Developer | TouchGFX
Roman REITER
Associate III
January 23, 2023

mostly an array with size is passed to functions (2 parameters-char * array, uint8_t size). i just wanted to do it the way it is done (as shown in books). However thank you for your help.