aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-12-13 15:54:30 -0700
committerSelene ToyKeeper2021-12-13 15:54:30 -0700
commit274b615fc35b0c6256fc647422e98f721a06e8ce (patch)
treea6a9fbac0e95483e5ac4364c5b7363c32b574662
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
-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;
}
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.