Open user_tab with external IO?

More
18 Jun 2016 09:36 #76247 by terkaa
Hi,

I have been building user interface for arm type atc. Is it possibly to activate usertab_0 with input on mesa io card?

File Attachment:


Tero

Please Log in or Create an account to join the conversation.

More
18 Jun 2016 10:28 #76250 by newbynobi
Hallo Tero,

at the development state it is not possible to add a hal pin to the user tab, but...
This is gmoccapy so there is at least a work around ;)

All buttons can be reached with the hal pins:
# vertical button
gmoccapy.v-button-0
gmoccapy.v-button-1
gmoccapy.v-button-2
...
gmoccapy.v-button-6

# horizontal  button
gmoccapy.h-button-0
gmoccapy.h-button-1
gmoccapy.h-button-2
...
gmoccapy.h-button-9

so a command like
setp gmoccapy.v-button-6    1
setp gmoccapy.v-button-6    0
will open the user tab.
to close that tab again using the hal pin, just use the same commands again.

You may ask, why use the command twice, first setting the pin true than false?
That is because the gui is designed to be used with momentary switches arround the display. So if you want to use a hardware switch, just connect the IO like:
net   V-Buuton_6    gmoccapy.v-button-6    <=    MESA-CARD-IO_Of_The_Momentary_Switch

Norbert

Please Log in or Create an account to join the conversation.

More
18 Jun 2016 13:54 #76259 by terkaa
Ok, This works perfectly thank you.


Tero

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.248 seconds
Powered by Kunena Forum