Adding v-button-7

More
07 Sep 2016 17:23 #80141 by terkaa
Adding v-button-7 was created by terkaa
I need to add one vertical buttion. I removed clock date and copied user_tab button to that place. I also modified gmoccapy.py:

for v_button in range( 0, 7 ):
pin = self.halcomp.newpin( "v-button-%s" % v_button, hal.HAL_BIT, hal.HAL_IN )
hal_glib.GPin( pin ).connect( "value_changed", self._on_v_button_changed )

to:
for v_button in range( 0, 8 ):

Now I have hal pin and button, but button does not react to hal pin v-button-7

What am I doing wrong?

Tero

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

More
07 Sep 2016 17:57 #80148 by terkaa
Replied by terkaa on topic Adding v-button-7
Still had to add it to __init__ section:

self.v_tabs = [( 0, "tbtn_estop" ), ( 1, "tbtn_on" ), ( 2, "rbt_manual" ), ( 3, "rbt_mdi" ),
( 4, "rbt_auto" ), ( 5, "tbtn_setup" ), ( 6, "tbtn_user_tabs" ) , ( 7, "tbtn_offset" )

Tero

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

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