aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-05-14 03:16:33 -0600
committerSelene ToyKeeper2019-05-14 03:16:33 -0600
commit1961c3a6950cefa05cdb6e4b0d1967371f7da9f4 (patch)
tree40ccaf6d31352a9a0a5c1b34bb8744c01648a36d /spaghetti-monster
parentadded tint ramping power correction for middle tints (diff)
downloadanduril-1961c3a6950cefa05cdb6e4b0d1967371f7da9f4.tar.gz
anduril-1961c3a6950cefa05cdb6e4b0d1967371f7da9f4.tar.bz2
anduril-1961c3a6950cefa05cdb6e4b0d1967371f7da9f4.zip
the lantern middle-tint power correction factor wasn't quite right...
... so I adjusted it to make the result closer to a flat curve
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/fsm-ramping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index 1dbb969..082f8c9 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -85,7 +85,7 @@ void set_level(uint8_t level) {
// correction is only necessary when PWM is fast
if (level > HALFSPEED_LEVEL) {
base_PWM = brightness
- + ((brightness>>1) * triangle_wave(mytint) / 255);
+ + ((((uint16_t)brightness) * 26 / 64) * triangle_wave(mytint) / 255);
}
cool_PWM = (((uint16_t)mytint * (uint16_t)base_PWM) + 127) / 255;
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.