cancel
Showing results for 
Search instead for 
Did you mean: 

Custom-Trigger more than one type

Roman REITER
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX

View solution in original post

4 REPLIES 4
Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX
Roman REITER
Associate III

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

Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX
Roman REITER
Associate III

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.