devchan with dev TPs issue
Kenny
Posts: 209
The below button event won't work. WHY.
It works if I remove the the touchpanels from the dev array
Kenny
It works if I remove the the touchpanels from the dev array
dev dvTPS[] = {dvTP,dvTP2} devchan dvChans[]={{dvTPs,1},{dvTPs,2}} BUTTON_EVENT[dvChans] { Push:{} Release: { PULSE[dvRelays,button.input.channel] } }I have a work around but I really want to know why this won't work.
Kenny
0
Comments
A DEVCHAN is a structure that contains a DEV (a single DEV) and an INTEGER. You are trying to stuff an array of devices (dvTPS) into a container that can only hold one device. That won?t fit or work.
You have an array of devchans (dvChans) but that doesn?t mean you can plug in an array of devices. It means you can have an array where each element in the array is a combination of one dev and one integer.
Hope that clears it up a bit.
This code was given to me as a base to start from for a new project. I'm wondering now if the old project that it came from works.
Maybe this worked in an old version of FW. The old project is was done in '05.
Thanks Joe for your explanation.
Kenny