diff options
| author | Selene ToyKeeper | 2021-08-31 22:48:13 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-08-31 22:48:13 -0600 |
| commit | dcc39c757b65fbbf3c85d927b699825807846bf7 (patch) | |
| tree | 1f185ff7956040f6731385d2a7fd998d3cdd9b69 | |
| parent | documented recent changes in the user manual (diff) | |
| download | anduril-dcc39c757b65fbbf3c85d927b699825807846bf7.tar.gz anduril-dcc39c757b65fbbf3c85d927b699825807846bf7.tar.bz2 anduril-dcc39c757b65fbbf3c85d927b699825807846bf7.zip | |
reduced length of auto-reverse timing window from ~1000 ms to ~660ms, because it was too fast
| -rw-r--r-- | spaghetti-monster/anduril/candle-mode.c | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/config-default.h | 3 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/ramp-mode.c | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/strobe-modes.c | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/spaghetti-monster/anduril/candle-mode.c b/spaghetti-monster/anduril/candle-mode.c index 3704ee6..d15195e 100644 --- a/spaghetti-monster/anduril/candle-mode.c +++ b/spaghetti-monster/anduril/candle-mode.c @@ -98,7 +98,7 @@ uint8_t candle_mode_state(Event event, uint16_t arg) { // clock tick: animate candle brightness else if (event == EV_tick) { // un-reverse after 1 second - if (arg == TICKS_PER_SECOND) ramp_direction = 1; + if (arg == AUTO_REVERSE_TIME) ramp_direction = 1; // 3-oscillator synth for a relatively organic pattern uint8_t add; diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h index 9c194f9..5b9897c 100644 --- a/spaghetti-monster/anduril/config-default.h +++ b/spaghetti-monster/anduril/config-default.h @@ -71,6 +71,9 @@ // smooth ramp speed: 1, 2, 3, 4, ... for 1X speed, 1/2, 1/3rd, 1/4th, ... #define USE_RAMP_SPEED_CONFIG +// after ramping, how long until the direction resets to "up"? +#define AUTO_REVERSE_TIME (TICKS_PER_SECOND * 2 / 3) + // add runtime option for whether hold-from-off should ramp or stay at moon #define USE_RAMP_AFTER_MOON_CONFIG diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index 31f959b..6d85480 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -258,7 +258,7 @@ uint8_t steady_state(Event event, uint16_t arg) { else if (event == EV_tick) { // un-reverse after 1 second - if (arg == TICKS_PER_SECOND) ramp_direction = 1; + if (arg == AUTO_REVERSE_TIME) ramp_direction = 1; #ifdef USE_SUNSET_TIMER // reduce output if shutoff timer is active diff --git a/spaghetti-monster/anduril/strobe-modes.c b/spaghetti-monster/anduril/strobe-modes.c index b27f298..d5f12c0 100644 --- a/spaghetti-monster/anduril/strobe-modes.c +++ b/spaghetti-monster/anduril/strobe-modes.c @@ -153,7 +153,7 @@ uint8_t strobe_state(Event event, uint16_t arg) { // clock tick: bump the random seed else if (event == EV_tick) { // un-reverse after 1 second - if (arg == TICKS_PER_SECOND) ramp_direction = 1; + if (arg == AUTO_REVERSE_TIME) ramp_direction = 1; pseudo_rand_seed += arg; return MISCHIEF_MANAGED; |
