From 999ea108106aa95553032a524310e7adac05ea23 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 13 Sep 2018 04:03:39 -0600 Subject: 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) --- spaghetti-monster/anduril/anduril.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spaghetti-monster') 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; } -- cgit v1.2.3