aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-05-13 23:23:00 -0600
committerSelene ToyKeeper2019-05-13 23:23:00 -0600
commita4dff7596a9a83b4c3b1f837e8cbe291ed3c4580 (patch)
treedefdaeeb326291e964785fbee8696aeb1c06bdc8 /spaghetti-monster
parentIncreased default candle magnitude to better fit recent changes (diff)
downloadanduril-a4dff7596a9a83b4c3b1f837e8cbe291ed3c4580.tar.gz
anduril-a4dff7596a9a83b4c3b1f837e8cbe291ed3c4580.tar.bz2
anduril-a4dff7596a9a83b4c3b1f837e8cbe291ed3c4580.zip
made tint ramping blink at ends of ramp, made lantern default to stepped mode, lowered lantern floor, made beacon blink shorter
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c18
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h3
2 files changed, 17 insertions, 4 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index e3ff0cb..a9fb234 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -262,6 +262,9 @@ void save_config_wl();
#endif
// default ramp options if not overridden earlier per-driver
+#ifndef RAMP_STYLE
+#define RAMP_STYLE 0 // smooth default
+#endif
#ifndef RAMP_SMOOTH_FLOOR
#define RAMP_SMOOTH_FLOOR 1
#endif
@@ -305,7 +308,7 @@ void save_config_wl();
#endif
uint8_t memorized_level = DEFAULT_LEVEL;
// smooth vs discrete ramping
-volatile uint8_t ramp_style = 0; // 0 = smooth, 1 = discrete
+volatile uint8_t ramp_style = RAMP_STYLE; // 0 = smooth, 1 = discrete
volatile uint8_t ramp_smooth_floor = RAMP_SMOOTH_FLOOR;
volatile uint8_t ramp_smooth_ceil = RAMP_SMOOTH_CEIL;
volatile uint8_t ramp_discrete_floor = RAMP_DISCRETE_FLOOR;
@@ -873,6 +876,7 @@ uint8_t steady_state(Event event, uint16_t arg) {
#ifdef USE_TINT_RAMPING
uint8_t tint_ramping_state(Event event, uint16_t arg) {
static int8_t tint_ramp_direction = 1;
+ static uint8_t prev_tint = 0;
// click, click, hold: change the tint
if (event == EV_click3_hold) {
@@ -883,6 +887,14 @@ uint8_t tint_ramping_state(Event event, uint16_t arg) {
else if ((tint_ramp_direction < 0) && (tint > 0)) {
tint -= 1;
}
+ if ((prev_tint != tint) &&
+ ( (tint == 0) || (tint == 255) )) {
+ uint8_t foo = actual_level;
+ set_level(0);
+ delay_4ms(3);
+ set_level(foo);
+ }
+ prev_tint = tint;
set_level(actual_level);
//}
return EVENT_HANDLED;
@@ -1816,9 +1828,9 @@ uint8_t beacon_config_state(Event event, uint16_t arg) {
inline void beacon_mode_iter() {
// one iteration of main loop()
set_level(memorized_level);
- nice_delay_ms(500);
+ nice_delay_ms(100);
set_level(0);
- nice_delay_ms(((beacon_seconds) * 1000) - 500);
+ nice_delay_ms(((beacon_seconds) * 1000) - 100);
}
#endif // #ifdef USE_BEACON_MODE
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 3d4c762..0372aa0 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -44,9 +44,10 @@
// set floor and ceiling as far apart as possible
// because this lantern isn't overpowered
+#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped
#define RAMP_SMOOTH_FLOOR 1
#define RAMP_SMOOTH_CEIL 150
-#define RAMP_DISCRETE_FLOOR 20
+#define RAMP_DISCRETE_FLOOR 10
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
#define RAMP_DISCRETE_STEPS 5
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.