From a9555063c186b24994db979471af62e92ddec17c Mon Sep 17 00:00:00 2001 From: Justin Silver <67859416+j-silv@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:35:36 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Fabian Foerg <3429782+faf0@users.noreply.github.com> --- README.md | 3 ++- src/xsct.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a48739a..afc027f 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,8 @@ xsct 3700 0.9 && xsct # Quirks -- If the delta mode is used to decrease the brightness to below 0.0 and then increased above 0.0, the temperature will reset to 6500K, regardless of whatever it was before the brightness reached 0. This is because the temperature is reset to 0K when the brightness is set equal to or below 0.0 (to verify this, you can run `xsct 0 0.0; xsct`). +If the delta mode is used to decrease the brightness to below 0.0 and then increased above 0.0, the temperature will reset to 6500 K, regardless of whatever it was before the brightness reached 0. +This is because the temperature is reset to 0 K when the brightness is set equal to or below 0.0 (to verify this, you can run `xsct 0 0.0; xsct`). # Resources diff --git a/src/xsct.c b/src/xsct.c index 1cb91bb..78132ea 100644 --- a/src/xsct.c +++ b/src/xsct.c @@ -161,7 +161,7 @@ static void bound_temp(struct temp_status *const temp) if (temp->temp <= 0) { // identical behavior when xsct is called in absolute mode with temp == 0 - fprintf(stderr, "WARNING! Temperatures below %d cannot be displayed.\n", TEMPERATURE_ZERO); + fprintf(stderr, "WARNING! Temperatures below %d cannot be displayed.\n", 0); temp->temp = TEMPERATURE_NORM; } else if (temp->temp < TEMPERATURE_ZERO)