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

Moved numErrors declaration to global context ( top of file ) #610

Merged
merged 1 commit into from
Oct 8, 2021
Merged
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
8 changes: 4 additions & 4 deletions src/capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ pthread_cond_t cond_SatrtSave;
#define NOT_SET -1 // signifies something isn't set yet
ASI_CONTROL_CAPS ControlCaps;
void *retval;
int gotSignal = 0; // did we get a SIGINT (from keyboard) or SIGTERM (from service)?
int numErrors = 0; // Number of errors in a row.
int gotSignal = 0; // did we get a SIGINT (from keyboard) or SIGTERM (from service)?
int iNumOfCtrl = 0;
int CamNum = 0;
pthread_t thread_display = 0;
pthread_t hthdSave = 0;
int numExposures = 0; // how many valid pictures have we taken so far?
int numExposures = 0; // how many valid pictures have we taken so far?
int currentGain = NOT_SET;

// Some command-line and other option definitions needed outside of main():
Expand Down Expand Up @@ -482,7 +483,7 @@ ASI_ERROR_CODE takeOneExposure(
displayDebugText(debugText, 0);
}
else {
numErrors = 0;
numErrors = 0;
ASIGetControlValue(cameraId, ASI_EXPOSURE, &actualExposureMicroseconds, &wasAutoExposure);
sprintf(debugText, " > Got image @ exposure: %'ld us (%'.2f ms)\n", actualExposureMicroseconds, (float)actualExposureMicroseconds/US_IN_MS);
displayDebugText(debugText, 2);
Expand Down Expand Up @@ -1755,7 +1756,6 @@ const char *locale = DEFAULT_LOCALE;

// Initialization
int exitCode = 0; // Exit code for main()
int numErrors = 0; // Number of errors in a row.
int maxErrors = 5; // Max number of errors in a row before we exit
int originalITextX = iTextX;
int originalITextY = iTextY;
Expand Down