Ejemplo n.º 1
0
import time
import sys
from indibase.indiBase import Client

# connect the server
indiclient = Client()
indiclient.setServer("localhost", 7624)

if not (indiclient.connectServer()):
    print("No indi server running on " + indiclient.getHost() + ":" +
          str(indiclient.getPort()) + " - Try to run")
    print("  indi server indi_simulator_telescope indi_simulator_ccd")
    sys.exit(1)

# connect the scope
telescope = "Telescope Simulator"
device_telescope = None
telescope_connect = None

# get the telescope device
device_telescope = indiclient.getDevice(telescope)
while not (device_telescope):
    time.sleep(0.5)
    device_telescope = indiclient.getDevice(telescope)

# wait CONNECTION property be defined for telescope
telescope_connect = device_telescope.getSwitch("CONNECTION")
while not (telescope_connect):
    time.sleep(0.5)
    telescope_connect = device_telescope.getSwitch("CONNECTION")
Ejemplo n.º 2
0
import time
import sys
from indibase.indiBase import Client


# connect the server
indiclient = Client()
indiclient.setServer("astro-comp.fritz.box", 7624)

if not (indiclient.connectServer()):
    print("No indi server running on "
          + indiclient.getHost()
          + ":"
          + str(indiclient.getPort()) + " - Try to run")
    print("  indi server indi_simulator_telescope indi_simulator_ccd")
    sys.exit(1)

# connect the camera
camera = "CCD Simulator"
device_camera = None
connect_camera = None
# connect the filter
filterwheel = "CCD Simulator"
device_filterwheel = None
connect_filterwheel = None

# get the telescope device
device_camera = indiclient.getDevice(telescope)
while not (device_telescope):
    time.sleep(0.5)
    device_telescope = indiclient.getDevice(telescope)