Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #648 from dirkenstein/master
Nighscape 8300 Driver/Optec IFW supports TCP/IP
- Loading branch information
Showing
24 changed files
with
3,476 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
PROJECT(indi_nightscape CXX C) | ||
|
||
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/") | ||
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake_modules/") | ||
include(GNUInstallDirs) | ||
|
||
find_package(CFITSIO REQUIRED) | ||
find_package(INDI REQUIRED) | ||
find_package(Threads REQUIRED) | ||
FIND_PACKAGE(D2XX) | ||
FIND_PACKAGE(USB1 REQUIRED) | ||
FIND_PACKAGE(FTDI1 REQUIRED) | ||
|
||
IF (D2XX_FOUND) | ||
set(HAVE_D2XX 1) | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_D2XX") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_D2XX") | ||
|
||
ENDIF() | ||
|
||
IF (APPLE) | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DARWIN_C_SOURCE") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE") | ||
ENDIF() | ||
|
||
|
||
set(INDI_NIGHTSCAPE_VERSION_MAJOR 0) | ||
set(INDI_NIGHTSCAPE_VERSION_MINOR 1) | ||
|
||
#set (HAVE_SERIAL 1) | ||
|
||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/indi_nightscape.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/indi_nightscape.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( ${USB1_INCLUDE_DIRS}) | ||
include_directories( ${FTDI1_INCLUDE_DIRS}) | ||
|
||
include(CMakeCommon) | ||
|
||
|
||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-error") | ||
|
||
SET(indinightscape_CORE | ||
${CMAKE_CURRENT_SOURCE_DIR}/nschannel.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/nschannel-u.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/nsmsg.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/nsdownload.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/nsstatus.cpp) | ||
|
||
IF(HAVE_D2XX) | ||
SET(indinightscape_CORE | ||
${indinightscape_CORE} | ||
${CMAKE_CURRENT_SOURCE_DIR}/nschannel-ftd.cpp) | ||
ENDIF() | ||
|
||
IF(HAVE_SERIAL) | ||
SET(indinightscape_CORE | ||
${indinightscape_CORE} | ||
${CMAKE_CURRENT_SOURCE_DIR}/nschannel-ser.cpp) | ||
|
||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_SERIAL") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_SERIAL") | ||
|
||
ENDIF() | ||
|
||
SET(indinightscape_SRCS | ||
${indinightscape_CORE} | ||
${CMAKE_CURRENT_SOURCE_DIR}/nightscape.cpp) | ||
|
||
SET(nstest_SRCS | ||
${indinightscape_CORE} | ||
${CMAKE_CURRENT_SOURCE_DIR}/nstest-main.cpp) | ||
|
||
|
||
add_executable(indi_nightscape_ccd ${indinightscape_SRCS}) | ||
|
||
add_executable(nstest ${nstest_SRCS}) | ||
|
||
IF(HAVE_D2XX) | ||
target_link_libraries(indi_nightscape_ccd ${INDI_LIBRARIES} ${CFITSIO_LIBRARIES} ${D2XX_LIBRARIES} ${FTDI1_LIBRARIES} ${USB1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
target_link_libraries(nstest ${D2XX_LIBRARIES} ${FTDI1_LIBRARIES} ${USB1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
ELSE() | ||
target_link_libraries(indi_nightscape_ccd ${INDI_LIBRARIES} ${CFITSIO_LIBRARIES} ${FTDI1_LIBRARIES} ${USB1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
target_link_libraries(nstest ${FTDI1_LIBRARIES} ${USB1_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
ENDIF() | ||
|
||
install(TARGETS indi_nightscape_ccd RUNTIME DESTINATION bin ) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_nightscape.xml DESTINATION ${INDI_DATA_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<driversList> | ||
<devGroup group="CCDs"> | ||
<device label="Nighscape 8300 CCD" mdpd="true"> | ||
<driver name="Nightscape CCD">indi_nighscape_ccd</driver> | ||
<version>@INDI_NIGHTSCAPE_VERSION_MAJOR@.@INDI_NIGHTSCAPE_VERSION_MINOR@</version> | ||
</device> | ||
</devGroup> | ||
</driversList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef KAF_CONSTANTS_H | ||
#define KAF_CONSTANTS_H | ||
|
||
#define KAF8300_MAX_X 3448 | ||
#define KAF8300_MAX_Y 2574 | ||
//Trailing 2 dummy 1 CTE 3 dummy 6 dark dummy 39 dark 8 dar dummy 4 blue 16 active buf | ||
#define KAF8300_PREAMBLE (2 + 1 + 3 + 6 + 39 +8 + 4+ + 16) | ||
//Leading 16 active 4 blue 5 dark dummy 5 dummy 1 active 8 dummy 4 virtual dummy | ||
#define KAF8300_POSTAMBLE (4 + 8+ 1 + 5 + 5 + 4 + 16) | ||
#define KAF8300_ACTIVE_X 3326 | ||
|
||
//trailing 6 dark dummy 12 dark 8 dark dumy 4 blue 16 active buf | ||
#define KAF8300_Y_PREAMBLE (6 + 12 + 8 + 4 + 16) | ||
//Leading 1 active cte 3 dark dummy 4 blue 16 active | ||
#define KAF8300_Y_POSTAMBLE (1+3+4+16) | ||
|
||
#define IMG_Y 2506 | ||
#define IMG_Y_HALF 1254 | ||
|
||
#define CMD_SIZE 16 | ||
|
||
#endif |
Oops, something went wrong.