Extra halpins for Touchy

  • Ozzyrob
  • Topic Author
  • New Member
  • New Member
More
9 years 2 weeks ago #100317 by Ozzyrob
Extra halpins for Touchy was created by Ozzyrob
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
Code:
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
Code:
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.

Please Log in to join the conversation.

More
9 years 2 weeks ago #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.

Please Log in to join the conversation.

Time to create page: 0.114 seconds
Powered by Kunena Forum