aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-08-31 22:48:13 -0600
committerSelene ToyKeeper2021-08-31 22:48:13 -0600
commitdcc39c757b65fbbf3c85d927b699825807846bf7 (patch)
tree1f185ff7956040f6731385d2a7fd998d3cdd9b69 /spaghetti-monster
parentdocumented recent changes in the user manual (diff)
downloadanduril-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
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/candle-mode.c2
-rw-r--r--spaghetti-monster/anduril/config-default.h3
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c2
-rw-r--r--spaghetti-monster/anduril/strobe-modes.c2
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;
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.