From 92e93451f924cc07c0a2185efbeca13e63562c15 Mon Sep 17 00:00:00 2001 From: whowechina Date: Sat, 13 Apr 2024 12:12:25 +0800 Subject: [PATCH] Default touch map when update from old version --- Production/firmware/mai_pico.uf2 | Bin 143872 -> 144384 bytes firmware/src/config.c | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Production/firmware/mai_pico.uf2 b/Production/firmware/mai_pico.uf2 index acd5fdccbf6ef0957ee890e0b413eafdc782ecab..8d40710bba3a739ef4a43b72f19ed8b5f10e2153 100644 GIT binary patch delta 16038 zcmb7L4O~=J+CS$q3M>8d(mdcdObywd)wjzj#JKOM#xGIzA>AQ_MAKj- z&Wpx6gj6CEcU}j1Ch%7?xnF*ew5=OWMkx44)DE|7tj;Yn5?`N=bly z)TpfVgI(1RG~Px!mR}wlAT)XM<;Kl#ZGn6s+`s(ztpMx1=v`-3Ic_@YQ9{Lcq(p6u zt@sYpmOGkxs;m_D*f9T&6Og-rL@RFbAwg|sL@Dz^vc2HFCo zQad@Kt`rhnwCxVQNF6~!cpN}sa0wX4KswF!N(UCPbfy=JDoN-eDZ#Phf9W2YAMk;& z9lswaP3T6ZfHp&cAwN*c?h9Biyn&knr91WzX^|^L%I^u5w)bG^Y)?$F2!`j9mxB#U z(t1Os(Y@jMq0&+NfcuiIQPWWn>K`h7Y%N&D?cGW7{kqYI13V9p7aMmq&*fD22{^|F9Fdy(n9O*GE2u&W>kGJR#U<}I+O zQDz;!CsdkkKbX_qcD(bDg}SSPJPuqVB*sV6SV9Lc#~pbpcYUo$LXr;-HT_K@i?mnTpw;$8`x)UI*bj2UC}x@ z373-yIf;~$C>I{)4PT`wNG~|UiZw>DM*aT7a8>KnykA|TF;+o-KDjrBjJ5RYpaoB4 zF&ZZ=lP&eF3B{FSyj3&w{0ncq5Fl0B1LC!Y%EX{yZ&-}hDbsZ6sYnwqNb7cm4$|TZ zuc=fdNDn%nj%~8UTg?`^>R7vI)fxnpYtf~bML(RFJxw#ZD)~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bl?9`r;Ag%vr&K` z1Zea8zDGsDGXdCBFqn5{&_;owG=3DkxY7vR+qg!J0CIx>;QeY$AE59AsCa@HPl$>q zM8y-rc)|oFJM6#Waqk8j!&sx%=Oo;#HAv+{%X~yADEEI|q`C-|j|jnx3+dem0dCJk zPK!Q7ksP9;6PeQ}VYyKL8+|!SNOdQQIwMueqL|NU!6H=uMvJ0_m7Z+sy$Zurl+g^` zhxZ(=cn(*=`UqC{n+ES&5DPpn6yw91b!dx$N(Qb!yu?yPXkZRvJpk&AQE818%xhnn z2)AD+gq&&{K3z5u{pU`2RmmUsU9UdIx$5ILe}}(uSlu22FaLSITsV%yq56kWNK|ZO zFnuyk_z!AH6uwgyYMe@aoRATE{W|=}fMHllV`!XF$e`8nLN*=beuB~0o7Y~dgvARb z!iR;_BnhU0xm#c%z~6hD;U@u%)!DqRgGG1(EY6A~5ov+GH?5L{=-8GM@Bue$iy|!l zb5Py}i-!8y4ti7)V!i7lGGA223T|J03*<+5D%Aav;$%A1-#ZKUz@H#-{uw0pZ9?LB zc#bgWOC&z`IouzA1yMD_=f+S6?{ONqO-58Q2`5-Wnw5l@xP<(*(Ili{Ws^zZM)I$) zVlQFR)n88|1_)ukuROiyag;t3|M1%^4+li4IPZq8UO$Q diff --git a/firmware/src/config.c b/firmware/src/config.c index b4c8faa..6cf8750 100644 --- a/firmware/src/config.c +++ b/firmware/src/config.c @@ -6,6 +6,8 @@ * Runtime is something to share between files. */ +#include + #include "config.h" #include "save.h" #include "touch.h" @@ -47,6 +49,23 @@ static inline bool in_range(int val, int min, int max) return (val >= min) && (val <= max); } +static bool touch_map_valid() +{ + uint64_t mask = 0; + for (int i = 0; i < sizeof(mai_cfg->alt.touch); i++) { + if (mai_cfg->alt.touch[i] < 34) { + mask |= 1ULL << mai_cfg->alt.touch[i]; + } + } + int keys = 0; + for (int i = 0; i < 34; i++) { + if (mask & (1ULL << i)) { + keys++; + } + } + return keys > 10; // bad data results in low touch key coverage +} + static void config_loaded() { if ((mai_cfg->sense.filter & 0x0f) > 3 || @@ -76,6 +95,12 @@ static void config_loaded() mai_cfg->rgb = default_cfg.rgb; config_changed(); } + + if (!touch_map_valid()) { + memcpy(mai_cfg->alt.touch, default_cfg.alt.touch, + sizeof(mai_cfg->alt.touch)); + config_changed(); + } } void config_changed()