fixed bug with SIGPIPE @write, fixed some other big bugs

This commit is contained in:
2022-03-24 17:06:29 +03:00
parent 290934f798
commit 684a0616a4
14 changed files with 296 additions and 276 deletions

View File

@@ -9,4 +9,4 @@ include_directories(${${CCDLIB}_INCLUDE_DIRS} ..)
link_directories(${${CCDLIB}_LIBRARY_DIRS})
add_library(${CCDLIB} SHARED ${SRC})
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES} -lASICamera2)
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES} -lASICamera2 -fPIC)

View File

@@ -85,18 +85,25 @@ static int asi_checkcam(){
static int campoll(capture_status *st, float *remain){
if(!st) return FALSE;
ASI_EXPOSURE_STATUS s;
if(ASI_SUCCESS != ASIGetExpStatus(caminfo.CameraID, &s)) return FALSE;
if(ASI_SUCCESS != ASIGetExpStatus(caminfo.CameraID, &s)){
DBG("Can't get exp status");
return FALSE;
}
switch(s){
case ASI_EXP_IDLE:
DBG("No capture");
*st = CAPTURE_NO;
break;
case ASI_EXP_WORKING:
DBG("Capture in progress");
*st = CAPTURE_PROCESS;
break;
case ASI_EXP_SUCCESS:
DBG("Capture ready");
*st = CAPTURE_READY;
break;
default: // failed
DBG("Failed: %d", s);
*st = CAPTURE_ABORTED;
}
if(remain){
@@ -309,8 +316,8 @@ static int gett(_U_ float *t){
static int camsetbin(int h, int v){
DBG("set bin %dx%d", h, v);
if(h != v){
WARNX(_("BinX and BinY should be equal"));
return FALSE;
WARNX(_("BinX and BinY should be equal, take h"));
//return FALSE;
}
if(h > extrvalues.maxbin){
WARNX(_("Maximal binning value is %d"), extrvalues.maxbin);