LinuxCNC start, stop, pause buttons ?

More
7 years 10 months ago #122116 by newbynobi
I do not know your code and unfortunatelly i o not peak rushan easer, but it looks like you did the button reaction through hal connections not with the gui code.

Gmoccapy does change the button depending on the mode and do handle the same hal pin in the correct way, depending on the vissible button.

Norbert

P.s. i hope i did not use any ilegal idea or way to use a gui!

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

More
7 years 10 months ago #122127 by nkp

but it looks like you did the button reaction through hal connections not with the gui code.

no
Code:
self.vtriggers = [] self.htriggers = [] for i in range(8) : self.vtriggers.append(hal_glib.GPin(self.halcomp.newpin('vbutton.%s'%i, hal.HAL_BIT, hal.HAL_IN))) self.vtriggers[-1].update() self.vtriggers[-1].connect('raise',self.click_button_v, self.widgets.notebook2, i) for i in range(8) : self.htriggers.append(hal_glib.GPin(self.halcomp.newpin('hbutton.%s'%i, hal.HAL_BIT, hal.HAL_IN))) self.htriggers[-1].update() self.htriggers[-1].connect('raise',self.click_button_h, self.widgets.notebook1, i) self.modes = {"mode_auto":0, "mode_referent":1, "mode_mdi":2, "mode_jogu":3, "mode_jogi":4, "mode_edit":5,"mode_mpg":6,} self.modetriggers = [] for mode in self.modes : self.modetriggers.append(hal_glib.GPin(self.halcomp.newpin(mode, hal.HAL_BIT, hal.HAL_IN))) self.modetriggers[-1].update() self.modetriggers[-1].connect('raise', self.change_mode) panel = gladevcp.makepins.GladePanel( self.halcomp, xmlname, self.builder, None) self.builder.connect_signals(self) self.halcomp.ready()
(code:Nick,cnc-club.ru)

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

Moderators: newbynobi, HansU
Time to create page: 0.109 seconds
Powered by Kunena Forum