I'm in trouble with a work I have to do. My idea is the following one: I'd Like to create a GUI in Python, and send variables via socket to a server program on Raspberry Pi. I decided to make the server program in C so i Can importa the various header files.h from of the API. The problem is that, if I want to control a telescope, i Would use for example the inditelescope.h set of functions, but I don't see the related .c program
I Need to control the EQMount from a RaspberryPi via cable, but receiving inputs from my pc. The connection between PC and Pi should be via local network. Can I use the indi client on Raspberry pi and call for example the functions of the telescope.h once I receive them from my PC ?
The chiama I want to create is the following:
Pc (with Ubuntu and a Python GUI) ---> network ---> Raspberry pi (with all the libs in a cpp. to control Mount moves) ---> cable connected to AZ-EQ6 Mount
The step stare the following: from the GUI in the user PC , i send values for the functions of the indilib. The PC acta a a client and send via socket the values to the Raspberry pi that store the, ad variables (this two steps have been implemented) . The program in the Pi will have a case and fall the functions from (for example) telescope.cpp and the relative .h that I found no the site. My quesiton is: once the program calls the functions, with the driver installed on the Raspberry pi for the Mount, I'll be able to see the effetto on the Mount without any others operations? This is a project for my university, and I need to create the GUI and send the value from myself. My problem is the passate from the .cpp program in the Raspberry pi to the effetto on the Mount . From the program to the fisic effect
Ok, INDI does not work this way. INDI a server-client architecture. You don't call methods in inditelescope.h,cpp, you call the INDI properties defined by the Mount driver. The stuff running on the PC are called
that communicate with the INDI server running on Raspberry Pi over the network via the INDI protocol. Please read the INDI Developers Manual.
There are many clients already available, but IF you want to create your own client, then use the Python INDI client to build your GUI client.
The project I'm trying to develop is not related to astronomy application. Is about track UAV with an high gain antenna on the Mount. Think you for your support, Really! so there's no way to create a server from myself by inserting the proper .cpp, .h and set properties by not using the INDI client and server ? (Pass the value with socket communication)
You can get the Alt/Az or RA/DEC of the mount via any client (including simple indi_getprop), then you can build a GUI anyway you want using the information retrieved from the INDI driver that controls the mount.
Ok! But what about set properties not by using INDI protocol between client and server? If I want to set properties from values send by my PC to Raspberry pi on my own way via local network, Once the Pi receive values and in my cpp program i store values as (for example) float dec and float ar, can I use the lib to set properties and send the commando to the Mount? Then I think driver will do the rest, or not? You told me that the .cpp and .h that I can include un my .cpp main don't have methods but can I set properties from values that I have in the program I want to realise?
You can't, if you use an INDI driver, you must use the protocol to communicate with it. Now if you don't want to use INDI, you can checkout indi-eqmod code (which I assume the driver you're planning to use for your mount) and then modify the code to fit with what you want.