diff options
| author | Selene ToyKeeper | 2021-08-12 03:00:11 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-08-12 03:00:11 -0600 |
| commit | 437a0bd41e42fa5f657a87ed47a5f46b29d7f430 (patch) | |
| tree | 0a6a4f8e4aa8aeec02a2224d28d07b7e7306297f /spaghetti-monster | |
| parent | added Nichia 219B build for KR4 and K9.3, adjusted 219C builds, for intl-outdoor (diff) | |
| download | anduril-437a0bd41e42fa5f657a87ed47a5f46b29d7f430.tar.gz anduril-437a0bd41e42fa5f657a87ed47a5f46b29d7f430.tar.bz2 anduril-437a0bd41e42fa5f657a87ed47a5f46b29d7f430.zip | |
document the actual maximum for manual memory timer (~140 minutes, not 255)
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/anduril-manual.txt | 4 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/ramp-mode.c | 3 |
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; } } |
