Skip to content

Commit

Permalink
Update ASI_functions.cpp: add closeCamera()
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Aug 14, 2023
1 parent b109cab commit e6d7339
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ASI_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,9 @@ ASI_ERROR_CODE ASIGetControlValue(int iCameraIndex, ASI_CONTROL_TYPE ControlType
}


// Empty routine so code compiles.
int stopVideoCapture(int cameraID) { return(ASI_SUCCESS); }
// Empty routines so code compiles.
int stopVideoCapture(int cameraID) { return((int) ASI_SUCCESS); }
int closeCamera(int cameraID) { return((int) ASI_SUCCESS); }

// Get the camera's serial number. RPi cameras don't support serial numbers.
ASI_ERROR_CODE ASIGetSerialNumber(int iCameraIndex, ASI_SN *pSN)
Expand All @@ -550,6 +551,7 @@ ASI_ERROR_CODE ASIGetSerialNumber(int iCameraIndex, ASI_SN *pSN)
}



#else ////////////////////// ZWO

// To keep the compiler quiet, we need to define these - they are RPi only.
Expand Down Expand Up @@ -592,6 +594,10 @@ int stopVideoCapture(int cameraID)
{
return((int) ASIStopVideoCapture(cameraID));
}
int closeCamera(int cameraID)
{
return((int) ASICloseCamera(cameraID));
}

int getCameraNumber()
{
Expand Down Expand Up @@ -856,7 +862,7 @@ void saveCameraInfo(ASI_CAMERA_INFO cameraInfo, char const *file, int width, int
fprintf(f, "\t\t{ \"value\" : 180, \"label\" : \"180 degrees\" },\n");
fprintf(f, "\t\t{ \"value\" : 270, \"label\" : \"270 degrees\" }\n");
}
fprintf(f, "\t],\n");;
fprintf(f, "\t],\n");
#endif

fprintf(f, "\t\"supportedImageFormats\": [\n");
Expand Down Expand Up @@ -887,7 +893,7 @@ void saveCameraInfo(ASI_CAMERA_INFO cameraInfo, char const *file, int width, int
"unknown format");
fprintf(f, " }");
}
fprintf(f, "\t],\n");;
fprintf(f, "\t],\n");

// Add some other things the camera supports, or the software supports for this camera.
// Adding it to the "controls" array makes the code that checks what's available easier.
Expand Down

0 comments on commit e6d7339

Please sign in to comment.