Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Moravian SFW driver #903

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/indi-mi/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
indi-mi (2.0) buster; urgency=medium

* Add MI Standalone Filter Wheel driver

-- Jakub Smutny <[email protected]> Tue, 05 Mar 2024 10:00:00 +0100

indi-mi (1.8) buster; urgency=medium

* Using MI Libraries again.
Expand Down
2 changes: 2 additions & 0 deletions debian/indi-mi/indi-mi.links
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
usr/bin/indi_mi_ccd usr/bin/indi_mi_ccd_usb
usr/bin/indi_mi_ccd usr/bin/indi_mi_ccd_eth
usr/bin/indi_mi_sfw usr/bin/indi_mi_sfw_usb
usr/bin/indi_mi_sfw usr/bin/indi_mi_sfw_eth
6 changes: 6 additions & 0 deletions debian/libmicam/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
libmicam (1.2) buster; urgency=low

* Updated MI library to version 0.10.0/0.9.0

-- Jakub Smutny <[email protected]> Tue, 05 Mar 2024 10:00:00 +0100

libmicam (1.1) buster; urgency=low

* Updated MI library to version 0.9.0/0.8.0
Expand Down
39 changes: 27 additions & 12 deletions indi-mi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
PROJECT(indi_miccd CXX C)
PROJECT(indi_mi CXX C)

LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/")
Expand All @@ -13,17 +13,17 @@ find_package(USB1 REQUIRED)
find_package(Threads REQUIRED)
find_package(CFITSIO REQUIRED)

set(INDI_MI_VERSION_MAJOR 1)
set(INDI_MI_VERSION_MINOR 9)
set(INDI_MI_VERSION_MAJOR 2)
set(INDI_MI_VERSION_MINOR 0)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/indi_miccd.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/indi_miccd.xml)

include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${INDI_INCLUDE_DIR})
include_directories( ${CFITSIO_INCLUDE_DIR})
include_directories( ${MICAM_INCLUDE_DIR})
include_directories(${CFITSIO_INCLUDE_DIR})
include_directories(${MICAM_INCLUDE_DIR})

########### MI CCD ###########
set(indi_miccd_SRCS
Expand All @@ -37,13 +37,6 @@ else (APPLE)
target_link_libraries(indi_mi_ccd ${INDI_LIBRARIES} ${CFITSIO_LIBRARIES} ${MICAM_LIBRARIES} ${USB1_LIBRARIES} Threads::Threads rt)
endif(APPLE)

#if(THREADS_HAVE_PTHREAD_ARG)
# target_compile_options(indi_mi_ccd "-pthread")
#endif()
#if(CMAKE_THREAD_LIBS_INIT)
# target_link_libraries(indi_mi_ccd "${CMAKE_THREAD_LIBS_INIT}")
#endif()

install(TARGETS indi_mi_ccd RUNTIME DESTINATION bin)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_mi_ccd_symlink.cmake
Expand All @@ -52,4 +45,26 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_mi_ccd_symlink.cmake

set_target_properties(indi_mi_ccd PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_mi_ccd_symlink.cmake)

########### MI SFW ###########
set(indi_misfw_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/mi_sfw.cpp
)

add_executable(indi_mi_sfw ${indi_misfw_SRCS})
if (APPLE)
target_link_libraries(indi_mi_sfw ${INDI_LIBRARIES} ${CFITSIO_LIBRARIES} ${MICAM_LIBRARIES} ${USB1_LIBRARIES} Threads::Threads)
else (APPLE)
target_link_libraries(indi_mi_sfw ${INDI_LIBRARIES} ${CFITSIO_LIBRARIES} ${MICAM_LIBRARIES} ${USB1_LIBRARIES} Threads::Threads rt)
endif(APPLE)

install(TARGETS indi_mi_sfw RUNTIME DESTINATION bin)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_mi_sfw_symlink.cmake
"exec_program(\"${CMAKE_COMMAND}\" ARGS -E create_symlink indi_mi_sfw \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/indi_mi_sfw_usb)\n
exec_program(\"${CMAKE_COMMAND}\" ARGS -E create_symlink indi_mi_sfw \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/indi_mi_sfw_eth)\n")

set_target_properties(indi_mi_sfw PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_mi_sfw_symlink.cmake)

##############################

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_miccd.xml DESTINATION ${INDI_DATA_DIR})
2 changes: 1 addition & 1 deletion indi-mi/INSTALL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MI CCD INSTALL
MI DRIVERS INSTALL
==============

You must have CMake >= 2.8.0 in order to build this package.
Expand Down
16 changes: 12 additions & 4 deletions indi-mi/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Moravian Instruments CCD Driver
Moravian Instruments INDI Driver
===============================

This package provides Moravian Instruments CCD INDI driver for MI CCD cameras.
This package provides Moravian Instruments INDI driver for MI cameras and standalone filter wheels.

Requirements
============
Expand Down Expand Up @@ -29,14 +29,22 @@ How to Use

To run the driver from the command line:

USB variant:
Cameras (USB variant):

$ indiserver indi_mi_ccd_usb

ETH variant:
Cameras (ETH variant):

$ indiserver indi_mi_ccd_eth

SFW (USB variant):

$ indiserver indi_mi_sfw_usb

SFW (ETH variant):

$ indiserver indi_mi_sfw_eth

You can then connect to the driver from any client, the default port is 7624.
If you're using KStars, the driver will be automatically listed in KStars' Device Manager,
no further configuration is necessary.
10 changes: 10 additions & 0 deletions indi-mi/indi_miccd.xml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@
<version>@INDI_MI_VERSION_MAJOR@.@INDI_MI_VERSION_MINOR@</version>
</device>
</devGroup>
<devGroup group="Filter Wheels">
<device label="MI SFW (USB)" manufacturer="Moravian Instruments">
<driver name="MI SFW">indi_mi_sfw_usb</driver>
<version>@INDI_MI_VERSION_MAJOR@.@INDI_MI_VERSION_MINOR@</version>
</device>
<device label="MI SFW (ETH)" manufacturer="Moravian Instruments">
<driver name="MI SFW">indi_mi_sfw_eth</driver>
<version>@INDI_MI_VERSION_MAJOR@.@INDI_MI_VERSION_MINOR@</version>
</device>
</devGroup>
</driversList>
3 changes: 2 additions & 1 deletion indi-mi/mi_ccd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ MICCD::MICCD(int camId, bool eth) : FilterInterface(this)
else
{
rtrim(sp);
snprintf(name, MAXINDINAME, "MI %s", sp);
strncpy(name, "MI ", MAXINDINAME);
strncat(name, sp, MAXINDINAME - 3);
IDLog("Detected camera: %s.\n", name);
}

Expand Down
Loading
Loading