Extra halpins for Touchy

More
13 Oct 2017 09:00 - 13 Oct 2017 09:02 #100317 by InMyDarkestHour
Due to not having a touch screen and wanting a pendant &/or control that interacts with the toggle buttons on the touchy interface I've come up with these few snippets. I have no python experience, so I think I need some advice on the best way to attack this. Or am I barking up the wrong tree. The idea is to have a pendant closer to the machine or a control panel with buttons.


Create new halpins
    self.c.newpin("select.fo", hal.HAL_BIT, hal.HAL_IN)
    self.selectfo = 0

Logic for halpin, just sends and activate signal to the button callback
        selectfo = self.c["select.fo"]
        if selectfo and not self.selectfo: 
            wfo = wtree.get_widget("fo")
            if wfo:
                os = wfo.get_active()
                if not os:
                    wfo.set_active(True) 
        self.selectfo = selectfo

So I can run touchy (in sim mode), use halcmd to send signals to the pins and the buttons seem to do their thing. There is a few changes in other areas I've had to make.
Last edit: 13 Oct 2017 09:02 by InMyDarkestHour.

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

More
13 Oct 2017 13:13 - 13 Oct 2017 13:14 #100325 by andypugh
Replied by andypugh on topic Extra halpins for Touchy
Using Touchy without a Touchscreen seems _slightly_ eccentric...

Touchscreens have become reasonably affordable now. It might be worth considering getting one.

However, I will be making similar changes to my own Touchy in the future as I want to be able to set jog speed with a knob.

I have already modified the FO and SO buttons to echo what the Halui inputs set. That might actually work better for you, switch count-enable in HAL and direct the jogwheel counts where needed.

I probably ought to discuss putting that change into the released version.
Last edit: 13 Oct 2017 13:14 by andypugh.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum