Skip to content

Commit

Permalink
Update capture_RPi.cpp: Call getCommandLineArguments() near beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored May 5, 2024
1 parent c8444e4 commit 507b6e1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/capture_RPi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ int main(int argc, char *argv[])
exit(EXIT_ERROR_STOP);
}

if (! getCommandLineArguments(&CG, argc, argv, false))
{
// getCommandLineArguents outputs an error message.
exit(EXIT_ERROR_STOP);
}
/*
char *x;
x = getenv("ALLSKY_DEBUG_LEVEL");
if (x != NULL) { CG.debugLevel = atoi(x); }
Expand Down Expand Up @@ -405,6 +412,7 @@ int main(int argc, char *argv[])
CG.isLibcamera = false;
}
}
*/
Log(4, "CONNECTED_CAMERAS_INFO=[%s], RPi_SUPPORTED_CAMERAS=[%s], RPi_COMMAND_TO_USE=[%s]\n",
CG.connectedCamerasFile, CG.RPI_cameraInfoFile, CG.cmdToUse);

Expand Down Expand Up @@ -443,9 +451,10 @@ int main(int argc, char *argv[])
if (! setDefaults(&CG, ASICameraInfo))
closeUp(EXIT_ERROR_STOP);

if (! getCommandLineArguments(&CG, argc, argv))
//x if (! getCommandLineArguments(&CG, argc, argv))
if (CG.configFile[0] != '\0' && ! getConfigFileArguments(&CG))
{
// getCommandLineArguents outputs an error message.
// getConfigFileArguments() outputs error messages
exit(EXIT_ERROR_STOP);
}

Expand Down

0 comments on commit 507b6e1

Please sign in to comment.