aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-09-13 04:03:39 -0600
committerSelene ToyKeeper2018-09-13 04:03:39 -0600
commit999ea108106aa95553032a524310e7adac05ea23 (patch)
treee0db2daef72b626166f534576c77c16ce6a25fe1
parentoops, forgot to add lantern config file (diff)
downloadanduril-999ea108106aa95553032a524310e7adac05ea23.tar.gz
anduril-999ea108106aa95553032a524310e7adac05ea23.tar.bz2
anduril-999ea108106aa95553032a524310e7adac05ea23.zip
made tint ramping actually work
(needed to set_level() again after changing tint) also, made sure ramp ends will go the right direction (may be reduntant though)
-rw-r--r--spaghetti-monster/anduril/anduril.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 07d51f5..250e3d7 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -804,6 +804,7 @@ uint8_t tint_ramping_state(EventPtr event, uint16_t arg) {
else if ((tint_ramp_direction < 0) && (tint > 0)) {
tint -= 1;
}
+ set_level(actual_level);
}
return EVENT_HANDLED;
}
@@ -811,6 +812,8 @@ uint8_t tint_ramping_state(EventPtr event, uint16_t arg) {
// click, click, hold, release: reverse direction for next ramp
else if (event == EV_click3_hold_release) {
tint_ramp_direction = -tint_ramp_direction;
+ if (tint == 0) tint_ramp_direction = 1;
+ else if (tint == 255) tint_ramp_direction = -1;
return EVENT_HANDLED;
}