Aylin replied to the topic 'Using PyIndi client with a simple GUI' in the forum. 2 weeks ago

I do, but I need a customized client. The other INDI clients have a lot of what I don't need. I'm just looking to make a simple interface.

Read More...

Aylin created a new topic ' Using PyIndi client with a simple GUI' in the forum. 2 weeks ago

Hi,
I've been having a lot of issues creating a client for multiple devices, a filter wheel and camera. When following the PyIndi client tutorials, I'm not able to change a device property by choice. I'm now trying to control the devices through a simple button GUI to provide an interface to change a set of properties by choice. For example, I have one simple GUI with 2 buttons, one to change the filter wheel to slot 1 and the other to change it to slot 2. Going into this, I thought that it would be as simple as running a basic client in the background and import another client for the filter wheel where I could call the function newProperty through my GUI. This is the code I have for changing the filter slot (bits of it):

#######################################################
class IndiClient(PyIndi.BaseClient):
dwheel = None
def __init__(self):
super(IndiClient, self).__init__()
def newDevice(self, d):
pass #connecting the filter wheel via a basic client
def newProperty(self, p):
if p.getName() == "FILTER_SLOT":
self.nd18()
......
def nd18(self):
slot=self.dwheel.getNumber("FILTER_SLOT")
slot[0].value=1
self.sendNewNumber(slot)

##############################################################3
I imported the IndiClient class from the script to my GUI and am trying to call newProperty, but I hit an issue with the arguments. I don't know how to call the functions ie: newProperty(self, p) because of the "p", property, parameter. I'm not very well versed with Python, so I imagine I'm missing something very obvious, but its doing a dang good job of eluding me. I'm not even sure if just calling the function newProperty or even nd18 would work.

tltr: How do you connect a GUI to a PyIndi client? Can you call one of the PyIndi functions such as newProperty(self, p) and if so, how?

Read More...

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!