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

Don't display camera model twice #3974

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions src/ASI_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1902,11 +1902,13 @@ void outputCameraInfo(ASI_CAMERA_INFO cameraInfo, config cg,
{
printf(" Camera Information:\n");
printf(" - Type: %s\n", CAMERA_TYPE);
printf(" - Model: %s\n", getCameraModel(cameraInfo.Name));
printf(" - Model: %s (%s)\n", getCameraModel(cameraInfo.Name), cg.cm);
#ifdef IS_ZWO
printf(" - Camera ID: %s\n", cID);
printf(" - ID: %s\n", cID);
#endif
printf(" - Camera Serial Number: %s\n", getSerialNumber(cameraInfo.CameraID));
printf(" - Serial Number: %s\n", getSerialNumber(cameraInfo.CameraID));
if (cg.cameraNumber > 0)
printf(" Camera number: %d\n", cg.cameraNumber);
printf(" - Native Resolution: %ldx%ld\n", width, height);
printf(" - Pixel Size: %1.2f microns\n", pixelSize);
printf(" - Supported Bins: ");
Expand Down Expand Up @@ -2496,3 +2498,4 @@ bool validateSettings(config *cg, ASI_CAMERA_INFO ci)

return(ok);
}

17 changes: 11 additions & 6 deletions src/allsky_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,6 @@ void displaySettings(config cg)
printf("%s", c(KGRN));
printf("\nSettings:\n");

printf(" Camera model: %s\n", cg.cm);
if (cg.cameraNumber > 0)
printf(" Camera number: %d\n", cg.cameraNumber);
if (cg.cmdToUse != NULL)
printf(" Command: %s\n", cg.cmdToUse);
printf(" Image Type: %s (%ld)\n", cg.sType, cg.imageType);
Expand Down Expand Up @@ -1597,13 +1594,20 @@ bool getCommandLineArguments(config *cg, int argc, char *argv[], bool readConfig
else if (strcmp(a, "cmd") == 0)
{
cg->cmdToUse = argv[++i];
if (strcmp(cg->cmdToUse, "raspistill") == 0)
if (cg->cmdToUse[0] == '\0')
{
cg->isLibcamera = false;
cg->cmdToUse = NULL; // usually with ZWO, which doesn't use this
}
else
{
cg->isLibcamera = true;
if (strcmp(cg->cmdToUse, "raspistill") == 0)
{
cg->isLibcamera = false;
}
else
{
cg->isLibcamera = true;
}
}
}
else if (strcmp(a, "tty") == 0) // overrides what was automatically determined
Expand Down Expand Up @@ -2128,3 +2132,4 @@ void doLocale(config *cg)
Log(-1, "*** %s: WARNING: Could not set locale to %s.\n", cg->ME, cg->locale);
}
}

Loading