@@ -752,7 +752,7 @@ void displayHelp(config cg)
752752 printf (" -%-*s - 'true' enables saving of daytime images [%s].\n " , n, " savedaytimeimages b" , yesNo (cg.daytimeSave ));
753753 printf (" -%-*s - 'true' enables daytime auto-exposure [%s].\n " , n, " dayautoexposure b" , yesNo (cg.dayAutoExposure ));
754754 printf (" -%-*s - Maximum daytime auto-exposure in ms.\n " , n, " daymaxexposure n" );
755- printf (" -%-*s - Daytime exposure in us [%'ld].\n " , n, " dayexposure n" , cg.dayExposure_us );
755+ printf (" -%-*s - Daytime exposure in ms [%'ld].\n " , n, " dayexposure n" , cg.dayExposure_us / 1000 );
756756 printf (" -%-*s - Daytime mean target brightness [%.2f].\n " , n, " daymean" , cg.myModeMeanSetting .dayMean );
757757 printf (" -%-*s - Daytime mean target threshold [%.2f].\n " , n, " daymeanthreshold n" , cg.myModeMeanSetting .dayMean_threshold );
758758 if (cg.ct == ctRPi) {
@@ -781,7 +781,7 @@ void displayHelp(config cg)
781781 printf (" -%-*s - 'true' enables saving of nighttime images [%s].\n " , n, " savenighttimeimages b" , yesNo (cg.nighttimeSave ));
782782 printf (" -%-*s - 'true' enables nighttime auto-exposure [%s].\n " , n, " nightautoexposure b" , yesNo (cg.nightAutoExposure ));
783783 printf (" -%-*s - Maximum nighttime auto-exposure in ms.\n " , n, " nightmaxexposure n" );
784- printf (" -%-*s - Nighttime exposure in us [%'ld].\n " , n, " nightexposure n" , cg.nightExposure_us );
784+ printf (" -%-*s - Nighttime exposure in ms [%'ld].\n " , n, " nightexposure n" , cg.nightExposure_us / 1000 );
785785 printf (" -%-*s - Nighttime mean target brightness [%.2f].\n " , n, " nightmean n" , cg.myModeMeanSetting .nightMean );
786786 if (cg.ct == ctRPi) {
787787 printf (" %-*s NOTE: Enable nighttime auto-gain and auto-exposure for best results.\n " , n, " " );
@@ -880,6 +880,7 @@ void displayHelp(config cg)
880880 printf (" %-*s Bullseye: libcamera-still\n " , n, " " );
881881 printf (" %-*s Bookworm and newer: rpicam-still\n " , n, " " );
882882 }
883+ printf (" -%-*s - Max images to take before exiting (0 takes all) [%d].\n " , n, " maximages n" , cg.maxImages );
883884/* These are too advanced for anyone other than developers.
884885 printf(" -%-*s - Be careful changing these values, ExposureChange (Steps) = p0 + (p1*diff) + (p2*diff)^2 [%.1f].\n", n, "mean-p0 n", cg.myModeMeanSetting.dayMean_threshold);
885886 printf(" -%-*s - [%.1f].\n", n, "mean-p1 n", cg.myModeMeanSetting.mean_p1);
@@ -1002,6 +1003,9 @@ void displaySettings(config cg)
10021003 printf (" ZWO Exposure Type: %s\n " , getZWOexposureType (cg.ZWOexposureType ));
10031004 }
10041005 printf (" Preview: %s\n " , yesNo (cg.preview ));
1006+ if (cg.maxImages > 0 ) {
1007+ printf (" Maximum images to take before exiting: %d\n " , cg.maxImages );
1008+ }
10051009 printf (" Focus mode: %s\n " , yesNo (cg.focusMode ));
10061010 printf (" Calculate focus metric: %s\n " , yesNo (cg.determineFocus ));
10071011 printf (" Taking Dark Frames: %s\n " , yesNo (cg.takeDarkFrames ));
@@ -1275,6 +1279,7 @@ bool getCommandLineArguments(config *cg, int argc, char *argv[], bool readConfig
12751279 {
12761280 char *a = argv[i];
12771281 if (*a == ' -' ) a++; // skip leading "-"
1282+ if (*a == ' -' ) a++; // skip second leading "-"
12781283
12791284 Log (4 , " %s >>> Parameter [%-*s] Value: [%s]\n " , b, n, a, argv[i+1 ]);
12801285
@@ -1292,7 +1297,7 @@ bool getCommandLineArguments(config *cg, int argc, char *argv[], bool readConfig
12921297 return (false );
12931298 }
12941299 }
1295- else if (strcmp (a, " - help" ) == 0 )
1300+ else if (strcmp (a, " help" ) == 0 )
12961301 {
12971302 cg->help = true ;
12981303 cg->quietExit = true ; // we display the help message and quit
@@ -1337,6 +1342,10 @@ bool getCommandLineArguments(config *cg, int argc, char *argv[], bool readConfig
13371342 {
13381343 cg->preview = getBoolean (argv[++i]);
13391344 }
1345+ else if (strcmp (a, " maximages" ) == 0 )
1346+ {
1347+ cg->maxImages = atoi (argv[++i]);
1348+ }
13401349
13411350 // daytime settings
13421351 else if (strcmp (a, " takedaytimeimages" ) == 0 )
0 commit comments