Merge pull request #532 from jonls/fix-time-based
Fix missing checks and verbose output
This commit is contained in:
+17
-12
@@ -1760,14 +1760,27 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/* Solar elevations */
|
||||
if (scheme.high < scheme.low) {
|
||||
fprintf(stderr,
|
||||
_("High transition elevation cannot be lower than"
|
||||
" the low transition elevation.\n"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
/* TRANSLATORS: Append degree symbols if possible. */
|
||||
printf(_("Solar elevations: day above %.1f, night below %.1f\n"),
|
||||
scheme.high, scheme.low);
|
||||
}
|
||||
}
|
||||
|
||||
if (mode != PROGRAM_MODE_RESET &&
|
||||
mode != PROGRAM_MODE_MANUAL) {
|
||||
if (verbose) {
|
||||
printf(_("Temperatures: %dK at day, %dK at night\n"),
|
||||
scheme.day.temperature,
|
||||
scheme.night.temperature);
|
||||
|
||||
/* TRANSLATORS: Append degree symbols if possible. */
|
||||
printf(_("Solar elevations: day above %.1f, night below %.1f\n"),
|
||||
scheme.high, scheme.low);
|
||||
}
|
||||
|
||||
/* Color temperature */
|
||||
@@ -1780,14 +1793,6 @@ main(int argc, char *argv[])
|
||||
MIN_TEMP, MAX_TEMP);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Solar elevations */
|
||||
if (scheme.high < scheme.low) {
|
||||
fprintf(stderr,
|
||||
_("High transition elevation cannot be lower than"
|
||||
" the low transition elevation.\n"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (mode == PROGRAM_MODE_MANUAL) {
|
||||
|
||||
Reference in New Issue
Block a user