DCD is an indi client written in python that comes with a complete client library that it uses for it's back-end. This library, indiclient.py, will be useful for constructing a python-based web interface to INDI.
The ST402-ME had problems sending data to this client which were not shared by the sample drivers bundled with INDI. This was eventually found to be caused by a message being sent by the driver that was interpreted by the client as containing a BLOB of null data, prior to sending the correct compressed FITS data. Patching the source code to ignore null data allowed the correct data to come through correctly.
Patch file:
--- indiclient.py.orig 2009-01-08 11:22:15.000000000 +0900
+++ indiclient.py 2009-01-08 11:24:01.000000000 +0900
@@ -1054,13 +1054,11 @@
@return: the decoded version of value
@rtype: StringType
"""
- if len(self.format)>=2:
+ data=base64.decodestring(self._value)
+ if (data != "") and len(self.format)>=2:
if self.format[len(self.format)-2]+self.format[len(self.format)-1]==".z":
- return zlib.decompress( base64.decodestring( self._value ))
- else:
- return base64.decodestring(self._value)
- else:
- return base64.decodestring(self._value)
+ data = zlib.decompress(data)
+ return data
def _encode_and_set_value(self,value,format):
"""
--- gindi.py.orig 2009-01-08 11:26:37.000000000 +0900
+++ gindi.py 2009-01-08 11:26:47.000000000 +0900
@@ -26,16 +26,18 @@
gtkindiclient._blob_received(self,vector,blob)
self.enable_blob()
if blob.get_plain_format()==".fits":
- i=1
- while os.path.exists("image%09d" % i+".fits"):
- i=i+1
- out_file = open("image%09d" % i+".fits","wb")
- out_file.write(blob.get_data())
- out_file.close()
- if platform.system()=="Windows":
- winstarter(self.widget.get_text()+" "+"image%09d" % i+".fits")
- if platform.system()=="Linux":
- os.system(self.widget.get_text()+" "+"image%09d" % i+".fits"+" &")
+ data = blob.get_data()
+ if (data != ""):
+ i=1
+ while os.path.exists("image%09d" % i+".fits"):
+ i=i+1
+ out_file = open("image%09d" % i+".fits","wb")
+ out_file.write(blob.get_data())
+ out_file.close()
+ if platform.system()=="Windows":
+ winstarter(self.widget.get_text()+" "+"image%09d" % i+".fits")
+ if platform.system()=="Linux":
+ os.system(self.widget.get_text()+" "+"image%09d" % i+".fits"+" &")
The Meade ETX125 works fine in DCD with no modification. One issue compared to other clients such as XEphem and KStars is that DCD has no built-in sky view. As the final intention is to take advantage of DCD's back end rather than it's GUI front end, this would have been a problem in any case.
The ST402-ME's on board filter wheel appears to function correctly in DCD.
Connecting to indi from an interactive python shell has been achieved and these scripts are what the web interface connects to.