aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/anduril-manual.txt4
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt
index e3b3cf5..57f1986 100644
--- a/spaghetti-monster/anduril/anduril-manual.txt
+++ b/spaghetti-monster/anduril/anduril-manual.txt
@@ -182,13 +182,15 @@ Memory determines which brightness level the light goes to with 1 click
from off. There are three types of brightness memory to choose from:
- Automatic: Always uses the last-ramped brightness.
+ (does not memorize levels accessed by a shortcut,
+ like turbo, 2C for ceiling, or 1H-from-off for floor)
- Manual: Always uses the user's saved brightness.
- Hybrid: Uses the automatic memory brightness if the light was only
off for a short time, or resets to the manual memory level if it was
off for a longer time.
- The timer for this is configurable from 0 to 255 minutes.
+ The timer for this is configurable from 0 to ~140 minutes.
Another way to think of it is: There are three styles of memory for the
last-ramped brightness level...
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index 0baffde..8ab4ec4 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -462,6 +462,9 @@ void manual_memory_timer_config_save(uint8_t step, uint8_t value) {
// item 1: disable manual memory, go back to automatic
if (step == 1) { manual_memory = 0; }
// item 2: set manual memory timer duration
+ // FIXME: should be limited to (65535 / SLEEP_TICKS_PER_MINUTE)
+ // to avoid overflows or impossibly long timeouts
+ // (by default, the effective limit is 145, but it allows up to 255)
else { manual_memory_timer = value; }
}