From fca5acc5ddf20e5ed6a60c82d71fdc94b1b8206c Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Wed, 10 Mar 2021 02:59:18 +0100 Subject: [PATCH] Ongoing RGB calculations. --- doc/ESP32 pinout.xcf | Bin 442054 -> 486153 bytes doc/RGB_mapping.py | 82 ++++++++++++++++++++++++++++++++----------- 2 files changed, 62 insertions(+), 20 deletions(-) diff --git a/doc/ESP32 pinout.xcf b/doc/ESP32 pinout.xcf index ae26ded2c1c7c5a36b9e8905c2d4984887a06fc7..418de6e6f6b2b14867f92596125759ede5d433f6 100644 GIT binary patch delta 39746 zcmc&-31C!3((d2UA)u?GFAA)>B9P2X z-k((#)D@6bgawRv{EEopEr=|lsGzujfLsYVXZruDtKQ5c;Hta(?+(oSx~r@2?yBzU zev`jO^B(TGxbYgsFYaKBZ8c~+*_@Dl#_LQNx`A=xX2v;BGA=uw@sq0<51nh!*KQ}{ z#cdgH?8`X%QpRoV3Y|os*mv7^Jf9$grc@7n{Y>+3V{AP{@H)ZKjP#7h zfjiKO>5aZ&Y%-29YZ7CtYnC7IZ*65&gg$KBdSH7d_S_>_$!MN6cv3;|Ic_Lpr`C*J z7c-vp7!vy|u-xi&ZBuJ{=(^Kd4_wM2=g$)S1EYEF!&6c`Z5z|ikd)54n*HZ?LW*An zmY1AS(8TH#s=KgtF87?e{Qz^^UdK2#HPqvxoc43rHzdk^AkKcCF_m$w;TJ7xK$|Ksa!-4hzRu66DU zhG^aNz2FhXQ8q%eu7~Fx9>MCfTTO`i`+JNPxyi_Oo~50meyxFI#tq^=WE~H3NiF_o=(A z-L^f@J$Sp7XWO0KMR!}LoPWjWF_ZG~fAZ*p{NpE189({V!Iv@SPZ%@qr2J9i$Bio( zHM!vC{K@0IOV!=gGP?azp0>q_em2*jth+}>FPf4d#iJ!L=5-M zZ>*N?TX$P6E}_V`-Z_5CIFrns1(OOUn;dU0xNFR)0;F}>_{sSr^QTNIxMj-N{96h} zPM&gSLH?L=U_#l(j=W<6T;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4av z1S2pO6EPKM;atqZ9L)1;&wpaI;!(^O>>6n4pn2Y(i z7B^xARylfH2kS{R<1uW*PP~kL;-L_Xz*tPgRGfu#F$;72+VlTV9*IIM#d55~T5QA? zY{d@jL7&*@!l4+03AU5%`QMmAA`NF_CN99GSm6EZyr7o@z2Q#;J 0: + return round((3.11 - (brightness * 100 - 1) * (3.11 - 2.87)/99), 2) + elif g > 0: + if b == 1: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.76)/99), 2) + else: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.77)/99), 2) elif b == 1: - v = round(r * (2.88 - (brightness - 0.01) * (2.88 - 1.85)), 2) + return round((2.88 - (brightness * 100 - 1) * (2.88 - 1.85)/99), 2) + elif b > 0: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.77)/99), 2) else: - v = round(r * (2.95 - (brightness - 0.01) * (2.95 - 1.82)), 2) - v = round(r * (2.9617 - brightness * 1.13), 2) - return v + return round((2.95 - (brightness * 100 - 1) * (2.95 - 1.82)/99), 2) + raise Exception("Shouldn't get here") def get_green(r, g, b, brightness): if g == 0: if r == 1 and b == 1: - return round(3.12 - (brightness - 0.01) * (3.12 - 2.92), 2) + return round(3.12 - (brightness * 100 - 1) * (3.12 - 2.92)/99, 2) + elif r == 1 and b > 0: + return round(3.12 - (brightness * 100 - 1) * (3.12 - 2.94)/99, 2) else: return maxV; - if r == 1: - v = round(g * (2.86 - (brightness - 0.01) * (2.86 - 1.77)), 2) + if r == 1 and g == 1: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.77)/99), 2) + elif r == 1: + if b == 1: + return round((2.93 - (brightness * 100 - 1) * (2.93 - 2.06)/99), 2) + else: + return round((2.93 - (brightness * 100 - 1) * (2.93 - 2.10)/99), 2) + elif r > 0: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.76)/99), 2) elif r == 0 and b == 1: - v = round(g * (2.86 - (brightness - 0.01) * (2.86 - 1.77)), 2) + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.76)/99), 2) else: - v = round(g * (2.95 - (brightness - 0.01) * (2.95 - 1.82)), 2) - return v + return round((2.95 - (brightness * 100 - 1) * (2.95 - 1.82)/99), 2) + raise Exception("Shouldn't get here") def get_blue(r, g, b, brightness): if b == 0: if r > 0 and g > 0: - return 3.17 + return round((3.17 - (brightness * 100 - 1) * (3.17 - 3.15)/99), 2) else: return maxV; if r == 1 and g == 1: - v = round(r * (3.0717 - brightness * 0.48), 2) + return round((3.07 - (brightness * 100 - 1) * (3.07 - 2.73)/99), 2) elif r == 1 and g == 0: - v = round(r * (2.86 - (brightness - 0.01) * (2.86 - 1.77)), 2) + if b == 1: + return round((2.86 - (brightness * 100 - 1) * (2.86 - 1.77)/99), 2) + elif b > 0: + return round((3.10 - (brightness * 100 - 1) * (3.10 - 2.84)/99), 2) + elif r == 1 and g > 0: + if b == 1: + return round((2.87 - (brightness * 100 - 1) * (2.87 - 1.80)/99), 2) + else: + return round((3.10 - (brightness * 100 - 1) * (3.10 - 2.86)/99), 2) elif r == 0 and g == 1: - v = round(g * (3.0717 - brightness * 0.48), 2) + return round((3.07 - (brightness * 100 - 1) * (3.07 - 2.71)/99), 2) else: - v = round(b * (2.95 - (brightness - 0.01) * (2.95 - 1.82)), 2) - return v + return round((2.95 - (brightness * 100 - 1) * (2.95 - 1.82)/99), 2) + raise Exception("Shouldn't get here") def make_rgb_fractions(r, g, b): """ These ought to be 0 to 1 on input already, but it won't @@ -93,5 +135,5 @@ for r,g,b,brightness,stateExpected, rVexpected, gVexpected, bVexpected in requir if rV == rVexpected and gV == gVexpected and bV == bVexpected and state == stateExpected: print(" [PASS]"); else: - print(" [FAIL]"); + print()