aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-08-12 03:02:50 -0600
committerSelene ToyKeeper2021-08-12 03:02:50 -0600
commit41189343748b60ace6a72b4dfe85e85efcb99695 (patch)
tree590ebdfc7bbb5b1c5be93bfc0fcae56e5fb21b05 /spaghetti-monster
parentmade blink_once() brightness configurable per build (diff)
downloadanduril-41189343748b60ace6a72b4dfe85e85efcb99695.tar.gz
anduril-41189343748b60ace6a72b4dfe85e85efcb99695.tar.bz2
anduril-41189343748b60ace6a72b4dfe85e85efcb99695.zip
added a "jump start moon" option for hold-from-off, for lights with slow-activating circuits
(briefly pulses the light at a higher level to wake up the circuit faster)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/off-mode.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index ae54f60..b1faf47 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -96,6 +96,12 @@ uint8_t off_state(Event event, uint16_t arg) {
#if (B_TIMING_ON == B_PRESS_T)
// hold (initially): go to lowest level (floor), but allow abort for regular click
else if (event == EV_click1_press) {
+ #ifdef JUMP_START_MOON
+ if (!arg) {
+ set_level(JUMP_START_MOON);
+ delay_4ms(3);
+ }
+ #endif
set_level(nearest_level(1));
return MISCHIEF_MANAGED;
}
@@ -110,6 +116,13 @@ uint8_t off_state(Event event, uint16_t arg) {
} else
#endif
#else // B_RELEASE_T or B_TIMEOUT_T
+ #ifdef JUMP_START_MOON
+ // pulse the output for a moment to wake up the power regulator
+ if (!arg) {
+ set_level(JUMP_START_MOON);
+ delay_4ms(3);
+ }
+ #endif
set_level(nearest_level(1));
#endif
// don't start ramping immediately;