From a196bfc06099229533c8f4e64f314bed5734cb66 Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Wed, 20 Nov 2024 03:10:57 -0600 Subject: [PATCH 1/3] Update allsky_common.cpp: don't display camera model or number They are displayed via ASI_functions.cpp --- src/allsky_common.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/allsky_common.cpp b/src/allsky_common.cpp index 7e3eac090..d99716f82 100644 --- a/src/allsky_common.cpp +++ b/src/allsky_common.cpp @@ -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); @@ -2128,3 +2125,4 @@ void doLocale(config *cg) Log(-1, "*** %s: WARNING: Could not set locale to %s.\n", cg->ME, cg->locale); } } + From 662b235331ce741c5fd87550c1a1ef5fd14f056f Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Wed, 20 Nov 2024 03:38:09 -0600 Subject: [PATCH 2/3] Update ASI_functions.cpp: display Camera Number It was displayed as part of "settings", but it makes more sense to display as part of Camera Information. Also: * Remove redundant word "Camera". * Display the camera model two ways. If they are ALWAYS the same, then remove the "getCameraModel()" version. Some ZWO cameras have "ZWO" in the model name, which getCameraModel() deletes. --- src/ASI_functions.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ASI_functions.cpp b/src/ASI_functions.cpp index 6966f0516..c474a6488 100644 --- a/src/ASI_functions.cpp +++ b/src/ASI_functions.cpp @@ -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: "); @@ -2496,3 +2498,4 @@ bool validateSettings(config *cg, ASI_CAMERA_INFO ci) return(ok); } + From ddf14425d65b2726e02ea9c073b57ee21c81b241 Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Wed, 20 Nov 2024 03:39:33 -0600 Subject: [PATCH 3/3] Update allsky_common.cpp: Ignore empty --cmd argument ZWO cameras don't use "-cmd command" so pass "" for the command. Ignore that so checks for "if (cmdToUse == NULL)" work. --- src/allsky_common.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/allsky_common.cpp b/src/allsky_common.cpp index d99716f82..a252560f6 100644 --- a/src/allsky_common.cpp +++ b/src/allsky_common.cpp @@ -1594,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