Open user_tab with external IO?
- terkaa
- Offline
- Elite Member
Less
More
- Posts: 261
- Thank you received: 3
18 Jun 2016 09:36 #76247
by terkaa
Open user_tab with external IO? was created by terkaa
Please Log in or Create an account to join the conversation.
- newbynobi
- Offline
- Moderator
Less
More
- Posts: 2075
- Thank you received: 406
18 Jun 2016 10:28 #76250
by newbynobi
Replied by newbynobi on topic Open user_tab with external IO?
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:
so a command likewill 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:
Norbert
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
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.
- terkaa
- Offline
- Elite Member
Less
More
- Posts: 261
- Thank you received: 3
18 Jun 2016 13:54 #76259
by terkaa
Replied by terkaa on topic Open user_tab with external IO?
Ok, This works perfectly thank you.
Tero
Tero
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.090 seconds