×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

The Imaging Source and INDI

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

So, for some reason the FPS with the new Ubuntu 18.04 version works now fine with the v4l2 driver and my The Imaging Source camera.
What I'd like to implement nonetheless, is the additional properties such as i. e. the Trigger Mode, ( see under section "Interface (electrical)" ). Since it would allow to generate very accurate timestamps in connection with an GPS device.

What would be the most convenient way to inherit from the V4L2_Driver class? Forking the INDI main repository and adding it or maybe going into the 3rd party and making an The Imaging Source driver, since these trigger features will only work for some of their cameras?

Thanks in advance

Cheers
Erik
4 years 6 months ago #44453

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

Probably 3rd party is the way to go here, though I'm not sure how well the V42L is exposed to 3rd party drivers at the time being.
4 years 6 months ago #44457

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

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

Okay. Forked the 3rd party drivers already. A quick glance revealed that the header files for the V4L drivers aren't yet added to the include folders.
4 years 6 months ago #44485

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

Right, let us know what needs to be done to get this in order. Like what we did with the LX200 library.
4 years 6 months ago #44488

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

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

Hey, thanks for the hint with the lx200 library.

I had a look at that and tried to do it similar, I changed the CMakeLists.txt accordingly and adapted the FindINDI.cmake in indi-3rdparty as well, but I seem to have been missing something, 'cause the newly written driver inheriting from V4L2_Driver does not link to the created library. Undefineed references to all member function..
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:157: undefined reference to `V4L2_Driver::V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::~V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:162: undefined reference to `V4L2_Driver::~V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::initProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:174: undefined reference to `V4L2_Driver::initProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISGetProperties(char const*)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:182: undefined reference to `V4L2_Driver::ISGetProperties(char const*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:187: undefined reference to `V4L2_Driver::ISNewSwitch(char const*, char const*, ISState*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewText(char const*, char const*, char**, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:192: undefined reference to `V4L2_Driver::ISNewText(char const*, char const*, char**, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewNumber(char const*, char const*, double*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:197: undefined reference to `V4L2_Driver::ISNewNumber(char const*, char const*, double*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::updateProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:202: undefined reference to `V4L2_Driver::updateProperties()'

Anyway, here are the changes I made to build the v4l library:
########### INDI::CCD V4L Driver ###############
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    SET(v4l2driverccd_SRC
        ${CMAKE_CURRENT_SOURCE_DIR}/libs/lx/Lx.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/v4l2driver.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/indi_v4l2driver.cpp)
 
    IF (UNITY_BUILD)
        ENABLE_UNITY_BUILD(v4l2driverccd v4l2driverccd_SRC 10 cpp)
    ENDIF ()
 
    add_library(indiv4l SHARED ${v4l2driverccd_SRC} ${libwebcam_C_SRC} ${libwebcam_CXX_SRC})
    set_target_properties(indiv4l PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION} OUTPUT_NAME indiv4l)
    add_executable(indi_v4l2_ccd ${v4l2driverccd_SRC} ${libwebcam_C_SRC} ${libwebcam_CXX_SRC})
    target_link_libraries(indi_v4l2_ccd ${JPEG_LIBRARY} indidriver)
    install(TARGETS indi_v4l2_ccd RUNTIME DESTINATION bin )
 
    install(TARGETS indiv4l LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
    install(FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/v4l2driver.h
        ${CMAKE_CURRENT_SOURCE_DIR}/libs/lx/Lx.h
        DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
 
    install(FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/libs/webcam/v4l2_base.h
        DESTINATION ${INCLUDE_INSTALL_DIR}/libindi/webcam COMPONENT Devel)
 
    install(FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/libs/webcam/v4l2_decode/v4l2_decode.h
        DESTINATION ${INCLUDE_INSTALL_DIR}/libindi/v4l2_decode COMPONENT Devel)
 
    # For DBK21 camera
    install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/80-dbk21-camera.rules DESTINATION ${UDEVRULES_INSTALL_DIR})
 
 
ENDIF ()

I did include that into the paragraph of the v4l driver.
As for the FindINDI.cmake I just added this line
INDI_declare_component(v4l  indiv4l)

To my understanding, shoudn't be the v4l library now be included into the INDI_LIBRARIES variable in cmake? I seem to be missing something obvious.

Cheers
Erik

PS.: Once it works, shall I do a pull request?
4 years 6 months ago #44591

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

Are these changes in a fork somewhere? If yes, I can check out the fork and diagnose the issue right there.
Last edit: 4 years 6 months ago by Jasem Mutlaq.
4 years 6 months ago #44592

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

  • Posts: 35
  • Thank you received: 1
4 years 6 months ago #44602

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

I fixed a couple of issues (you can't use DEBUG outside the class, use IDLog). but it compiled fine. It's not linked against indi_v4l2.. did you push this part yet?
4 years 6 months ago #44632

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

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

I just pushed it all. Sorry.

It's not yet much what I did. I only took the generic ccd and used it as template to inherit from v4l2_driver.
4 years 6 months ago #44633

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

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

Oh, and the branch on the indi-3rdparty fork I'm working with is github.com/emktubs/indi-3rdparty/tree/v4l_tis_expansion
4 years 6 months ago #44634

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

Ok, so you need to add:

INDI_declare_component(v4l indiv4l)

to the FindINDI.cmake in the 3rdparty/cmake_modules directory.. since this is what is used by the driver.
4 years 6 months ago #44636

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

  • Posts: 35
  • Thank you received: 1

Replied by erik on topic The Imaging Source and INDI

I did. Still undefined references, though.
[ 50%] Linking CXX executable indi_v4ltis_ccd
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:157: undefined reference to `V4L2_Driver::V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::~V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:162: undefined reference to `V4L2_Driver::~V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::initProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:174: undefined reference to `V4L2_Driver::initProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISGetProperties(char const*)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:182: undefined reference to `V4L2_Driver::ISGetProperties(char const*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:187: undefined reference to `V4L2_Driver::ISNewSwitch(char const*, char const*, ISState*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewText(char const*, char const*, char**, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:192: undefined reference to `V4L2_Driver::ISNewText(char const*, char const*, char**, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewNumber(char const*, char const*, double*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:197: undefined reference to `V4L2_Driver::ISNewNumber(char const*, char const*, double*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::updateProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:202: undefined reference to `V4L2_Driver::updateProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x98): undefined reference to `V4L2_Driver::saveConfigItems(_IO_FILE*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0xf0): undefined reference to `V4L2_Driver::StartExposure(float)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x100): undefined reference to `V4L2_Driver::AbortExposure()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x118): undefined reference to `V4L2_Driver::UpdateCCDFrame(int, int, int, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x128): undefined reference to `V4L2_Driver::UpdateCCDBin(int, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x180): undefined reference to `V4L2_Driver::StartStreaming()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x188): undefined reference to `V4L2_Driver::StopStreaming()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1a8): undefined reference to `V4L2_Driver::initCamBase()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1b0): undefined reference to `V4L2_Driver::getBasicData()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1b8): undefined reference to `V4L2_Driver::updateV4L2Controls()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTI9V4LTISCCD[_ZTI9V4LTISCCD]+0x10): undefined reference to `typeinfo for V4L2_Driver'
collect2: error: ld returned 1 exit status
CMakeFiles/indi_v4ltis_ccd.dir/build.make:98: recipe for target 'indi_v4ltis_ccd' failed
make[2]: *** [indi_v4ltis_ccd] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/indi_v4ltis_ccd.dir/all' failed
make[1]: *** [CMakeFiles/indi_v4ltis_ccd.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
4 years 6 months ago #44639

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

Time to create page: 0.718 seconds