aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-12-13 15:54:30 -0700
committerSelene ToyKeeper2021-12-13 15:54:30 -0700
commit274b615fc35b0c6256fc647422e98f721a06e8ce (patch)
treea6a9fbac0e95483e5ac4364c5b7363c32b574662 /spaghetti-monster
parentAdded "Lockout 3C -> Off", changed Lockout 4H blink (light) to a blip (dark), (diff)
downloadanduril-274b615fc35b0c6256fc647422e98f721a06e8ce.tar.gz
anduril-274b615fc35b0c6256fc647422e98f721a06e8ce.tar.bz2
anduril-274b615fc35b0c6256fc647422e98f721a06e8ce.zip
fixed bug where tint-ramping could end up 1 brightness ramp step different than it started
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/tint-ramping.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/tint-ramping.c b/spaghetti-monster/anduril/tint-ramping.c
index 6cc0616..d270d9d 100644
--- a/spaghetti-monster/anduril/tint-ramping.c
+++ b/spaghetti-monster/anduril/tint-ramping.c
@@ -22,7 +22,6 @@
#include "tint-ramping.h"
-
uint8_t tint_ramping_state(Event event, uint16_t arg) {
static int8_t tint_ramp_direction = 1;
static uint8_t prev_tint = 0;
@@ -92,6 +91,9 @@ uint8_t tint_ramping_state(Event event, uint16_t arg) {
else if (tint >= 254) tint_ramp_direction = -1;
// remember tint after battery change
save_config();
+ // bug?: for some reason, brightness can seemingly change
+ // from 1/150 to 2/150 without this next line... not sure why
+ set_level(actual_level);
return EVENT_HANDLED;
}