![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LIGHT2
Diff: main.cpp
- Revision:
- 98:cd1b2da4704f
- Parent:
- 97:d71c57e3515e
- Child:
- 99:7bbcb3c0fb06
--- a/main.cpp Wed Aug 12 00:14:21 2020 +0000 +++ b/main.cpp Wed Aug 19 02:27:45 2020 +0000 @@ -1,4 +1,4 @@ -//200812-1 +//200819-1 #include "mbed.h" #include "FastPWM.h" #include "INIT_HW.h" @@ -193,72 +193,72 @@ float input_NN[num_input] = { 0.0f }; const float h1[num_input][16] = { - {-0.8097203969955444f,0.4414135217666626f,0.12903714179992676f,0.11036134511232376f,-0.9600693583488464f,3.1494152545928955f,-0.17472904920578003f,0.586768627166748f,-4.449813365936279f,-0.8258424997329712f,-0.23096854984760284f,-2.9395718574523926f,-0.26403480768203735f,-2.074904680252075f,-0.2571594715118408f,2.6023237705230713f}, -{-0.8093165159225464f,0.658986508846283f,-0.3927857577800751f,-0.15765640139579773f,-1.0536823272705078f,1.850258469581604f,-0.4054011106491089f,0.6027240753173828f,-2.507427930831909f,-0.37478989362716675f,-0.26731759309768677f,-1.3369394540786743f,0.23577988147735596f,-1.7169277667999268f,-0.20967772603034973f,0.9031592011451721f}, -{-0.8143073916435242f,0.8226664662361145f,0.36391180753707886f,-0.460040420293808f,-0.9197589755058289f,0.7947497367858887f,0.2872133255004883f,0.8109666705131531f,-0.11829791218042374f,-0.17228920757770538f,-0.3408655822277069f,0.22128674387931824f,-0.0022603936959058046f,-0.16905049979686737f,0.05590221285820007f,-0.6246200799942017f}, -{-0.9938223361968994f,1.0098074674606323f,0.39742106199264526f,0.25526055693626404f,-1.3803852796554565f,-0.5356543660163879f,-0.11584559082984924f,1.2068217992782593f,2.5912516117095947f,0.16104958951473236f,0.10329903662204742f,1.3646738529205322f,-0.16418832540512085f,0.5301267504692078f,-0.2961459457874298f,-1.1432890892028809f}, -{0.09868474304676056f,0.6722683310508728f,-0.0051451027393341064f,0.27669477462768555f,-0.9302022457122803f,-1.3165873289108276f,0.1294034719467163f,0.17281584441661835f,3.452556610107422f,0.3410228192806244f,0.35563355684280396f,1.1116588115692139f,-0.06756797432899475f,1.3585044145584106f,-0.3865056037902832f,-1.493058204650879f}, -{4.0763983726501465f,-3.817742347717285f,0.21773302555084229f,0.4135795533657074f,3.3691959381103516f,-3.444652557373047f,0.16514194011688232f,-3.606274127960205f,0.33385977149009705f,1.1241480112075806f,-0.23945419490337372f,1.7422852516174316f,-0.2640157639980316f,2.7652909755706787f,-0.4132833778858185f,0.7563164234161377f}, -{-0.2336282730102539f,0.5288040041923523f,-0.2501986622810364f,-0.6430939435958862f,0.7025597095489502f,0.5459174513816833f,0.06014183163642883f,-0.2603897750377655f,-0.001964108319953084f,-0.07970346510410309f,0.15401500463485718f,0.9357159733772278f,-0.17204509675502777f,1.0304431915283203f,-0.15618428587913513f,-2.5391180515289307f}, -{-0.9050356149673462f,0.05340365320444107f,-0.26619744300842285f,-0.044719185680150986f,-0.6887577772140503f,1.5033495426177979f,-0.17925891280174255f,-1.420706868171692f,4.436413764953613f,0.19631661474704742f,0.1091700941324234f,-2.1720457077026367f,0.37308573722839355f,0.13548801839351654f,0.04303058981895447f,4.711082458496094f}, -{0.43784111738204956f,-0.6006630659103394f,0.10248100757598877f,-0.4403073787689209f,0.5609986782073975f,1.037424921989441f,-0.07246989011764526f,-1.3788509368896484f,-0.06339003145694733f,0.6676791906356812f,-0.29292768239974976f,-1.8985565900802612f,0.23086795210838318f,0.4877270758152008f,-0.30555272102355957f,4.045020580291748f}, -{-0.036838334053754807f,-0.5635775923728943f,0.18462657928466797f,-0.17717698216438293f,0.36153092980384827f,0.3406716287136078f,-0.2990540862083435f,0.1106804832816124f,-1.8224303722381592f,-0.282331258058548f,-0.0037344631273299456f,-2.1794273853302f,0.3740088939666748f,0.23098443448543549f,0.3484981060028076f,-2.1184303760528564f}, -{0.23072007298469543f,0.11643347144126892f,0.37182438373565674f,0.1489139199256897f,-0.1252019852399826f,-1.325034260749817f,-0.20339298248291016f,-0.09470587968826294f,-1.027321219444275f,0.12314741313457489f,0.3525862991809845f,-3.1166610717773438f,-0.06504320353269577f,1.6114453077316284f,0.26688337326049805f,-4.138108253479004f}, -{-0.2673735022544861f,-0.2903279960155487f,-0.40320003032684326f,-0.1255786418914795f,0.07108580321073532f,-2.1071906089782715f,0.1533789038658142f,0.29359644651412964f,-0.5852934718132019f,0.38707610964775085f,-0.41015690565109253f,-1.5804376602172852f,0.14605700969696045f,1.2968003749847412f,0.10493969917297363f,-1.5323810577392578f}, -{0.15047627687454224f,-0.12190425395965576f,0.19847965240478516f,0.07482684403657913f,0.23196566104888916f,-2.0102710723876953f,-0.2404318004846573f,0.17862457036972046f,0.3626876473426819f,-0.04647992551326752f,-0.1046956330537796f,-0.07697045803070068f,0.09354410320520401f,0.6696446537971497f,-0.22268100082874298f,0.13430683314800262f}, -{-0.004485058132559061f,-0.08152496814727783f,0.4127817749977112f,-0.11922062933444977f,-0.37754273414611816f,-1.6171168088912964f,-0.32001304626464844f,-0.14244554936885834f,-0.25989097356796265f,-0.17456310987472534f,-0.1899278461933136f,0.9842401146888733f,-0.3109734058380127f,-0.3267957270145416f,0.0479682981967926f,-0.6410547494888306f}, -{-0.049159497022628784f,-0.018137486651539803f,0.20282304286956787f,0.024114999920129776f,0.02577952854335308f,-0.3361547589302063f,0.04202890396118164f,0.05665987730026245f,0.06006404757499695f,0.06607701629400253f,-0.27408432960510254f,-0.5515044331550598f,0.10555920749902725f,-0.4352801442146301f,0.0668090283870697f,-0.48965951800346375f}, -{-0.1248687356710434f,-0.41963282227516174f,-0.40439701080322266f,-0.15743118524551392f,-0.31818413734436035f,0.3693816363811493f,-0.15568238496780396f,-0.030827471986413002f,-0.5186337232589722f,-0.022161586210131645f,-0.46884721517562866f,0.49413880705833435f,-0.26890143752098083f,-0.12830734252929688f,-0.08245879411697388f,-0.6198499202728271f}, -{-0.13647101819515228f,-0.36818772554397583f,0.16706281900405884f,0.02115493081510067f,-0.14659161865711212f,0.11085072159767151f,-0.041414469480514526f,0.22333866357803345f,-0.35389265418052673f,-0.027265382930636406f,-0.3487294316291809f,2.7009499073028564f,0.11436564475297928f,0.3761715888977051f,0.29427415132522583f,0.5870246887207031f}, + {-0.5148975849151611f,0.6913270354270935f,0.12903714179992676f,0.06968002766370773f,-0.790452778339386f,1.4857755899429321f,-0.17472904920578003f,1.0495461225509644f,-0.6124919652938843f,-0.25905439257621765f,-0.23836180567741394f,1.9130226373672485f,-0.3294254243373871f,-1.4778105020523071f,-0.2571594715118408f,-2.4880127906799316f}, +{-0.7906327247619629f,0.8467333912849426f,-0.3927857577800751f,-0.1892901360988617f,-0.9342114925384521f,1.347975492477417f,-0.4054011106491089f,0.6229709982872009f,-0.5047441124916077f,-0.13633562624454498f,-0.27498406171798706f,0.7508368492126465f,0.21865729987621307f,-1.491814136505127f,-0.20967772603034973f,-1.5309267044067383f}, +{-1.1931301355361938f,1.1135512590408325f,0.36391180753707886f,-0.48407620191574097f,-0.9778469800949097f,1.5033245086669922f,0.2872133255004883f,0.6421817541122437f,-0.9563406109809875f,-0.26685020327568054f,-0.3487076163291931f,-1.0145602226257324f,0.03020939975976944f,-0.45736515522003174f,0.05590221285820007f,-0.8476586937904358f}, +{-1.3051706552505493f,1.0874000787734985f,0.39742106199264526f,0.24348556995391846f,-1.1686537265777588f,0.2843722105026245f,-0.11584559082984924f,1.0672457218170166f,-1.069120168685913f,-0.12463018298149109f,0.0952904224395752f,-2.554316759109497f,-0.08049971610307693f,-0.008950088173151016f,-0.2961459457874298f,1.1411194801330566f}, +{0.14222723245620728f,0.4066593050956726f,-0.0051451027393341064f,0.2917144000530243f,-0.26570791006088257f,-1.2131741046905518f,0.1294034719467163f,0.13665500283241272f,-0.12447118014097214f,0.10683567821979523f,0.3473935127258301f,-2.5899734497070312f,0.0719006285071373f,0.7997652292251587f,-0.3865056037902832f,2.311340093612671f}, +{3.920180320739746f,-3.846663475036621f,0.21773302555084229f,0.4770970344543457f,3.5844225883483887f,-3.6941583156585693f,0.16514194011688232f,-3.6810801029205322f,3.154061794281006f,1.2145910263061523f,-0.24791206419467926f,3.4647464752197266f,-0.05989024043083191f,3.000591516494751f,-0.4132833778858185f,1.4438724517822266f}, +{-0.12111768126487732f,0.08380457758903503f,-0.2501986622810364f,-0.582443118095398f,-0.49875351786613464f,0.5143295526504517f,0.06014183163642883f,-0.592200517654419f,2.287799835205078f,-0.1632602959871292f,0.1481132060289383f,-1.1173450946807861f,-0.3159672021865845f,1.0699635744094849f,-0.15618428587913513f,-0.9952345490455627f}, +{-0.6355297565460205f,-0.03333640471100807f,-0.26619744300842285f,-0.053172167390584946f,-0.7811458706855774f,0.9147476553916931f,-0.17925891280174255f,-0.7938778400421143f,-1.6391313076019287f,-0.16126398742198944f,0.10272976756095886f,-1.6798183917999268f,0.3692992031574249f,0.6723886132240295f,0.04303058981895447f,2.1895909309387207f}, +{-0.0021498650312423706f,0.08051954954862595f,0.10248100757598877f,-0.4481695890426636f,-0.301817387342453f,1.5014127492904663f,-0.07246989011764526f,-1.0245394706726074f,-1.6347746849060059f,0.7809115052223206f,-0.29991286993026733f,1.5558332204818726f,0.2544945776462555f,0.9728240370750427f,-0.30555272102355957f,0.02078300528228283f}, +{-0.09895939379930496f,-0.5768936276435852f,0.18462657928466797f,-0.17065918445587158f,-0.04719269648194313f,0.4076792895793915f,-0.2990540862083435f,-0.12788896262645721f,-0.6685953736305237f,0.2066139578819275f,-0.011072719469666481f,0.32346463203430176f,0.39884257316589355f,0.9943166971206665f,0.3484981060028076f,-1.832129955291748f}, +{0.32884395122528076f,-0.2635522484779358f,0.37182438373565674f,0.1577087640762329f,-0.38952457904815674f,-0.5387749671936035f,-0.20339298248291016f,0.15740512311458588f,-0.19073837995529175f,0.5409423112869263f,0.3455236852169037f,-0.4002244472503662f,-0.058453820645809174f,1.5326565504074097f,0.26688337326049805f,-2.694427490234375f}, +{-0.23524357378482819f,-0.6518380045890808f,-0.40320003032684326f,-0.1305554062128067f,-0.06504672020673752f,-0.8075979948043823f,0.1533789038658142f,0.35412418842315674f,0.488972932100296f,0.6301876902580261f,-0.4167799949645996f,-0.36251047253608704f,0.1458144187927246f,0.6380942463874817f,0.10493969917297363f,-2.115976333618164f}, +{0.03274271637201309f,-0.0911468043923378f,0.19847965240478516f,0.05293659120798111f,0.30053776502609253f,-0.4260278344154358f,-0.2404318004846573f,0.07340890169143677f,0.16252197325229645f,-0.04801492020487785f,-0.11149545013904572f,-0.43259477615356445f,0.10189790278673172f,-0.670600414276123f,-0.22268100082874298f,-1.3953211307525635f}, +{-0.09184899926185608f,0.11332615464925766f,0.4127817749977112f,-0.13804464042186737f,-0.06335645169019699f,-0.5682795643806458f,-0.32001304626464844f,-0.3443944752216339f,-0.24648019671440125f,-0.23045474290847778f,-0.1973976045846939f,0.22043177485466003f,-0.2981586754322052f,-1.4600191116333008f,0.0479682981967926f,-0.3355119228363037f}, +{0.17548403143882751f,0.0514235720038414f,0.20282304286956787f,0.0031971673015505075f,0.4625685513019562f,-0.16567985713481903f,0.04202890396118164f,0.14673961699008942f,0.03839880973100662f,-0.11902724951505661f,-0.2818385362625122f,-0.056304946541786194f,0.10816586762666702f,-0.8528621792793274f,0.0668090283870697f,-1.0549118518829346f}, +{-0.14676930010318756f,-0.2984490394592285f,-0.40439701080322266f,-0.1851670742034912f,-0.22558066248893738f,-0.3248671591281891f,-0.15568238496780396f,0.0530388168990612f,0.10560767352581024f,-0.35172489285469055f,-0.4762044847011566f,-0.34036463499069214f,-0.26879024505615234f,0.10006672143936157f,-0.08245879411697388f,-0.039185766130685806f}, +{-0.15191811323165894f,-0.1007840558886528f,0.16706281900405884f,0.006672909948974848f,-0.003110149409621954f,-0.762115478515625f,-0.041414469480514526f,0.03543923795223236f,0.5521782636642456f,-0.4062930643558502f,-0.3557530641555786f,0.3585992157459259f,0.13107405602931976f,0.24544933438301086f,0.29427415132522583f,1.0534487962722778f}, }; const float h2[16][16] = { - {-1.3626923561096191f,3.559429168701172f,-0.06966331601142883f,1.0679280757904053f,-0.21907491981983185f,2.1128387451171875f,-0.015646522864699364f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,-0.6165129542350769f,4.014952659606934f,0.0362207293510437f,-1.483006238937378f,0.02117646113038063f,-0.4814707934856415f}, -{2.1085665225982666f,-0.37047895789146423f,0.057057321071624756f,0.5958731174468994f,-0.35503754019737244f,-2.0827198028564453f,-0.5415452718734741f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,-0.7234960794448853f,-3.902017593383789f,0.2860128879547119f,0.6093584895133972f,2.087905168533325f,-1.2216612100601196f}, + {-3.4398791790008545f,1.8482379913330078f,-0.06966331601142883f,-0.00788033101707697f,-0.21907491981983185f,2.2592196464538574f,-0.004953187890350819f,0.0904630720615387f,-0.43008196353912354f,-0.1415480375289917f,0.7502431273460388f,-0.47024568915367126f,0.00603795750066638f,2.3494179248809814f,2.4163272380828857f,-0.5829678773880005f}, +{2.1497676372528076f,0.14490026235580444f,0.057057321071624756f,-1.802488088607788f,-0.35503754019737244f,-1.8396915197372437f,-0.5683606863021851f,-0.2990124225616455f,-0.33757925033569336f,0.2895788848400116f,2.452321767807007f,-0.6453670263290405f,0.19870516657829285f,-0.7929888367652893f,0.2338344007730484f,-0.649878978729248f}, {-0.22745239734649658f,0.003037691116333008f,-0.061119019985198975f,0.35696902871131897f,0.05568113923072815f,0.011741191148757935f,-0.20225946605205536f,-0.08465918898582458f,0.3489862382411957f,0.0687277615070343f,0.31964078545570374f,0.3004753887653351f,0.36063823103904724f,-0.42892736196517944f,0.08652284741401672f,0.027493387460708618f}, -{0.08209212124347687f,-0.3668873906135559f,-0.2894435524940491f,0.23971600830554962f,0.08946844935417175f,0.21642270684242249f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,-0.07672230899333954f,0.35305339097976685f,-0.4486631751060486f,-0.18220700323581696f,0.28852298855781555f,0.13291531801223755f}, -{-1.1906832456588745f,0.8289573788642883f,-0.25313520431518555f,-0.44156479835510254f,0.036378175020217896f,1.7150423526763916f,-0.5148868560791016f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,0.8389655351638794f,3.167668104171753f,0.0157912690192461f,-1.4450953006744385f,-0.05417611449956894f,-0.5514891743659973f}, -{-0.07615465670824051f,-0.1349271833896637f,-0.3519742488861084f,-0.2830902636051178f,-0.3015052080154419f,0.26559001207351685f,-0.7199816703796387f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,0.37819811701774597f,-0.6628282070159912f,-0.27080994844436646f,-0.3976362347602844f,0.9013896584510803f,-1.0254287719726562f}, +{0.032889463007450104f,-0.3373774290084839f,-0.2894435524940491f,0.19745232164859772f,0.08946844935417175f,0.21209675073623657f,-0.23805393278598785f,0.4122363030910492f,0.26211628317832947f,0.2953031361103058f,-0.015198991633951664f,0.2877965271472931f,-0.5414372086524963f,-0.14195658266544342f,0.31992027163505554f,0.23537500202655792f}, +{-0.5507016181945801f,0.18181274831295013f,-0.25313520431518555f,-0.7556056976318359f,0.036378175020217896f,0.3760649859905243f,-0.4087822735309601f,-0.08570799231529236f,-0.024399548768997192f,-0.39465832710266113f,2.0449025630950928f,-0.6807706952095032f,-0.03529064357280731f,-0.502030611038208f,0.676935613155365f,-0.8007894158363342f}, +{0.30517372488975525f,0.041431691497564316f,-0.3519742488861084f,-0.3776823580265045f,-0.3015052080154419f,0.22321076691150665f,-0.7179126143455505f,-0.019414573907852173f,-0.23047015070915222f,0.3579089343547821f,0.5109689831733704f,-0.2936096787452698f,-0.348145067691803f,-1.0741698741912842f,0.5876720547676086f,-1.0622529983520508f}, {-0.1828227937221527f,-0.02554568648338318f,-0.3260969817638397f,0.08422836661338806f,-0.38453540205955505f,-0.25432005524635315f,0.285016268491745f,0.12387624382972717f,-0.0982072651386261f,0.13111665844917297f,-0.03692615032196045f,-0.32796353101730347f,-0.21546880900859833f,0.049302369356155396f,-0.27088475227355957f,-0.4124959409236908f}, -{3.8436150550842285f,4.060661315917969f,0.33083590865135193f,0.32661956548690796f,-0.14358049631118774f,-1.5763370990753174f,-0.1452331244945526f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,-2.7710835933685303f,-0.41825899481773376f,-0.4039062559604645f,2.0664453506469727f,-0.466689795255661f,-0.47882387042045593f}, -{-0.5602059960365295f,-1.0100384950637817f,-0.11379697918891907f,2.520216226577759f,0.041274964809417725f,-1.1268502473831177f,-0.10284432768821716f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,-0.1917453408241272f,-4.463569641113281f,-0.42279407382011414f,0.1335466206073761f,0.7995954155921936f,-0.6986193656921387f}, -{-0.1339513063430786f,-0.013957088813185692f,-0.13502129912376404f,0.08287782967090607f,0.12987366318702698f,0.025024527683854103f,-0.03518039360642433f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,-0.23482145369052887f,-0.6966692209243774f,0.33327627182006836f,-0.4459782838821411f,-0.1862078458070755f,-1.3349103927612305f}, -{-0.2826353907585144f,0.011107364669442177f,0.0457797646522522f,-0.3530964255332947f,-0.03321319818496704f,-0.4110557734966278f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.19596530497074127f,0.3545852601528168f,-0.3647043704986572f,0.4010928273200989f,-0.41425859928131104f,-0.26681315898895264f}, -{0.038556743413209915f,0.5333544611930847f,0.3954955041408539f,0.5178714394569397f,0.0033026933670043945f,-0.12961754202842712f,-0.42596811056137085f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,0.44780001044273376f,-1.4391846656799316f,0.01617513783276081f,-0.8704860210418701f,0.9961355328559875f,-0.558021605014801f}, -{-0.26824426651000977f,-0.20954884588718414f,-0.15798500180244446f,0.37357789278030396f,-0.37393757700920105f,0.3626435101032257f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.10632200539112091f,-0.2837170362472534f,0.41839322447776794f,-0.019250929355621338f,-0.13113634288311005f,0.11033844202756882f}, -{-0.09516629576683044f,-0.4704839289188385f,-0.2018718123435974f,0.8700968027114868f,0.07545611262321472f,-0.12274783849716187f,-0.41731542348861694f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,-0.7129552960395813f,-3.0128707885742188f,-0.212868332862854f,1.7972642183303833f,-1.2676265239715576f,-1.1758460998535156f}, +{0.6063749194145203f,0.5828306078910828f,0.33083590865135193f,-0.6215236783027649f,-0.14358049631118774f,-1.3952178955078125f,-0.15046429634094238f,-0.3003333508968353f,0.2600560486316681f,-0.37898191809654236f,-3.355509042739868f,-0.7030810117721558f,-0.44010040163993835f,2.910482168197632f,1.412354588508606f,-0.53904128074646f}, +{-0.8159868717193604f,2.5172226428985596f,-0.11379697918891907f,-0.5977725982666016f,0.041274964809417725f,0.3400547504425049f,-0.2325267791748047f,0.0019084513187408447f,0.06103590130805969f,-0.38046833872795105f,0.8653631210327148f,-0.8738273978233337f,-0.49878576397895813f,0.6692306399345398f,-0.8648783564567566f,-0.6348849534988403f}, +{0.004738830961287022f,0.6704568266868591f,-0.13502129912376404f,0.16209425032138824f,0.12987366318702698f,0.048303429037332535f,-0.0286114439368248f,-0.3632148504257202f,-0.13619378209114075f,0.16938945651054382f,-0.35661208629608154f,0.09956754744052887f,0.24273109436035156f,0.20394794642925262f,0.08121732622385025f,-0.5678980946540833f}, +{-0.2795029282569885f,0.005486087407916784f,0.0457797646522522f,-0.35345935821533203f,-0.03321319818496704f,-0.4265287518501282f,0.17873415350914001f,-0.20421427488327026f,-0.050184011459350586f,0.12480869889259338f,-0.20449678599834442f,0.3545852601528168f,-0.3647043704986572f,0.4054204225540161f,-0.40733587741851807f,-0.270757257938385f}, +{-0.4767029583454132f,6.086306095123291f,0.3954955041408539f,-0.4272023141384125f,0.0033026933670043945f,2.254685401916504f,-0.3985411822795868f,-0.11795541644096375f,0.3487861454486847f,-0.32520344853401184f,3.9606168270111084f,-0.45552361011505127f,-0.0559220127761364f,-2.728947401046753f,1.051852822303772f,-0.3014424741268158f}, +{-0.1879907101392746f,-0.2501440644264221f,-0.15798500180244446f,0.5000408291816711f,-0.37393757700920105f,0.34403666853904724f,0.11292675137519836f,-0.2947862446308136f,-0.3764709532260895f,0.2424570620059967f,-0.08110538870096207f,-0.2837170362472534f,0.41839322447776794f,0.011466778814792633f,-0.18873721361160278f,0.06270549446344376f}, +{0.08501578122377396f,-0.3231253921985626f,-0.2018718123435974f,0.669339656829834f,0.07545611262321472f,-0.05011335760354996f,-0.41673141717910767f,-0.21416273713111877f,-0.24509364366531372f,0.19522181153297424f,-1.303952693939209f,-0.5437983274459839f,-0.30508455634117126f,0.31748679280281067f,-0.22021836042404175f,-0.5213689804077148f}, {0.4138670265674591f,0.1604653298854828f,0.056746453046798706f,0.036025404930114746f,0.3228367865085602f,-0.07083973288536072f,0.018455177545547485f,0.0059362053871154785f,0.40515169501304626f,0.014240056276321411f,-0.07738298177719116f,0.1407785713672638f,-0.13024571537971497f,-0.29546058177948f,-0.11976784467697144f,-0.35825538635253906f}, -{-0.19099704921245575f,-0.6991280317306519f,0.12081471085548401f,-0.040976669639348984f,0.29976895451545715f,0.04890979081392288f,-0.28460392355918884f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.8055384755134583f,1.5638492107391357f,-0.26196736097335815f,-1.0852240324020386f,0.8432919979095459f,-0.5244962573051453f}, +{-0.5098994374275208f,-0.7174665927886963f,0.12081471085548401f,-1.3910459280014038f,0.29976895451545715f,-0.1250896453857422f,-0.18117135763168335f,0.31089308857917786f,-0.3893685042858124f,-0.02222958207130432f,0.01646742783486843f,-0.6269581913948059f,-0.3353298604488373f,0.3096812665462494f,-0.18774321675300598f,-0.4136137068271637f}, }; const float h3[16][16] = { - {-0.36079341173171997f,-3.9357128143310547f,-1.2353267669677734f,-0.4479454457759857f,0.2948816418647766f,-0.8609504699707031f,0.45291733741760254f,0.3036012351512909f,-0.2405819296836853f,-0.1139695942401886f,-0.2734302878379822f,0.4001283347606659f,-0.03898678347468376f,0.6329914927482605f,-0.23971135914325714f,0.6512688994407654f}, -{0.047732532024383545f,0.9605207443237305f,1.7830438613891602f,-0.2558155655860901f,0.9893799424171448f,0.1151559129357338f,-0.30879029631614685f,-0.04843417927622795f,0.1365063339471817f,-0.23045620322227478f,0.2565042972564697f,-0.46522295475006104f,-0.058952413499355316f,0.49743029475212097f,-1.1833242177963257f,-1.8431867361068726f}, + {-0.36079341173171997f,-1.4002022743225098f,-0.15496845543384552f,-0.5186285376548767f,1.12073814868927f,0.021711893379688263f,0.22705639898777008f,0.3036012351512909f,-0.49025630950927734f,-0.5200098752975464f,-0.11870327591896057f,0.10166759043931961f,-0.6542547345161438f,0.7162150144577026f,-1.2592511177062988f,1.8590933084487915f}, +{0.047732532024383545f,-1.526611566543579f,-0.24044454097747803f,-0.3331625461578369f,-1.4728660583496094f,4.130182266235352f,-0.3198729455471039f,0.06247803568840027f,0.24862875044345856f,-0.15296953916549683f,0.2721240222454071f,-0.44297707080841064f,2.064105272293091f,1.9600025415420532f,-2.6107990741729736f,0.6521881222724915f}, {0.07903262972831726f,0.2790505588054657f,-0.07798504829406738f,0.04248586297035217f,-0.1963958442211151f,-0.19260792434215546f,-0.4038352966308594f,0.015906542539596558f,0.15353140234947205f,0.030178606510162354f,0.2488909661769867f,0.13805970549583435f,-0.0816211998462677f,-0.20733052492141724f,-0.3036302626132965f,0.054825395345687866f}, -{-0.30922991037368774f,0.15509124100208282f,0.5192636847496033f,-0.3878806531429291f,2.6802191734313965f,-0.4313819110393524f,0.055310800671577454f,0.005540765356272459f,-0.3932358920574188f,-0.42990148067474365f,-0.025062749162316322f,0.25402820110321045f,-0.6464306116104126f,1.2382471561431885f,-0.4996623694896698f,-1.2010728120803833f}, +{-0.30922991037368774f,-0.7222880721092224f,-0.37467989325523376f,-0.43315574526786804f,-1.4309061765670776f,-0.08427301049232483f,0.07763774693012238f,0.07002416253089905f,-0.5193164944648743f,-0.6246053576469421f,0.13192829489707947f,0.05707714706659317f,-0.005306444130837917f,0.9676557183265686f,-0.2170732319355011f,-0.42233189940452576f}, {-0.39607733488082886f,-0.05481579899787903f,0.1976260244846344f,0.022423356771469116f,0.16892847418785095f,-0.27518749237060547f,0.16012099385261536f,0.3626593053340912f,-0.08640444278717041f,-0.11053556203842163f,-0.10529157519340515f,-0.31317979097366333f,-0.1530032455921173f,-0.1336749792098999f,0.22959044575691223f,0.19986507296562195f}, -{-0.37449589371681213f,-0.1426372230052948f,0.9208844304084778f,0.011541874147951603f,-2.6410834789276123f,0.3831448554992676f,-0.5198522806167603f,0.07727988809347153f,-0.548179030418396f,-0.1298495978116989f,-0.24662913382053375f,0.03421551734209061f,-0.14141534268856049f,1.4408740997314453f,0.04193932190537453f,-0.41530483961105347f}, -{0.4110594093799591f,0.19653694331645966f,-0.23337505757808685f,0.37246426939964294f,0.19125360250473022f,-0.17062419652938843f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.21155259013175964f,0.04271707311272621f,0.21387404203414917f,-0.3391006588935852f}, +{-0.37449589371681213f,0.6806039214134216f,-0.9492158889770508f,-0.11001157015562057f,0.26889902353286743f,0.593567430973053f,-0.3240175247192383f,0.22384825348854065f,-0.6745800375938416f,0.5529975891113281f,-0.2385200560092926f,-0.13680315017700195f,-2.3767623901367188f,-0.8200106024742126f,1.6094990968704224f,0.5019183158874512f}, +{0.4110594093799591f,0.17449118196964264f,-0.22636400163173676f,0.37246426939964294f,0.1987767368555069f,-0.18461379408836365f,-0.08670487999916077f,-0.25336313247680664f,-0.030661463737487793f,-0.06259563565254211f,-0.1344406008720398f,0.35313835740089417f,0.21155259013175964f,0.03979954123497009f,0.20585757493972778f,-0.3391006588935852f}, {-0.40892091393470764f,0.043769627809524536f,-0.3867315948009491f,0.25968697667121887f,0.3424709737300873f,-0.051169753074645996f,-0.23312048614025116f,-0.390264093875885f,0.28059282898902893f,-0.1559126079082489f,-0.14134526252746582f,-0.0003446042537689209f,-0.2742875814437866f,-0.36560842394828796f,0.07994696497917175f,0.005298197269439697f}, {0.10697010159492493f,-0.12228584289550781f,-0.37870171666145325f,0.21184906363487244f,-0.37222859263420105f,-0.17138728499412537f,-0.1382003128528595f,0.3493293821811676f,-0.360889196395874f,-0.3875247836112976f,0.42142823338508606f,-0.3482915461063385f,-0.3289247751235962f,-0.2186824083328247f,0.09620395302772522f,-0.06898030638694763f}, {0.2847062647342682f,0.018552124500274658f,0.11435768008232117f,0.36562982201576233f,-0.047046810388565063f,0.30447837710380554f,0.2430230677127838f,0.2909286320209503f,-0.2802048921585083f,0.18043199181556702f,0.41849127411842346f,-0.287167489528656f,0.24394884705543518f,-0.14084559679031372f,-0.10168051719665527f,0.010465055704116821f}, -{0.15459725260734558f,0.6822951436042786f,-1.8076457977294922f,-0.2658248543739319f,-0.9337107539176941f,0.09819532930850983f,-0.7815399169921875f,-0.09437912702560425f,-0.18962785601615906f,-0.3308940529823303f,-0.03042592853307724f,-0.46041011810302734f,-0.16326282918453217f,-0.27264106273651123f,0.5295608639717102f,-0.25163358449935913f}, -{-0.408692330121994f,-0.5686866641044617f,2.757739543914795f,0.0922636091709137f,-5.595403671264648f,1.967482328414917f,-0.36892542243003845f,0.23923462629318237f,-0.20705322921276093f,-0.31117701530456543f,0.12809070944786072f,0.03996849060058594f,-0.6075212955474854f,1.0410428047180176f,-2.5736641883850098f,-0.6091660261154175f}, -{-0.2991822361946106f,0.16860590875148773f,0.09138333052396774f,-0.05932474136352539f,0.2541872262954712f,0.07005511224269867f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.1786714345216751f,-0.30694013833999634f,0.17156483232975006f,-0.07854658365249634f}, -{-0.2675279378890991f,0.10311675071716309f,-1.3622825145721436f,-0.1150468960404396f,0.7050028443336487f,0.11019168794155121f,-0.13633859157562256f,-0.31893211603164673f,-0.5661224126815796f,-0.5721097588539124f,-0.5263854265213013f,-0.5656268000602722f,0.11899291723966599f,-0.8062530755996704f,0.9719531536102295f,0.7021549940109253f}, -{-0.015470266342163086f,-0.2546629309654236f,1.6631083488464355f,0.27566051483154297f,0.04447168856859207f,0.6073436141014099f,-0.14271573722362518f,-0.13423189520835876f,-0.5589900016784668f,-0.5349217057228088f,-0.025492876768112183f,-0.2609069049358368f,-0.007030019536614418f,-0.058869343250989914f,-0.9019383788108826f,0.6670117378234863f}, -{0.1863725483417511f,-0.1447485387325287f,0.06327609717845917f,-0.4664100110530853f,0.47049859166145325f,-0.02930854819715023f,0.04860696196556091f,0.17769548296928406f,-0.027388401329517365f,0.3378079831600189f,-0.3929237127304077f,0.19592127203941345f,0.41537413001060486f,0.02166307158768177f,-0.37968552112579346f,-0.008256490342319012f}, +{0.15459725260734558f,-0.3258223533630371f,-0.1492905467748642f,-0.38421759009361267f,0.3944055438041687f,-0.11667867004871368f,-0.08742031455039978f,0.05785742402076721f,-0.34515058994293213f,-0.6268306374549866f,-0.010714782401919365f,-0.5127771496772766f,2.32047963142395f,-4.680253982543945f,0.6271816492080688f,0.3120194971561432f}, +{-0.408692330121994f,0.14456172287464142f,-0.09676734358072281f,0.0922636091709137f,-0.12856626510620117f,-0.0092587536200881f,0.03285527229309082f,0.38763079047203064f,-0.20705322921276093f,-0.25883403420448303f,0.12809070944786072f,0.03996849060058594f,-0.476328581571579f,-0.10435925424098969f,-0.0763804242014885f,0.2252551019191742f}, +{-0.2991822361946106f,0.3313310444355011f,-0.04416324570775032f,-0.05932474136352539f,0.11846208572387695f,0.19483672082424164f,-0.11253207921981812f,0.34576353430747986f,0.04814547300338745f,-0.35770976543426514f,-0.044228196144104004f,-0.36229726672172546f,0.05057636648416519f,-0.16746534407138824f,0.31812024116516113f,-0.10828400403261185f}, +{-0.2675279378890991f,0.17262902855873108f,-0.2144627720117569f,-0.20456747710704803f,0.0998799204826355f,-0.46256816387176514f,-0.46433788537979126f,-0.31893211603164673f,-0.6255066990852356f,-2.024089813232422f,-0.5077632069587708f,-0.7495431900024414f,2.3684983253479004f,-1.0168710947036743f,0.407028466463089f,0.9326169490814209f}, +{-0.015470266342163086f,-0.8369113802909851f,0.2782694101333618f,0.1809295266866684f,-0.4426118731498718f,-1.1821869611740112f,-0.07059845328330994f,-0.008358269929885864f,-0.8782433867454529f,-1.07737398147583f,-0.013666536659002304f,-0.4159398078918457f,-0.11609124392271042f,-0.9788495898246765f,0.0649058148264885f,-0.08596501499414444f}, +{0.1863725483417511f,0.07582804560661316f,0.03896167874336243f,-0.5841152667999268f,0.5126551985740662f,-0.024197066202759743f,0.04860696196556091f,0.17769548296928406f,-0.03374833986163139f,0.3378079831600189f,-0.3929237127304077f,0.19592127203941345f,0.43936654925346375f,0.09462994337081909f,-0.15384435653686523f,0.25945281982421875f}, }; -const float hout[16] = { 0.45773375034332275f,0.12986235320568085f,-0.12958075106143951f,-0.21291053295135498f,-0.14550718665122986f,0.14889225363731384f,0.050249096006155014f,0.09596521407365799f,-0.13369672000408173f,0.08056697994470596f,0.08866558969020844f,-0.15259654819965363f,0.05658946931362152f,0.19029897451400757f,0.16101594269275665f,-0.19369226694107056f }; +const float hout[16] = { 0.45773375034332275f,0.1165318712592125f,0.07097302377223969f,0.05380448326468468f,-0.2004425972700119f,0.1399393528699875f,-0.09999578446149826f,0.15066689252853394f,0.06000344827771187f,0.18214748799800873f,0.24302048981189728f,0.013172424398362637f,-0.19916334748268127f,0.10718239098787308f,0.25865495204925537f,-0.19829462468624115f }; -const float b1[16] = { 0.30674707889556885f,1.3229871988296509f,-1.7145336866378784f,0.2537260949611664f,1.5967637300491333f,1.6245051622390747f,-0.058932315558195114f,1.5004398822784424f,0.6193894743919373f,-0.8404539823532104f,0.5756582617759705f,3.545907735824585f,-0.36973118782043457f,-2.3032939434051514f,-1.087764859199524f,1.1168707609176636f }; +const float b1[16] = { 0.4491645097732544f,0.9208755493164062f,-1.7145336866378784f,0.31634828448295593f,1.3090225458145142f,0.29584822058677673f,-0.058932315558195114f,1.2392112016677856f,0.586719274520874f,-1.0047807693481445f,0.5695509910583496f,1.2591114044189453f,-0.38834723830223083f,-1.4351211786270142f,-1.087764859199524f,3.8004064559936523f }; -const float b2[16] = { 0.40804532170295715f,-1.116403341293335f,-1.4564176797866821f,-1.4208685159683228f,-0.6939148902893066f,0.159179225564003f,0.14267557859420776f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,0.8783766031265259f,0.2903093695640564f,-0.14494526386260986f,1.4648785591125488f,-0.7252910733222961f,0.5480677485466003f }; +const float b2[16] = { 0.3279315233230591f,-2.2450084686279297f,-1.4564176797866821f,1.2814544439315796f,-0.6939148902893066f,0.06713049858808517f,0.1416337788105011f,-0.30969977378845215f,-1.20063054561615f,-1.912178635597229f,-1.621219277381897f,0.43232816457748413f,-0.2173057645559311f,0.9712880849838257f,-0.5004745721817017f,0.3576800227165222f }; -const float b3[16] = { -1.963319182395935f,0.05484238639473915f,-0.11087591201066971f,-0.22759604454040527f,-1.4023056030273438f,0.5291256904602051f,-0.7528672814369202f,-0.8049214482307434f,0.34808605909347534f,0.410354882478714f,-0.301833838224411f,-0.10627538710832596f,-0.7780864834785461f,-0.1581760197877884f,0.2737984359264374f,0.3170960247516632f }; +const float b3[16] = { -1.963319182395935f,0.4309479296207428f,-0.12190741300582886f,-0.3140162527561188f,0.6727640628814697f,0.5497865676879883f,-0.5637004375457764f,-0.6562485098838806f,0.2397126406431198f,1.1901241540908813f,-0.29090970754623413f,-0.3208962678909302f,-2.2033352851867676f,-0.04992983490228653f,-0.40876078605651855f,-1.1118935346603394f }; -const float bout[1] = { -0.2603877782821655f }; +const float bout[1] = { -0.07665504515171051f }; float VALVE_POS_RAW_NN = 0.0f; @@ -1825,7 +1825,7 @@ } - if (flag_data_request[2] == LOW) { + if (flag_data_request[2] == HIGH) { //CAN_TX_PRES((int16_t) (pres_A.sen), (int16_t) (pres_B.sen)); // 1400 double t_value = 0; if(valve_pos.ref>=(float) VALVE_CENTER) {