Welcome, Guest
Username: Password: Remember me
14 Nov 2018
Glad to announce of release of INDI Library v1.7.5 on 2018-11-14. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...
  • Page:
  • 1
  • 2

TOPIC: Driver for GoTo and Guide through Arduino & ST4

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12317

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Hi Guys !

on the layout of the driver indi_ardust4 ( github.com/tliff/indi_ardust4 ) I would like to develop a Guide/GoTo driver. A good starting point is in the "Tutorial 7" which explain how to create a GoTo driver but the issue is ... if I have 2 drivers, one for Guide and the other for GoTo how can they simultaneously keep open the same serial connection to Arduino ?

I started by just adding the GoTo functions to the indi_ardust4 driver but it does not seem to be so clean.

Any idea?
Cheers
Francesco

Please Log in or Create an account to join the conversation.

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12322

Try to incorporate it in your mount driver. A mount driver can have the INDI Guide interface as well like the telescope simulator and EQMod
The following user(s) said Thank You: Piuma75

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12323

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0

knro wrote: Try to incorporate it in your mount driver. A mount driver can have the INDI Guide interface as well like the telescope simulator and EQMod


At the moment I don't have any mount driver but just a "guide" driver which has an object to connect to the USB and then to the Arduino controller (which send commands to the ST4 input on my mount).

If I understand correctly (last line of C++ code for me were typed about 10 years ago !!!) I should create a new "mount driver" which include Guide and Telescope (GoTo).
Is that correct ?

What about the EQMod ? Do I need it ?

Do you know if there are any similar drivers around so I can have a look and understand how to proceed ?

Cheers
Francesco

Please Log in or Create an account to join the conversation.

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12326

"GOTO" functions mean mount driver. If you just want an ST4 driver then the code you linked works. So you can create a minimal driver. Take a look at the telescope simulator driver and strip it down to bare minimum to fit your needs.

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12384

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Thank you !

I did as suggested:
1) transformed the project from a generic Default Device into "Telescope"
2) added the functions from the Telescope Simulator which are related to "GoTo"
3) corrected some wrong function categorization (private, public, protected...)

Compiled ... with errors !! The errors is related to "missing libnova" library.

I don't know if this is the right forum where to ask for advice, if not you may point me to the right one or advice me ... please !

My development environment is Ubuntu 16.04 LTS
I installed the indi library from mutlaqja repository with this command:
sudo apt install indi-full kstars-bleeding

The libnova library version I have is 0.14.0-2.1 (both the library and the development ... all the .h files)
I downloaded the full source code of Indi (version 1.3).

As IDE I am using QT. GCC can find all the Indi Libraries (as libnova is included within telescope.h) but no way to find libnova...

I did modify the orginal MakeFile.txt of ardust4 into this, to include libnova directory:

########### Tutorial one ##############
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()


include_directories("/usr/include/libindi/")
include_directories("/usr/include/libnova/")
add_executable(indi_ardust4 ardust4.cpp ardust4driver.cpp)

target_link_libraries(indi_ardust4 indidriver)


After that I got a different output which let me think about libraries incompatibility such as versions mismatch:

:-1: error: CMakeFiles/indi_ardust4.dir/ardust4.o: undefined reference to symbol 'ln_get_julian_from_sys'

Can you suggest me which is the best development environment you suggest ? Or if you already got this issue ... how to solve it ! It seems like I am using a wrong libnova version but it cames together with libindi (which is version 1.3) so i am not sure...

Cheers
Francesco

Please Log in or Create an account to join the conversation.

Last Edit: by Piuma75. Reason: Wrong version mentioned

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12387

Are you building this as a 3rd party driver or a driver within libindi? Please zip your project file upload them somewhere and post a link to them so I can inspect them.

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12390

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Hi !

are you awake 24 hours a day ? Thank you very much to be so fast to reply.

Perhaps I don't know the difference in building within libindi or as a 3rd party driver.

The tgz of my project is here:
https://www.dropbox.com/s/lz31p0sg6awcvs4/indi_ardust4-master-2.0.tgz?dl=0

While waiting for your comments I will try to learn something more !!

NOTE:
To be on the safe side, I edited the CMakeList.txt, created a Modules folder and added the findINDI.cmake and findNOVA.cmake files (copied from the eqmode 3rd party drivers). The CMakeList.txt is now pretty much similar to the one in the EQmod driver folder.

########## Tutorial one ##############
cmake_minimum_required(VERSION 2.4.7)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
include(GNUInstallDirs)

set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")

find_package(INDI REQUIRED)
find_package(Nova REQUIRED)
find_package(ZLIB REQUIRED)

set(ARDUST4_VERSION_MAJOR 2)
set(ARDUST4_VERSION_MINOR 0)

set(INDI_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/indi")

include_directories( ${CMAKE_CURRENT_BINARY_DIR})
include_directories( ${CMAKE_CURRENT_SOURCE_DIR})
include_directories( ${INDI_INCLUDE_DIR})
include_directories( ${NOVA_INCLUDE_DIR})
include_directories( ${NOVA_INCLUDE_DIR}/..)


include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()


add_executable(indi_ardust4 ardust4.cpp ardust4driver.cpp)

target_link_libraries(indi_ardust4 indidriver)


Run again CMake but when I compile I got the same exact error.

Cheers
Francesco

Please Log in or Create an account to join the conversation.

Last Edit: by Piuma75. Reason: Additional notes and comment

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12396

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Hi knro,

found the solution and compiled !

The issue was in the MakeFile.txt, there was information of the include directive but not of the library :

I added this to the end of the MakeFile.txt and I got it compiled ...
target_link_libraries(indi_ardust4 nova)

That does not mean that it will work but ... you know ... it has to compile first !!

I asked the author of ardust4 if I can collaborate but he didn't come back to me so I started to modify is driver. When I will have it tested with basic goto functionality I will create my GitHub repository and I will inform you.

Thanks for your support. I really appreciate your hard work and commitment for such a big project !
Many thanks from Francesco (an Italian who live in Britain)
Francesco

Please Log in or Create an account to join the conversation.

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12401

Ok please download "fixed" version from here: www.dropbox.com/s/oevagh6caacf0vy/indi_a...4-master.tar.gz?dl=0

Now it is made as a 3rd party library. 3rd part simply means it is compiled outside of INDI tree. I changed the device name to "Adruino GOTO" and note that I used the same name in the device XML file (that clients parse to learn of available drivers in the system). I also included the cmake_modules directory and made any necessary changes. Now it fails to compile, but it is due to missing Park()/unPark() functions you defined in the header but not implemented yet, so I'll leave that to you. Good luck!

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12405

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Thanks you !

YOU ARE A PRO !!

Please Log in or Create an account to join the conversation.

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12450

  • Piuma75
  • Piuma75's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Hello again !

The code is now compiling correctly and I have been able to start indiserver, start CCDciel and use the Panel (only the Tracking part of the code is working, the rest is still simulated).

If I tried to use KStars (as it is the only way I know to be able to test GoTo functionalities with Indi) ... I can see my driver listed but when I connect indiserver I get an error message like "driver was not found on the system".

I checked and the driver is (together with the other) in /usr/bin while the xml is in /usr/share/indi

With KStars I can use indi with indi_v4l2_ccd and indi_gphoto2_ccd ... which have files located in the same place of arduinogoto_telescope ...

Any idea ? I tried to strace indiserver but without success !

Cheers
Francesco

Please Log in or Create an account to join the conversation.

Driver for GoTo and Guide through Arduino & ST4 2 years 3 weeks ago #12452

I checked what I sent you, and in the XML file, the file is called "indi_arduino_telescope", while the executable is called "indi_arduinogoto_telescope", so please change the name in the XML file to that of the executable exactly and run sudo make install and try again.

Please Log in or Create an account to join the conversation.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
  • Page:
  • 1
  • 2
Time to create page: 0.234 seconds

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!


Gallery

Replica

Why INDI

Replica