blocks_mpython.min.dev.js 358 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535
  1. 'use strict';
  2. goog.provide('Blockly.Blocks.CocoRobo');
  3. goog.require('Blockly.Blocks');
  4. var musical_note = [["C3", "C3"], ["C#3", "C#3"], ["D3", "D3"], ["D#3", "D#3"], ["E3", "E3"], ["F3", "F3"], ["F#3", "F#3"], ["G3", "G3"], ["G#3", "G#3"], ["A3", "A3"], ["A#3", "A#3"], ["B3", "B3"], ["C4", "C4"], ["C#4", "C#4"], ["D4", "D4"], ["D#4", "D#4"], ["E4", "E4"], ["F4", "F4"], ["F#4", "F#4"], ["G4", "G4"], ["G#4", "G#4"], ["A4", "A4"], ["A#4", "A#4"], ["B4", "B4"], ["C5", "C5"], ["C#5", "C#5"], ["D5", "D5"], ["D#5", "D#5"], ["E5", "E5"], ["F5", "F5"], ["F#5", "F#5"], ["G5", "G5"], ["G#5", "G#5"], ["A5", "A5"], ["A#5", "A#5"], ["B5", "B5"]],
  5. music_tone_freq = [["C3", "131"], ["C#3", "139"], ["D3", "147"], ["D#3", "156"], ["E3", "165"], ["F3", "175"], ["F#3", "185"], ["G3", "196"], ["G#3", "208"], ["A3", "220"], ["A#3", "233"], ["B3", "247"], ["C4", "262"], ["C#4", "277"], ["D4", "294"], ["D#4", "311"], ["E4", "330"], ["F4", "349"], ["F#4", "370"], ["G4", "392"], ["G#4", "415"], ["A4", "440"], ["A#4", "466"], ["B4", "494"], ["C5", "523"], ["C#5", "554"], ["D5", "587"], ["D#5", "622"], ["E5", "659"], ["F5", "698"], ["F#5", "740"], ["G5", "784"], ["G#5", "831"], ["A5", "880"], ["A#5", "932"], ["B5", "988"]],
  6. music_tick = [["1/4", "1"], ["1/2", "2"], ["1", "4"], ["2", "8"]],
  7. usocket_color = 32,
  8. logic_color = 210,
  9. CocoRobo_bluebit_color = "#336699",
  10. list_color = Blockly.Blocks.lists.HUE,
  11. math_color = 230,
  12. event_color = 32,
  13. lcd_color = 96,
  14. buttonColor = 300,
  15. pinColor = 260,
  16. rgbColor = 0,
  17. buzzColor = 192,
  18. tuple_color = 192,
  19. dict_color = 32,
  20. accelerometerColor = 55,
  21. wifi_color = 160,
  22. iot_color = 64,
  23. iot_blynk_color = "#24c48e",
  24. iot_onenet_color = 64,
  25. iot_tinyweb_color = 160,
  26. set_color = 160,
  27. extend_color = 288,
  28. bluetooth_color = "#a101e5",
  29. purple_red = 328,
  30. wine_red = rgbColor,
  31. brown = event_color,
  32. green = lcd_color,
  33. light_blue = tuple_color,
  34. purple = pinColor,
  35. light_green = wifi_color,
  36. yellow_green = iot_onenet_color,
  37. bright_green = iot_blynk_color,
  38. bright_purple = extend_color,
  39. deep_blue = CocoRobo_bluebit_color,
  40. read_digital = [["P0", "0"], ["P1", "1"], ["P2", "2"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  41. read_analog = [["P0", "0"], ["P1", "1"], ["P2", "2"], ["P3(EXT)", "3"], ["P4(light)", "4"], ["P10(sound)", "10"]],
  42. read_analog_1 = [["P1", "1"], ["P0", "0"], ["P2", "2"], ["P3(EXT)", "3"], ["P4(light)", "4"], ["P10(sound)", "10"]],
  43. set_digital_state = [["LOW", "0"], ["HIGH", "1"]],
  44. set_digital = [["P0", "0"], ["P1", "1"], ["P5(button_A)", "5"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P11(button_B)", "11"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  45. set_digital_1 = [["P1", "1"], ["P0", "0"], ["P5(button_A)", "5"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  46. set_analog = [["P0", "0"], ["P1", "1"], ["P5(button_A)", "5"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P11(button_B)", "11"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  47. set_analog_1 = [["P1", "1"], ["P0", "0"], ["P5(button_A)", "5"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  48. all_pin = [["P0", "0"], ["P1", "1"], ["P2", "2"], ["P3(EXT)", "3"], ["P4(light)", "4"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P10", "10"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  49. buzz_tone = [["do", "262"], ["re", "294"], ["mi", "330"], ["fa", "349"], ["sol", "392"], ["la", "440"], ["si", "494"]],
  50. dh11_hum_tem_pin = [["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  51. text_color = 160,
  52. touchPad = [["P", "P"], ["Y", "Y"], ["T", "T"], ["H", "H"], ["O", "O"], ["N", "N"]],
  53. axis = [["X", "X"], ["Y", "Y"], ["Z", "Z"]],
  54. WiFi_config = [["IP", "0"], ["gateway", "3"]] //, ["netmask", "2"], ["DNS", "3"]
  55. ,
  56. WiFi_channel = [["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"], ["11", "11"], ["12", "12"], ["13", "13"]],
  57. button_AB = [["A", "button_a"], ["B", "button_b"]],
  58. uart_tx_pin = [["P16", "16"], ["P0", "0"], ["P1", "1"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  59. uart_rx_pin = [["P15", "15"], ["P0", "0"], ["P1", "1"], ["P2", "2"], ["P3(EXT)", "3"], ["P4(light)", "4"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P10", "10"], ["P13", "13"], ["P14", "14"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  60. i2c_pin = [["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]],
  61. output_pin = [["P0", "0"], ["P1", "1"], ["P6(buzzer)", "6"], ["P7(RGB)", "7"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19(SCL)", "19"], ["P20(SDA)", "20"]];
  62. Blockly.Blocks.i2c_pin = {
  63. init: function init() {
  64. this.jsonInit({
  65. inputsInline: !0,
  66. output: "Number",
  67. colour: CategoryColors.Pin,
  68. helpUrl: Blockly.Msg.I2C_PIN_HELPURL,
  69. tooltip: Blockly.Msg.I2C_PIN_TOOLTIP,
  70. message0: Blockly.Msg.I2C_PIN_MESSAGE0,
  71. args0: [{
  72. options: i2c_pin,
  73. type: "field_dropdown",
  74. name: "i2c_pin"
  75. }]
  76. });
  77. }
  78. };
  79. Blockly.Blocks.uart_rx_pin = {
  80. init: function init() {
  81. this.jsonInit({
  82. inputsInline: !0,
  83. output: "Number",
  84. colour: CategoryColors.Pin,
  85. helpUrl: Blockly.Msg.UART_RX_PIN_HELPURL,
  86. tooltip: Blockly.Msg.UART_RX_PIN_TOOLTIP,
  87. message0: Blockly.Msg.UART_RX_PIN_MESSAGE0,
  88. args0: [{
  89. options: uart_rx_pin,
  90. type: "field_dropdown",
  91. name: "uart_rx_pin"
  92. }]
  93. });
  94. }
  95. };
  96. Blockly.Blocks.uart_tx_pin = {
  97. init: function init() {
  98. this.jsonInit({
  99. inputsInline: !0,
  100. output: "Number",
  101. colour: CategoryColors.Pin,
  102. helpUrl: Blockly.Msg.UART_TX_PIN_HELPURL,
  103. tooltip: Blockly.Msg.UART_TX_PIN_TOOLTIP,
  104. message0: Blockly.Msg.UART_TX_PIN_MESSAGE0,
  105. args0: [{
  106. options: uart_tx_pin,
  107. type: "field_dropdown",
  108. name: "uart_tx_pin"
  109. }]
  110. });
  111. }
  112. };
  113. Blockly.Blocks.dh11_hum_tem_pin = {
  114. init: function init() {
  115. this.jsonInit({
  116. inputsInline: !0,
  117. output: "Number",
  118. colour: CategoryColors.Pin,
  119. helpUrl: Blockly.Msg.DH11_HUM_TEM_PIN_HELPURL,
  120. tooltip: Blockly.Msg.DH11_HUM_TEM_PIN_TOOLTIP,
  121. message0: Blockly.Msg.DH11_HUM_TEM_PIN_MESSAGE0,
  122. args0: [{
  123. options: dh11_hum_tem_pin,
  124. type: "field_dropdown",
  125. name: "dh11_hum_tem_pin"
  126. }]
  127. });
  128. }
  129. };
  130. Blockly.Blocks.pwm_pin = {
  131. init: function init() {
  132. this.jsonInit({
  133. inputsInline: !0,
  134. output: "Number",
  135. colour: CategoryColors.Pin,
  136. helpUrl: Blockly.Msg.PWM_PIN_HELPURL,
  137. tooltip: Blockly.Msg.PWM_PIN_TOOLTIP,
  138. message0: Blockly.Msg.PWM_PIN_MESSAGE0,
  139. args0: [{
  140. options: [[Blockly.Msg.CocoRobo_PWM_PIN_P7, "7"], ["P8", "8"], [Blockly.Msg.CocoRobo_PWM_PIN_P9, "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"]],
  141. type: "field_dropdown",
  142. name: "pwm_pin"
  143. }]
  144. });
  145. }
  146. };
  147. Blockly.Blocks.all_pin = {
  148. init: function init() {
  149. this.jsonInit({
  150. inputsInline: !0,
  151. output: "Number",
  152. colour: CategoryColors.Pin,
  153. helpUrl: Blockly.Msg.ALL_PIN_HELPURL,
  154. tooltip: Blockly.Msg.ALL_PIN_TOOLTIP,
  155. message0: Blockly.Msg.ALL_PIN_MESSAGE0,
  156. args0: [{
  157. options: all_pin,
  158. type: "field_dropdown",
  159. name: "all_pin"
  160. }]
  161. });
  162. }
  163. };
  164. Blockly.Blocks.set_digital = {
  165. init: function init() {
  166. this.jsonInit({
  167. inputsInline: !0,
  168. output: "Number",
  169. colour: CategoryColors.Pin,
  170. helpUrl: Blockly.Msg.SET_DIGITAL_HELPURL,
  171. tooltip: Blockly.Msg.SET_DIGITAL_TOOLTIP,
  172. message0: Blockly.Msg.SET_DIGITAL_MESSAGE0,
  173. args0: [{
  174. options: set_digital,
  175. type: "field_dropdown",
  176. name: "set_digital"
  177. }]
  178. });
  179. }
  180. };
  181. Blockly.Blocks.set_analog = {
  182. init: function init() {
  183. this.jsonInit({
  184. inputsInline: !0,
  185. output: "Number",
  186. colour: CategoryColors.Pin,
  187. helpUrl: Blockly.Msg.SET_ANALOG_HELPURL,
  188. tooltip: Blockly.Msg.SET_ANALOG_TOOLTIP,
  189. message0: Blockly.Msg.SET_ANALOG_MESSAGE0,
  190. args0: [{
  191. options: set_analog,
  192. type: "field_dropdown",
  193. name: "set_analog"
  194. }]
  195. });
  196. }
  197. };
  198. Blockly.Blocks.read_analog_pin = {
  199. init: function init() {
  200. this.jsonInit({
  201. inputsInline: !0,
  202. output: "Number",
  203. colour: CategoryColors.Pin,
  204. helpUrl: Blockly.Msg.READ_ANALOG_PIN_HELPURL,
  205. tooltip: Blockly.Msg.READ_ANALOG_PIN_TOOLTIP,
  206. message0: Blockly.Msg.READ_ANALOG_PIN_MESSAGE0,
  207. args0: [{
  208. options: read_analog,
  209. type: "field_dropdown",
  210. name: "read_analog_pin"
  211. }]
  212. });
  213. }
  214. };
  215. Blockly.Blocks.input_pin = {
  216. init: function init() {
  217. this.jsonInit({
  218. inputsInline: !0,
  219. output: "Number",
  220. colour: CategoryColors.Pin,
  221. helpUrl: Blockly.Msg.INPUT_PIN_HELPURL,
  222. tooltip: Blockly.Msg.INPUT_PIN_TOOLTIP,
  223. message0: Blockly.Msg.INPUT_PIN_MESSAGE0,
  224. args0: [{
  225. options: all_pin,
  226. type: "field_dropdown",
  227. name: "input_pin"
  228. }]
  229. });
  230. }
  231. };
  232. Blockly.Blocks.output_pin = {
  233. init: function init() {
  234. this.jsonInit({
  235. inputsInline: !0,
  236. output: "Number",
  237. colour: CategoryColors.Pin,
  238. helpUrl: Blockly.Msg.OUTPUT_PIN_HELPURL,
  239. tooltip: Blockly.Msg.OUTPUT_PIN_TOOLTIP,
  240. message0: Blockly.Msg.OUTPUT_PIN_MESSAGE0,
  241. args0: [{
  242. options: output_pin,
  243. type: "field_dropdown",
  244. name: "output_pin"
  245. }]
  246. });
  247. }
  248. };
  249. function getFirstProvince() {
  250. for (var a in CITYS_DATA) {
  251. return a;
  252. }
  253. return "";
  254. }
  255. function getCitysByProvince(a) {
  256. var b = [],
  257. c;
  258. for (c in CITYS_DATA[a]) {
  259. b.push([c, c]);
  260. }
  261. return b;
  262. }
  263. var PROVINCES = [],
  264. key;
  265. for (key in CITYS_DATA) {
  266. PROVINCES.push([key, key]);
  267. }
  268. var CITYS = getCitysByProvince(getFirstProvince());
  269. Blockly.Blocks.china_city = {
  270. init: function init() {
  271. this.jsonInit({
  272. inputsInline: !0,
  273. output: "String",
  274. colour: CategoryColors.Weather,
  275. helpUrl: "",
  276. tooltip: "",
  277. message0: Blockly.Msg.CHINA_CITY_MESSAGE0,
  278. args0: [{
  279. options: PROVINCES,
  280. type: "field_dropdown",
  281. name: "province"
  282. }, {
  283. options: CITYS,
  284. type: "field_dropdown",
  285. name: "city"
  286. }]
  287. });
  288. }
  289. };
  290. Blockly.Blocks.china_city_town = {
  291. init: function init() {
  292. this.jsonInit({
  293. inputsInline: !0,
  294. output: "String",
  295. colour: CategoryColors.Wifi,
  296. helpUrl: "",
  297. tooltip: "",
  298. message0: Blockly.Msg.CHINA_CITY_TOWN_MESSAGE0,
  299. args0: [{
  300. options: PROVINCES,
  301. type: "field_dropdown",
  302. name: "province"
  303. }, {
  304. options: CITYS,
  305. type: "field_dropdown",
  306. name: "city"
  307. }, {
  308. options: [["-", "-"]],
  309. type: "field_dropdown",
  310. name: "town"
  311. }, {
  312. options: [[Blockly.Msg.CHINA_CITY_PINYIN, "pinyin"], [Blockly.Msg.CHINA_CITY_CNNAME, "cnname"]],
  313. type: "field_dropdown",
  314. name: "type"
  315. }]
  316. });
  317. }
  318. };
  319. Blockly.Blocks.int_to_chr = {
  320. init: function init() {
  321. this.jsonInit({
  322. inputsInline: !0,
  323. output: "String",
  324. colour: CategoryColors.Math,
  325. helpUrl: Blockly.Msg.INT_TO_CHR_HELPURL,
  326. tooltip: Blockly.Msg.INT_TO_CHR_TOOLTIP,
  327. message0: Blockly.Msg.INT_TO_CHR_MESSAGE0,
  328. args0: [{
  329. check: "Number",
  330. type: "input_value",
  331. name: "_int"
  332. }]
  333. });
  334. }
  335. };
  336. Blockly.Blocks.CocoRobo_hcsr04_obj = {
  337. init: function init() {
  338. this.jsonInit({
  339. inputsInline: !0,
  340. nextStatement: null,
  341. previousStatement: null,
  342. colour: CategoryColors.General,
  343. helpUrl: Blockly.Msg.CocoRobo_HCSR04_OBJ_HELPURL,
  344. tooltip: Blockly.Msg.CocoRobo_HCSR04_OBJ_TOOLTIP,
  345. message0: Blockly.Msg.CocoRobo_HCSR04_OBJ_MESSAGE0,
  346. args0: [{
  347. text: "hcsr04",
  348. type: "field_input",
  349. name: "hcsr04_name"
  350. }, {
  351. check: "Number",
  352. type: "input_value",
  353. name: "trigger"
  354. }, {
  355. check: "Number",
  356. type: "input_value",
  357. name: "echo"
  358. }]
  359. });
  360. }
  361. };
  362. Blockly.Blocks.CocoRobo_hcsr04_distance = {
  363. init: function init() {
  364. this.jsonInit({
  365. inputsInline: !0,
  366. output: "Number",
  367. colour: CategoryColors.General,
  368. helpUrl: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_HELPURL,
  369. tooltip: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_TOOLTIP,
  370. message0: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_MESSAGE0,
  371. args0: [{
  372. text: "hcsr04",
  373. type: "field_input",
  374. name: "hcsr04_name"
  375. }, {
  376. options: [["mm", "mm"], ["cm", "cm"]],
  377. type: "field_dropdown",
  378. name: "unit"
  379. }]
  380. });
  381. }
  382. };
  383. Blockly.Blocks.CocoRobo_hcsr04_distance_mm = {
  384. init: function init() {
  385. this.jsonInit({
  386. inputsInline: !0,
  387. output: "Number",
  388. colour: CategoryColors.Pin,
  389. helpUrl: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_MM_HELPURL,
  390. tooltip: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_MM_TOOLTIP,
  391. message0: Blockly.Msg.CocoRobo_HCSR04_DISTANCE_MM_MESSAGE0,
  392. args0: [{
  393. text: "hcsr04",
  394. type: "field_input",
  395. name: "hcsr04_name"
  396. }]
  397. });
  398. }
  399. };
  400. Blockly.Blocks.CocoRobo_pm2_5_MIC = {
  401. init: function init() {
  402. this.jsonInit({
  403. inputsInline: !0,
  404. output: "Number",
  405. colour: CategoryColors.General,
  406. helpUrl: Blockly.Msg.CocoRobo_PM2_5_MIC_HELPURL,
  407. tooltip: Blockly.Msg.CocoRobo_PM2_5_MIC_TOOLTIP,
  408. message0: Blockly.Msg.CocoRobo_PM2_5_MIC_MESSAGE0,
  409. args0: [{
  410. check: "Number",
  411. type: "input_value",
  412. name: "rx"
  413. }, {
  414. options: [["PM1.0ug/m3", "_pm_data[0]"], ["PM2.5ug/m3", "_pm_data[1]"], ["PM10ug/m3", "_pm_data[2]"]],
  415. type: "field_dropdown",
  416. name: "unit"
  417. }]
  418. });
  419. }
  420. };
  421. Blockly.Blocks.CocoRobo_pm2_5_LitresAir = {
  422. init: function init() {
  423. this.jsonInit({
  424. inputsInline: !0,
  425. output: "Number",
  426. colour: CategoryColors.General,
  427. helpUrl: Blockly.Msg.CocoRobo_PM2_5_LitresAir_HELPURL,
  428. tooltip: Blockly.Msg.CocoRobo_PM2_5_LitresAir_TOOLTIP,
  429. message0: Blockly.Msg.CocoRobo_PM2_5_LitresAir_MESSAGE0,
  430. args0: [{
  431. check: "Number",
  432. type: "input_value",
  433. name: "rx"
  434. }, {
  435. options: [["0.3um", "_pm_data[3]"], ["0.5um", "_pm_data[4]"], ["1um", "_pm_data[5]"], ["2.5um", "_pm_data[6]"], ["5um", "_pm_data[7]"], ["10um", "_pm_data[8]"]],
  436. type: "field_dropdown",
  437. name: "unit"
  438. }]
  439. });
  440. }
  441. };
  442. Blockly.Blocks.CocoRobo_mac_address = {
  443. init: function init() {
  444. this.jsonInit({
  445. inputsInline: !0,
  446. output: "String",
  447. colour: "X" == SOFTWARE_KEY ? CategoryColors.System : CategoryColors.Wifi,
  448. helpUrl: Blockly.Msg.CocoRobo_MAC_ADDRESS_HELPURL,
  449. tooltip: Blockly.Msg.CocoRobo_MAC_ADDRESS_TOOLTIP,
  450. message0: Blockly.Msg.CocoRobo_MAC_ADDRESS_MESSAGE0
  451. });
  452. }
  453. };
  454. Blockly.Blocks.CocoRobo_ujson_loads = {
  455. init: function init() {
  456. this.jsonInit({
  457. inputsInline: !0,
  458. output: null,
  459. colour: CategoryColors.Text,
  460. helpUrl: Blockly.Msg.CocoRobo_UJSON_LOADS_HELPURL,
  461. tooltip: Blockly.Msg.CocoRobo_UJSON_LOADS_TOOLTIP,
  462. message0: Blockly.Msg.CocoRobo_UJSON_LOADS_MESSAGE0,
  463. args0: [{
  464. check: "String",
  465. type: "input_value",
  466. name: "data"
  467. }]
  468. });
  469. }
  470. };
  471. Blockly.Blocks.CocoRobo_ujson_dumps = {
  472. init: function init() {
  473. this.jsonInit({
  474. inputsInline: !0,
  475. output: "String",
  476. colour: CategoryColors.Text,
  477. helpUrl: Blockly.Msg.CocoRobo_UJSON_DUMPS_HELPURL,
  478. tooltip: Blockly.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP,
  479. message0: Blockly.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0,
  480. args0: [{
  481. type: "input_value",
  482. name: "data"
  483. }]
  484. });
  485. }
  486. };
  487. Blockly.Blocks.CocoRobo_base64_to_data = {
  488. init: function init() {
  489. this.jsonInit({
  490. inputsInline: !0,
  491. output: null,
  492. colour: CategoryColors.Math,
  493. helpUrl: Blockly.Msg.CocoRobo_BASE64_TO_DATA_HELPURL,
  494. tooltip: Blockly.Msg.CocoRobo_BASE64_TO_DATA_TOOLTIP,
  495. message0: Blockly.Msg.CocoRobo_BASE64_TO_DATA_MESSAGE0,
  496. args0: [{
  497. type: "input_value",
  498. name: "data"
  499. }]
  500. });
  501. }
  502. };
  503. Blockly.Blocks.CocoRobo_data_to_base64 = {
  504. init: function init() {
  505. this.jsonInit({
  506. inputsInline: !0,
  507. output: null,
  508. colour: CategoryColors.Math,
  509. helpUrl: Blockly.Msg.CocoRobo_DATA_TO_BASE64_HELPURL,
  510. tooltip: Blockly.Msg.CocoRobo_DATA_TO_BASE64_TOOLTIP,
  511. message0: Blockly.Msg.CocoRobo_DATA_TO_BASE64_MESSAGE0,
  512. args0: [{
  513. type: "input_value",
  514. name: "data"
  515. }]
  516. });
  517. }
  518. };
  519. Blockly.Blocks.CocoRobo_hex_to_bin_str = {
  520. init: function init() {
  521. this.jsonInit({
  522. inputsInline: !0,
  523. output: null,
  524. colour: CategoryColors.Math,
  525. helpUrl: Blockly.Msg.CocoRobo_HEX_TO_BIN_STR_HELPURL,
  526. tooltip: Blockly.Msg.CocoRobo_HEX_TO_BIN_STR_TOOLTIP,
  527. message0: Blockly.Msg.CocoRobo_HEX_TO_BIN_STR_MESSAGE0,
  528. args0: [{
  529. check: "String",
  530. type: "input_value",
  531. name: "convert_chr"
  532. }]
  533. });
  534. }
  535. };
  536. Blockly.Blocks.CocoRobo_str_to_hex = {
  537. init: function init() {
  538. this.jsonInit({
  539. inputsInline: !0,
  540. output: null,
  541. colour: CategoryColors.Math,
  542. helpUrl: Blockly.Msg.CocoRobo_STR_TO_HEX_HELPURL,
  543. tooltip: Blockly.Msg.CocoRobo_STR_TO_HEX_TOOLTIP,
  544. message0: Blockly.Msg.CocoRobo_STR_TO_HEX_MESSAGE0,
  545. args0: [{
  546. check: "String",
  547. type: "input_value",
  548. name: "convert_chr"
  549. }]
  550. });
  551. }
  552. };
  553. Blockly.Blocks.CocoRobo_chr_to_int = {
  554. init: function init() {
  555. this.jsonInit({
  556. inputsInline: !0,
  557. output: "String",
  558. colour: CategoryColors.Math,
  559. helpUrl: Blockly.Msg.CocoRobo_CHR_TO_INT_HELPURL,
  560. tooltip: Blockly.Msg.CocoRobo_CHR_TO_INT_TOOLTIP,
  561. message0: Blockly.Msg.CocoRobo_CHR_TO_INT_MESSAGE0,
  562. args0: [{
  563. check: "String",
  564. type: "input_value",
  565. name: "convert_chr"
  566. }]
  567. });
  568. }
  569. };
  570. Blockly.Blocks.CocoRobo_int_to_chr = {
  571. init: function init() {
  572. this.jsonInit({
  573. inputsInline: !0,
  574. output: "String",
  575. colour: CategoryColors.Math,
  576. helpUrl: Blockly.Msg.CocoRobo_INT_TO_CHR_HELPURL,
  577. tooltip: Blockly.Msg.CocoRobo_INT_TO_CHR_TOOLTIP,
  578. message0: Blockly.Msg.CocoRobo_INT_TO_CHR_MESSAGE0,
  579. args0: [{
  580. check: "Number",
  581. type: "input_value",
  582. name: "convert_num"
  583. }]
  584. });
  585. }
  586. };
  587. Blockly.Blocks.CocoRobo_ten_converted_to_bytes = {
  588. init: function init() {
  589. this.jsonInit({
  590. inputsInline: !0,
  591. output: null,
  592. colour: CategoryColors.Math,
  593. helpUrl: Blockly.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_HELPURL,
  594. // tooltip: Blockly.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP,
  595. message0: Blockly.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_MESSAGE0,
  596. args0: [{
  597. options: [["2", "'\x3cHH'"], ["4", "'\x3cLL'"]],
  598. type: "field_dropdown",
  599. name: "convert_choice"
  600. }, {
  601. check: "Number",
  602. type: "input_value",
  603. name: "convert_num"
  604. }]
  605. });
  606. var thisBlock = this;
  607. this.setTooltip(function () {
  608. var mode = thisBlock.getFieldValue('convert_choice');
  609. var TOOLTIPS = {
  610. "'\x3cHH'": Blockly.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP.replace('%1', "2"),
  611. "'\x3cLL'": Blockly.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP.replace('%1', "4")
  612. };
  613. return TOOLTIPS[mode];
  614. });
  615. }
  616. };
  617. Blockly.Blocks.CocoRobo_convert_to_ten = {
  618. init: function init() {
  619. this.jsonInit({
  620. inputsInline: !0,
  621. output: "Number",
  622. colour: CategoryColors.Math,
  623. helpUrl: Blockly.Msg.CocoRobo_CONVERT_TO_TEN_HELPURL,
  624. // tooltip: Blockly.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP,
  625. message0: Blockly.Msg.CocoRobo_CONVERT_TO_TEN_MESSAGE0,
  626. args0: [{
  627. options: [[Blockly.Msg.CocoRobo_BIN, "2"], [Blockly.Msg.CocoRobo_OCT, "8"], [Blockly.Msg.CocoRobo_HEX, "16"]],
  628. type: "field_dropdown",
  629. name: "convert_choice"
  630. }, {
  631. check: "String",
  632. type: "input_value",
  633. name: "convert_str"
  634. }]
  635. });
  636. var thisBlock = this;
  637. this.setTooltip(function () {
  638. var mode = thisBlock.getFieldValue('convert_choice');
  639. var TOOLTIPS = {
  640. '2': Blockly.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace('%2', "bin"),
  641. '8': Blockly.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace('%2', "oct"),
  642. '16': Blockly.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace('%2', "hex")
  643. };
  644. return TOOLTIPS[mode];
  645. });
  646. }
  647. };
  648. Blockly.Blocks.CocoRobo_ten_convert_to = {
  649. init: function init() {
  650. this.jsonInit({
  651. inputsInline: !0,
  652. output: "String",
  653. colour: CategoryColors.Math,
  654. helpUrl: Blockly.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL,
  655. // tooltip: Blockly.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP,
  656. message0: Blockly.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0,
  657. args0: [{
  658. check: "Number",
  659. type: "input_value",
  660. name: "int_num"
  661. }, {
  662. options: [[Blockly.Msg.CocoRobo_BIN, "bin"], [Blockly.Msg.CocoRobo_OCT, "oct"], [Blockly.Msg.CocoRobo_HEX, "hex"]],
  663. type: "field_dropdown",
  664. name: "ten_convert_to"
  665. }]
  666. });
  667. var thisBlock = this;
  668. this.setTooltip(function () {
  669. return Blockly.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP.replace('%2',
  670. thisBlock.getFieldValue('ten_convert_to'));
  671. });
  672. }
  673. };
  674. Blockly.Blocks.CocoRobo_high_low = {
  675. init: function init() {
  676. this.jsonInit({
  677. inputsInline: !0,
  678. output: "Number",
  679. colour: CategoryColors.Pin,
  680. helpUrl: Blockly.Msg.CocoRobo_HIGH_LOW_HELPURL,
  681. tooltip: Blockly.Msg.CocoRobo_HIGH_LOW_TOOLTIP,
  682. message0: Blockly.Msg.CocoRobo_HIGH_LOW_MESSAGE0,
  683. args0: [{
  684. options: [["HIGH", "1"], ["LOW", "0"]],
  685. type: "field_dropdown",
  686. name: "high_low"
  687. }]
  688. });
  689. }
  690. };
  691. Blockly.Blocks.CocoRobo_start_new_thread = {
  692. init: function init() {
  693. this.jsonInit({
  694. inputsInline: !0,
  695. nextStatement: null,
  696. previousStatement: null,
  697. colour: CategoryColors.Event,
  698. helpUrl: Blockly.Msg.CocoRobo_START_NEW_THREAD_HELPURL,
  699. tooltip: Blockly.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP,
  700. message0: Blockly.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0,
  701. args0: [{
  702. options: [["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]],
  703. type: "field_dropdown",
  704. name: "thread_name"
  705. }]
  706. });
  707. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  708. }
  709. };
  710. Blockly.Blocks.CocoRobo_lock_object_acquire_lock = {
  711. init: function init() {
  712. this.jsonInit({
  713. inputsInline: !0,
  714. nextStatement: null,
  715. previousStatement: null,
  716. colour: CategoryColors.Event,
  717. helpUrl: Blockly.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL,
  718. tooltip: Blockly.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP,
  719. message0: Blockly.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0,
  720. args0: [{
  721. type: "field_input",
  722. name: "thread_lock_object",
  723. text: "lock"
  724. }]
  725. });
  726. }
  727. };
  728. Blockly.Blocks.text_is_number = {
  729. init: function init() {
  730. this.jsonInit({
  731. inputsInline: !0,
  732. output: "Boolean",
  733. colour: CategoryColors.Text,
  734. helpUrl: Blockly.Msg.TEXT_IS_NUMBER_HELPURL,
  735. // tooltip: Blockly.Msg.TEXT_IS_NUMBER_TOOLTIP,
  736. message0: Blockly.Msg.TEXT_IS_NUMBER_MESSAGE0,
  737. args0: [{
  738. type: "input_value",
  739. name: "TEXT",
  740. check: "String"
  741. }, {
  742. options: [[Blockly.Msg.TEXT_IS_DIGIT, ".isdigit()"], [Blockly.Msg.TEXT_IS_ALPHA, ".isalpha()"]],
  743. type: "field_dropdown",
  744. name: "TYPE"
  745. }]
  746. });
  747. var thisBlock = this;
  748. this.setTooltip(function () {
  749. var mode = thisBlock.getFieldValue('TYPE');
  750. var TOOLTIPS = {
  751. '.isdigit()': Blockly.Msg.TEXT_IS_NUMBER_TOOLTIP.replace('%1', Blockly.Msg.TEXT_IS_DIGIT),
  752. '.isalpha()': Blockly.Msg.TEXT_IS_NUMBER_TOOLTIP.replace('%1', Blockly.Msg.TEXT_IS_ALPHA)
  753. };
  754. return TOOLTIPS[mode];
  755. });
  756. }
  757. };
  758. Blockly.Blocks.CocoRobo_bytes_decode = {
  759. init: function init() {
  760. this.jsonInit({
  761. inputsInline: !0,
  762. output: "String",
  763. colour: CategoryColors.Text,
  764. helpUrl: Blockly.Msg.CocoRobo_BYTES_DECODE_HELPURL,
  765. tooltip: Blockly.Msg.CocoRobo_BYTES_DECODE_TOOLTIP,
  766. message0: Blockly.Msg.CocoRobo_BYTES_DECODE_MESSAGE0,
  767. args0: [{
  768. type: "input_value",
  769. name: "bytes_decode"
  770. }]
  771. });
  772. }
  773. };
  774. Blockly.Blocks.text_format = {
  775. init: function init() {
  776. this.jsonInit({
  777. inputsInline: !1,
  778. output: "String",
  779. colour: "#33cc99"
  780. /* CategoryColors.Text*/
  781. ,
  782. helpUrl: Blockly.Msg.TEXT_FORMAT_HELPURL,
  783. tooltip: Blockly.Msg.TEXT_FORMAT_TOOLTIP,
  784. message0: Blockly.Msg.TEXT_FORMAT_MESSAGE0,
  785. args0: [{
  786. type: "input_value",
  787. name: "FORMAT",
  788. check: "String"
  789. }, {
  790. type: "input_value",
  791. name: "CONTENT"
  792. }]
  793. });
  794. }
  795. };
  796. Blockly.Blocks.text_format2 = {
  797. init: function init() {
  798. this.jsonInit({
  799. inputsInline: !1,
  800. output: "String",
  801. colour: CategoryColors.Text,
  802. helpUrl: Blockly.Msg.TEXT_FORMAT2_HELPURL,
  803. tooltip: Blockly.Msg.TEXT_FORMAT2_TOOLTIP,
  804. message0: Blockly.Msg.TEXT_FORMAT2_MESSAGE0,
  805. args0: [{
  806. type: "input_value",
  807. name: "FORMAT",
  808. check: "String"
  809. }, {
  810. type: "input_value",
  811. name: "CONTENT"
  812. }]
  813. });
  814. }
  815. };
  816. Blockly.Blocks.text_to_byte = {
  817. init: function init() {
  818. this.jsonInit({
  819. inputsInline: !0,
  820. output: null,
  821. colour: "#33cc99"
  822. /*CategoryColors.Text*/
  823. ,
  824. helpUrl: Blockly.Msg.TEXT_TO_BYTE_HELPURL,
  825. tooltip: Blockly.Msg.TEXT_TO_BYTE_TOOLTIP,
  826. message0: Blockly.Msg.TEXT_TO_BYTE_MESSAGE0,
  827. args0: [{
  828. type: "input_value",
  829. name: "TEXT",
  830. check: "String"
  831. }]
  832. });
  833. }
  834. };
  835. Blockly.Blocks.other_to_byte = {
  836. init: function init() {
  837. this.jsonInit({
  838. inputsInline: !0,
  839. output: null,
  840. colour: CategoryColors.Text,
  841. helpUrl: Blockly.Msg.OTHER_TO_BYTE_HELPURL,
  842. tooltip: Blockly.Msg.OTHER_TO_BYTE_TOOLTIP,
  843. message0: Blockly.Msg.OTHER_TO_BYTE_MESSAGE0,
  844. args0: [{
  845. type: "input_value",
  846. name: "input_var"
  847. }]
  848. });
  849. }
  850. };
  851. Blockly.Blocks.bit_inversion = {
  852. init: function init() {
  853. this.jsonInit({
  854. inputsInline: !0,
  855. output: "Number",
  856. colour: CategoryColors.Math,
  857. helpUrl: Blockly.Msg.BIT_INVERSION_HELPURL,
  858. tooltip: Blockly.Msg.BIT_INVERSION_TOOLTIP,
  859. message0: Blockly.Msg.BIT_INVERSION_MESSAGE0,
  860. args0: [{
  861. type: "input_value",
  862. name: "data"
  863. }]
  864. });
  865. }
  866. };
  867. Blockly.Blocks.CocoRobo_try_except = {
  868. init: function init() {
  869. this.jsonInit({
  870. message0: "",
  871. previousStatement: null,
  872. nextStatement: null,
  873. colour: CategoryColors.Logic,
  874. tooltip: "",
  875. helpUrl: ""
  876. });
  877. this.appendStatementInput("TRY").appendField("try");
  878. this.appendStatementInput("EXCEPT").appendField("except");
  879. }
  880. };
  881. Blockly.Blocks.CocoRobo_try_except_finally = {
  882. init: function init() {
  883. this.jsonInit({
  884. message0: "",
  885. previousStatement: null,
  886. nextStatement: null,
  887. colour: CategoryColors.Logic,
  888. tooltip: "",
  889. helpUrl: ""
  890. }); // this.appendStatementInput("TRY").appendField(Blockly.Msg.TRY_EXCEPT_TRY);
  891. // this.appendStatementInput("EXCEPT").appendField(Blockly.Msg.TRY_EXCEPT_EXCEPT);
  892. // this.appendStatementInput("FINALLY").appendField(Blockly.Msg.TRY_EXCEPT_FINALLY)
  893. this.appendStatementInput("TRY").appendField("try");
  894. this.appendStatementInput("EXCEPT").appendField("except");
  895. this.appendStatementInput("FINALLY").appendField("finally");
  896. }
  897. };
  898. Blockly.Blocks.text_append_text = {
  899. init: function init() {
  900. this.jsonInit({
  901. colour: CategoryColors.Text,
  902. args0: [{
  903. type: "input_value",
  904. name: "text_abc"
  905. }, {
  906. type: "input_value",
  907. name: "append_text"
  908. }],
  909. output: "String",
  910. inputsInline: !0,
  911. helpUrl: Blockly.Msg.TEXT_APPEND_TEXT_HELPURL,
  912. tooltip: Blockly.Msg.TEXT_APPEND_TEXT_TOOLTIP,
  913. message0: Blockly.Msg.TEXT_APPEND_TEXT_MESSAGE0
  914. });
  915. }
  916. };
  917. Blockly.Blocks.CocoRobo_custom_code = {
  918. init: function init() {
  919. this.jsonInit({
  920. inputsInline: !1,
  921. nextStatement: null,
  922. previousStatement: null,
  923. colour: CategoryColors.Text,
  924. helpUrl: Blockly.Msg.CocoRobo_CUSTOM_CODE_HELPURL,
  925. tooltip: Blockly.Msg.CocoRobo_CUSTOM_CODE_TOOLTIP,
  926. message0: Blockly.Msg.CocoRobo_CUSTOM_CODE_MESSAGE0,
  927. args0: [{
  928. name: "custom_type",
  929. options: [[Blockly.Msg.CocoRobo_CUSTOM_TYPE_NORMAL, "normal"], [Blockly.Msg.CocoRobo_CUSTOM_TYPE_IMPORT, "topping"]],
  930. type: "field_dropdown"
  931. }, {
  932. type: "input_dummy"
  933. }, {
  934. type: "field_textarea",
  935. name: "custom_code",
  936. text: "custom code"
  937. }]
  938. });
  939. }
  940. };
  941. Blockly.Blocks.CocoRobo_machine_reset = {
  942. init: function init() {
  943. this.jsonInit({
  944. inputsInline: !0,
  945. nextStatement: null,
  946. previousStatement: null,
  947. colour: CategoryColors.System,
  948. helpUrl: Blockly.Msg.CocoRobo_MACHINE_RESET_HELPURL,
  949. tooltip: Blockly.Msg.CocoRobo_MACHINE_RESET_TOOLTIP,
  950. message0: Blockly.Msg.CocoRobo_MACHINE_RESET_MESSAGE0
  951. });
  952. }
  953. };
  954. Blockly.Blocks.math_random_randrange = {
  955. init: function init() {
  956. this.jsonInit({
  957. inputsInline: !0,
  958. output: "Number",
  959. colour: CategoryColors.Math,
  960. helpUrl: Blockly.Msg.MATH_RANDOM_RANDRANGE_HELPURL,
  961. tooltip: Blockly.Msg.MATH_RANDOM_RANDRANGE_TOOLTIP,
  962. message0: Blockly.Msg.MATH_RANDOM_RANDRANGE_MESSAGE0,
  963. args0: [{
  964. check: "Number",
  965. type: "input_value",
  966. name: "start"
  967. }, {
  968. check: "Number",
  969. type: "input_value",
  970. name: "stop"
  971. }, {
  972. check: "Number",
  973. type: "input_value",
  974. name: "step"
  975. }]
  976. });
  977. }
  978. };
  979. Blockly.Blocks.math_angle = {
  980. init: function init() {
  981. this.jsonInit({
  982. inputsInline: !0,
  983. output: "Number",
  984. colour: CategoryColors.Math,
  985. helpUrl: "",
  986. tooltip: "",
  987. message0: "%1",
  988. args0: [{
  989. name: "angle",
  990. type: "field_angle"
  991. }]
  992. });
  993. }
  994. };
  995. Blockly.Blocks.math_keep_decimal = {
  996. init: function init() {
  997. this.jsonInit({
  998. inputsInline: !0,
  999. output: "Number",
  1000. colour: CategoryColors.Math,
  1001. helpUrl: Blockly.Msg.MATH_KEEP_DECIMAL_HELPURL,
  1002. tooltip: Blockly.Msg.MATH_KEEP_DECIMAL_TOOLTIP,
  1003. message0: Blockly.Msg.MATH_KEEP_DECIMAL_MESSAGE0,
  1004. args0: [{
  1005. check: "Number",
  1006. type: "input_value",
  1007. name: "NUM"
  1008. }, {
  1009. check: "Number",
  1010. type: "input_value",
  1011. name: "PLACE"
  1012. }]
  1013. });
  1014. }
  1015. };
  1016. Blockly.Blocks.labplus_mapping = {
  1017. init: function init() {
  1018. this.jsonInit({
  1019. inputsInline: !0,
  1020. colour: CategoryColors.Math,
  1021. args0: [{
  1022. name: "inputNum",
  1023. type: "input_value",
  1024. check: "Number"
  1025. }, {
  1026. name: "bMin",
  1027. type: "input_value",
  1028. check: "Number"
  1029. }, {
  1030. name: "bMax",
  1031. type: "input_value",
  1032. check: "Number"
  1033. }, {
  1034. name: "cMin",
  1035. type: "input_value",
  1036. check: "Number"
  1037. }, {
  1038. name: "cMax",
  1039. type: "input_value",
  1040. check: "Number"
  1041. }],
  1042. output: "Number",
  1043. message0: Blockly.Msg.labplus_mapping_MESSAGE0,
  1044. tooltip: Blockly.Msg.labplus_mapping_TOOLTIP,
  1045. helpUrl: Blockly.Msg.labplus_mapping_HELPURL
  1046. });
  1047. }
  1048. };
  1049. Blockly.Blocks.CocoRobo_Timer = {
  1050. init: function init() {
  1051. this.jsonInit({
  1052. message0: Blockly.Msg.CocoRobo_Timer_MESSAGE0,
  1053. nextStatement: null,
  1054. previousStatement: null,
  1055. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1056. helpUrl: Blockly.Msg.CocoRobo_Timer_HELPURL,
  1057. tooltip: Blockly.Msg.CocoRobo_Timer_TOOLTIP,
  1058. args0: [{
  1059. check: "Number",
  1060. type: "input_value",
  1061. name: "Num"
  1062. }, {
  1063. options: [[Blockly.Msg.CocoRobo_PERIODIC, "PERIODIC"], [Blockly.Msg.CocoRobo_ONE_SHOT, "ONE_SHOT"]],
  1064. type: "field_dropdown",
  1065. name: "Timer_mode"
  1066. }, {
  1067. check: "Number",
  1068. type: "input_value",
  1069. name: "period"
  1070. }]
  1071. });
  1072. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1073. }
  1074. };
  1075. Blockly.Blocks.CocoRobo_timer_option = {
  1076. init: function init() {
  1077. this.jsonInit({
  1078. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1079. output: "Number",
  1080. helpUrl: "",
  1081. tooltip: "",
  1082. message0: "%1",
  1083. args0: [{
  1084. options: [["1", "1"], ["2", "2"], ["4", "4"], ["7", "7"], ["8", "8"], ["9", "9"], ["10", "10"]],
  1085. type: "field_dropdown",
  1086. name: "Timer_num"
  1087. }]
  1088. });
  1089. }
  1090. };
  1091. Blockly.Blocks.CocoRobo_event_option = {
  1092. init: function init() {
  1093. this.jsonInit({
  1094. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1095. output: "Number",
  1096. helpUrl: "",
  1097. tooltip: "",
  1098. message0: "%1",
  1099. args0: [{
  1100. options: [["10", "10"], ["9", "9"], ["8", "8"], ["7", "7"], ["4", "4"], ["2", "2"], ["1", "1"]],
  1101. type: "field_dropdown",
  1102. name: "Timer_num"
  1103. }]
  1104. });
  1105. }
  1106. };
  1107. Blockly.Blocks.CocoRobo_Timer_value = {
  1108. init: function init() {
  1109. this.jsonInit({
  1110. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1111. output: "Number",
  1112. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1113. tooltip: Blockly.Msg.CocoRobo_Timer_value_TOOLTIP,
  1114. message0: Blockly.Msg.CocoRobo_Timer_value_MESSAGE0,
  1115. args0: [{
  1116. check: "Number",
  1117. type: "input_value",
  1118. name: "Timer_num"
  1119. }]
  1120. });
  1121. }
  1122. };
  1123. Blockly.Blocks.CocoRobo_Timer_deinit = {
  1124. init: function init() {
  1125. this.jsonInit({
  1126. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1127. inputsInline: !0,
  1128. nextStatement: null,
  1129. previousStatement: null,
  1130. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1131. tooltip: Blockly.Msg.CocoRobo_Timer_deinit_TOOLTIP,
  1132. message0: Blockly.Msg.CocoRobo_Timer_deinit_MESSAGE0,
  1133. args0: [{
  1134. check: "Number",
  1135. type: "input_value",
  1136. name: "Timer_num"
  1137. }]
  1138. });
  1139. }
  1140. };
  1141. Blockly.Blocks.CocoRobo_Interrupt_pin = {
  1142. init: function init() {
  1143. this.jsonInit({
  1144. message0: Blockly.Msg.CocoRobo_Interrupt_pin_MESSAGE0,
  1145. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.System,
  1146. helpUrl: Blockly.Msg.CocoRobo_Interrupt_pin_HELPURL,
  1147. tooltip: Blockly.Msg.CocoRobo_Interrupt_pin_TOOLTIP,
  1148. args0: [{
  1149. check: "Number",
  1150. type: "input_value",
  1151. name: "Interrupt_pin"
  1152. }, {
  1153. options: [[Blockly.Msg.CocoRobo_Interrupt_pin_IRQ_RISING, "to_high"], [Blockly.Msg.CocoRobo_Interrupt_pin_IRQ_FALLING, "to_low"]],
  1154. type: "field_dropdown",
  1155. name: "action"
  1156. }]
  1157. });
  1158. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1159. }
  1160. };
  1161. Blockly.Blocks.CocoRobo_Interrupt_AB = {
  1162. init: function init() {
  1163. this.jsonInit({
  1164. inputsInline: !0,
  1165. message0: Blockly.Msg.CocoRobo_Interrupt_AB_MESSAGE0,
  1166. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.System,
  1167. helpUrl: Blockly.Msg.CocoRobo_Interrupt_AB_HELPURL,
  1168. tooltip: Blockly.Msg.CocoRobo_Interrupt_AB_TOOLTIP,
  1169. args0: [{
  1170. options: button_AB,
  1171. type: "field_dropdown",
  1172. name: "button"
  1173. }, {
  1174. options: [[Blockly.Msg.CocoRobo_IRQ_FALLING, "down"], [Blockly.Msg.CocoRobo_IRQ_RISING, "up"]],
  1175. type: "field_dropdown",
  1176. name: "action"
  1177. }]
  1178. });
  1179. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1180. }
  1181. };
  1182. Blockly.Blocks.CocoRobo_is_shaked = {
  1183. init: function init() {
  1184. this.jsonInit({
  1185. colour: "#e8795b",
  1186. output: "Boolean",
  1187. helpUrl: Blockly.Msg.CocoRobo_IS_SHAKED_HELPURL,
  1188. tooltip: Blockly.Msg.CocoRobo_IS_SHAKED_TOOLTIP,
  1189. message0: Blockly.Msg.CocoRobo_IS_SHAKED_MESSAGE0,
  1190. args0: [{
  1191. options: [[Blockly.Msg.CocoRobo_IS_SHAKED, "shaked"], [Blockly.Msg.CocoRobo_IS_THROWN, "thrown"]],
  1192. type: "field_dropdown",
  1193. name: "action"
  1194. }]
  1195. });
  1196. }
  1197. };
  1198. Blockly.Blocks.CocoRobo_shake_detector = {
  1199. init: function init() {
  1200. this.jsonInit({
  1201. inputsInline: !0,
  1202. message0: Blockly.Msg.CocoRobo_SHAKE_DETECTOR_MESSAGE0,
  1203. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.System,
  1204. helpUrl: Blockly.Msg.CocoRobo_SHAKE_DETECTOR_HELPURL,
  1205. tooltip: Blockly.Msg.CocoRobo_SHAKE_DETECTOR_TOOLTIP,
  1206. args0: [{
  1207. options: [[Blockly.Msg.CocoRobo_IS_SHAKED, "shaked"], [Blockly.Msg.CocoRobo_IS_THROWN, "thrown"]],
  1208. type: "field_dropdown",
  1209. name: "action"
  1210. }]
  1211. });
  1212. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1213. }
  1214. };
  1215. Blockly.Blocks.CocoRobo_is_tilted = {
  1216. init: function init() {
  1217. this.jsonInit({
  1218. colour: "#e8795b",
  1219. output: "Boolean",
  1220. helpUrl: Blockly.Msg.CocoRobo_IS_TILTED_HELPURL,
  1221. tooltip: Blockly.Msg.CocoRobo_IS_TILTED_TOOLTIP,
  1222. message0: Blockly.Msg.CocoRobo_IS_TILTED_MESSAGE0,
  1223. args0: [{
  1224. options: [[Blockly.Msg.CocoRobo_DIRECTION_FORWARD, "forward"], [Blockly.Msg.CocoRobo_DIRECTION_BACK, "back"], [Blockly.Msg.CocoRobo_DIRECTION_LEFT, "left"], [Blockly.Msg.CocoRobo_DIRECTION_RIGHT, "right"]],
  1225. type: "field_dropdown",
  1226. name: "direction"
  1227. }]
  1228. });
  1229. }
  1230. };
  1231. Blockly.Blocks.CocoRobo_tilt_detector = {
  1232. init: function init() {
  1233. this.jsonInit({
  1234. inputsInline: !0,
  1235. message0: Blockly.Msg.CocoRobo_TILT_DETECTOR_MESSAGE0,
  1236. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.System,
  1237. helpUrl: Blockly.Msg.CocoRobo_TILT_DETECTOR_HELPURL,
  1238. tooltip: Blockly.Msg.CocoRobo_TILT_DETECTOR_TOOLTIP,
  1239. args0: [{
  1240. options: [[Blockly.Msg.CocoRobo_DIRECTION_FORWARD, "forward"], [Blockly.Msg.CocoRobo_DIRECTION_BACK, "back"], [Blockly.Msg.CocoRobo_DIRECTION_LEFT, "left"], [Blockly.Msg.CocoRobo_DIRECTION_RIGHT, "right"], [Blockly.Msg.CocoRobo_DIRECTION_NONE, "none"]],
  1241. type: "field_dropdown",
  1242. name: "direction"
  1243. }]
  1244. });
  1245. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1246. }
  1247. };
  1248. Blockly.Blocks.CocoRobo_touch_event = {
  1249. init: function init() {
  1250. this.jsonInit({
  1251. inputsInline: !0,
  1252. message0: Blockly.Msg.CocoRobo_TOUCH_EVENT_MESSAGE0,
  1253. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.System,
  1254. helpUrl: Blockly.Msg.CocoRobo_TOUCH_EVENT_HELPURL,
  1255. tooltip: Blockly.Msg.CocoRobo_TOUCH_EVENT_TOOLTIP,
  1256. args0: [{
  1257. options: touchPad,
  1258. type: "field_dropdown",
  1259. name: "touchPad"
  1260. }, {
  1261. options: [[Blockly.Msg.CocoRobo_TOUCH_EVENT_PRESSED, "pressed"], [Blockly.Msg.CocoRobo_TOUCH_EVENT_UNPRESSED, "unpressed"]],
  1262. type: "field_dropdown",
  1263. name: "action"
  1264. }]
  1265. });
  1266. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1267. }
  1268. };
  1269. Blockly.Blocks.CocoRobo_custom_event = {
  1270. init: function init() {
  1271. this.jsonInit({
  1272. message0: Blockly.Msg.CocoRobo_CUSTOM_EVENT_MESSAGE0,
  1273. nextStatement: null,
  1274. previousStatement: null,
  1275. colour: "X" == SOFTWARE_KEY ? CategoryColors.Event : CategoryColors.Loop,
  1276. inputsInline: !0,
  1277. helpUrl: Blockly.Msg.CocoRobo_CUSTOM_EVENT_HELPURL,
  1278. tooltip: Blockly.Msg.CocoRobo_CUSTOM_EVENT_TOOLTIP,
  1279. args0: [{
  1280. check: "Number",
  1281. type: "input_value",
  1282. name: "index"
  1283. }, {
  1284. check: "Boolean",
  1285. type: "input_value",
  1286. name: "condition"
  1287. }]
  1288. });
  1289. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  1290. }
  1291. };
  1292. Blockly.Blocks.CocoRobo_time_ticks = {
  1293. init: function init() {
  1294. this.jsonInit({
  1295. colour: CategoryColors.System,
  1296. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1297. tooltip: Blockly.Msg.CocoRobo_time_ticks_TOOLTIP,
  1298. message0: Blockly.Msg.CocoRobo_time_ticks_MESSAGE0,
  1299. output: "Number",
  1300. args0: [{
  1301. options: [[Blockly.Msg.CocoRobo_s, "time"], [Blockly.Msg.CocoRobo_ms, "ticks_ms"], [Blockly.Msg.CocoRobo_us, "ticks_us"]],
  1302. type: "field_dropdown",
  1303. name: "time_ticks"
  1304. }]
  1305. });
  1306. }
  1307. };
  1308. Blockly.Blocks.CocoRobo_time_localtime = {
  1309. init: function init() {
  1310. this.jsonInit({
  1311. colour: CategoryColors.System,
  1312. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1313. tooltip: Blockly.Msg.CocoRobo_time_localtime_TOOLTIP,
  1314. message0: Blockly.Msg.CocoRobo_time_localtime_MESSAGE0,
  1315. output: "Number",
  1316. args0: [{
  1317. options: [[Blockly.Msg.CocoRobo_year, "0"], [Blockly.Msg.CocoRobo_month, "1"], [Blockly.Msg.CocoRobo_date, "2"], [Blockly.Msg.CocoRobo_hour, "3"], [Blockly.Msg.CocoRobo_minute, "4"], [Blockly.Msg.CocoRobo_s, "5"], [Blockly.Msg.CocoRobo_week, "6"], [Blockly.Msg.CocoRobo_days, "7"]],
  1318. type: "field_dropdown",
  1319. name: "time_localtime"
  1320. }]
  1321. });
  1322. }
  1323. };
  1324. Blockly.Blocks.CocoRobo_sway_xyz = {
  1325. init: function init() {
  1326. this.jsonInit({
  1327. colour: CategoryColors.System,
  1328. args0: [{
  1329. name: "direction_group",
  1330. options: [[Blockly.Msg.CocoRobo_left_right, "left_right"], [Blockly.Msg.CocoRobo_front_back, "front_back"]],
  1331. type: "field_dropdown"
  1332. }],
  1333. output: "Boolean",
  1334. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1335. tooltip: Blockly.Msg.CocoRobo_sway_xyz_TOOLTIP,
  1336. message0: Blockly.Msg.CocoRobo_sway_xyz_MESSAGE0
  1337. });
  1338. }
  1339. };
  1340. Blockly.Blocks.CocoRobo_servo_angle0 = {
  1341. init: function init() {
  1342. this.jsonInit({
  1343. colour: CategoryColors.Pin,
  1344. args0: [{
  1345. name: "pwm_pin",
  1346. check: "Number",
  1347. type: "input_value"
  1348. }, {
  1349. name: "servo_angle",
  1350. type: "input_value",
  1351. check: "Number"
  1352. }],
  1353. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1354. tooltip: Blockly.Msg.CocoRobo_servo_angle0_TOOLTIP,
  1355. message0: Blockly.Msg.CocoRobo_servo_angle0_MESSAGE0,
  1356. inputsInline: !0,
  1357. nextStatement: null,
  1358. previousStatement: null
  1359. });
  1360. }
  1361. };
  1362. Blockly.Blocks.CocoRobo_servo_angle = {
  1363. init: function init() {
  1364. this.jsonInit({
  1365. colour: CategoryColors.Pin,
  1366. args0: [{
  1367. name: "pwm_pin",
  1368. check: "Number",
  1369. type: "input_value"
  1370. }, {
  1371. name: "servo_angle",
  1372. type: "input_value",
  1373. check: "Number"
  1374. }, {
  1375. name: "min_us",
  1376. type: "input_value",
  1377. check: "Number"
  1378. }, {
  1379. name: "max_us",
  1380. type: "input_value",
  1381. check: "Number"
  1382. }, {
  1383. name: "actuation_range",
  1384. type: "input_value",
  1385. check: "Number"
  1386. }],
  1387. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1388. tooltip: Blockly.Msg.CocoRobo_servo_angle_TOOLTIP,
  1389. message0: Blockly.Msg.CocoRobo_servo_angle_MESSAGE0,
  1390. inputsInline: !0,
  1391. nextStatement: null,
  1392. previousStatement: null
  1393. });
  1394. }
  1395. };
  1396. Blockly.Blocks.CocoRobo_dh11_hum_tem = {
  1397. init: function init() {
  1398. this.jsonInit({
  1399. colour: CategoryColors.General,
  1400. args0: [{
  1401. name: "dh11_hum_tem_pin",
  1402. check: "Number",
  1403. type: "input_value"
  1404. }, {
  1405. name: "hum_tem",
  1406. options: [[Blockly.Msg.CocoRobo_tem, "temperature"], [Blockly.Msg.CocoRobo_hum, "humidity"]],
  1407. type: "field_dropdown"
  1408. }],
  1409. output: "Number",
  1410. helpUrl: Blockly.Msg.CocoRobo_dh11_hum_tem_HELPURL,
  1411. tooltip: Blockly.Msg.CocoRobo_dh11_hum_tem_TOOLTIP,
  1412. message0: Blockly.Msg.CocoRobo_dh11_hum_tem_MESSAGE0
  1413. });
  1414. }
  1415. };
  1416. Blockly.Blocks.CocoRobo_dh22_hum_tem = {
  1417. init: function init() {
  1418. this.jsonInit({
  1419. colour: CategoryColors.General,
  1420. args0: [{
  1421. name: "dh22_hum_tem_pin",
  1422. check: "Number",
  1423. type: "input_value"
  1424. }, {
  1425. name: "hum_tem",
  1426. options: [[Blockly.Msg.CocoRobo_tem, "temperature"], [Blockly.Msg.CocoRobo_hum, "humidity"]],
  1427. type: "field_dropdown"
  1428. }],
  1429. output: "Number",
  1430. helpUrl: Blockly.Msg.CocoRobo_DH22_HUM_TEM_HELPURL,
  1431. tooltip: Blockly.Msg.CocoRobo_DH22_HUM_TEM_TOOLTIP,
  1432. message0: Blockly.Msg.CocoRobo_DH22_HUM_TEM_MESSAGE0
  1433. });
  1434. }
  1435. };
  1436. Blockly.Blocks.CocoRobo_sleep_ms = {
  1437. init: function init() {
  1438. this.jsonInit({
  1439. inputsInline: !0,
  1440. nextStatement: null,
  1441. previousStatement: null,
  1442. colour: CategoryColors.Loop,
  1443. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1444. tooltip: Blockly.Msg.MICROBIT_MICROBIT_SLEEP_TOOLTIP,
  1445. message0: Blockly.Msg.MICROBIT_MICROBIT_SLEEP_MESSAGE0,
  1446. args0: [{
  1447. check: "Number",
  1448. type: "input_value",
  1449. name: "duration"
  1450. }, {
  1451. name: "ms_us",
  1452. options: [[Blockly.Msg.CocoRobo_s, "s"], [Blockly.Msg.CocoRobo_MS, "ms"], [Blockly.Msg.CocoRobo_US, "us"]],
  1453. type: "field_dropdown"
  1454. }]
  1455. });
  1456. }
  1457. };
  1458. Blockly.Blocks.CocoRobo_type = {
  1459. init: function init() {
  1460. this.jsonInit({
  1461. message0: Blockly.Msg.CocoRobo_TYPE_MESSAGE0,
  1462. args0: [{
  1463. type: "input_value",
  1464. name: "VAR"
  1465. }],
  1466. output: null,
  1467. colour: CategoryColors.Logic,
  1468. tooltip: Blockly.Msg.CocoRobo_TYPE_TOOLTIP,
  1469. helpUrl: Blockly.Msg.CocoRobo_TYPE_HELPURL
  1470. });
  1471. }
  1472. };
  1473. Blockly.Blocks.CocoRobo_type_is = {
  1474. init: function init() {
  1475. this.jsonInit({
  1476. message0: Blockly.Msg.CocoRobo_TYPE_IS_MESSAGE0,
  1477. args0: [{
  1478. type: "input_value",
  1479. name: "VAR"
  1480. }, {
  1481. name: "TYPE",
  1482. options: [["int", "int"], ["float", "float"], ["bool", "bool"], ["str", "str"], ["list", "list"], ["tuple", "tuple"], ["set", "set"], ["dict", "dict"], ["bytes", "bytes"], ["bytearray", "bytearray"], ["complex", "complex"]],
  1483. type: "field_dropdown"
  1484. }],
  1485. output: "Boolean",
  1486. colour: CategoryColors.Logic,
  1487. // tooltip: Blockly.Msg.CocoRobo_TYPE_IS_TOOLTIP,
  1488. helpUrl: Blockly.Msg.CocoRobo_TYPE_IS_HELPURL
  1489. });
  1490. var thisBlock = this;
  1491. this.setTooltip(function () {
  1492. return Blockly.Msg.CocoRobo_TYPE_IS_TOOLTIP.replace('%2',
  1493. thisBlock.getFieldValue('TYPE'));
  1494. });
  1495. }
  1496. };
  1497. Blockly.Blocks.CocoRobo_eval = {
  1498. init: function init() {
  1499. this.jsonInit({
  1500. message0: Blockly.Msg.CocoRobo_EVAL_MESSAGE0,
  1501. args0: [{
  1502. check: "String",
  1503. type: "input_value",
  1504. name: "VAR"
  1505. }],
  1506. output: null,
  1507. colour: CategoryColors.Logic,
  1508. tooltip: Blockly.Msg.CocoRobo_EVAL_TOOLTIP,
  1509. helpUrl: Blockly.Msg.CocoRobo_EVAL_HELPURL
  1510. });
  1511. }
  1512. };
  1513. Blockly.Blocks.CocoRobo_return = {
  1514. init: function init() {
  1515. this.jsonInit({
  1516. inputsInline: !0,
  1517. nextStatement: null,
  1518. previousStatement: null,
  1519. colour: CategoryColors.Logic,
  1520. helpUrl: Blockly.Msg.CocoRobo_RETURN_HELPURL,
  1521. tooltip: Blockly.Msg.CocoRobo_RETURN_TOOLTIP,
  1522. message0: Blockly.Msg.CocoRobo_RETURN_MESSAGE0,
  1523. args0: [{
  1524. type: "input_value",
  1525. name: "VAR"
  1526. }]
  1527. });
  1528. }
  1529. };
  1530. Blockly.Blocks.CocoRobo_time_difference = {
  1531. init: function init() {
  1532. this.jsonInit({
  1533. inputsInline: !0,
  1534. colour: CategoryColors.System,
  1535. output: "Number",
  1536. helpUrl: Blockly.Msg.CocoRobo_TIME_DIFFERENCE_HELPURL,
  1537. tooltip: Blockly.Msg.CocoRobo_TIME_DIFFERENCE_TOOLTIP,
  1538. message0: Blockly.Msg.CocoRobo_TIME_DIFFERENCE_MESSAGE0,
  1539. args0: [{
  1540. check: "Number",
  1541. type: "input_value",
  1542. name: "time1"
  1543. }, {
  1544. check: "Number",
  1545. type: "input_value",
  1546. name: "time2"
  1547. }]
  1548. });
  1549. }
  1550. };
  1551. Blockly.Blocks.CocoRobo_def_clock = {
  1552. init: function init() {
  1553. this.jsonInit({
  1554. inputsInline: !0,
  1555. nextStatement: null,
  1556. previousStatement: null,
  1557. colour: CategoryColors.Show,
  1558. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1559. tooltip: Blockly.Msg.CocoRobo_def_clock_TOOLTIP,
  1560. message0: Blockly.Msg.CocoRobo_def_clock_MESSAGE0,
  1561. args0: [{
  1562. type: "field_input",
  1563. name: "clock_name",
  1564. text: "my_clock"
  1565. }, {
  1566. check: "Number",
  1567. type: "input_value",
  1568. name: "x"
  1569. }, {
  1570. check: "Number",
  1571. type: "input_value",
  1572. name: "y"
  1573. }, {
  1574. check: "Number",
  1575. type: "input_value",
  1576. name: "radius"
  1577. }]
  1578. });
  1579. }
  1580. };
  1581. Blockly.Blocks.CocoRobo_settime_clock = {
  1582. init: function init() {
  1583. this.jsonInit({
  1584. inputsInline: !0,
  1585. nextStatement: null,
  1586. previousStatement: null,
  1587. colour: CategoryColors.Show,
  1588. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1589. tooltip: Blockly.Msg.CocoRobo_settime_clock_TOOLTIP,
  1590. message0: Blockly.Msg.CocoRobo_settime_clock_MESSAGE0,
  1591. args0: [{
  1592. type: "field_input",
  1593. name: "clock_name",
  1594. text: "my_clock"
  1595. }]
  1596. });
  1597. }
  1598. };
  1599. Blockly.Blocks.CocoRobo_draw_clear_clock = {
  1600. init: function init() {
  1601. this.jsonInit({
  1602. inputsInline: !0,
  1603. nextStatement: null,
  1604. previousStatement: null,
  1605. colour: CategoryColors.Show,
  1606. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1607. tooltip: Blockly.Msg.CocoRobo_draw_clear_clock_TOOLTIP,
  1608. message0: Blockly.Msg.CocoRobo_draw_clear_clock_MESSAGE0,
  1609. args0: [{
  1610. name: "draw_clear_clock",
  1611. options: [[Blockly.Msg.CocoRobo_draw, "drawClock"], [Blockly.Msg.CocoRobo_clear, "clear"]],
  1612. type: "field_dropdown"
  1613. }, {
  1614. type: "field_input",
  1615. name: "clock_name",
  1616. text: "my_clock"
  1617. }]
  1618. });
  1619. }
  1620. };
  1621. Blockly.Blocks.CocoRobo_button_is_pressed = {
  1622. init: function init() {
  1623. this.jsonInit({
  1624. colour: CategoryColors.System,
  1625. args0: [{
  1626. name: "button",
  1627. options: [["A", "a"], ["B", "b"], ["A+B", "A+B"]],
  1628. type: "field_dropdown"
  1629. }],
  1630. output: "Boolean",
  1631. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1632. tooltip: Blockly.Msg.CocoRobo_button_is_pressed_TOOLTIP,
  1633. message0: Blockly.Msg.CocoRobo_button_is_pressed_MESSAGE0
  1634. });
  1635. }
  1636. };
  1637. Blockly.Blocks.CocoRobo_button_both_pressed = {
  1638. init: function init() {
  1639. this.jsonInit({
  1640. colour: CategoryColors.System,
  1641. output: "Boolean",
  1642. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1643. tooltip: Blockly.Msg.CocoRobo_button_both_pressed_TOOLTIP,
  1644. message0: Blockly.Msg.CocoRobo_button_both_pressed_MESSAGE0
  1645. });
  1646. }
  1647. };
  1648. Blockly.Blocks.CocoRobo_touchPad_value = {
  1649. init: function init() {
  1650. this.jsonInit({
  1651. colour: CategoryColors.System,
  1652. args0: [{
  1653. name: "touchPad",
  1654. options: touchPad,
  1655. type: "field_dropdown"
  1656. }],
  1657. output: "Boolean",
  1658. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1659. tooltip: Blockly.Msg.CocoRobo_touchPad_value_TOOLTIP,
  1660. message0: Blockly.Msg.CocoRobo_touchPad_value_MESSAGE0
  1661. });
  1662. }
  1663. };
  1664. Blockly.Blocks.CocoRobo_touchPad_value_num = {
  1665. init: function init() {
  1666. this.jsonInit({
  1667. colour: CategoryColors.System,
  1668. args0: [{
  1669. name: "touchPad",
  1670. options: touchPad,
  1671. type: "field_dropdown"
  1672. }],
  1673. output: "Number",
  1674. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1675. tooltip: Blockly.Msg.CocoRobo_touchPad_value_num_TOOLTIP,
  1676. message0: Blockly.Msg.CocoRobo_touchPad_value_num_MESSAGE0
  1677. });
  1678. }
  1679. };
  1680. Blockly.Blocks.CocoRobo_read_digital = {
  1681. init: function init() {
  1682. this.jsonInit({
  1683. colour: CategoryColors.Pin,
  1684. args0: [{
  1685. name: "allPin",
  1686. check: "Number",
  1687. type: "input_value"
  1688. }],
  1689. output: "Number",
  1690. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1691. tooltip: Blockly.Msg.CocoRobo_read_digital_TOOLTIP,
  1692. message0: Blockly.Msg.CocoRobo_read_digital_MESSAGE0
  1693. });
  1694. }
  1695. };
  1696. Blockly.Blocks.CocoRobo_read_ds18b20 = {
  1697. init: function init() {
  1698. this.jsonInit({
  1699. colour: CategoryColors.General,
  1700. args0: [{
  1701. name: "allPin",
  1702. check: "Number",
  1703. type: "input_value"
  1704. }],
  1705. output: "Number",
  1706. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1707. tooltip: Blockly.Msg.CocoRobo_read_DS18B20_TOOLTIP,
  1708. message0: Blockly.Msg.CocoRobo_read_DS18B20_MESSAGE0
  1709. });
  1710. }
  1711. };
  1712. Blockly.Blocks.CocoRobo_set_digital = {
  1713. init: function init() {
  1714. this.jsonInit({
  1715. inputsInline: !0,
  1716. nextStatement: null,
  1717. previousStatement: null,
  1718. colour: CategoryColors.Pin,
  1719. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1720. tooltip: Blockly.Msg.CocoRobo_set_digital_TOOLTIP,
  1721. message0: Blockly.Msg.CocoRobo_set_digital_MESSAGE0,
  1722. args0: [{
  1723. check: "Number",
  1724. type: "input_value",
  1725. name: "num"
  1726. }, {
  1727. name: "allPin",
  1728. check: "Number",
  1729. type: "input_value"
  1730. }]
  1731. });
  1732. }
  1733. };
  1734. Blockly.Blocks.CocoRobo_set_pin_mode = {
  1735. init: function init() {
  1736. this.jsonInit({
  1737. inputsInline: !0,
  1738. nextStatement: null,
  1739. previousStatement: null,
  1740. colour: CategoryColors.Pin,
  1741. helpUrl: Blockly.Msg.CocoRobo_SETS_PIN_MODE_HELPURL,
  1742. tooltip: Blockly.Msg.CocoRobo_SETS_PIN_MODE_TOOLTIP,
  1743. message0: Blockly.Msg.CocoRobo_SETS_PIN_MODE_MESSAGE0,
  1744. args0: [{
  1745. name: "allPin",
  1746. check: "Number",
  1747. type: "input_value"
  1748. }, {
  1749. name: "in_out",
  1750. options: [[Blockly.Msg.CocoRobo_SET_PIN_LEAKY_OUT, "OUT_DRAIN"]],
  1751. type: "field_dropdown"
  1752. }, {
  1753. name: "pin_up_down_pull",
  1754. options: [[Blockly.Msg.CocoRobo_SET_PIN_NO_PULL, "None"], [Blockly.Msg.CocoRobo_SET_PIN_DOWN_PULL, "Pin.PULL_DOWN"], [Blockly.Msg.CocoRobo_SET_PIN_UP_PULL, "Pin.PULL_UP"]],
  1755. type: "field_dropdown"
  1756. }, {
  1757. name: "pin_value",
  1758. check: "Number",
  1759. type: "input_value"
  1760. }]
  1761. });
  1762. }
  1763. };
  1764. Blockly.Blocks.CocoRobo_read_analog = {
  1765. init: function init() {
  1766. this.jsonInit({
  1767. colour: CategoryColors.Pin,
  1768. args0: [{
  1769. check: "Number",
  1770. type: "input_value",
  1771. name: "allPin"
  1772. }],
  1773. output: "Number",
  1774. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1775. tooltip: Blockly.Msg.CocoRobo_read_analog_TOOLTIP,
  1776. message0: Blockly.Msg.CocoRobo_read_analog_MESSAGE0
  1777. });
  1778. }
  1779. };
  1780. Blockly.Blocks.CocoRobo_set_analog = {
  1781. init: function init() {
  1782. this.jsonInit({
  1783. inputsInline: !0,
  1784. nextStatement: null,
  1785. previousStatement: null,
  1786. colour: CategoryColors.Pin,
  1787. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1788. tooltip: Blockly.Msg.CocoRobo_set_analog_TOOLTIP,
  1789. message0: Blockly.Msg.CocoRobo_set_analog_MESSAGE0,
  1790. args0: [{
  1791. check: "Number",
  1792. type: "input_value",
  1793. name: "num"
  1794. }, {
  1795. name: "allPin",
  1796. check: "Number",
  1797. type: "input_value"
  1798. }]
  1799. });
  1800. }
  1801. };
  1802. Blockly.Blocks.CocoRobo_rgb_list = {
  1803. init: function init() {
  1804. this.jsonInit({
  1805. inputsInline: !0,
  1806. output: "Number",
  1807. colour: CategoryColors.Pin,
  1808. helpUrl: "",
  1809. tooltip: "",
  1810. message0: "%1",
  1811. args0: [{
  1812. options: [[Blockly.Msg.CocoRobo_RGB_0, "0"], [Blockly.Msg.CocoRobo_RGB_1, "1"], [Blockly.Msg.CocoRobo_RGB_2, "2"], [Blockly.Msg.CocoRobo_RGB_ALL, "-1"]],
  1813. type: "field_dropdown",
  1814. name: "rgb_list"
  1815. }]
  1816. });
  1817. }
  1818. };
  1819. Blockly.Blocks.CocoRobo_set_rgb_list_color = {
  1820. init: function init() {
  1821. this.jsonInit({
  1822. inputsInline: !0,
  1823. nextStatement: null,
  1824. previousStatement: null,
  1825. colour: CategoryColors.onboard_RGB,
  1826. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1827. tooltip: Blockly.Msg.CocoRobo_SET_RGB_LIST_COLOR_TOOLTIP,
  1828. message0: Blockly.Msg.CocoRobo_SET_RGB_LIST_COLOR_MESSAGE0,
  1829. args0: [{
  1830. name: "num",
  1831. check: "Number",
  1832. type: "input_value"
  1833. }, {
  1834. type: "field_colour",
  1835. name: "COLOUR",
  1836. colour: "#ff0000"
  1837. }]
  1838. });
  1839. }
  1840. };
  1841. Blockly.Blocks.CocoRobo_set_rgb_list_number = {
  1842. init: function init() {
  1843. this.jsonInit({
  1844. inputsInline: !0,
  1845. nextStatement: null,
  1846. previousStatement: null,
  1847. colour: CategoryColors.onboard_RGB,
  1848. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1849. tooltip: Blockly.Msg.CocoRobo_SET_RGB_LIST_NUMBER_TOOLTIP,
  1850. message0: Blockly.Msg.CocoRobo_SET_RGB_LIST_NUMBER_MESSAGE0,
  1851. args0: [{
  1852. name: "num",
  1853. check: "Number",
  1854. type: "input_value"
  1855. }, {
  1856. check: "Number",
  1857. type: "input_value",
  1858. name: "r"
  1859. }, {
  1860. check: "Number",
  1861. type: "input_value",
  1862. name: "g"
  1863. }, {
  1864. check: "Number",
  1865. type: "input_value",
  1866. name: "b"
  1867. }]
  1868. });
  1869. }
  1870. };
  1871. Blockly.Blocks.CocoRobo_off_rgb_list = {
  1872. init: function init() {
  1873. this.jsonInit({
  1874. inputsInline: !0,
  1875. nextStatement: null,
  1876. previousStatement: null,
  1877. colour: CategoryColors.onboard_RGB,
  1878. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1879. tooltip: Blockly.Msg.CocoRobo_OFF_RGB_LIST_TOOLTIP,
  1880. message0: Blockly.Msg.CocoRobo_OFF_RGB_LIST_MESSAGE0,
  1881. args0: [{
  1882. name: "num",
  1883. check: "Number",
  1884. type: "input_value"
  1885. }]
  1886. });
  1887. }
  1888. };
  1889. Blockly.Blocks.CocoRobo_set_RGB_color = {
  1890. init: function init() {
  1891. this.jsonInit({
  1892. inputsInline: !0,
  1893. nextStatement: null,
  1894. previousStatement: null,
  1895. colour: CategoryColors.System,
  1896. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1897. tooltip: Blockly.Msg.CocoRobo_set_RGB_color_TOOLTIP,
  1898. message0: Blockly.Msg.CocoRobo_set_RGB_color_MESSAGE0,
  1899. args0: [{
  1900. check: "Number",
  1901. type: "input_value",
  1902. name: "num"
  1903. }, {
  1904. type: "field_colour",
  1905. name: "COLOUR",
  1906. colour: "#ff0000"
  1907. }]
  1908. });
  1909. }
  1910. };
  1911. Blockly.Blocks.CocoRobo_set_RGB = {
  1912. init: function init() {
  1913. this.jsonInit({
  1914. inputsInline: !0,
  1915. nextStatement: null,
  1916. previousStatement: null,
  1917. colour: CategoryColors.System,
  1918. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1919. tooltip: Blockly.Msg.CocoRobo_set_RGB_TOOLTIP,
  1920. message0: Blockly.Msg.CocoRobo_set_RGB_MESSAGE0,
  1921. args0: [{
  1922. check: "Number",
  1923. type: "input_value",
  1924. name: "num"
  1925. }, {
  1926. check: "Number",
  1927. type: "input_value",
  1928. name: "r"
  1929. }, {
  1930. check: "Number",
  1931. type: "input_value",
  1932. name: "g"
  1933. }, {
  1934. check: "Number",
  1935. type: "input_value",
  1936. name: "b"
  1937. }]
  1938. });
  1939. }
  1940. };
  1941. Blockly.Blocks.CocoRobo_set_RGB_color_all = {
  1942. init: function init() {
  1943. this.jsonInit({
  1944. inputsInline: !0,
  1945. nextStatement: null,
  1946. previousStatement: null,
  1947. colour: CategoryColors.System,
  1948. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1949. tooltip: Blockly.Msg.CocoRobo_set_RGB_color_all_TOOLTIP,
  1950. message0: Blockly.Msg.CocoRobo_set_RGB_color_all_MESSAGE0,
  1951. args0: [{
  1952. type: "field_colour",
  1953. name: "COLOUR",
  1954. colour: "#ff0000"
  1955. }]
  1956. });
  1957. }
  1958. };
  1959. Blockly.Blocks.CocoRobo_set_RGB_all = {
  1960. init: function init() {
  1961. this.jsonInit({
  1962. inputsInline: !0,
  1963. nextStatement: null,
  1964. previousStatement: null,
  1965. colour: CategoryColors.System,
  1966. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1967. tooltip: Blockly.Msg.CocoRobo_set_RGB_all_TOOLTIP,
  1968. message0: Blockly.Msg.CocoRobo_set_RGB_all_MESSAGE0,
  1969. args0: [{
  1970. check: "Number",
  1971. type: "input_value",
  1972. name: "r"
  1973. }, {
  1974. check: "Number",
  1975. type: "input_value",
  1976. name: "g"
  1977. }, {
  1978. check: "Number",
  1979. type: "input_value",
  1980. name: "b"
  1981. }]
  1982. });
  1983. }
  1984. };
  1985. Blockly.Blocks.CocoRobo_fresh_RGB = {
  1986. init: function init() {
  1987. this.jsonInit({
  1988. inputsInline: !0,
  1989. nextStatement: null,
  1990. previousStatement: null,
  1991. colour: CategoryColors.System,
  1992. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  1993. tooltip: Blockly.Msg.CocoRobo_fresh_RGB_TOOLTIP,
  1994. message0: Blockly.Msg.CocoRobo_fresh_RGB_MESSAGE0
  1995. });
  1996. }
  1997. };
  1998. Blockly.Blocks.CocoRobo_off_RGB = {
  1999. init: function init() {
  2000. this.jsonInit({
  2001. inputsInline: !0,
  2002. nextStatement: null,
  2003. previousStatement: null,
  2004. colour: CategoryColors.System,
  2005. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2006. tooltip: Blockly.Msg.CocoRobo_off_RGB_TOOLTIP,
  2007. message0: Blockly.Msg.CocoRobo_off_RGB_MESSAGE0
  2008. });
  2009. }
  2010. };
  2011. Blockly.Blocks.CocoRobo_buzz_state = {
  2012. init: function init() {
  2013. this.jsonInit({
  2014. inputsInline: !0,
  2015. nextStatement: null,
  2016. previousStatement: null,
  2017. colour: CategoryColors.Music,
  2018. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2019. tooltip: Blockly.Msg.CocoRobo_buzz_state_TOOLTIP,
  2020. message0: Blockly.Msg.CocoRobo_buzz_state_MESSAGE0
  2021. });
  2022. }
  2023. };
  2024. Blockly.Blocks.CocoRobo_buzz_freq = {
  2025. init: function init() {
  2026. this.jsonInit({
  2027. inputsInline: !0,
  2028. nextStatement: null,
  2029. previousStatement: null,
  2030. colour: CategoryColors.Music,
  2031. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2032. tooltip: Blockly.Msg.CocoRobo_buzz_freq_TOOLTIP,
  2033. message0: Blockly.Msg.CocoRobo_buzz_freq_MESSAGE0,
  2034. args0: [{
  2035. check: "Number",
  2036. type: "input_value",
  2037. name: "freq"
  2038. }, {
  2039. check: "Number",
  2040. type: "input_value",
  2041. name: "pin"
  2042. }]
  2043. });
  2044. }
  2045. };
  2046. Blockly.Blocks.CocoRobo_buzz_tone = {
  2047. init: function init() {
  2048. this.jsonInit({
  2049. inputsInline: !0,
  2050. nextStatement: null,
  2051. previousStatement: null,
  2052. colour: CategoryColors.Music,
  2053. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2054. tooltip: Blockly.Msg.CocoRobo_buzz_tone_TOOLTIP,
  2055. message0: Blockly.Msg.CocoRobo_buzz_tone_MESSAGE0,
  2056. args0: [{
  2057. name: "buzz_tone",
  2058. options: buzz_tone,
  2059. type: "field_dropdown"
  2060. }]
  2061. });
  2062. }
  2063. };
  2064. Blockly.Blocks.CocoRobo_read_sound = {
  2065. init: function init() {
  2066. this.jsonInit({
  2067. colour: CategoryColors.System,
  2068. output: "Number",
  2069. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2070. tooltip: Blockly.Msg.CocoRobo_read_sound_TOOLTIP,
  2071. message0: Blockly.Msg.CocoRobo_read_sound_MESSAGE0
  2072. });
  2073. }
  2074. };
  2075. Blockly.Blocks.CocoRobo_read_light = {
  2076. init: function init() {
  2077. this.jsonInit({
  2078. colour: "#e8795b",
  2079. output: "Number",
  2080. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2081. tooltip: Blockly.Msg.CocoRobo_read_light_TOOLTIP,
  2082. message0: Blockly.Msg.CocoRobo_read_light_MESSAGE0
  2083. });
  2084. }
  2085. };
  2086. Blockly.Blocks.CocoRobo_accelerometer_get = {
  2087. init: function init() {
  2088. this.jsonInit({
  2089. colour: "#e8795b",
  2090. args0: [{
  2091. name: "axis",
  2092. options: axis,
  2093. type: "field_dropdown"
  2094. }],
  2095. output: "Number",
  2096. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2097. tooltip: Blockly.Msg.CocoRobo_accelerometer_get_TOOLTIP,
  2098. message0: Blockly.Msg.CocoRobo_accelerometer_get_MESSAGE0
  2099. });
  2100. }
  2101. };
  2102. Blockly.Blocks.CocoRobo_accelerometer_get_x = {
  2103. init: function init() {
  2104. this.jsonInit({
  2105. colour: CategoryColors.System,
  2106. output: "Number",
  2107. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2108. tooltip: Blockly.Msg.CocoRobo_accelerometer_get_x_TOOLTIP,
  2109. message0: Blockly.Msg.CocoRobo_accelerometer_get_x_MESSAGE0
  2110. });
  2111. }
  2112. };
  2113. Blockly.Blocks.CocoRobo_accelerometer_get_y = {
  2114. init: function init() {
  2115. this.jsonInit({
  2116. colour: CategoryColors.System,
  2117. output: "Number",
  2118. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2119. tooltip: Blockly.Msg.CocoRobo_accelerometer_get_y_TOOLTIP,
  2120. message0: Blockly.Msg.CocoRobo_accelerometer_get_y_MESSAGE0
  2121. });
  2122. }
  2123. };
  2124. Blockly.Blocks.CocoRobo_accelerometer_get_z = {
  2125. init: function init() {
  2126. this.jsonInit({
  2127. colour: CategoryColors.System,
  2128. output: "Number",
  2129. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2130. tooltip: Blockly.Msg.CocoRobo_accelerometer_get_z_TOOLTIP,
  2131. message0: Blockly.Msg.CocoRobo_accelerometer_get_z_MESSAGE0
  2132. });
  2133. }
  2134. };
  2135. Blockly.Blocks.CocoRobo_accelerometer_set_range = {
  2136. init: function init() {
  2137. this.jsonInit({
  2138. colour: CategoryColors.System,
  2139. args0: [{
  2140. name: "range",
  2141. options: [[Blockly.Msg.CocoRobo_ACCELEROMETER_RANGE_2G, "RANGE_2G"], [Blockly.Msg.CocoRobo_ACCELEROMETER_RANGE_4G, "RANGE_4G"], [Blockly.Msg.CocoRobo_ACCELEROMETER_RANGE_8G, "RANGE_8G"], [Blockly.Msg.CocoRobo_ACCELEROMETER_RANGE_16G, "RANGE_16G"]],
  2142. type: "field_dropdown"
  2143. }],
  2144. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2145. tooltip: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_RANGE_TOOLTIP,
  2146. message0: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_RANGE_MESSAGE0,
  2147. nextStatement: null,
  2148. previousStatement: null
  2149. });
  2150. }
  2151. };
  2152. Blockly.Blocks.CocoRobo_accelerometer_set_resolustion = {
  2153. init: function init() {
  2154. this.jsonInit({
  2155. colour: CategoryColors.System,
  2156. args0: [{
  2157. name: "resolustion",
  2158. options: [[Blockly.Msg.CocoRobo_ACCELEROMETER_RES_10_BIT, "RES_10_BIT"], [Blockly.Msg.CocoRobo_ACCELEROMETER_RES_12_BIT, "RES_12_BIT"], [Blockly.Msg.CocoRobo_ACCELEROMETER_RES_14_BIT, "RES_14_BIT"]],
  2159. type: "field_dropdown"
  2160. }],
  2161. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2162. tooltip: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_RESOLUSTION_TOOLTIP,
  2163. message0: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_RESOLUSTION_MESSAGE0,
  2164. nextStatement: null,
  2165. previousStatement: null
  2166. });
  2167. }
  2168. };
  2169. Blockly.Blocks.CocoRobo_accelerometer_set_offset = {
  2170. init: function init() {
  2171. this.jsonInit({
  2172. colour: CategoryColors.System,
  2173. args0: [{
  2174. type: "input_dummy"
  2175. }, {
  2176. check: "Number",
  2177. type: "input_value",
  2178. name: "x"
  2179. }, {
  2180. check: "Number",
  2181. type: "input_value",
  2182. name: "y"
  2183. }, {
  2184. check: "Number",
  2185. type: "input_value",
  2186. name: "z"
  2187. }],
  2188. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2189. tooltip: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_OFFSET_TOOLTIP,
  2190. message0: Blockly.Msg.CocoRobo_ACCELEROMETER_SET_OFFSET_MESSAGE0,
  2191. nextStatement: null,
  2192. previousStatement: null
  2193. });
  2194. }
  2195. };
  2196. Blockly.Blocks.CocoRobo_tilt_angle = {
  2197. init: function init() {
  2198. this.jsonInit({
  2199. colour: "#e8795b",
  2200. args0: [{
  2201. name: "axis",
  2202. options: axis,
  2203. type: "field_dropdown"
  2204. }],
  2205. output: "Number",
  2206. helpUrl: Blockly.Msg.CocoRobo_TILT_ANGLE_HELPURL,
  2207. tooltip: Blockly.Msg.CocoRobo_TILT_ANGLE_TOOLTIP,
  2208. message0: Blockly.Msg.CocoRobo_TILT_ANGLE_MESSAGE0
  2209. });
  2210. }
  2211. };
  2212. Blockly.Blocks.CocoRobo_random_choice = {
  2213. init: function init() {
  2214. this.jsonInit({
  2215. message0: Blockly.Msg.CocoRobo_random_choice_MESSAGE0,
  2216. args0: [{
  2217. type: "input_value",
  2218. name: "list",
  2219. check: ["Array", "String"]
  2220. }],
  2221. output: "String",
  2222. colour: CategoryColors.Math,
  2223. tooltip: Blockly.Msg.CocoRobo_random_choice_TOOLTIP,
  2224. helpUrl: Blockly.Msg.CocoRobo_HELPURL
  2225. });
  2226. }
  2227. };
  2228. Blockly.Blocks.machine_time_pulse_us = {
  2229. init: function init() {
  2230. this.jsonInit({
  2231. inputsInline: !0,
  2232. output: "Number",
  2233. colour: CategoryColors.Pin,
  2234. helpUrl: Blockly.Msg.MACHINE_TIME_PULSE_US_HELPURL,
  2235. tooltip: Blockly.Msg.MACHINE_TIME_PULSE_US_TOOLTIP,
  2236. message0: Blockly.Msg.MACHINE_TIME_PULSE_US_MESSAGE0,
  2237. args0: [{
  2238. check: "Number",
  2239. type: "input_value",
  2240. name: "pin"
  2241. }, {
  2242. check: "Number",
  2243. type: "input_value",
  2244. name: "pulse"
  2245. }]
  2246. });
  2247. }
  2248. };
  2249. Blockly.Blocks.CocoRobo_print = {
  2250. init: function init() {
  2251. this.jsonInit({
  2252. colour: CategoryColors.Text,
  2253. args0: [{
  2254. name: "CONTENT",
  2255. type: "input_value",
  2256. check: ["Number", "String"]
  2257. }],
  2258. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2259. tooltip: Blockly.Msg.CocoRobo_print_TOOLTIP,
  2260. message0: Blockly.Msg.CocoRobo_print_MESSAGE0,
  2261. nextStatement: null,
  2262. previousStatement: null
  2263. });
  2264. }
  2265. };
  2266. Blockly.Blocks.CocoRobo_print_to_chart = {
  2267. init: function init() {
  2268. this.setColour(CategoryColors.Math);
  2269. this.itemCount_ = 1;
  2270. this.updateShape_();
  2271. this.setNextStatement(!0);
  2272. this.setPreviousStatement(!0);
  2273. this.setMutator(new Blockly.Mutator(["CocoRobo_print_to_chart_item"]));
  2274. this.setTooltip(Blockly.Msg.CocoRobo_PRINT_TO_CHART_TOOLTIP);
  2275. },
  2276. mutationToDom: function mutationToDom() {
  2277. var a = document.createElement("mutation");
  2278. a.setAttribute("items", this.itemCount_);
  2279. return a;
  2280. },
  2281. domToMutation: function domToMutation(a) {
  2282. this.itemCount_ = parseInt(a.getAttribute("items"), 10);
  2283. this.updateShape_();
  2284. },
  2285. decompose: function decompose(a) {
  2286. var b = a.newBlock("CocoRobo_print_to_chart_container");
  2287. b.initSvg();
  2288. for (var c = b.getInput("STACK").connection, e = 0; e < this.itemCount_; e++) {
  2289. var d = a.newBlock("CocoRobo_print_to_chart_item");
  2290. d.initSvg();
  2291. c.connect(d.previousConnection);
  2292. c = d.nextConnection;
  2293. }
  2294. return b;
  2295. },
  2296. compose: function compose(a) {
  2297. var b = a.getInputTargetBlock("STACK");
  2298. for (a = []; b;) {
  2299. a.push(b.valueConnection_), b = b.nextConnection && b.nextConnection.targetBlock();
  2300. }
  2301. for (b = 0; b < this.itemCount_; b++) {
  2302. var c = this.getInput("ADD" + b).connection.targetConnection;
  2303. c && -1 == a.indexOf(c) && c.disconnect();
  2304. }
  2305. this.itemCount_ = a.length;
  2306. 4 < this.itemCount_ && (this.itemCount_ = 4);
  2307. this.updateShape_();
  2308. for (b = 0; b < this.itemCount_; b++) {
  2309. Blockly.Mutator.reconnect(a[b], this, "ADD" + b);
  2310. }
  2311. },
  2312. saveConnections: function saveConnections(a) {
  2313. a = a.getInputTargetBlock("STACK");
  2314. for (var b = 0; a;) {
  2315. var c = this.getInput("ADD" + b);
  2316. a.valueConnection_ = c && c.connection.targetConnection;
  2317. b++;
  2318. a = a.nextConnection && a.nextConnection.targetBlock();
  2319. }
  2320. },
  2321. updateShape_: function updateShape_() {
  2322. this.itemCount_ && this.getInput("EMPTY") ? this.removeInput("EMPTY") : this.itemCount_ || this.getInput("EMPTY") || this.appendDummyInput("EMPTY").appendField(Blockly.Msg.CocoRobo_PRINT_TO_CHART_EMPTY_TITLE);
  2323. for (var a = 0; a < this.itemCount_; a++) {
  2324. if (!this.getInput("ADD" + a)) {
  2325. var b = this.appendValueInput("ADD" + a);
  2326. 0 == a && b.setCheck("Number").appendField(Blockly.Msg.CocoRobo_PRINT_TO_CHART_INPUT_WITH);
  2327. }
  2328. }
  2329. for (; this.getInput("ADD" + a);) {
  2330. this.removeInput("ADD" + a), a++;
  2331. }
  2332. }
  2333. };
  2334. Blockly.Blocks.CocoRobo_print_to_chart_item = {
  2335. init: function init() {
  2336. this.setColour(CategoryColors.Math);
  2337. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_PRINT_TO_CHART_ITEM_TITLE);
  2338. this.setPreviousStatement(!0);
  2339. this.setNextStatement(!0);
  2340. this.setTooltip(Blockly.Msg.CocoRobo_PRINT_TO_CHART_ITEM_TOOLTIP);
  2341. this.contextMenu = !1;
  2342. }
  2343. };
  2344. Blockly.Blocks.CocoRobo_print_to_chart_container = {
  2345. init: function init() {
  2346. this.setColour(CategoryColors.Math);
  2347. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_PRINT_TO_CHART_CONTAINER_TITLE_ADD);
  2348. this.appendStatementInput("STACK");
  2349. this.setTooltip(Blockly.Msg.CocoRobo_PRINT_TO_CHART_CONTAINER_TOOLTIP);
  2350. this.contextMenu = !1;
  2351. }
  2352. };
  2353. Blockly.Blocks.CocoRobo_init_chart = {
  2354. init: function init() {
  2355. this.setColour(CategoryColors.Math);
  2356. this.itemCount_ = 1;
  2357. this.updateShape_();
  2358. this.setNextStatement(!0);
  2359. this.setPreviousStatement(!0);
  2360. this.setMutator(new Blockly.Mutator(["CocoRobo_init_chart_item"]));
  2361. this.setTooltip(Blockly.Msg.CocoRobo_INIT_CHART_TOOLTIP);
  2362. },
  2363. mutationToDom: function mutationToDom() {
  2364. var a = document.createElement("mutation");
  2365. a.setAttribute("items", this.itemCount_);
  2366. return a;
  2367. },
  2368. domToMutation: function domToMutation(a) {
  2369. this.itemCount_ = parseInt(a.getAttribute("items"), 10);
  2370. this.updateShape_();
  2371. },
  2372. decompose: function decompose(a) {
  2373. var b = a.newBlock("CocoRobo_init_chart_container");
  2374. b.initSvg();
  2375. for (var c = b.getInput("STACK").connection, e = 0; e < this.itemCount_; e++) {
  2376. var d = a.newBlock("CocoRobo_init_chart_item");
  2377. d.initSvg();
  2378. c.connect(d.previousConnection);
  2379. c = d.nextConnection;
  2380. }
  2381. return b;
  2382. },
  2383. compose: function compose(a) {
  2384. var b = a.getInputTargetBlock("STACK");
  2385. for (a = []; b;) {
  2386. a.push(b.valueConnection_), b = b.nextConnection && b.nextConnection.targetBlock();
  2387. }
  2388. for (b = 0; b < this.itemCount_; b++) {
  2389. var c = this.getInput("ADD" + b).connection.targetConnection;
  2390. c && -1 == a.indexOf(c) && c.disconnect();
  2391. }
  2392. this.itemCount_ = a.length;
  2393. 4 < this.itemCount_ && (this.itemCount_ = 4);
  2394. this.updateShape_();
  2395. for (b = 0; b < this.itemCount_; b++) {
  2396. Blockly.Mutator.reconnect(a[b], this, "ADD" + b);
  2397. }
  2398. },
  2399. saveConnections: function saveConnections(a) {
  2400. a = a.getInputTargetBlock("STACK");
  2401. for (var b = 0; a;) {
  2402. var c = this.getInput("ADD" + b);
  2403. a.valueConnection_ = c && c.connection.targetConnection;
  2404. b++;
  2405. a = a.nextConnection && a.nextConnection.targetBlock();
  2406. }
  2407. },
  2408. updateShape_: function updateShape_() {
  2409. this.itemCount_ && this.getInput("EMPTY") ? this.removeInput("EMPTY") : this.itemCount_ || this.getInput("EMPTY") || this.appendDummyInput("EMPTY").appendField(Blockly.Msg.CocoRobo_INIT_CHART_EMPTY_TITLE);
  2410. for (var a = 0; a < this.itemCount_; a++) {
  2411. if (!this.getInput("ADD" + a)) {
  2412. var b = this.appendValueInput("ADD" + a);
  2413. 0 == a && b.setCheck("String").appendField(Blockly.Msg.CocoRobo_INIT_CHART_INPUT_WITH);
  2414. }
  2415. }
  2416. for (; this.getInput("ADD" + a);) {
  2417. this.removeInput("ADD" + a), a++;
  2418. }
  2419. }
  2420. };
  2421. Blockly.Blocks.CocoRobo_init_chart_item = {
  2422. init: function init() {
  2423. this.setColour(CategoryColors.Math);
  2424. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_INIT_CHART_ITEM_TITLE);
  2425. this.setPreviousStatement(!0);
  2426. this.setNextStatement(!0);
  2427. this.setTooltip(Blockly.Msg.CocoRobo_INIT_CHART_ITEM_TOOLTIP);
  2428. this.contextMenu = !1;
  2429. }
  2430. };
  2431. Blockly.Blocks.CocoRobo_init_chart_container = {
  2432. init: function init() {
  2433. this.setColour(CategoryColors.Math);
  2434. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_INIT_CHART_CONTAINER_TITLE_ADD);
  2435. this.appendStatementInput("STACK");
  2436. this.setTooltip(Blockly.Msg.CocoRobo_INIT_CHART_CONTAINER_TOOLTIP);
  2437. this.contextMenu = !1;
  2438. }
  2439. };
  2440. Blockly.Blocks.CocoRobo_ir_remote_recv = {
  2441. init: function init() {
  2442. this.jsonInit({
  2443. message0: Blockly.Msg.CocoRobo_IR_REMOTE_RECV_MESSAGE0,
  2444. inputsInline: !0,
  2445. colour: CategoryColors.Sensor,
  2446. helpUrl: Blockly.Msg.CocoRobo_IR_REMOTE_RECV_HELPURL,
  2447. tooltip: Blockly.Msg.CocoRobo_IR_REMOTE_RECV_TOOLTIP,
  2448. args0: [{
  2449. check: "Number",
  2450. type: "input_value",
  2451. name: "pin"
  2452. }, {
  2453. type: "input_value",
  2454. name: "address"
  2455. }, {
  2456. type: "input_value",
  2457. name: "command"
  2458. }]
  2459. });
  2460. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  2461. }
  2462. };
  2463. Blockly.Blocks.CocoRobo_ir_remote_send = {
  2464. init: function init() {
  2465. this.jsonInit({
  2466. message0: Blockly.Msg.CocoRobo_IR_REMOTE_SEND_MESSAGE0,
  2467. inputsInline: !0,
  2468. nextStatement: null,
  2469. previousStatement: null,
  2470. colour: CategoryColors.Sensor,
  2471. helpUrl: Blockly.Msg.CocoRobo_IR_REMOTE_SEND_HELPURL,
  2472. tooltip: Blockly.Msg.CocoRobo_IR_REMOTE_SEND_TOOLTIP,
  2473. args0: [{
  2474. check: "Number",
  2475. type: "input_value",
  2476. name: "pin"
  2477. }, {
  2478. check: ["Number", "Array"],
  2479. type: "input_value",
  2480. name: "address"
  2481. }, {
  2482. check: ["Number", "Array"],
  2483. type: "input_value",
  2484. name: "command"
  2485. }]
  2486. });
  2487. }
  2488. };
  2489. Blockly.Blocks.CocoRobo_bme280_hum_tem_pre = {
  2490. init: function init() {
  2491. this.jsonInit({
  2492. colour: CategoryColors.Common,
  2493. args0: [{
  2494. name: "hum_tem_pre",
  2495. options: [[Blockly.Msg.CocoRobo_tem, "temperature"], [Blockly.Msg.CocoRobo_hum, "humidity"], [Blockly.Msg.CocoRobo_pre, "pressure"]],
  2496. type: "field_dropdown"
  2497. }],
  2498. output: "Number",
  2499. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2500. tooltip: Blockly.Msg.CocoRobo_bme280_hum_tem_pre_TOOLTIP,
  2501. message0: Blockly.Msg.CocoRobo_bme280_hum_tem_pre_MESSAGE0
  2502. });
  2503. }
  2504. };
  2505. Blockly.Blocks.CocoRobo_compass_get_axis = {
  2506. init: function init() {
  2507. this.jsonInit({
  2508. colour: CategoryColors.System,
  2509. args0: [{
  2510. name: "axis",
  2511. options: axis,
  2512. type: "field_dropdown"
  2513. }],
  2514. output: "Number",
  2515. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2516. tooltip: Blockly.Msg.CocoRobo_COMPASS_GET_AXIS_TOOLTIP,
  2517. message0: Blockly.Msg.CocoRobo_COMPASS_GET_AXIS_MESSAGE0
  2518. });
  2519. }
  2520. };
  2521. Blockly.Blocks.CocoRobo_compass_get_angle = {
  2522. init: function init() {
  2523. this.jsonInit({
  2524. colour: CategoryColors.System,
  2525. output: "Number",
  2526. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  2527. tooltip: Blockly.Msg.CocoRobo_COMPASS_GET_ANGLE_TOOLTIP,
  2528. message0: Blockly.Msg.CocoRobo_COMPASS_GET_ANGLE_MESSAGE0
  2529. });
  2530. }
  2531. };
  2532. Blockly.Blocks.CocoRobo_audio_set_volume = {
  2533. init: function init() {
  2534. this.jsonInit({
  2535. inputsInline: !0,
  2536. nextStatement: null,
  2537. previousStatement: null,
  2538. colour: CategoryColors.Audio,
  2539. helpUrl: Blockly.Msg.CocoRobo_AUDIO_SET_VOLUME_HELPURL,
  2540. tooltip: Blockly.Msg.CocoRobo_AUDIO_SET_VOLUME_TOOLTIP,
  2541. message0: Blockly.Msg.CocoRobo_AUDIO_SET_VOLUME_MESSAGE0,
  2542. args0: [{
  2543. check: "Number",
  2544. type: "input_value",
  2545. name: "volume"
  2546. }]
  2547. });
  2548. }
  2549. };
  2550. Blockly.Blocks.CocoRobo_audio_xunfei_tts = {
  2551. init: function init() {
  2552. this.jsonInit({
  2553. inputsInline: !0,
  2554. nextStatement: null,
  2555. previousStatement: null,
  2556. colour: CategoryColors.Audio,
  2557. helpUrl: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_HELPURL,
  2558. tooltip: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_TOOLTIP,
  2559. message0: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_MESSAGE0,
  2560. args0: [{
  2561. check: "String",
  2562. type: "input_value",
  2563. name: "TEXT"
  2564. }]
  2565. });
  2566. }
  2567. };
  2568. Blockly.Blocks.CocoRobo_audio_xunfei_tts_config = {
  2569. init: function init() {
  2570. this.jsonInit({
  2571. inputsInline: !0,
  2572. nextStatement: null,
  2573. previousStatement: null,
  2574. colour: CategoryColors.Audio,
  2575. helpUrl: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_CONFIG_HELPURL,
  2576. tooltip: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_CONFIG_TOOLTIP,
  2577. message0: Blockly.Msg.CocoRobo_AUDIO_XUNFEI_TTS_CONFIG_MESSAGE0,
  2578. args0: [{
  2579. check: "String",
  2580. type: "input_value",
  2581. name: "APPID"
  2582. }, {
  2583. check: "String",
  2584. type: "input_value",
  2585. name: "API_KEY"
  2586. }]
  2587. });
  2588. }
  2589. };
  2590. Blockly.Blocks.CocoRobo_audio_play = {
  2591. init: function init() {
  2592. this.jsonInit({
  2593. inputsInline: !0,
  2594. nextStatement: null,
  2595. previousStatement: null,
  2596. colour: CategoryColors.Audio,
  2597. helpUrl: Blockly.Msg.CocoRobo_AUDIO_PLAY_HELPURL,
  2598. tooltip: Blockly.Msg.CocoRobo_AUDIO_PLAY_TOOLTIP,
  2599. message0: Blockly.Msg.CocoRobo_AUDIO_PLAY_MESSAGE0,
  2600. args0: [{
  2601. check: "String",
  2602. type: "input_value",
  2603. name: "url"
  2604. }]
  2605. });
  2606. }
  2607. };
  2608. Blockly.Blocks.CocoRobo_audio_cmd = {
  2609. init: function init() {
  2610. this.jsonInit({
  2611. inputsInline: !0,
  2612. nextStatement: null,
  2613. previousStatement: null,
  2614. colour: CategoryColors.Audio,
  2615. helpUrl: Blockly.Msg.CocoRobo_AUDIO_CMD_HELPURL,
  2616. tooltip: Blockly.Msg.CocoRobo_AUDIO_CMD_TOOLTIP,
  2617. message0: Blockly.Msg.CocoRobo_AUDIO_CMD_MESSAGE0,
  2618. args0: [{
  2619. options: [[Blockly.Msg.PAUSE, "pause"], [Blockly.Msg.PLAY, "resume"], [Blockly.Msg.STOP, "stop"]],
  2620. type: "field_dropdown",
  2621. name: "cmd"
  2622. }]
  2623. });
  2624. }
  2625. };
  2626. Blockly.Blocks.CocoRobo_audio_deinit = {
  2627. init: function init() {
  2628. this.jsonInit({
  2629. inputsInline: !0,
  2630. nextStatement: null,
  2631. previousStatement: null,
  2632. colour: CategoryColors.Audio,
  2633. helpUrl: Blockly.Msg.CocoRobo_AUDIO_DEINIT_HELPURL,
  2634. tooltip: Blockly.Msg.CocoRobo_AUDIO_DEINIT_TOOLTIP,
  2635. message0: Blockly.Msg.CocoRobo_AUDIO_DEINIT_MESSAGE0
  2636. });
  2637. }
  2638. };
  2639. Blockly.Blocks.CocoRobo_audio_init = {
  2640. init: function init() {
  2641. this.jsonInit({
  2642. inputsInline: !0,
  2643. nextStatement: null,
  2644. previousStatement: null,
  2645. colour: CategoryColors.Audio,
  2646. helpUrl: Blockly.Msg.CocoRobo_AUDIO_INIT_HELPURL,
  2647. tooltip: Blockly.Msg.CocoRobo_AUDIO_INIT_TOOLTIP,
  2648. message0: Blockly.Msg.CocoRobo_AUDIO_INIT_MESSAGE0
  2649. });
  2650. }
  2651. };
  2652. Blockly.Blocks.CocoRobo_record_init = {
  2653. init: function init() {
  2654. this.jsonInit({
  2655. inputsInline: !0,
  2656. nextStatement: null,
  2657. previousStatement: null,
  2658. colour: CategoryColors.Audio,
  2659. helpUrl: Blockly.Msg.CocoRobo_RECORD_INIT_HELPURL,
  2660. tooltip: Blockly.Msg.CocoRobo_RECORD_INIT_TOOLTIP,
  2661. message0: Blockly.Msg.CocoRobo_RECORD_INIT_MESSAGE0
  2662. });
  2663. }
  2664. };
  2665. Blockly.Blocks.CocoRobo_record_deinit = {
  2666. init: function init() {
  2667. this.jsonInit({
  2668. inputsInline: !0,
  2669. nextStatement: null,
  2670. previousStatement: null,
  2671. colour: CategoryColors.Audio,
  2672. helpUrl: Blockly.Msg.CocoRobo_RECORD_DEINIT_HELPURL,
  2673. tooltip: Blockly.Msg.CocoRobo_RECORD_DEINIT_TOOLTIP,
  2674. message0: Blockly.Msg.CocoRobo_RECORD_DEINIT_MESSAGE0
  2675. });
  2676. }
  2677. };
  2678. Blockly.Blocks.CocoRobo_record_wav = {
  2679. init: function init() {
  2680. this.jsonInit({
  2681. inputsInline: !0,
  2682. nextStatement: null,
  2683. previousStatement: null,
  2684. colour: CategoryColors.Audio,
  2685. helpUrl: Blockly.Msg.CocoRobo_RECORD_WAV_HELPURL,
  2686. tooltip: Blockly.Msg.CocoRobo_RECORD_WAV_TOOLTIP,
  2687. message0: Blockly.Msg.CocoRobo_RECORD_WAV_MESSAGE0,
  2688. args0: [{
  2689. check: "String",
  2690. type: "input_value",
  2691. name: "file_name"
  2692. }, {
  2693. check: "Number",
  2694. type: "input_value",
  2695. name: "record_time"
  2696. }]
  2697. });
  2698. }
  2699. };
  2700. Blockly.Blocks.CocoRobo_asr = {
  2701. init: function init() {
  2702. this.jsonInit({
  2703. inputsInline: !0,
  2704. output: "String",
  2705. colour: CategoryColors.AI,
  2706. helpUrl: Blockly.Msg.CocoRobo_ASR_HELPURL,
  2707. tooltip: Blockly.Msg.CocoRobo_ASR_TOOLTIP,
  2708. message0: Blockly.Msg.CocoRobo_ASR_MESSAGE0
  2709. });
  2710. }
  2711. };
  2712. Blockly.Blocks.CocoRobo_ir_recv = {
  2713. init: function init() {
  2714. this.jsonInit({
  2715. inputsInline: !0,
  2716. output: null,
  2717. colour: CategoryColors.Bluebit,
  2718. helpUrl: Blockly.Msg.CocoRobo_IR_RECV_HELPURL,
  2719. tooltip: Blockly.Msg.CocoRobo_IR_RECV_TOOLTIP,
  2720. message0: Blockly.Msg.CocoRobo_IR_RECV_MESSAGE0,
  2721. args0: [{
  2722. check: "Number",
  2723. type: "input_value",
  2724. name: "rx"
  2725. }]
  2726. });
  2727. }
  2728. };
  2729. Blockly.Blocks.CocoRobo_ir_trans = {
  2730. init: function init() {
  2731. this.jsonInit({
  2732. inputsInline: !0,
  2733. nextStatement: null,
  2734. previousStatement: null,
  2735. colour: CategoryColors.Bluebit,
  2736. helpUrl: Blockly.Msg.CocoRobo_IR_TRANS_HELPURL,
  2737. tooltip: Blockly.Msg.CocoRobo_IR_TRANS_TOOLTIP,
  2738. message0: Blockly.Msg.CocoRobo_IR_TRANS_MESSAGE0,
  2739. args0: [{
  2740. type: "input_value",
  2741. name: "data"
  2742. }, {
  2743. check: "Number",
  2744. type: "input_value",
  2745. name: "tx"
  2746. }]
  2747. });
  2748. }
  2749. };
  2750. Blockly.Blocks.CocoRobo_lcd_move = {
  2751. init: function init() {
  2752. this.jsonInit({
  2753. inputsInline: !0,
  2754. nextStatement: null,
  2755. previousStatement: null,
  2756. colour: CategoryColors.Bluebit,
  2757. helpUrl: Blockly.Msg.CocoRobo_LCD_MOVE_HELPURL,
  2758. tooltip: Blockly.Msg.CocoRobo_LCD_MOVE_TOOLTIP,
  2759. message0: Blockly.Msg.CocoRobo_LCD_MOVE_MESSAGE0,
  2760. args0: [{
  2761. options: [[Blockly.Msg.CocoRobo_LEFT, "left"], [Blockly.Msg.CocoRobo_RIGHT, "right"]],
  2762. type: "field_dropdown",
  2763. name: "move"
  2764. }]
  2765. });
  2766. }
  2767. };
  2768. Blockly.Blocks.CocoRobo_lcd_text_direction = {
  2769. init: function init() {
  2770. this.jsonInit({
  2771. inputsInline: !0,
  2772. nextStatement: null,
  2773. previousStatement: null,
  2774. colour: CategoryColors.Bluebit,
  2775. helpUrl: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_HELPURL,
  2776. tooltip: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_TOOLTIP,
  2777. message0: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_MESSAGE0,
  2778. args0: [{
  2779. options: [[Blockly.Msg.CocoRobo_LEFT_TO_RIGHT, "LEFT_TO_RIGHT"], [Blockly.Msg.CocoRobo_RIGHT_TO_LEFT, "RIGHT_TO_LEFT"]],
  2780. type: "field_dropdown",
  2781. name: "text_direction"
  2782. }]
  2783. });
  2784. }
  2785. };
  2786. Blockly.Blocks.CocoRobo_lcd_clear = {
  2787. init: function init() {
  2788. this.jsonInit({
  2789. inputsInline: !0,
  2790. nextStatement: null,
  2791. previousStatement: null,
  2792. colour: CategoryColors.Bluebit,
  2793. helpUrl: Blockly.Msg.CocoRobo_LCD_CLEAR_HELPURL,
  2794. tooltip: Blockly.Msg.CocoRobo_LCD_CLEAR_TOOLTIP,
  2795. message0: Blockly.Msg.CocoRobo_LCD_CLEAR_MESSAGE0
  2796. });
  2797. }
  2798. };
  2799. Blockly.Blocks.CocoRobo_lcd_set_cursor = {
  2800. init: function init() {
  2801. this.jsonInit({
  2802. inputsInline: !0,
  2803. nextStatement: null,
  2804. previousStatement: null,
  2805. colour: CategoryColors.Bluebit,
  2806. helpUrl: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_HELPURL,
  2807. tooltip: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_TOOLTIP,
  2808. message0: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_MESSAGE0,
  2809. args0: [{
  2810. check: "Number",
  2811. type: "input_value",
  2812. name: "column"
  2813. }, {
  2814. check: "Number",
  2815. type: "input_value",
  2816. name: "row"
  2817. }]
  2818. });
  2819. }
  2820. };
  2821. Blockly.Blocks.CocoRobo_lcd_cursor = {
  2822. init: function init() {
  2823. this.jsonInit({
  2824. inputsInline: !0,
  2825. nextStatement: null,
  2826. previousStatement: null,
  2827. colour: CategoryColors.Bluebit,
  2828. helpUrl: Blockly.Msg.CocoRobo_LCD_CURSOR_HELPURL,
  2829. tooltip: Blockly.Msg.CocoRobo_LCD_CURSOR_TOOLTIP,
  2830. message0: Blockly.Msg.CocoRobo_LCD_CURSOR_MESSAGE0,
  2831. args0: [{
  2832. options: [[Blockly.Msg.LABPLUS_USB_SWITCH_ON, "Cursor(1)"], [Blockly.Msg.LABPLUS_USB_SWITCH_OFF, "Cursor(0)"], [Blockly.Msg.CocoRobo_LCD_CURSOR_BLINK, "Blink(1)"], [Blockly.Msg.CocoRobo_LCD_CURSOR_NO_BLINK, "Blink(0)"]],
  2833. type: "field_dropdown",
  2834. name: "cursor_cmd"
  2835. }]
  2836. });
  2837. }
  2838. };
  2839. Blockly.Blocks.CocoRobo_lcd_home = {
  2840. init: function init() {
  2841. this.jsonInit({
  2842. inputsInline: !0,
  2843. nextStatement: null,
  2844. previousStatement: null,
  2845. colour: CategoryColors.Bluebit,
  2846. helpUrl: Blockly.Msg.CocoRobo_LCD_HOME_HELPURL,
  2847. tooltip: Blockly.Msg.CocoRobo_LCD_HOME_TOOLTIP,
  2848. message0: Blockly.Msg.CocoRobo_LCD_HOME_MESSAGE0
  2849. });
  2850. }
  2851. };
  2852. Blockly.Blocks.CocoRobo_lcd_print = {
  2853. init: function init() {
  2854. this.jsonInit({
  2855. inputsInline: !0,
  2856. nextStatement: null,
  2857. previousStatement: null,
  2858. colour: CategoryColors.Bluebit,
  2859. helpUrl: Blockly.Msg.CocoRobo_LCD_PRINT_HELPURL,
  2860. tooltip: Blockly.Msg.CocoRobo_LCD_PRINT_TOOLTIP,
  2861. message0: Blockly.Msg.CocoRobo_LCD_PRINT_MESSAGE0,
  2862. args0: [{
  2863. check: "String",
  2864. type: "input_value",
  2865. name: "display_str"
  2866. }]
  2867. });
  2868. }
  2869. };
  2870. Blockly.Blocks.CocoRobo_lcd_object = {
  2871. init: function init() {
  2872. this.jsonInit({
  2873. inputsInline: !0,
  2874. nextStatement: null,
  2875. previousStatement: null,
  2876. colour: CategoryColors.Bluebit,
  2877. helpUrl: Blockly.Msg.CocoRobo_LCD_OBJECT_HELPURL,
  2878. tooltip: Blockly.Msg.CocoRobo_LCD_OBJECT_TOOLTIP,
  2879. message0: Blockly.Msg.CocoRobo_LCD_OBJECT_MESSAGE0
  2880. });
  2881. }
  2882. };
  2883. Blockly.Blocks.CocoRobo_ir_recv = {
  2884. init: function init() {
  2885. this.jsonInit({
  2886. inputsInline: !0,
  2887. output: null,
  2888. colour: CategoryColors.Bluebit,
  2889. helpUrl: Blockly.Msg.CocoRobo_IR_RECV_HELPURL,
  2890. tooltip: Blockly.Msg.CocoRobo_IR_RECV_TOOLTIP,
  2891. message0: Blockly.Msg.CocoRobo_IR_RECV_MESSAGE0,
  2892. args0: [{
  2893. check: "Number",
  2894. type: "input_value",
  2895. name: "rx"
  2896. }]
  2897. });
  2898. }
  2899. };
  2900. Blockly.Blocks.CocoRobo_ir_trans = {
  2901. init: function init() {
  2902. this.jsonInit({
  2903. inputsInline: !0,
  2904. nextStatement: null,
  2905. previousStatement: null,
  2906. colour: CategoryColors.Bluebit,
  2907. helpUrl: Blockly.Msg.CocoRobo_IR_TRANS_HELPURL,
  2908. tooltip: Blockly.Msg.CocoRobo_IR_TRANS_TOOLTIP,
  2909. message0: Blockly.Msg.CocoRobo_IR_TRANS_MESSAGE0,
  2910. args0: [{
  2911. type: "input_value",
  2912. name: "data"
  2913. }, {
  2914. check: "Number",
  2915. type: "input_value",
  2916. name: "tx"
  2917. }]
  2918. });
  2919. }
  2920. };
  2921. Blockly.Blocks.CocoRobo_lcd_move = {
  2922. init: function init() {
  2923. this.jsonInit({
  2924. inputsInline: !0,
  2925. nextStatement: null,
  2926. previousStatement: null,
  2927. colour: CategoryColors.Bluebit,
  2928. helpUrl: Blockly.Msg.CocoRobo_LCD_MOVE_HELPURL,
  2929. tooltip: Blockly.Msg.CocoRobo_LCD_MOVE_TOOLTIP,
  2930. message0: Blockly.Msg.CocoRobo_LCD_MOVE_MESSAGE0,
  2931. args0: [{
  2932. options: [[Blockly.Msg.CocoRobo_LEFT, "left"], [Blockly.Msg.CocoRobo_RIGHT, "right"]],
  2933. type: "field_dropdown",
  2934. name: "move"
  2935. }]
  2936. });
  2937. }
  2938. };
  2939. Blockly.Blocks.CocoRobo_lcd_text_direction = {
  2940. init: function init() {
  2941. this.jsonInit({
  2942. inputsInline: !0,
  2943. nextStatement: null,
  2944. previousStatement: null,
  2945. colour: CategoryColors.Bluebit,
  2946. helpUrl: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_HELPURL,
  2947. tooltip: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_TOOLTIP,
  2948. message0: Blockly.Msg.CocoRobo_LCD_TEXT_DIRECTION_MESSAGE0,
  2949. args0: [{
  2950. options: [[Blockly.Msg.CocoRobo_LEFT_TO_RIGHT, "LEFT_TO_RIGHT"], [Blockly.Msg.CocoRobo_RIGHT_TO_LEFT, "RIGHT_TO_LEFT"]],
  2951. type: "field_dropdown",
  2952. name: "text_direction"
  2953. }]
  2954. });
  2955. }
  2956. };
  2957. Blockly.Blocks.CocoRobo_lcd_clear = {
  2958. init: function init() {
  2959. this.jsonInit({
  2960. inputsInline: !0,
  2961. nextStatement: null,
  2962. previousStatement: null,
  2963. colour: CategoryColors.Bluebit,
  2964. helpUrl: Blockly.Msg.CocoRobo_LCD_CLEAR_HELPURL,
  2965. tooltip: Blockly.Msg.CocoRobo_LCD_CLEAR_TOOLTIP,
  2966. message0: Blockly.Msg.CocoRobo_LCD_CLEAR_MESSAGE0
  2967. });
  2968. }
  2969. };
  2970. Blockly.Blocks.CocoRobo_lcd_set_cursor = {
  2971. init: function init() {
  2972. this.jsonInit({
  2973. inputsInline: !0,
  2974. nextStatement: null,
  2975. previousStatement: null,
  2976. colour: CategoryColors.Bluebit,
  2977. helpUrl: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_HELPURL,
  2978. tooltip: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_TOOLTIP,
  2979. message0: Blockly.Msg.CocoRobo_LCD_SET_CURSOR_MESSAGE0,
  2980. args0: [{
  2981. check: "Number",
  2982. type: "input_value",
  2983. name: "column"
  2984. }, {
  2985. check: "Number",
  2986. type: "input_value",
  2987. name: "row"
  2988. }]
  2989. });
  2990. }
  2991. };
  2992. Blockly.Blocks.CocoRobo_lcd_cursor = {
  2993. init: function init() {
  2994. this.jsonInit({
  2995. inputsInline: !0,
  2996. nextStatement: null,
  2997. previousStatement: null,
  2998. colour: CategoryColors.Bluebit,
  2999. helpUrl: Blockly.Msg.CocoRobo_LCD_CURSOR_HELPURL,
  3000. tooltip: Blockly.Msg.CocoRobo_LCD_CURSOR_TOOLTIP,
  3001. message0: Blockly.Msg.CocoRobo_LCD_CURSOR_MESSAGE0,
  3002. args0: [{
  3003. options: [[Blockly.Msg.LABPLUS_USB_SWITCH_ON, "Cursor(1)"], [Blockly.Msg.LABPLUS_USB_SWITCH_OFF, "Cursor(0)"], [Blockly.Msg.CocoRobo_LCD_CURSOR_BLINK, "Blink(1)"], [Blockly.Msg.CocoRobo_LCD_CURSOR_NO_BLINK, "Blink(0)"]],
  3004. type: "field_dropdown",
  3005. name: "cursor_cmd"
  3006. }]
  3007. });
  3008. }
  3009. };
  3010. Blockly.Blocks.CocoRobo_lcd_home = {
  3011. init: function init() {
  3012. this.jsonInit({
  3013. inputsInline: !0,
  3014. nextStatement: null,
  3015. previousStatement: null,
  3016. colour: CategoryColors.Bluebit,
  3017. helpUrl: Blockly.Msg.CocoRobo_LCD_HOME_HELPURL,
  3018. tooltip: Blockly.Msg.CocoRobo_LCD_HOME_TOOLTIP,
  3019. message0: Blockly.Msg.CocoRobo_LCD_HOME_MESSAGE0
  3020. });
  3021. }
  3022. };
  3023. Blockly.Blocks.CocoRobo_lcd_print = {
  3024. init: function init() {
  3025. this.jsonInit({
  3026. inputsInline: !0,
  3027. nextStatement: null,
  3028. previousStatement: null,
  3029. colour: CategoryColors.Bluebit,
  3030. helpUrl: Blockly.Msg.CocoRobo_LCD_PRINT_HELPURL,
  3031. tooltip: Blockly.Msg.CocoRobo_LCD_PRINT_TOOLTIP,
  3032. message0: Blockly.Msg.CocoRobo_LCD_PRINT_MESSAGE0,
  3033. args0: [{
  3034. check: "String",
  3035. type: "input_value",
  3036. name: "display_str"
  3037. }]
  3038. });
  3039. }
  3040. };
  3041. Blockly.Blocks.CocoRobo_lcd_object = {
  3042. init: function init() {
  3043. this.jsonInit({
  3044. inputsInline: !0,
  3045. nextStatement: null,
  3046. previousStatement: null,
  3047. colour: CategoryColors.Bluebit,
  3048. helpUrl: Blockly.Msg.CocoRobo_LCD_OBJECT_HELPURL,
  3049. tooltip: Blockly.Msg.CocoRobo_LCD_OBJECT_TOOLTIP,
  3050. message0: Blockly.Msg.CocoRobo_LCD_OBJECT_MESSAGE0
  3051. });
  3052. }
  3053. };
  3054. Blockly.Blocks.CocoRobo_bluebit_lcd_bmp = {
  3055. init: function init() {
  3056. this.jsonInit({
  3057. inputsInline: !0,
  3058. nextStatement: null,
  3059. previousStatement: null,
  3060. colour: CategoryColors.Bluebit,
  3061. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_BMP_HELPURL,
  3062. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_BMP_TOOLTIP,
  3063. message0: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_BMP_MESSAGE0,
  3064. args0: [{
  3065. check: "Number",
  3066. type: "input_value",
  3067. name: "x"
  3068. }, {
  3069. check: "Number",
  3070. type: "input_value",
  3071. name: "y"
  3072. }, {
  3073. check: "Number",
  3074. type: "input_value",
  3075. name: "w"
  3076. }, {
  3077. check: "Number",
  3078. type: "input_value",
  3079. name: "h"
  3080. }, {
  3081. check: "Array",
  3082. type: "input_value",
  3083. name: "bmp"
  3084. }]
  3085. });
  3086. }
  3087. };
  3088. Blockly.Blocks.CocoRobo_bluebit_lcd_clear = {
  3089. init: function init() {
  3090. this.jsonInit({
  3091. inputsInline: !0,
  3092. nextStatement: null,
  3093. previousStatement: null,
  3094. colour: CategoryColors.Bluebit,
  3095. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_CLEAR_HELPURL,
  3096. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_CLEAR_TOOLTIP,
  3097. message0: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_CLEAR_MESSAGE0
  3098. });
  3099. }
  3100. };
  3101. Blockly.Blocks.CocoRobo_bluebit_lcd_init = {
  3102. init: function init() {
  3103. this.jsonInit({
  3104. inputsInline: !0,
  3105. nextStatement: null,
  3106. previousStatement: null,
  3107. colour: CategoryColors.Bluebit,
  3108. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_INIT_HELPURL,
  3109. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_INIT_TOOLTIP,
  3110. message0: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_INIT_MESSAGE0,
  3111. args0: [{
  3112. check: "Number",
  3113. type: "input_value",
  3114. name: "tx"
  3115. }, {
  3116. check: "Number",
  3117. type: "input_value",
  3118. name: "rx"
  3119. }]
  3120. });
  3121. }
  3122. };
  3123. Blockly.Blocks.CocoRobo_bluebit_lcd_print = {
  3124. init: function init() {
  3125. this.jsonInit({
  3126. inputsInline: !0,
  3127. nextStatement: null,
  3128. previousStatement: null,
  3129. colour: CategoryColors.Bluebit,
  3130. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_PRINT_HELPURL,
  3131. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_PRINT_TOOLTIP,
  3132. message0: Blockly.Msg.CocoRobo_BLUEBIT_OLCD_PRINT_MESSAGE0,
  3133. args0: [{
  3134. check: "String",
  3135. type: "input_value",
  3136. name: "_print"
  3137. }, {
  3138. check: "Number",
  3139. type: "input_value",
  3140. name: "x"
  3141. }, {
  3142. check: "Number",
  3143. type: "input_value",
  3144. name: "y"
  3145. }]
  3146. });
  3147. }
  3148. };
  3149. Blockly.Blocks.CocoRobo_bluebit_extio_writeio = {
  3150. init: function init() {
  3151. this.jsonInit({
  3152. inputsInline: !0,
  3153. nextStatement: null,
  3154. previousStatement: null,
  3155. colour: CategoryColors.Bluebit,
  3156. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_WRITEIO_HELPURL,
  3157. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_WRITEIO_TOOLTIP,
  3158. message0: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_WRITEIO_MESSAGE0,
  3159. args0: [{
  3160. type: "input_value",
  3161. name: "io_value"
  3162. }, {
  3163. options: [["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"]],
  3164. type: "field_dropdown",
  3165. name: "IO"
  3166. }]
  3167. });
  3168. }
  3169. };
  3170. Blockly.Blocks.CocoRobo_bluebit_extio_readio = {
  3171. init: function init() {
  3172. this.jsonInit({
  3173. inputsInline: !0,
  3174. output: "Number",
  3175. colour: CategoryColors.Bluebit,
  3176. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_READIO_HELPURL,
  3177. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_READIO_TOOLTIP,
  3178. message0: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_READIO_MESSAGE0,
  3179. args0: [{
  3180. options: [["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"]],
  3181. type: "field_dropdown",
  3182. name: "IO"
  3183. }]
  3184. });
  3185. }
  3186. };
  3187. Blockly.Blocks.CocoRobo_bluebit_extio_iomode = {
  3188. init: function init() {
  3189. this.jsonInit({
  3190. inputsInline: !0,
  3191. nextStatement: null,
  3192. previousStatement: null,
  3193. colour: CategoryColors.Bluebit,
  3194. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_IOMODE_HELPURL,
  3195. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_IOMODE_TOOLTIP,
  3196. message0: Blockly.Msg.CocoRobo_BLUEBIT_EXTIO_IOMODE_MESSAGE0,
  3197. args0: [{
  3198. options: [[Blockly.Msg.LABPLUS_COMPITITION_INIT_EXTENDED_PINS_OUTPUT, "0"], [Blockly.Msg.LABPLUS_COMPITITION_INIT_EXTENDED_PINS_INPUT, "1"]],
  3199. type: "field_dropdown",
  3200. name: "mode"
  3201. }, {
  3202. options: [["0", "0"], ["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"], ["5", "5"], ["6", "6"], ["7", "7"]],
  3203. type: "field_dropdown",
  3204. name: "IO"
  3205. }]
  3206. });
  3207. }
  3208. };
  3209. Blockly.Blocks.CocoRobo_bluebit_mp3_singleLoop = {
  3210. init: function init() {
  3211. this.jsonInit({
  3212. inputsInline: !0,
  3213. nextStatement: null,
  3214. previousStatement: null,
  3215. colour: CategoryColors.Bluebit,
  3216. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_SINGLELOOP_HELPURL,
  3217. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_SINGLELOOP_TOOLTIP,
  3218. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_SINGLELOOP_MESSAGE0,
  3219. args0: [{
  3220. options: [[Blockly.Msg.LABPLUS_USB_SWITCH_ON, "1"], [Blockly.Msg.LABPLUS_USB_SWITCH_OFF, "0"]],
  3221. type: "field_dropdown",
  3222. name: "singleLoop"
  3223. }]
  3224. });
  3225. }
  3226. };
  3227. Blockly.Blocks.CocoRobo_bluebit_mp3_cmd = {
  3228. init: function init() {
  3229. this.jsonInit({
  3230. inputsInline: !0,
  3231. nextStatement: null,
  3232. previousStatement: null,
  3233. colour: CategoryColors.Bluebit,
  3234. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_CMD_HELPURL,
  3235. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_CMD_TOOLTIP,
  3236. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_CMD_MESSAGE0,
  3237. args0: [{
  3238. options: [[Blockly.Msg.PAUSE, "pause"], [Blockly.Msg.STOP, "stop"], [Blockly.Msg.PLAY, "play"], [Blockly.Msg.PLAYNEXT, "playNext"], [Blockly.Msg.PLAYPREV, "playPrev"]],
  3239. type: "field_dropdown",
  3240. name: "cmd"
  3241. }]
  3242. });
  3243. }
  3244. };
  3245. Blockly.Blocks.CocoRobo_bluebit_mp3_play_song = {
  3246. init: function init() {
  3247. this.jsonInit({
  3248. inputsInline: !0,
  3249. nextStatement: null,
  3250. previousStatement: null,
  3251. colour: CategoryColors.Bluebit,
  3252. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_PLAY_SONG_HELPURL,
  3253. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_PLAY_SONG_TOOLTIP,
  3254. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_PLAY_SONG_MESSAGE0,
  3255. args0: [{
  3256. check: "Number",
  3257. type: "input_value",
  3258. name: "song_order"
  3259. }]
  3260. });
  3261. }
  3262. };
  3263. Blockly.Blocks.CocoRobo_bluebit_mp3_volume_plus = {
  3264. init: function init() {
  3265. this.jsonInit({
  3266. inputsInline: !0,
  3267. nextStatement: null,
  3268. previousStatement: null,
  3269. colour: CategoryColors.Bluebit,
  3270. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_PLUS_HELPURL,
  3271. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_PLUS_TOOLTIP,
  3272. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_PLUS_MESSAGE0,
  3273. args0: [{
  3274. options: [[Blockly.Msg.CocoRobo_PLUS_1, "volumeInc"], [Blockly.Msg.CocoRobo_MINUS_1, "volumeDec"]],
  3275. type: "field_dropdown",
  3276. name: "volume_plus"
  3277. }]
  3278. });
  3279. }
  3280. };
  3281. Blockly.Blocks.CocoRobo_bluebit_mp3_init = {
  3282. init: function init() {
  3283. this.jsonInit({
  3284. inputsInline: !0,
  3285. nextStatement: null,
  3286. previousStatement: null,
  3287. colour: CategoryColors.Bluebit,
  3288. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_INIT_HELPURL,
  3289. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_INIT_TOOLTIP,
  3290. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_INIT_MESSAGE0,
  3291. args0: [{
  3292. check: "Number",
  3293. type: "input_value",
  3294. name: "mp3_tx"
  3295. }]
  3296. });
  3297. }
  3298. };
  3299. Blockly.Blocks.CocoRobo_bluebit_mp3_volume = {
  3300. init: function init() {
  3301. this.jsonInit({
  3302. inputsInline: !0,
  3303. nextStatement: null,
  3304. previousStatement: null,
  3305. colour: CategoryColors.Bluebit,
  3306. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_HELPURL,
  3307. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_TOOLTIP,
  3308. message0: Blockly.Msg.CocoRobo_BLUEBIT_MP3_VOLUME_MESSAGE0,
  3309. args0: [{
  3310. check: "Number",
  3311. type: "input_value",
  3312. name: "volume_level"
  3313. }]
  3314. });
  3315. }
  3316. };
  3317. Blockly.Blocks.CocoRobo_bluebit_matrix_show = {
  3318. init: function init() {
  3319. this.jsonInit({
  3320. inputsInline: !0,
  3321. nextStatement: null,
  3322. previousStatement: null,
  3323. colour: CategoryColors.Bluebit,
  3324. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_SHOW_HELPURL,
  3325. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_SHOW_TOOLTIP,
  3326. message0: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_SHOW_MESSAGE0
  3327. });
  3328. }
  3329. };
  3330. Blockly.Blocks.CocoRobo_bluebit_matrix_bitmap = {
  3331. init: function init() {
  3332. this.jsonInit({
  3333. colour: CategoryColors.Bluebit,
  3334. args0: [{
  3335. type: "input_dummy"
  3336. }, {
  3337. checked: !1,
  3338. type: "field_checkbox",
  3339. name: "00"
  3340. }, {
  3341. checked: !1,
  3342. type: "field_checkbox",
  3343. name: "01"
  3344. }, {
  3345. checked: !1,
  3346. type: "field_checkbox",
  3347. name: "02"
  3348. }, {
  3349. checked: !1,
  3350. type: "field_checkbox",
  3351. name: "03"
  3352. }, {
  3353. checked: !1,
  3354. type: "field_checkbox",
  3355. name: "04"
  3356. }, {
  3357. checked: !1,
  3358. type: "field_checkbox",
  3359. name: "05"
  3360. }, {
  3361. checked: !1,
  3362. type: "field_checkbox",
  3363. name: "06"
  3364. }, {
  3365. checked: !1,
  3366. type: "field_checkbox",
  3367. name: "07"
  3368. }, {
  3369. type: "input_dummy"
  3370. }, {
  3371. checked: !1,
  3372. type: "field_checkbox",
  3373. name: "10"
  3374. }, {
  3375. checked: !1,
  3376. type: "field_checkbox",
  3377. name: "11"
  3378. }, {
  3379. checked: !1,
  3380. type: "field_checkbox",
  3381. name: "12"
  3382. }, {
  3383. checked: !1,
  3384. type: "field_checkbox",
  3385. name: "13"
  3386. }, {
  3387. checked: !1,
  3388. type: "field_checkbox",
  3389. name: "14"
  3390. }, {
  3391. checked: !1,
  3392. type: "field_checkbox",
  3393. name: "15"
  3394. }, {
  3395. checked: !1,
  3396. type: "field_checkbox",
  3397. name: "16"
  3398. }, {
  3399. checked: !1,
  3400. type: "field_checkbox",
  3401. name: "17"
  3402. }, {
  3403. type: "input_dummy"
  3404. }, {
  3405. checked: !1,
  3406. type: "field_checkbox",
  3407. name: "20"
  3408. }, {
  3409. checked: !1,
  3410. type: "field_checkbox",
  3411. name: "21"
  3412. }, {
  3413. checked: !1,
  3414. type: "field_checkbox",
  3415. name: "22"
  3416. }, {
  3417. checked: !1,
  3418. type: "field_checkbox",
  3419. name: "23"
  3420. }, {
  3421. checked: !1,
  3422. type: "field_checkbox",
  3423. name: "24"
  3424. }, {
  3425. checked: !1,
  3426. type: "field_checkbox",
  3427. name: "25"
  3428. }, {
  3429. checked: !1,
  3430. type: "field_checkbox",
  3431. name: "26"
  3432. }, {
  3433. checked: !1,
  3434. type: "field_checkbox",
  3435. name: "27"
  3436. }, {
  3437. type: "input_dummy"
  3438. }, {
  3439. checked: !1,
  3440. type: "field_checkbox",
  3441. name: "30"
  3442. }, {
  3443. checked: !1,
  3444. type: "field_checkbox",
  3445. name: "31"
  3446. }, {
  3447. checked: !1,
  3448. type: "field_checkbox",
  3449. name: "32"
  3450. }, {
  3451. checked: !1,
  3452. type: "field_checkbox",
  3453. name: "33"
  3454. }, {
  3455. checked: !1,
  3456. type: "field_checkbox",
  3457. name: "34"
  3458. }, {
  3459. checked: !1,
  3460. type: "field_checkbox",
  3461. name: "35"
  3462. }, {
  3463. checked: !1,
  3464. type: "field_checkbox",
  3465. name: "36"
  3466. }, {
  3467. checked: !1,
  3468. type: "field_checkbox",
  3469. name: "37"
  3470. }, {
  3471. type: "input_dummy"
  3472. }, {
  3473. checked: !1,
  3474. type: "field_checkbox",
  3475. name: "40"
  3476. }, {
  3477. checked: !1,
  3478. type: "field_checkbox",
  3479. name: "41"
  3480. }, {
  3481. checked: !1,
  3482. type: "field_checkbox",
  3483. name: "42"
  3484. }, {
  3485. checked: !1,
  3486. type: "field_checkbox",
  3487. name: "43"
  3488. }, {
  3489. checked: !1,
  3490. type: "field_checkbox",
  3491. name: "44"
  3492. }, {
  3493. checked: !1,
  3494. type: "field_checkbox",
  3495. name: "45"
  3496. }, {
  3497. checked: !1,
  3498. type: "field_checkbox",
  3499. name: "46"
  3500. }, {
  3501. checked: !1,
  3502. type: "field_checkbox",
  3503. name: "47"
  3504. }, {
  3505. type: "input_dummy"
  3506. }, {
  3507. checked: !1,
  3508. type: "field_checkbox",
  3509. name: "50"
  3510. }, {
  3511. checked: !1,
  3512. type: "field_checkbox",
  3513. name: "51"
  3514. }, {
  3515. checked: !1,
  3516. type: "field_checkbox",
  3517. name: "52"
  3518. }, {
  3519. checked: !1,
  3520. type: "field_checkbox",
  3521. name: "53"
  3522. }, {
  3523. checked: !1,
  3524. type: "field_checkbox",
  3525. name: "54"
  3526. }, {
  3527. checked: !1,
  3528. type: "field_checkbox",
  3529. name: "55"
  3530. }, {
  3531. checked: !1,
  3532. type: "field_checkbox",
  3533. name: "56"
  3534. }, {
  3535. checked: !1,
  3536. type: "field_checkbox",
  3537. name: "57"
  3538. }, {
  3539. type: "input_dummy"
  3540. }, {
  3541. checked: !1,
  3542. type: "field_checkbox",
  3543. name: "60"
  3544. }, {
  3545. checked: !1,
  3546. type: "field_checkbox",
  3547. name: "61"
  3548. }, {
  3549. checked: !1,
  3550. type: "field_checkbox",
  3551. name: "62"
  3552. }, {
  3553. checked: !1,
  3554. type: "field_checkbox",
  3555. name: "63"
  3556. }, {
  3557. checked: !1,
  3558. type: "field_checkbox",
  3559. name: "64"
  3560. }, {
  3561. checked: !1,
  3562. type: "field_checkbox",
  3563. name: "65"
  3564. }, {
  3565. checked: !1,
  3566. type: "field_checkbox",
  3567. name: "66"
  3568. }, {
  3569. checked: !1,
  3570. type: "field_checkbox",
  3571. name: "67"
  3572. }, {
  3573. type: "input_dummy"
  3574. }, {
  3575. checked: !1,
  3576. type: "field_checkbox",
  3577. name: "70"
  3578. }, {
  3579. checked: !1,
  3580. type: "field_checkbox",
  3581. name: "71"
  3582. }, {
  3583. checked: !1,
  3584. type: "field_checkbox",
  3585. name: "72"
  3586. }, {
  3587. checked: !1,
  3588. type: "field_checkbox",
  3589. name: "73"
  3590. }, {
  3591. checked: !1,
  3592. type: "field_checkbox",
  3593. name: "74"
  3594. }, {
  3595. checked: !1,
  3596. type: "field_checkbox",
  3597. name: "75"
  3598. }, {
  3599. checked: !1,
  3600. type: "field_checkbox",
  3601. name: "76"
  3602. }, {
  3603. checked: !1,
  3604. type: "field_checkbox",
  3605. name: "77"
  3606. }],
  3607. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BITMAP_HELPURL,
  3608. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BITMAP_TOOLTIP,
  3609. message0: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BITMAP_MESSAGE0,
  3610. nextStatement: null,
  3611. previousStatement: null
  3612. });
  3613. }
  3614. };
  3615. Blockly.Blocks.CocoRobo_bluebit_matrix_fill = {
  3616. init: function init() {
  3617. this.jsonInit({
  3618. inputsInline: !0,
  3619. nextStatement: null,
  3620. previousStatement: null,
  3621. colour: CategoryColors.Bluebit,
  3622. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_FILL_HELPURL,
  3623. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_FILL_TOOLTIP,
  3624. message0: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_FILL_MESSAGE0,
  3625. args0: [{
  3626. options: [[Blockly.Msg.CocoRobo_display_fill_1, "1"], [Blockly.Msg.CocoRobo_display_fill_0, "0"]],
  3627. type: "field_dropdown",
  3628. name: "fill_clear"
  3629. }]
  3630. });
  3631. }
  3632. };
  3633. Blockly.Blocks.CocoRobo_bluebit_matrix_brightness = {
  3634. init: function init() {
  3635. this.jsonInit({
  3636. inputsInline: !0,
  3637. nextStatement: null,
  3638. previousStatement: null,
  3639. colour: CategoryColors.Bluebit,
  3640. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BRIGHTNESS_HELPURL,
  3641. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BRIGHTNESS_TOOLTIP,
  3642. message0: Blockly.Msg.CocoRobo_BLUEBIT_MATRIX_BRIGHTNESS_MESSAGE0,
  3643. args0: [{
  3644. check: "Number",
  3645. type: "input_value",
  3646. name: "brightness_level"
  3647. }]
  3648. });
  3649. }
  3650. };
  3651. Blockly.Blocks.CocoRobo_bluebit_midi_play = {
  3652. init: function init() {
  3653. this.jsonInit({
  3654. inputsInline: !0,
  3655. nextStatement: null,
  3656. previousStatement: null,
  3657. colour: CategoryColors.Bluebit,
  3658. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_PLAY_HELPURL,
  3659. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_PLAY_TOOLTIP,
  3660. message0: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_PLAY_MESSAGE0,
  3661. args0: [{
  3662. options: [[Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_PLAY, "1"], [Blockly.Msg.STOP, "0"]],
  3663. type: "field_dropdown",
  3664. name: "play_stop"
  3665. }, {
  3666. check: "Number",
  3667. type: "input_value",
  3668. name: "play_note"
  3669. }]
  3670. });
  3671. }
  3672. };
  3673. Blockly.Blocks.CocoRobo_bluebit_midi_instrument = {
  3674. init: function init() {
  3675. this.jsonInit({
  3676. inputsInline: !0,
  3677. nextStatement: null,
  3678. previousStatement: null,
  3679. colour: CategoryColors.Bluebit,
  3680. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_INSTRUMENT_HELPURL,
  3681. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_INSTRUMENT_TOOLTIP,
  3682. message0: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_INSTRUMENT_MESSAGE0,
  3683. args0: [{
  3684. options: [[Blockly.Msg.MIDI_PIANO, "1"], [Blockly.Msg.MIDI_BRIGHTACOUSTICPIANO, "2"], [Blockly.Msg.MIDI_ELECTRICGRANDPIANO, "3"], [Blockly.Msg.MIDI_HARPSICHORD, "7"], [Blockly.Msg.MIDI_CELESTA, "9"], [Blockly.Msg.MIDI_GLOCKENSPIEL, "10"], [Blockly.Msg.MIDI_MARIMBA, "13"], [Blockly.Msg.MIDI_XYLOPHONE, "14"], [Blockly.Msg.MIDI_TUBULARBELL, "15"], [Blockly.Msg.MIDI_DULCIMER, "16"], [Blockly.Msg.MIDI_VIBRAPHONE, "12"], [Blockly.Msg.MIDI_ORGAN, "17"], [Blockly.Msg.MIDI_ACOUSTIC_GUITAR, "25"], [Blockly.Msg.MIDI_ELECTRIC_GUITAR, "31"], [Blockly.Msg.MIDI_ACOUSTIC_BASS, "33"], [Blockly.Msg.MIDI_STRING_ENSEMBLE, "49"], [Blockly.Msg.MIDI_VIOLIN, "41"], [Blockly.Msg.MIDI_TRUMPET, "57"], [Blockly.Msg.MIDI_SAX, "65"], [Blockly.Msg.MIDI_STEEL_DRUMS, "115"], [Blockly.Msg.MIDI_LEAD, "81"], [Blockly.Msg.MIDI_PAD, "89"]],
  3685. type: "field_dropdown",
  3686. name: "midi_instrument"
  3687. }]
  3688. });
  3689. }
  3690. };
  3691. Blockly.Blocks.CocoRobo_bluebit_midi_volume = {
  3692. init: function init() {
  3693. this.jsonInit({
  3694. inputsInline: !0,
  3695. nextStatement: null,
  3696. previousStatement: null,
  3697. colour: CategoryColors.Bluebit,
  3698. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_VOLUME_HELPURL,
  3699. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_VOLUME_TOOLTIP,
  3700. message0: Blockly.Msg.CocoRobo_BLUEBIT_MIDI_VOLUME_MESSAGE0,
  3701. args0: [{
  3702. check: "Number",
  3703. type: "input_value",
  3704. name: "midi_volume"
  3705. }]
  3706. });
  3707. }
  3708. };
  3709. Blockly.Blocks.CocoRobo_bluebit_init_midi = {
  3710. init: function init() {
  3711. this.jsonInit({
  3712. inputsInline: !0,
  3713. nextStatement: null,
  3714. previousStatement: null,
  3715. colour: CategoryColors.Bluebit,
  3716. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_INIT_MIDI_HELPURL,
  3717. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_INIT_MIDI_TOOLTIP,
  3718. message0: Blockly.Msg.CocoRobo_BLUEBIT_INIT_MIDI_MESSAGE0,
  3719. args0: [{
  3720. check: "Number",
  3721. type: "input_value",
  3722. name: "midi_tx"
  3723. }]
  3724. });
  3725. }
  3726. };
  3727. Blockly.Blocks.CocoRobo_bluebit_get_all_color = {
  3728. init: function init() {
  3729. this.jsonInit({
  3730. inputsInline: !0,
  3731. output: "Array",
  3732. colour: CategoryColors.Bluebit,
  3733. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_HELPURL,
  3734. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_TOOLTIP,
  3735. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_MESSAGE0
  3736. });
  3737. }
  3738. };
  3739. Blockly.Blocks.CocoRobo_bluebit_get_color = {
  3740. init: function init() {
  3741. this.jsonInit({
  3742. inputsInline: !0,
  3743. output: "Number",
  3744. colour: CategoryColors.Bluebit,
  3745. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_HELPURL,
  3746. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_TOOLTIP,
  3747. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_MESSAGE0,
  3748. args0: [{
  3749. name: "r_g_b",
  3750. type: "field_dropdown",
  3751. options: [[Blockly.Msg.CocoRobo_RED, "0"], [Blockly.Msg.CocoRobo_GREEN, "1"], [Blockly.Msg.CocoRobo_BLUE, "2"]]
  3752. }]
  3753. });
  3754. }
  3755. };
  3756. Blockly.Blocks.CocoRobo_bluebit_get_all_color_hsv = {
  3757. init: function init() {
  3758. this.jsonInit({
  3759. inputsInline: !0,
  3760. output: "Array",
  3761. colour: CategoryColors.Bluebit,
  3762. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_HSV_HELPURL,
  3763. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_HSV_TOOLTIP,
  3764. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_ALL_COLOR_HSV_MESSAGE0
  3765. });
  3766. }
  3767. };
  3768. Blockly.Blocks.CocoRobo_bluebit_get_color_hsv = {
  3769. init: function init() {
  3770. this.jsonInit({
  3771. inputsInline: !0,
  3772. output: "Number",
  3773. colour: CategoryColors.Bluebit,
  3774. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_HSV_HELPURL,
  3775. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_HSV_TOOLTIP,
  3776. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_COLOR_HSV_MESSAGE0,
  3777. args0: [{
  3778. name: "hsv",
  3779. type: "field_dropdown",
  3780. options: [["H", "0"], ["S", "1"], ["V", "2"]]
  3781. }]
  3782. });
  3783. }
  3784. };
  3785. Blockly.Blocks.CocoRobo_bluebit_get_force_measure = {
  3786. init: function init() {
  3787. this.jsonInit({
  3788. inputsInline: !0,
  3789. output: "Number",
  3790. colour: CategoryColors.Bluebit,
  3791. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_FORCE_MEASURE_HELPURL,
  3792. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_FORCE_MEASURE_TOOLTIP,
  3793. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_FORCE_MEASURE_MESSAGE0,
  3794. args0: [{
  3795. name: "measure",
  3796. type: "field_dropdown",
  3797. options: [["0", "0X64"], ["1", "0X65"], ["2", "0X66"], ["3", "0X67"]]
  3798. }]
  3799. });
  3800. }
  3801. };
  3802. Blockly.Blocks.CocoRobo_bluebit_get_electricity_measure = {
  3803. init: function init() {
  3804. this.jsonInit({
  3805. inputsInline: !0,
  3806. output: "Number",
  3807. colour: CategoryColors.Bluebit,
  3808. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_ELECTRICITY_MEASURE_HELPURL,
  3809. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_ELECTRICITY_MEASURE_TOOLTIP,
  3810. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_ELECTRICITY_MEASURE_MESSAGE0,
  3811. args0: [{
  3812. name: "measure",
  3813. type: "field_dropdown",
  3814. options: [["0", "0X60"], ["1", "0X61"], ["2", "0X62"], ["3", "0X63"]]
  3815. }]
  3816. });
  3817. }
  3818. };
  3819. Blockly.Blocks.CocoRobo_bluebit_get_voltage_measure = {
  3820. init: function init() {
  3821. this.jsonInit({
  3822. inputsInline: !0,
  3823. output: "Number",
  3824. colour: CategoryColors.Bluebit,
  3825. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_VOLTAGE_MEASURE_HELPURL,
  3826. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_VOLTAGE_MEASURE_TOOLTIP,
  3827. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_VOLTAGE_MEASURE_MESSAGE0,
  3828. args0: [{
  3829. name: "measure",
  3830. type: "field_dropdown",
  3831. options: [["0", "0X6A"], ["1", "0X6B"], ["2", "0X6C"], ["3", "0X6D"]]
  3832. }]
  3833. });
  3834. }
  3835. };
  3836. Blockly.Blocks.CocoRobo_bluebit_get_magnetic_measure = {
  3837. init: function init() {
  3838. this.jsonInit({
  3839. inputsInline: !0,
  3840. output: "Number",
  3841. colour: CategoryColors.Bluebit,
  3842. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_MAGNETIC_MEASURE_HELPURL,
  3843. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_MAGNETIC_MEASURE_TOOLTIP,
  3844. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_MAGNETIC_MEASURE_MESSAGE0,
  3845. args0: [{
  3846. name: "measure",
  3847. type: "field_dropdown",
  3848. options: [["0", "0X58"], ["1", "0X59"], ["2", "0X5A"], ["3", "0X5B"]]
  3849. }]
  3850. });
  3851. }
  3852. };
  3853. Blockly.Blocks.CocoRobo_bluebit_get_PH_measure = {
  3854. init: function init() {
  3855. this.jsonInit({
  3856. inputsInline: !0,
  3857. output: "Number",
  3858. colour: CategoryColors.Bluebit,
  3859. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_PH_MEASURE_HELPURL,
  3860. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_PH_MEASURE_TOOLTIP,
  3861. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_PH_MEASURE_MESSAGE0,
  3862. args0: [{
  3863. name: "measure",
  3864. type: "field_dropdown",
  3865. options: [["0", "0X54"], ["1", "0X55"]]
  3866. }]
  3867. });
  3868. }
  3869. };
  3870. Blockly.Blocks.CocoRobo_bluebit_get_tds_measure = {
  3871. init: function init() {
  3872. this.jsonInit({
  3873. inputsInline: !0,
  3874. output: "Number",
  3875. colour: CategoryColors.Bluebit,
  3876. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_TDS_MEASURE_HELPURL,
  3877. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_TDS_MEASURE_TOOLTIP,
  3878. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_TDS_MEASURE_MESSAGE0,
  3879. args0: [{
  3880. name: "measure",
  3881. type: "field_dropdown",
  3882. options: [["0", "0X68"], ["1", "0X69"]]
  3883. }]
  3884. });
  3885. }
  3886. };
  3887. Blockly.Blocks.CocoRobo_bluebit_get_pressure_measure = {
  3888. init: function init() {
  3889. this.jsonInit({
  3890. inputsInline: !0,
  3891. output: "Number",
  3892. colour: CategoryColors.Bluebit,
  3893. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_PRESSURE_MEASURE_HELPURL,
  3894. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_PRESSURE_MEASURE_TOOLTIP,
  3895. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_PRESSURE_MEASURE_MESSAGE0,
  3896. args0: [{
  3897. name: "measure",
  3898. type: "field_dropdown",
  3899. options: [["0", "0X5C"], ["1", "0X5D"], ["2", "0X5E"], ["3", "0X5F"]]
  3900. }]
  3901. });
  3902. }
  3903. };
  3904. Blockly.Blocks.CocoRobo_bluebit_get_photogate_timer_measure = {
  3905. init: function init() {
  3906. this.jsonInit({
  3907. inputsInline: !0,
  3908. output: "Number",
  3909. colour: CategoryColors.Bluebit,
  3910. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_PHOTOGATE_TIMER_MEASURE_HELPURL,
  3911. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_PHOTOGATE_TIMER_MEASURE_TOOLTIP,
  3912. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_PHOTOGATE_TIMER_MEASURE_MESSAGE0,
  3913. args0: [{
  3914. name: "measure",
  3915. type: "field_dropdown",
  3916. options: [["0", "0X50"], ["1", "0X51"]]
  3917. }]
  3918. });
  3919. }
  3920. };
  3921. Blockly.Blocks.CocoRobo_init_assistant_wifi = {
  3922. init: function init() {
  3923. this.jsonInit({
  3924. inputsInline: !0,
  3925. output: "Number",
  3926. colour: CategoryColors.Bluebit,
  3927. helpUrl: Blockly.Msg.CocoRobo_INIT_ASSISTANT_WIFI_HELPURL,
  3928. tooltip: Blockly.Msg.CocoRobo_INIT_ASSISTANT_WIFI_TOOLTIP,
  3929. message0: Blockly.Msg.CocoRobo_INIT_ASSISTANT_WIFI_MESSAGE0,
  3930. args0: [{
  3931. check: "String",
  3932. type: "input_value",
  3933. name: "ssid"
  3934. }, {
  3935. check: "String",
  3936. type: "input_value",
  3937. name: "password"
  3938. }]
  3939. });
  3940. }
  3941. };
  3942. Blockly.Blocks.CocoRobo_init_assistant_profile = {
  3943. init: function init() {
  3944. this.jsonInit({
  3945. colour: CategoryColors.Bluebit,
  3946. args0: [{
  3947. type: "input_value",
  3948. name: "file_path"
  3949. }],
  3950. inputsInline: !0,
  3951. nextStatement: null,
  3952. previousStatement: null,
  3953. helpUrl: Blockly.Msg.CocoRobo_INIT_ASSISTANT_PROFILE_HELPURL,
  3954. tooltip: Blockly.Msg.CocoRobo_INIT_ASSISTANT_PROFILE_TOOLTIP,
  3955. message0: Blockly.Msg.CocoRobo_INIT_ASSISTANT_PROFILE_MESSAGE0
  3956. });
  3957. }
  3958. };
  3959. Blockly.Blocks.CocoRobo_bluebit_seg_clear = {
  3960. init: function init() {
  3961. this.jsonInit({
  3962. inputsInline: !0,
  3963. nextStatement: null,
  3964. previousStatement: null,
  3965. colour: CategoryColors.Bluebit,
  3966. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SEG_CLEAR_HELPURL,
  3967. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SEG_CLEAR_TOOLTIP,
  3968. message0: Blockly.Msg.CocoRobo_BLUEBIT_SEG_CLEAR_MESSAGE0
  3969. });
  3970. }
  3971. };
  3972. Blockly.Blocks.CocoRobo_bluebit_seg_display = {
  3973. init: function init() {
  3974. this.jsonInit({
  3975. inputsInline: !0,
  3976. nextStatement: null,
  3977. previousStatement: null,
  3978. colour: CategoryColors.Bluebit,
  3979. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SEG_DISPLAY_HELPURL,
  3980. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SEG_DISPLAY_TOOLTIP,
  3981. message0: Blockly.Msg.CocoRobo_BLUEBIT_SEG_DISPLAY_MESSAGE0,
  3982. args0: [{
  3983. check: "Number",
  3984. type: "input_value",
  3985. name: "seg_num"
  3986. }]
  3987. });
  3988. }
  3989. };
  3990. Blockly.Blocks.CocoRobo_bluebit_ambientlight = {
  3991. init: function init() {
  3992. this.jsonInit({
  3993. inputsInline: !0,
  3994. output: "Number",
  3995. colour: CategoryColors.Bluebit,
  3996. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_AMBIENTLIGHT_HELPURL,
  3997. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_AMBIENTLIGHT_TOOLTIP,
  3998. message0: Blockly.Msg.CocoRobo_BLUEBIT_AMBIENTLIGHT_MESSAGE0
  3999. });
  4000. }
  4001. };
  4002. Blockly.Blocks.CocoRobo_bluebit_hum_tem = {
  4003. init: function init() {
  4004. this.jsonInit({
  4005. colour: CategoryColors.Bluebit,
  4006. output: "Number",
  4007. args0: [{
  4008. name: "hum_tem",
  4009. options: [[Blockly.Msg.CocoRobo_BLUEBIT_TEMPERATURE, "temperature"], [Blockly.Msg.CocoRobo_BLUEBIT_HUMIDITY, "humidity"]],
  4010. type: "field_dropdown"
  4011. }],
  4012. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_HUM_TEM_HELPURL,
  4013. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_HUM_TEM_TOOLTIP,
  4014. message0: Blockly.Msg.CocoRobo_BLUEBIT_HUM_TEM_MESSAGE0
  4015. });
  4016. }
  4017. };
  4018. Blockly.Blocks.CocoRobo_bluebit_ultrasonic = {
  4019. init: function init() {
  4020. this.jsonInit({
  4021. colour: CategoryColors.Bluebit,
  4022. output: "Number",
  4023. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_ULTRASONIC_HELPURL,
  4024. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_ULTRASONIC_TOOLTIP,
  4025. message0: Blockly.Msg.CocoRobo_BLUEBIT_ULTRASONIC_MESSAGE0
  4026. });
  4027. }
  4028. };
  4029. Blockly.Blocks.CocoRobo_bluebit_read_digital = {
  4030. init: function init() {
  4031. this.jsonInit({
  4032. colour: CategoryColors.Bluebit,
  4033. args0: [{
  4034. name: "digital_senor",
  4035. options: [[Blockly.Msg.CocoRobo_BLUEBIT_SOUND, "SOUND"], [Blockly.Msg.CocoRobo_BLUEBIT_IR_RECEIVE, "IR"], [Blockly.Msg.CocoRobo_BLUEBIT_VIBRATION, "VIBRATION"], [Blockly.Msg.CocoRobo_BLUEBIT_RFID, "RFID"], [Blockly.Msg.CocoRobo_BLUEBIT_FINGERPRINT_SCANNER, "FINGERPRINT"], [Blockly.Msg.CocoRobo_BLUEBIT_PIR, "PIR"], [Blockly.Msg.CocoRobo_BLUEBIT_MAGNETIC, "MAGNETIC"], [Blockly.Msg.CocoRobo_BLUEBIT_BUTTON, "BUTTON"]],
  4036. type: "field_dropdown"
  4037. }, {
  4038. name: "allPin",
  4039. check: "Number",
  4040. type: "input_value"
  4041. }],
  4042. output: "Boolean",
  4043. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_READ_DIGITAL_HELPURL,
  4044. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_READ_DIGITAL_TOOLTIP,
  4045. message0: Blockly.Msg.CocoRobo_BLUEBIT_READ_DIGITAL_MESSAGE0
  4046. });
  4047. }
  4048. };
  4049. Blockly.Blocks.CocoRobo_bluebit_line_follower = {
  4050. init: function init() {
  4051. this.jsonInit({
  4052. colour: CategoryColors.Bluebit,
  4053. args0: [{
  4054. name: "allPin",
  4055. check: "Number",
  4056. type: "input_value"
  4057. }],
  4058. output: "Boolean",
  4059. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_LINE_FOLLOWER_HELPURL,
  4060. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_LINE_FOLLOWER_TOOLTIP,
  4061. message0: Blockly.Msg.CocoRobo_BLUEBIT_LINE_FOLLOWER_MESSAGE0
  4062. });
  4063. }
  4064. };
  4065. Blockly.Blocks.CocoRobo_bluebit_set_true = {
  4066. init: function init() {
  4067. this.jsonInit({
  4068. inputsInline: !0,
  4069. nextStatement: null,
  4070. previousStatement: null,
  4071. colour: CategoryColors.Bluebit,
  4072. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SET_TRUE_HELPURL,
  4073. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SET_TRUE_TOOLTIP,
  4074. message0: Blockly.Msg.CocoRobo_BLUEBIT_SET_TRUE_MESSAGE0,
  4075. args0: [{
  4076. name: "set_digital_senor",
  4077. options: [[Blockly.Msg.CocoRobo_BLUEBIT_FAN, "_FAN"], [Blockly.Msg.CocoRobo_BLUEBIT_LASER, "_LASER"]],
  4078. type: "field_dropdown"
  4079. }, {
  4080. name: "set_digital_P",
  4081. check: "Number",
  4082. type: "input_value"
  4083. }]
  4084. });
  4085. }
  4086. };
  4087. Blockly.Blocks.CocoRobo_bluebit_set_false = {
  4088. init: function init() {
  4089. this.jsonInit({
  4090. inputsInline: !0,
  4091. nextStatement: null,
  4092. previousStatement: null,
  4093. colour: CategoryColors.Bluebit,
  4094. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SET_FALSE_HELPURL,
  4095. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SET_FALSE_TOOLTIP,
  4096. message0: Blockly.Msg.CocoRobo_BLUEBIT_SET_FALSE_MESSAGE0,
  4097. args0: [{
  4098. name: "set_digital_senor",
  4099. options: [[Blockly.Msg.CocoRobo_BLUEBIT_FAN, "_FAN"], [Blockly.Msg.CocoRobo_BLUEBIT_LASER, "_LASER"]],
  4100. type: "field_dropdown"
  4101. }, {
  4102. name: "set_digital_P",
  4103. check: "Number",
  4104. type: "input_value"
  4105. }]
  4106. });
  4107. }
  4108. };
  4109. Blockly.Blocks.CocoRobo_bluebit_read_analog = {
  4110. init: function init() {
  4111. this.jsonInit({
  4112. colour: CategoryColors.Bluebit,
  4113. args0: [{
  4114. name: "analog_senor",
  4115. options: [[Blockly.Msg.CocoRobo_BLUEBIT_ANALOG_LIGHT, "_ANALOG_LIGHT"], [Blockly.Msg.CocoRobo_BLUEBIT_SOUND, "_SOUND"], [Blockly.Msg.CocoRobo_BLUEBIT_NTC_TEMP, "_NTC"], [Blockly.Msg.CocoRobo_BLUEBIT_WATER, "_WATER"], [Blockly.Msg.CocoRobo_BLUEBIT_SOIL_MOISTURE, "_SOIL"], [Blockly.Msg.CocoRobo_BLUEBIT_ROTATE_DIMMER, "_ROTATE"], [Blockly.Msg.CocoRobo_BLUEBIT_LINEAR_SLIDING_POTENTIOMETER, "_LINEAR_SLIDING_POTENTIOMETER"], [Blockly.Msg.CocoRobo_BLUEBIT_LM35_TEMP, "_LM35"]],
  4116. type: "field_dropdown"
  4117. }, {
  4118. name: "read_analog_P",
  4119. check: "Number",
  4120. type: "input_value"
  4121. }],
  4122. output: "Number",
  4123. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_READ_ANALOG_HELPURL,
  4124. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_READ_ANALOG_TOOLTIP,
  4125. message0: Blockly.Msg.CocoRobo_BLUEBIT_READ_ANALOG_MESSAGE0
  4126. });
  4127. }
  4128. };
  4129. Blockly.Blocks.CocoRobo_bluebit_set_analog = {
  4130. init: function init() {
  4131. this.jsonInit({
  4132. colour: CategoryColors.Bluebit,
  4133. args0: [{
  4134. check: "Number",
  4135. type: "input_value",
  4136. name: "analog_value"
  4137. }, {
  4138. name: "set_analog_P",
  4139. check: "Number",
  4140. type: "input_value"
  4141. }],
  4142. inputsInline: !0,
  4143. nextStatement: null,
  4144. previousStatement: null,
  4145. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SET_ANALOG_HELPURL,
  4146. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SET_ANALOG_TOOLTIP,
  4147. message0: Blockly.Msg.CocoRobo_BLUEBIT_SET_ANALOG_MESSAGE0
  4148. });
  4149. }
  4150. };
  4151. Blockly.Blocks.CocoRobo_bluebit_voice_record_on = {
  4152. init: function init() {
  4153. this.jsonInit({
  4154. colour: CategoryColors.Bluebit,
  4155. args0: [{
  4156. type: "field_dropdown",
  4157. name: "func",
  4158. options: [[Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_PLAY, "play"], [Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_REC, "rec"]]
  4159. }, {
  4160. type: "input_dummy"
  4161. }, {
  4162. name: "rec",
  4163. check: "Number",
  4164. type: "input_value"
  4165. }, {
  4166. name: "play",
  4167. check: "Number",
  4168. type: "input_value"
  4169. }],
  4170. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_ON_HELPURL,
  4171. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_ON_TOOLTIP,
  4172. message0: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_ON_MESSAGE0,
  4173. nextStatement: null,
  4174. previousStatement: null,
  4175. inputsInline: !0
  4176. });
  4177. }
  4178. };
  4179. Blockly.Blocks.CocoRobo_bluebit_voice_record_off = {
  4180. init: function init() {
  4181. this.jsonInit({
  4182. colour: CategoryColors.Bluebit,
  4183. args0: [{
  4184. type: "input_dummy"
  4185. }, {
  4186. name: "rec",
  4187. check: "Number",
  4188. type: "input_value"
  4189. }, {
  4190. name: "play",
  4191. check: "Number",
  4192. type: "input_value"
  4193. }],
  4194. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_OFF_HELPURL,
  4195. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_OFF_TOOLTIP,
  4196. message0: Blockly.Msg.CocoRobo_BLUEBIT_VOICE_RECORD_OFF_MESSAGE0,
  4197. nextStatement: null,
  4198. previousStatement: null,
  4199. inputsInline: !0
  4200. });
  4201. }
  4202. };
  4203. Blockly.Blocks.CocoRobo_bluebit_motor_on = {
  4204. init: function init() {
  4205. this.jsonInit({
  4206. colour: CategoryColors.Bluebit,
  4207. args0: [{
  4208. name: "status",
  4209. type: "field_dropdown",
  4210. options: [[Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_CLOCKWISE, "1"], [Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_ANTICLOCKWISE, "0"]]
  4211. }, {
  4212. name: "speed",
  4213. type: "input_value",
  4214. check: "Number"
  4215. }, {
  4216. name: "ain1",
  4217. check: "Number",
  4218. type: "input_value"
  4219. }, {
  4220. name: "ain2",
  4221. check: "Number",
  4222. type: "input_value"
  4223. }],
  4224. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_HELPURL,
  4225. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_TOOLTIP,
  4226. message0: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_MESSAGE0,
  4227. inputsInline: !0,
  4228. nextStatement: null,
  4229. previousStatement: null
  4230. });
  4231. }
  4232. };
  4233. Blockly.Blocks.CocoRobo_bluebit_motor_off = {
  4234. init: function init() {
  4235. this.jsonInit({
  4236. colour: CategoryColors.Bluebit,
  4237. args0: [{
  4238. type: "input_dummy"
  4239. }, {
  4240. name: "ain1",
  4241. check: "Number",
  4242. type: "input_value"
  4243. }, {
  4244. name: "ain2",
  4245. check: "Number",
  4246. type: "input_value"
  4247. }],
  4248. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_HELPURL,
  4249. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_TOOLTIP,
  4250. message0: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_MESSAGE0,
  4251. inputsInline: !0,
  4252. nextStatement: null,
  4253. previousStatement: null
  4254. });
  4255. }
  4256. };
  4257. Blockly.Blocks.CocoRobo_bluebit_get_motorpeed = {
  4258. init: function init() {
  4259. this.jsonInit({
  4260. colour: CategoryColors.Bluebit,
  4261. args0: [{
  4262. name: "left_right_interface",
  4263. options: [["M1", "1"], ["M2", "2"]],
  4264. type: "field_dropdown"
  4265. }],
  4266. inputsInline: !0,
  4267. output: "Number",
  4268. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_GET_MOTORPEED_HELPURL,
  4269. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_GET_MOTORPEED_TOOLTIP,
  4270. message0: Blockly.Msg.CocoRobo_BLUEBIT_GET_MOTORPEED_MESSAGE0
  4271. });
  4272. }
  4273. };
  4274. Blockly.Blocks.CocoRobo_m1m2_led_on = {
  4275. init: function init() {
  4276. this.jsonInit({
  4277. inputsInline: !0,
  4278. nextStatement: null,
  4279. previousStatement: null,
  4280. colour: CategoryColors.Bluebit,
  4281. helpUrl: Blockly.Msg.CocoRobo_M1M2_LED_ON_HELPURL,
  4282. tooltip: Blockly.Msg.CocoRobo_M1M2_LED_ON_TOOLTIP,
  4283. message0: Blockly.Msg.CocoRobo_M1M2_LED_ON_MESSAGE0,
  4284. args0: [{
  4285. name: "m1m2",
  4286. options: [["M1", "1"], ["M2", "2"]],
  4287. type: "field_dropdown"
  4288. }, {
  4289. check: "Number",
  4290. type: "input_value",
  4291. name: "brightness"
  4292. }]
  4293. });
  4294. }
  4295. };
  4296. Blockly.Blocks.CocoRobo_m1m2_led_off = {
  4297. init: function init() {
  4298. this.jsonInit({
  4299. inputsInline: !0,
  4300. nextStatement: null,
  4301. previousStatement: null,
  4302. colour: CategoryColors.Bluebit,
  4303. helpUrl: Blockly.Msg.CocoRobo_M1M2_LED_OFF_HELPURL,
  4304. tooltip: Blockly.Msg.CocoRobo_M1M2_LED_OFF_TOOLTIP,
  4305. message0: Blockly.Msg.CocoRobo_M1M2_LED_OFF_MESSAGE0,
  4306. args0: [{
  4307. name: "m1m2",
  4308. options: [["M1", "1"], ["M2", "2"]],
  4309. type: "field_dropdown"
  4310. }]
  4311. });
  4312. }
  4313. };
  4314. Blockly.Blocks.CocoRobo_bluebit_set_Fan = {
  4315. init: function init() {
  4316. this.jsonInit({
  4317. colour: CategoryColors.Bluebit,
  4318. args0: [{
  4319. name: "left_right_interface",
  4320. options: [["M1", "1"], ["M2", "2"]],
  4321. type: "field_dropdown"
  4322. }],
  4323. inputsInline: !0,
  4324. nextStatement: null,
  4325. previousStatement: null,
  4326. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_HELPURL,
  4327. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_TOOLTIP,
  4328. message0: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_MESSAGE0
  4329. });
  4330. }
  4331. };
  4332. Blockly.Blocks.CocoRobo_bluebit_set_Fan_off = {
  4333. init: function init() {
  4334. this.jsonInit({
  4335. colour: CategoryColors.Bluebit,
  4336. args0: [{
  4337. name: "left_right_interface",
  4338. options: [["M1", "1"], ["M2", "2"]],
  4339. type: "field_dropdown"
  4340. }],
  4341. inputsInline: !0,
  4342. nextStatement: null,
  4343. previousStatement: null,
  4344. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_OFF_HELPURL,
  4345. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_OFF_TOOLTIP,
  4346. message0: Blockly.Msg.CocoRobo_BLUEBIT_SET_FAN_OFF_MESSAGE0
  4347. });
  4348. }
  4349. };
  4350. Blockly.Blocks.CocoRobo_bluebit_4button = {
  4351. init: function init() {
  4352. this.jsonInit({
  4353. colour: CategoryColors.Bluebit,
  4354. args0: [{
  4355. name: "pin",
  4356. check: "Number",
  4357. type: "input_value"
  4358. }, {
  4359. name: "button_val",
  4360. type: "field_dropdown",
  4361. options: [[Blockly.Msg.BLUE, "'A'"], [Blockly.Msg.GREEN, "'B'"], [Blockly.Msg.RED, "'C'"], [Blockly.Msg.YELLOW, "'D'"]]
  4362. }],
  4363. output: "Boolean",
  4364. message0: Blockly.Msg.CocoRobo_BLUEBIT_4BUTTON_MESSAGE0,
  4365. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_4BUTTON_TOOLTIP,
  4366. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_4BUTTON_HELPURL
  4367. });
  4368. }
  4369. };
  4370. Blockly.Blocks.CocoRobo_bluebit_joystick = {
  4371. init: function init() {
  4372. this.jsonInit({
  4373. colour: CategoryColors.Bluebit,
  4374. args0: [{
  4375. name: "pin",
  4376. check: "Number",
  4377. type: "input_value"
  4378. }, {
  4379. name: "pin1",
  4380. check: "Number",
  4381. type: "input_value"
  4382. }, {
  4383. name: "axis",
  4384. type: "field_dropdown",
  4385. options: [["X", "X"], ["Y", "Y"]]
  4386. }],
  4387. output: "Number",
  4388. message0: Blockly.Msg.CocoRobo_BLUEBIT_JOYSTICK_MESSAGE0,
  4389. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_JOYSTICK_TOOLTIP,
  4390. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_JOYSTICK_HELPURL
  4391. });
  4392. }
  4393. };
  4394. Blockly.Blocks.CocoRobo_bluebit_motor_on_i2c = {
  4395. init: function init() {
  4396. this.jsonInit({
  4397. colour: CategoryColors.Bluebit,
  4398. args0: [{
  4399. name: "left_right_interface",
  4400. options: [["M1", "M1"], ["M2", "M2"]],
  4401. type: "field_dropdown"
  4402. }, {
  4403. name: "status",
  4404. type: "field_dropdown",
  4405. options: [[Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_CLOCKWISE, "CLOCKWISE"], [Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_ANTICLOCKWISE, "ANTICLOCKWISE"]]
  4406. }, {
  4407. check: "Number",
  4408. type: "input_value",
  4409. name: "speed"
  4410. }],
  4411. inputsInline: !0,
  4412. nextStatement: null,
  4413. previousStatement: null,
  4414. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_I2C_HELPURL,
  4415. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_I2C_TOOLTIP,
  4416. message0: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_ON_I2C_MESSAGE0
  4417. });
  4418. }
  4419. };
  4420. Blockly.Blocks.CocoRobo_bluebit_motor_off_i2c = {
  4421. init: function init() {
  4422. this.jsonInit({
  4423. colour: CategoryColors.Bluebit,
  4424. inputsInline: !0,
  4425. nextStatement: null,
  4426. previousStatement: null,
  4427. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_I2C_HELPURL,
  4428. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_I2C_TOOLTIP,
  4429. message0: Blockly.Msg.CocoRobo_BLUEBIT_MOTOR_OFF_I2C_MESSAGE0
  4430. });
  4431. }
  4432. };
  4433. Blockly.Blocks.CocoRobo_bluebit_coded_three_motor_on_i2c = {
  4434. init: function init() {
  4435. this.jsonInit({
  4436. colour: CategoryColors.Bluebit,
  4437. args0: [{
  4438. name: "pattern",
  4439. options: [["pwm", "set_pwm"], ["\u5DE1\u822A", "set_cruise"], ["\u5B9A\u4F4D", "set_position"]],
  4440. type: "field_dropdown"
  4441. }, {
  4442. name: "Dial_code",
  4443. options: [["0", "0X10"], ["1", "0X11"], ["2", "0X12"], ["3", "0X13"]],
  4444. type: "field_dropdown"
  4445. }, {
  4446. check: "Number",
  4447. type: "input_value",
  4448. name: "speed1"
  4449. }, {
  4450. check: "Number",
  4451. type: "input_value",
  4452. name: "speed2"
  4453. }],
  4454. inputsInline: !0,
  4455. nextStatement: null,
  4456. previousStatement: null,
  4457. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_CODED_THREE_MOTOR_ON_I2C_HELPURL,
  4458. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_CODED_THREE_MOTOR_ON_I2C_TOOLTIP,
  4459. message0: Blockly.Msg.CocoRobo_BLUEBIT_CODED_THREE_MOTOR_ON_I2C_MESSAGE0
  4460. });
  4461. }
  4462. };
  4463. Blockly.Blocks.CocoRobo_bluebit_coded_stop_motor_on_i2c = {
  4464. init: function init() {
  4465. this.jsonInit({
  4466. inputsInline: !0,
  4467. nextStatement: null,
  4468. previousStatement: null,
  4469. colour: CategoryColors.Bluebit,
  4470. helpUrl: Blockly.Msg.CocoRobo_BLUEBIT_CODED_STOP_MOTOR_ON_I2C_HELPURL,
  4471. tooltip: Blockly.Msg.CocoRobo_BLUEBIT_CODED_STOP_MOTOR_ON_I2C_TOOLTIP,
  4472. message0: Blockly.Msg.CocoRobo_BLUEBIT_CODED_STOP_MOTOR_ON_I2C_MESSAGE0,
  4473. args0: [{
  4474. name: "coded_stop",
  4475. type: "field_dropdown",
  4476. options: [["0", "0X10"], ["1", "0X11"], ["2", "0X12"], ["3", "0X13"]]
  4477. }]
  4478. });
  4479. }
  4480. };
  4481. Blockly.Blocks.CocoRobo_init_bluetooth = {
  4482. init: function init() {
  4483. this.jsonInit({
  4484. inputsInline: !0,
  4485. nextStatement: null,
  4486. previousStatement: null,
  4487. colour: bluetooth_color,
  4488. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4489. tooltip: Blockly.Msg.CocoRobo_init_bluetooth_TOOLTIP,
  4490. message0: Blockly.Msg.CocoRobo_init_bluetooth_MESSAGE0,
  4491. args0: [{
  4492. check: "String",
  4493. type: "input_value",
  4494. name: "init_bluetooth"
  4495. }]
  4496. });
  4497. }
  4498. };
  4499. Blockly.Blocks.CocoRobo_OnOff_bluetooth = {
  4500. init: function init() {
  4501. this.jsonInit({
  4502. inputsInline: !0,
  4503. nextStatement: null,
  4504. previousStatement: null,
  4505. colour: bluetooth_color,
  4506. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4507. tooltip: Blockly.Msg.CocoRobo_OnOff_bluetooth_TOOLTIP,
  4508. message0: Blockly.Msg.CocoRobo_OnOff_bluetooth_MESSAGE0,
  4509. args0: [{
  4510. name: "OnOff_bluetooth",
  4511. type: "field_dropdown",
  4512. options: [["\u5F00\u542F", "start"], ["\u5173\u95ED", "stop"]]
  4513. }]
  4514. });
  4515. }
  4516. };
  4517. Blockly.Blocks.CocoRobo_HID_consumer_bluetooth = {
  4518. init: function init() {
  4519. this.jsonInit({
  4520. inputsInline: !0,
  4521. nextStatement: null,
  4522. previousStatement: null,
  4523. colour: bluetooth_color,
  4524. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4525. tooltip: Blockly.Msg.CocoRobo_HID_consumer_bluetooth_TOOLTIP,
  4526. message0: Blockly.Msg.CocoRobo_HID_consumer_bluetooth_MESSAGE0,
  4527. args0: [{
  4528. options: [["Power", "ble.HID_CONSUMER_POWER"], ["Reset", "ble.HID_CONSUMER_RESET"], ["Sleep", "ble.HID_CONSUMER_SLEEP"], ["Menu", "ble.HID_CONSUMER_MENU"], ["Selection", "ble.HID_CONSUMER_SELECTION"], ["Assign Selection", "ble.HID_CONSUMER_ASSIGN_SEL"], ["Mode Step", "ble.HID_CONSUMER_MODE_STEP"], ["Recall Last", "ble.HID_CONSUMER_RECALL_LAST"], ["Quit", "ble.HID_CONSUMER_QUIT"], ["Help", "ble.HID_CONSUMER_HELP"], ["Channel Increment", "ble.HID_CONSUMER_CHANNEL_UP"], ["Channel Decrement", "ble.HID_CONSUMER_CHANNEL_DOWN"], ["Play", "ble.HID_CONSUMER_PLAY"], ["Pause", "ble.HID_CONSUMER_PAUSE"], ["Record", "ble.HID_CONSUMER_RECORD"], ["Fast Forward", "ble.HID_CONSUMER_FAST_FORWARD"], ["Rewind", "ble.HID_CONSUMER_REWIND"], ["Scan Next Track", "ble.HID_CONSUMER_SCAN_NEXT_TRK"], ["Scan Previous Track", "ble.HID_CONSUMER_SCAN_PREV_TRK"], ["Stop", "ble.HID_CONSUMER_STOP"], ["Eject", "ble.HID_CONSUMER_EJECT"], ["Random Play", "ble.HID_CONSUMER_RANDOM_PLAY"], ["Select Disk", "ble.HID_CONSUMER_SELECT_DISC"], ["Enter Disc", "ble.HID_CONSUMER_ENTER_DISC"], ["Repeat", "ble.HID_CONSUMER_REPEAT"], ["Volume", "ble.HID_CONSUMER_VOLUME"], ["Balance", "ble.HID_CONSUMER_BALANCE"], ["Mute", "ble.HID_CONSUMER_MUTE"], ["Bass", "ble.HID_CONSUMER_BASS"], ["Volume Increment", "ble.HID_CONSUMER_VOLUME_UP"], ["Volume Decrement", "ble.HID_CONSUMER_VOLUME_DOWN"]],
  4529. type: "field_dropdown",
  4530. name: "type"
  4531. }, {
  4532. options: [["\u5F00\u542F", "True"], ["\u5173\u95ED", "False"]],
  4533. type: "field_dropdown",
  4534. name: "status_bar"
  4535. }]
  4536. });
  4537. }
  4538. };
  4539. Blockly.Blocks.CocoRobo_HID_keyboard_bluetooth = {
  4540. init: function init() {
  4541. this.jsonInit({
  4542. inputsInline: !0,
  4543. nextStatement: null,
  4544. previousStatement: null,
  4545. colour: bluetooth_color,
  4546. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4547. tooltip: Blockly.Msg.CocoRobo_HID_keyboard_bluetooth_TOOLTIP,
  4548. message0: Blockly.Msg.CocoRobo_HID_keyboard_bluetooth_MESSAGE0,
  4549. args0: [{
  4550. name: "HID_keyboard_bluetooth",
  4551. type: "field_dropdown",
  4552. options: [["A", "ble.HID_KEY_A"], ["B", "ble.HID_KEY_B"], ["C", "ble.HID_KEY_C"], ["D", "ble.HID_KEY_D"], ["E", "ble.HID_KEY_E"], ["F", "ble.HID_KEY_F"], ["G", "ble.HID_KEY_G"], ["H", "ble.HID_KEY_H"], ["I", "ble.HID_KEY_I"], ["J", "ble.HID_KEY_J"], ["K", "ble.HID_KEY_K"], ["L", "ble.HID_KEY_L"], ["M", "ble.HID_KEY_M"], ["N", "ble.HID_KEY_N"], ["O", "ble.HID_KEY_O"], ["P", "ble.HID_KEY_P"], ["Q", "ble.HID_KEY_Q"], ["R", "ble.HID_KEY_R"], ["S", "ble.HID_KEY_S"], ["T", "ble.HID_KEY_T"], ["U", "ble.HID_KEY_U"], ["V", "ble.HID_KEY_V"], ["W", "ble.HID_KEY_W"], ["X", "ble.HID_KEY_X"], ["Y", "ble.HID_KEY_Y"], ["Z", "ble.HID_KEY_Z"], ["1", "ble.HID_KEY_1"], ["2", "ble.HID_KEY_2"], ["3", "ble.HID_KEY_3"], ["4", "ble.HID_KEY_4"], ["5", "ble.HID_KEY_5"], ["6", "ble.HID_KEY_6"], ["7", "ble.HID_KEY_7"], ["8", "ble.HID_KEY_8"], ["9", "ble.HID_KEY_9"], ["0", "ble.HID_KEY_0"], ["Return", "ble.HID_KEY_RETURN"], ["ESCAPE", "ble.HID_KEY_ESCAPE"], ["DELETE", "ble.HID_KEY_DELETE"], ["Tab", "ble.HID_KEY_TAB"], ["Spacebar", "ble.HID_KEY_SPACEBAR"], ["- and (underscore)", "ble.HID_KEY_MINUS"], ["\x3d and +", "ble.HID_KEY_EQUAL"], ["[ and {", "ble.HID_KEY_LEFT_BRKT"], [" ] and }", "ble.HID_KEY_RIGHT_BRKT"], ["and |", "ble.HID_KEY_BACK_SLASH"], ["; and :", "ble.HID_KEY_SEMI_COLON"], ["\u2018\u2019 and \u201C\u201D", "ble.HID_KEY_SGL_QUOTE"], ["Grave Accent and Tilde", "ble.HID_KEY_GRV_ACCENT"], [", and \x3c", "ble.HID_KEY_COMMA"], [". and \x3e", "ble.HID_KEY_DOT"], ["/ and ?", "ble.HID_KEY_FWD_SLASH"], ["/ and ?", "ble.HID_KEY_CAPS_LOCK"], ["F1", "ble.HID_KEY_F1"], ["F2", "ble.HID_KEY_F2"], ["F3", "ble.HID_KEY_F3"], ["F4", "ble.HID_KEY_F4"], ["F5", "ble.HID_KEY_F5"], ["F6", "ble.HID_KEY_F6"], ["F7", "ble.HID_KEY_F7"], ["F8", "ble.HID_KEY_F8"], ["F9", "ble.HID_KEY_F9"], ["F10", "ble.HID_KEY_F10"], ["F11", "ble.HID_KEY_F11"], ["F12", "ble.HID_KEY_F12"], ["Print Screen", "ble.HID_KEY_PRNT_SCREEN"], ["Scroll Lock", "ble.HID_KEY_SCROLL_LOCK"], ["Pause", "ble.HID_KEY_PAUSE"], ["Insert", "ble.HID_KEY_INSERT"], ["Home", "ble.HID_KEY_HOME"], ["PageUp", "ble.HID_KEY_PAGE_UP"], ["Delete Forward", "ble.HID_KEY_DELETE_FWD"], ["End", "ble.HID_KEY_END"], ["PageDown", "ble.HID_KEY_PAGE_DOWN"], ["RightArrow", "ble.HID_KEY_RIGHT_ARROW"], ["LeftArrow", "ble.HID_KEY_LEFT_ARROW"], ["DownArrow", "ble.HID_KEY_DOWN_ARROW"], ["UpArrow", "ble.HID_KEY_UP_ARROW"], ["Num Lock and Clear", "ble.HID_KEY_NUM_LOCK"], [" /", "ble.HID_KEY_DIVIDE"], [" *", "ble.HID_KEY_MULTIPLY"], [" -", "ble.HID_KEY_SUBTRACT"], [" +-", "ble.HID_KEY_ADD"], [" ENTER", "ble.HID_KEY_ENTER"], [" 1 and End", "ble.HID_KEYPAD_1"], [" 2 and Down Arrow", "ble.HID_KEYPAD_2"], [" 3 and PageDn", "ble.HID_KEYPAD_3"], [" 4 and Lfet Arrow", "ble.HID_KEYPAD_4"], [" 5", "ble.HID_KEYPAD_5"], [" 6 and Right Arrow", "ble.HID_KEYPAD_6"], [" 7 and Home", "ble.HID_KEYPAD_7"], [" 8 and Up Arrow", "ble.HID_KEYPAD_8"], [" 9 and PageUp", "ble.HID_KEYPAD_9"], [" 0 and Insert", "ble.HID_KEYPAD_0"], [" . and Delete", "ble.HID_KEYPAD_DOT"], [" Mute", "ble.HID_KEY_MUTE"], [" Volume up", "ble.HID_KEY_VOLUME_UP"], [" Volume down", "ble.HID_KEY_VOLUME_DOWN"]]
  4553. }]
  4554. });
  4555. }
  4556. };
  4557. Blockly.Blocks.CocoRobo_HID_release_keyboard_bluetooth = {
  4558. init: function init() {
  4559. this.jsonInit({
  4560. inputsInline: !0,
  4561. nextStatement: null,
  4562. previousStatement: null,
  4563. colour: bluetooth_color,
  4564. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4565. tooltip: Blockly.Msg.CocoRobo_HID_release_keyboard_bluetooth_TOOLTIP,
  4566. message0: Blockly.Msg.CocoRobo_HID_release_keyboard_bluetooth_MESSAGE0,
  4567. args0: [{
  4568. name: "HID_release_keyboard",
  4569. type: "field_dropdown"
  4570. }]
  4571. });
  4572. }
  4573. };
  4574. Blockly.Blocks.CocoRobo_HID_mouse_bluetooth = {
  4575. init: function init() {
  4576. this.jsonInit({
  4577. inputsInline: !0,
  4578. nextStatement: null,
  4579. previousStatement: null,
  4580. colour: bluetooth_color,
  4581. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4582. tooltip: Blockly.Msg.CocoRobo_HID_mouse_bluetooth_TOOLTIP,
  4583. message0: Blockly.Msg.CocoRobo_HID_mouse_bluetooth_MESSAGE0,
  4584. args0: [{
  4585. name: "HID_mouse",
  4586. type: "field_dropdown",
  4587. options: [["\u5DE6\u952E", "ble.HID_MOUSE_LEFT"], ["\u53F3\u952E", "ble.HID_MOUSE_RIGHT"], ["\u6EDA\u8F6E\u6309\u4E0B", "ble.HID_MOUSE_MIDDLE"]]
  4588. }]
  4589. });
  4590. }
  4591. };
  4592. Blockly.Blocks.CocoRobo_HID_release_mouse_bluetooth = {
  4593. init: function init() {
  4594. this.jsonInit({
  4595. inputsInline: !0,
  4596. nextStatement: null,
  4597. previousStatement: null,
  4598. colour: bluetooth_color,
  4599. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4600. tooltip: Blockly.Msg.CocoRobo_HID_release_mouse_bluetooth_TOOLTIP,
  4601. message0: Blockly.Msg.CocoRobo_HID_release_mouse_bluetooth_MESSAGE0,
  4602. args0: [{
  4603. name: "HID_release_mouse",
  4604. type: "field_dropdown"
  4605. }]
  4606. });
  4607. }
  4608. };
  4609. Blockly.Blocks.CocoRobo_HID_mouse_pointer_bluetooth = {
  4610. init: function init() {
  4611. this.jsonInit({
  4612. inputsInline: !0,
  4613. nextStatement: null,
  4614. previousStatement: null,
  4615. colour: bluetooth_color,
  4616. helpUrl: Blockly.Msg.CocoRobo_HID_mouse_pointer_bluetooth_HELPURL,
  4617. tooltip: Blockly.Msg.CocoRobo_HID_mouse_pointer_bluetooth_TOOLTIP,
  4618. message0: Blockly.Msg.CocoRobo_HID_mouse_pointer_bluetooth_MESSAGE0,
  4619. args0: [{
  4620. check: "Number",
  4621. type: "input_value",
  4622. name: "column"
  4623. }, {
  4624. check: "Number",
  4625. type: "input_value",
  4626. name: "row"
  4627. }]
  4628. });
  4629. }
  4630. };
  4631. Blockly.Blocks.CocoRobo_HID_keyboard_group_bluetooth = {
  4632. init: function init() {
  4633. this.jsonInit({
  4634. inputsInline: !0,
  4635. nextStatement: null,
  4636. previousStatement: null,
  4637. colour: bluetooth_color,
  4638. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  4639. tooltip: Blockly.Msg.CocoRobo_HID_keyboard_group_bluetooth_TOOLTIP,
  4640. message0: Blockly.Msg.CocoRobo_HID_keyboard_group_bluetooth_MESSAGE0,
  4641. args0: [{
  4642. name: "HID_keyboard_bluetooth",
  4643. type: "field_dropdown",
  4644. options: [["A", "ble.HID_KEY_A"], ["B", "ble.HID_KEY_B"], ["C", "ble.HID_KEY_C"], ["D", "ble.HID_KEY_D"], ["E", "ble.HID_KEY_E"], ["F", "ble.HID_KEY_F"], ["G", "ble.HID_KEY_G"], ["H", "ble.HID_KEY_H"], ["I", "ble.HID_KEY_I"], ["J", "ble.HID_KEY_J"], ["K", "ble.HID_KEY_K"], ["L", "ble.HID_KEY_L"], ["M", "ble.HID_KEY_M"], ["N", "ble.HID_KEY_N"], ["O", "ble.HID_KEY_O"], ["P", "ble.HID_KEY_P"], ["Q", "ble.HID_KEY_Q"], ["R", "ble.HID_KEY_R"], ["S", "ble.HID_KEY_S"], ["T", "ble.HID_KEY_T"], ["U", "ble.HID_KEY_U"], ["V", "ble.HID_KEY_V"], ["W", "ble.HID_KEY_W"], ["X", "ble.HID_KEY_X"], ["Y", "ble.HID_KEY_Y"], ["Z", "ble.HID_KEY_Z"], ["1", "ble.HID_KEY_1"], ["2", "ble.HID_KEY_2"], ["3", "ble.HID_KEY_3"], ["4", "ble.HID_KEY_4"], ["5", "ble.HID_KEY_5"], ["6", "ble.HID_KEY_6"], ["7", "ble.HID_KEY_7"], ["8", "ble.HID_KEY_8"], ["9", "ble.HID_KEY_9"], ["0", "ble.HID_KEY_0"], ["Return", "ble.HID_KEY_RETURN"], ["ESCAPE", "ble.HID_KEY_ESCAPE"], ["DELETE", "ble.HID_KEY_DELETE"], ["Tab", "ble.HID_KEY_TAB"], ["Spacebar", "ble.HID_KEY_SPACEBAR"], ["- and (underscore)", "ble.HID_KEY_MINUS"], ["\x3d and +", "ble.HID_KEY_EQUAL"], ["[ and {", "ble.HID_KEY_LEFT_BRKT"], [" ] and }", "ble.HID_KEY_RIGHT_BRKT"], ["and |", "ble.HID_KEY_BACK_SLASH"], ["; and :", "ble.HID_KEY_SEMI_COLON"], ["\u2018\u2019 and \u201C\u201D", "ble.HID_KEY_SGL_QUOTE"], ["Grave Accent and Tilde", "ble.HID_KEY_GRV_ACCENT"], [", and \x3c", "ble.HID_KEY_COMMA"], [". and \x3e", "ble.HID_KEY_DOT"], ["/ and ?", "ble.HID_KEY_FWD_SLASH"], ["/ and ?", "ble.HID_KEY_CAPS_LOCK"], ["F1", "ble.HID_KEY_F1"], ["F2", "ble.HID_KEY_F2"], ["F3", "ble.HID_KEY_F3"], ["F4", "ble.HID_KEY_F4"], ["F5", "ble.HID_KEY_F5"], ["F6", "ble.HID_KEY_F6"], ["F7", "ble.HID_KEY_F7"], ["F8", "ble.HID_KEY_F8"], ["F9", "ble.HID_KEY_F9"], ["F10", "ble.HID_KEY_F10"], ["F11", "ble.HID_KEY_F11"], ["F12", "ble.HID_KEY_F12"], ["Print Screen", "ble.HID_KEY_PRNT_SCREEN"], ["Scroll Lock", "ble.HID_KEY_SCROLL_LOCK"], ["Pause", "ble.HID_KEY_PAUSE"], ["Insert", "ble.HID_KEY_INSERT"], ["Home", "ble.HID_KEY_HOME"], ["PageUp", "ble.HID_KEY_PAGE_UP"], ["Delete Forward", "ble.HID_KEY_DELETE_FWD"], ["End", "ble.HID_KEY_END"], ["PageDown", "ble.HID_KEY_PAGE_DOWN"], ["RightArrow", "ble.HID_KEY_RIGHT_ARROW"], ["LeftArrow", "ble.HID_KEY_LEFT_ARROW"], ["DownArrow", "ble.HID_KEY_DOWN_ARROW"], ["UpArrow", "ble.HID_KEY_UP_ARROW"], ["Num Lock and Clear", "ble.HID_KEY_NUM_LOCK"], [" /", "ble.HID_KEY_DIVIDE"], [" *", "ble.HID_KEY_MULTIPLY"], [" -", "ble.HID_KEY_SUBTRACT"], [" +-", "ble.HID_KEY_ADD"], [" ENTER", "ble.HID_KEY_ENTER"], [" 1 and End", "ble.HID_KEYPAD_1"], [" 2 and Down Arrow", "ble.HID_KEYPAD_2"], [" 3 and PageDn", "ble.HID_KEYPAD_3"], [" 4 and Lfet Arrow", "ble.HID_KEYPAD_4"], [" 5", "ble.HID_KEYPAD_5"], [" 6 and Right Arrow", "ble.HID_KEYPAD_6"], [" 7 and Home", "ble.HID_KEYPAD_7"], [" 8 and Up Arrow", "ble.HID_KEYPAD_8"], [" 9 and PageUp", "ble.HID_KEYPAD_9"], [" 0 and Insert", "ble.HID_KEYPAD_0"], [" . and Delete", "ble.HID_KEYPAD_DOT"], [" Mute", "ble.HID_KEY_MUTE"], [" Volume up", "ble.HID_KEY_VOLUME_UP"], [" Volume down", "ble.HID_KEY_VOLUME_DOWN"]]
  4645. }, {
  4646. type: "input_value",
  4647. name: "group"
  4648. }]
  4649. });
  4650. }
  4651. };
  4652. Blockly.Blocks.CocoRobo_HID_keyboard_part_bluetooth = {
  4653. init: function init() {
  4654. this.jsonInit({
  4655. inputsInline: !0,
  4656. output: null,
  4657. colour: bluetooth_color,
  4658. helpUrl: Blockly.Msg.CocoRobo_HID_keyboard_part_bluetooth_HELPURL,
  4659. tooltip: Blockly.Msg.CocoRobo_HID_keyboard_part_bluetooth_TOOLTIP,
  4660. message0: Blockly.Msg.CocoRobo_HID_keyboard_part_bluetooth_MESSAGE0,
  4661. args0: [{
  4662. type: "field_dropdown",
  4663. name: "HID_keyboard_group",
  4664. options: [["L_CTRL", "ble.KEY_MASK_L_CTRL"], ["L_SHIFT", "ble.KEY_MASK_L_SHIFT"], ["L_ALT", "ble.KEY_MASK_L_ALT"], ["L_GUI", "ble.KEY_MASK_L_GUI"], ["R_CTRL", "ble.KEY_MASK_R_CTRL "], ["R_SHIFT", "ble.KEY_MASK_R_SHIFT"], ["R_ALT", "ble.KEY_MASK_R_ALT"], ["R_GUI", "ble.KEY_MASK_R_GUI"]]
  4665. }]
  4666. });
  4667. }
  4668. };
  4669. Blockly.Blocks.dict_create_with = {
  4670. init: function init() {
  4671. this.jsonInit({
  4672. inputsInline: !0,
  4673. nextStatement: null,
  4674. previousStatement: null,
  4675. colour: CategoryColors.Dictionary,
  4676. helpUrl: Blockly.Msg.DICT_CREATE_WITH_HELPURL,
  4677. tooltip: Blockly.Msg.DICT_CREATE_WITH_TOOLTIP,
  4678. message0: Blockly.Msg.DICT_CREATE_WITH_MESSAGE0,
  4679. args0: [{
  4680. type: "input_value",
  4681. name: "dict_name"
  4682. }, {
  4683. type: "input_value",
  4684. name: "dict_items"
  4685. }]
  4686. });
  4687. }
  4688. };
  4689. Blockly.Blocks.dict_create_with_items_insert = {
  4690. init: function init() {
  4691. this.setColour(CategoryColors.Dictionary);
  4692. this.appendDummyInput("").appendField(new Blockly.FieldLabel(Blockly.Msg.DICT_CREATE_WITH_INPUT_WITH), "TIP");
  4693. this.itemCount_ = 3;
  4694. this.updateShape_();
  4695. this.setOutput(!0);
  4696. this.setMutator(new Blockly.Mutator(["dict_create_with_item"]));
  4697. this.setTooltip(Blockly.Msg.DICT_CREATE_WITH_ITEMS_INSERT_TOOLTIP);
  4698. },
  4699. mutationToDom: function mutationToDom() {
  4700. var a = document.createElement("mutation");
  4701. a.setAttribute("items", this.itemCount_);
  4702. return a;
  4703. },
  4704. domToMutation: function domToMutation(a) {
  4705. this.itemCount_ = parseInt(a.getAttribute("items"), 10);
  4706. this.updateShape_();
  4707. },
  4708. decompose: function decompose(a) {
  4709. var b = a.newBlock("dict_create_with_container");
  4710. b.initSvg();
  4711. for (var c = b.getInput("STACK").connection, e = 0; e < this.itemCount_; e++) {
  4712. var d = a.newBlock("dict_create_with_item");
  4713. d.initSvg();
  4714. c.connect(d.previousConnection);
  4715. c = d.nextConnection;
  4716. }
  4717. return b;
  4718. },
  4719. compose: function compose(a) {
  4720. a = a.getInputTargetBlock("STACK");
  4721. for (var b = [], c = 0; a;) {
  4722. b[c] = a.valueConnection_, a = a.nextConnection && a.nextConnection.targetBlock(), c++;
  4723. }
  4724. this.itemCount_ = c;
  4725. this.updateShape_();
  4726. for (c = 0; c < this.itemCount_; c++) {
  4727. b[c] && this.getInput("ADD" + c).connection.connect(b[c]);
  4728. }
  4729. },
  4730. saveConnections: function saveConnections(a) {
  4731. a = a.getInputTargetBlock("STACK");
  4732. for (var b = 0; a;) {
  4733. var c = this.getInput("ADD" + b);
  4734. a.valueConnection_ = c && c.connection.targetConnection;
  4735. b++;
  4736. a = a.nextConnection && a.nextConnection.targetBlock();
  4737. }
  4738. },
  4739. updateShape_: function updateShape_() {
  4740. this.getInput("EMPTY") && this.removeInput("EMPTY");
  4741. for (var a = [], b = 0; this.getInput("ADD" + b); b++) {
  4742. a.push(this.getFieldValue("KEY" + b)), this.removeInput("ADD" + b);
  4743. }
  4744. if (0 == this.itemCount_) this.getField("TIP").setText(Blockly.Msg.DICT_CREATE_EMPTY_TITLE); else for (this.getField("TIP").setText(Blockly.Msg.DICT_CREATE_WITH_INPUT_WITH), b = 0; b < this.itemCount_; b++) {
  4745. this.appendValueInput("ADD" + b).setCheck(null).setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(a.length > b ? a[b] : 0 == b ? "key_0" : "key_" + b), "KEY" + b).appendField(":");
  4746. }
  4747. },
  4748. getVars: function getVars() {
  4749. return [this.getFieldValue("VAR")];
  4750. },
  4751. renameVar: function renameVar(a, b) {
  4752. Blockly.Names.equals(a, this.getFieldValue("VAR")) && this.setTitleValue(b, "VAR");
  4753. }
  4754. };
  4755. Blockly.Blocks.dict_create_with_item = {
  4756. init: function init() {
  4757. this.setColour(CategoryColors.Dictionary);
  4758. this.appendDummyInput().appendField(Blockly.Msg.DICT_CREATE_WITH_ITEM_TITLE);
  4759. this.setPreviousStatement(!0);
  4760. this.setNextStatement(!0);
  4761. this.setTooltip(Blockly.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP);
  4762. this.contextMenu = !1;
  4763. }
  4764. };
  4765. Blockly.Blocks.dict_create_with_container = {
  4766. init: function init() {
  4767. this.setColour(CategoryColors.Dictionary);
  4768. this.appendDummyInput().appendField(Blockly.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD);
  4769. this.appendStatementInput("STACK");
  4770. this.setTooltip(Blockly.Msg.DICT_CREATE_WITH_CONTAINER_TOOLTIP);
  4771. this.contextMenu = !1;
  4772. }
  4773. };
  4774. Blockly.Blocks.dict_key_value = {
  4775. init: function init() {
  4776. this.jsonInit({
  4777. colour: CategoryColors.Dictionary,
  4778. args0: [{
  4779. type: "input_value",
  4780. name: "dict_name"
  4781. }, {
  4782. type: "input_value",
  4783. name: "dict_items"
  4784. }],
  4785. output: ["String", "Number", "Boolean", "Array"],
  4786. inputsInline: !0,
  4787. helpUrl: Blockly.Msg.DICT_KEY_VALUE_HELPURL,
  4788. tooltip: Blockly.Msg.DICT_KEY_VALUE_TOOLTIP,
  4789. message0: Blockly.Msg.DICT_KEY_VALUE_MESSAGE0
  4790. });
  4791. }
  4792. };
  4793. Blockly.Blocks.add_dict_key_value = {
  4794. init: function init() {
  4795. this.jsonInit({
  4796. colour: CategoryColors.Dictionary,
  4797. args0: [{
  4798. type: "input_value",
  4799. name: "dict_name"
  4800. }, {
  4801. type: "input_value",
  4802. name: "dict_items"
  4803. }, {
  4804. type: "input_value",
  4805. name: "add_value"
  4806. }],
  4807. inputsInline: !0,
  4808. nextStatement: null,
  4809. previousStatement: null,
  4810. helpUrl: Blockly.Msg.ADD_DICT_KEY_VALUE_HELPURL,
  4811. tooltip: Blockly.Msg.ADD_DICT_KEY_VALUE_TOOLTIP,
  4812. message0: Blockly.Msg.ADD_DICT_KEY_VALUE_MESSAGE0
  4813. });
  4814. }
  4815. };
  4816. Blockly.Blocks.dict_length = {
  4817. init: function init() {
  4818. this.jsonInit({
  4819. colour: CategoryColors.Dictionary,
  4820. args0: [{
  4821. type: "input_value",
  4822. name: "dict_name"
  4823. }],
  4824. output: "Number",
  4825. inputsInline: !0,
  4826. helpUrl: Blockly.Msg.DICT_LENGTH_HELPURL,
  4827. tooltip: Blockly.Msg.DICT_LENGTH_TOOLTIP,
  4828. message0: Blockly.Msg.DICT_LENGTH_MESSAGE0
  4829. });
  4830. }
  4831. };
  4832. Blockly.Blocks.dict_key_exist = {
  4833. init: function init() {
  4834. this.jsonInit({
  4835. colour: CategoryColors.Dictionary,
  4836. args0: [{
  4837. type: "input_value",
  4838. name: "dict_name"
  4839. }, {
  4840. type: "input_value",
  4841. name: "dict_items"
  4842. }],
  4843. output: "Boolean",
  4844. inputsInline: !0,
  4845. helpUrl: Blockly.Msg.DICT_KEY_EXIST_HELPURL,
  4846. tooltip: Blockly.Msg.DICT_KEY_EXIST_TOOLTIP,
  4847. message0: Blockly.Msg.DICT_KEY_EXIST_MESSAGE0
  4848. });
  4849. }
  4850. };
  4851. Blockly.Blocks.dict_key_or_val_list = {
  4852. init: function init() {
  4853. this.jsonInit({
  4854. colour: CategoryColors.Dictionary,
  4855. args0: [{
  4856. type: "input_value",
  4857. name: "dict_name"
  4858. }, {
  4859. options: [[Blockly.Msg.DICT_KEYS, "keys"], [Blockly.Msg.DICT_VALUES, "values"]],
  4860. type: "field_dropdown",
  4861. name: "key_or_val"
  4862. }],
  4863. output: "Array",
  4864. inputsInline: !0,
  4865. helpUrl: Blockly.Msg.DICT_KEY_OR_VAL_LIST_HELPURL,
  4866. // tooltip: Blockly.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP,
  4867. message0: Blockly.Msg.DICT_KEY_OR_VAL_LIST_MESSAGE0
  4868. });
  4869. var thisBlock = this;
  4870. this.setTooltip(function () {
  4871. var mode = thisBlock.getFieldValue('key_or_val');
  4872. var TOOLTIPS = {
  4873. 'keys': Blockly.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP.replace('%2', Blockly.Msg.DICT_KEYS),
  4874. 'values': Blockly.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP.replace('%2', Blockly.Msg.DICT_VALUES)
  4875. };
  4876. return TOOLTIPS[mode];
  4877. });
  4878. }
  4879. };
  4880. Blockly.Blocks.CocoRobo_input = {
  4881. init: function init() {
  4882. this.jsonInit({
  4883. output: "Number",
  4884. colour: CategoryColors.Text,
  4885. helpUrl: Blockly.Msg.CocoRobo_INPUT_HELPURL,
  4886. tooltip: Blockly.Msg.CocoRobo_INPUT_TOOLTIP,
  4887. message0: Blockly.Msg.CocoRobo_INPUT_MESSAGE0,
  4888. args0: [{
  4889. check: "String",
  4890. type: "input_value",
  4891. name: "imports"
  4892. }]
  4893. });
  4894. }
  4895. };
  4896. Blockly.Blocks.file_to_list = {
  4897. init: function init() {
  4898. this.jsonInit({
  4899. colour: CategoryColors.File,
  4900. args0: [{
  4901. type: "input_value",
  4902. name: "file_path"
  4903. }, {
  4904. options: [[Blockly.Msg.CocoRobo_ENTER, "ENTER"], [Blockly.Msg.CocoRobo_COMMA, ","], [Blockly.Msg.CocoRobo_SEMICOLON, ";"], [Blockly.Msg.CocoRobo_SPACE, " "]],
  4905. type: "field_dropdown",
  4906. name: "separator"
  4907. }],
  4908. output: "Array",
  4909. inputsInline: !0,
  4910. helpUrl: Blockly.Msg.FILE_TO_LIST_HELPURL,
  4911. tooltip: Blockly.Msg.FILE_TO_LIST_TOOLTIP,
  4912. message0: Blockly.Msg.FILE_TO_LIST_MESSAGE0
  4913. });
  4914. }
  4915. };
  4916. Blockly.Blocks.file_to_bin = {
  4917. init: function init() {
  4918. this.jsonInit({
  4919. colour: CategoryColors.File,
  4920. args0: [{
  4921. type: "input_value",
  4922. name: "file_path"
  4923. }],
  4924. output: "Array",
  4925. inputsInline: !0,
  4926. helpUrl: Blockly.Msg.FILE_TO_BIN_HELPURL,
  4927. tooltip: Blockly.Msg.FILE_TO_BIN_TOOLTIP,
  4928. message0: Blockly.Msg.FILE_TO_BIN_MESSAGE0
  4929. });
  4930. }
  4931. };
  4932. Blockly.Blocks.CocoRobo_init_file = {
  4933. init: function init() {
  4934. this.jsonInit({
  4935. colour: CategoryColors.File,
  4936. args0: [{
  4937. type: "input_value",
  4938. name: "file_path"
  4939. }],
  4940. inputsInline: !0,
  4941. nextStatement: null,
  4942. previousStatement: null,
  4943. helpUrl: Blockly.Msg.CocoRobo_INIT_FILE_HELPURL,
  4944. tooltip: Blockly.Msg.CocoRobo_INIT_FILE_TOOLTIP,
  4945. message0: Blockly.Msg.CocoRobo_INIT_FILE_MESSAGE0
  4946. });
  4947. }
  4948. };
  4949. Blockly.Blocks.CocoRobo_write_file = {
  4950. init: function init() {
  4951. this.jsonInit({
  4952. colour: CategoryColors.File,
  4953. args0: [{
  4954. type: "input_value",
  4955. name: "file_path"
  4956. }, {
  4957. type: "input_value",
  4958. name: "data"
  4959. }, {
  4960. options: [[Blockly.Msg.CocoRobo_ENTER, "ENTER"], [Blockly.Msg.CocoRobo_COMMA, ","], [Blockly.Msg.CocoRobo_SEMICOLON, ";"], [Blockly.Msg.CocoRobo_SPACE, " "]],
  4961. type: "field_dropdown",
  4962. name: "separator"
  4963. }],
  4964. inputsInline: !0,
  4965. nextStatement: null,
  4966. previousStatement: null,
  4967. helpUrl: Blockly.Msg.CocoRobo_WRITE_FILE_HELPURL,
  4968. tooltip: Blockly.Msg.CocoRobo_WRITE_FILE_TOOLTIP,
  4969. message0: Blockly.Msg.CocoRobo_WRITE_FILE_MESSAGE0
  4970. });
  4971. }
  4972. };
  4973. Blockly.Blocks.CocoRobo_sdcard_init = {
  4974. init: function init() {
  4975. this.jsonInit({
  4976. colour: CategoryColors.File,
  4977. inputsInline: !0,
  4978. nextStatement: null,
  4979. previousStatement: null,
  4980. helpUrl: Blockly.Msg.CocoRobo_SDCARD_INIT_HELPURL,
  4981. tooltip: Blockly.Msg.CocoRobo_SDCARD_INIT_TOOLTIP,
  4982. message0: Blockly.Msg.CocoRobo_SDCARD_INIT_MESSAGE0
  4983. });
  4984. }
  4985. };
  4986. Blockly.Blocks.CocoRobo_sdcard_mount = {
  4987. init: function init() {
  4988. this.jsonInit({
  4989. colour: CategoryColors.File,
  4990. args0: [{
  4991. check: "String",
  4992. type: "input_value",
  4993. name: "sd_path"
  4994. }],
  4995. inputsInline: !0,
  4996. nextStatement: null,
  4997. previousStatement: null,
  4998. helpUrl: Blockly.Msg.CocoRobo_SDCARD_MOUNT_HELPURL,
  4999. tooltip: Blockly.Msg.CocoRobo_SDCARD_MOUNT_TOOLTIP,
  5000. message0: Blockly.Msg.CocoRobo_SDCARD_MOUNT_MESSAGE0
  5001. });
  5002. }
  5003. };
  5004. Blockly.Blocks.CocoRobo_dev_i2c_init = {
  5005. init: function init() {
  5006. this.jsonInit({
  5007. colour: CategoryColors.Pin,
  5008. args0: [{
  5009. type: "input_value",
  5010. name: "freq"
  5011. }, {
  5012. check: "Number",
  5013. type: "input_value",
  5014. name: "scl"
  5015. }, {
  5016. check: "Number",
  5017. type: "input_value",
  5018. name: "sda"
  5019. }],
  5020. helpUrl: Blockly.Msg.CocoRobo_dev_i2c_init_HELPURL,
  5021. tooltip: Blockly.Msg.CocoRobo_dev_i2c_init_TOOLTIP,
  5022. message0: Blockly.Msg.CocoRobo_dev_i2c_init_MESSAGE0,
  5023. nextStatement: null,
  5024. previousStatement: null,
  5025. inputsInline: !0
  5026. });
  5027. }
  5028. };
  5029. Blockly.Blocks.CocoRobo_i2c_init = {
  5030. init: function init() {
  5031. this.jsonInit({
  5032. colour: CategoryColors.Pin,
  5033. args0: [{
  5034. type: "input_value",
  5035. name: "freq"
  5036. }],
  5037. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  5038. tooltip: Blockly.Msg.CocoRobo_i2c_init_TOOLTIP,
  5039. message0: Blockly.Msg.CocoRobo_i2c_init_MESSAGE0,
  5040. nextStatement: null,
  5041. previousStatement: null
  5042. });
  5043. }
  5044. };
  5045. Blockly.Blocks.CocoRobo_i2c_read_write = {
  5046. init: function init() {
  5047. this.jsonInit({
  5048. colour: CategoryColors.Pin,
  5049. args0: [{
  5050. name: "adr",
  5051. type: "input_value",
  5052. check: "Number"
  5053. }, {
  5054. name: "data",
  5055. type: "input_value",
  5056. check: ["Number", "String"]
  5057. }],
  5058. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  5059. tooltip: Blockly.Msg.CocoRobo_i2c_read_write_TOOLTIP,
  5060. message0: Blockly.Msg.CocoRobo_i2c_read_write_MESSAGE0,
  5061. nextStatement: null,
  5062. previousStatement: null,
  5063. inputsInline: !0
  5064. });
  5065. }
  5066. };
  5067. Blockly.Blocks.CocoRobo_i2c_readfrom = {
  5068. init: function init() {
  5069. this.jsonInit({
  5070. colour: CategoryColors.Pin,
  5071. args0: [{
  5072. name: "adr",
  5073. type: "input_value",
  5074. check: "Number"
  5075. }, {
  5076. name: "num",
  5077. type: "input_value",
  5078. check: "Number"
  5079. }],
  5080. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  5081. tooltip: Blockly.Msg.CocoRobo_i2c_readfrom_TOOLTIP,
  5082. message0: Blockly.Msg.CocoRobo_i2c_readfrom_MESSAGE0,
  5083. output: "String",
  5084. inputsInline: !0
  5085. });
  5086. }
  5087. };
  5088. Blockly.Blocks.mqtt_common_setup = {
  5089. init: function init() {
  5090. this.jsonInit({
  5091. inputsInline: !1,
  5092. nextStatement: null,
  5093. previousStatement: null,
  5094. colour: CategoryColors.IoT_MQTT,
  5095. helpUrl: Blockly.Msg.MQTT_COMMON_SETUP_HELPURL,
  5096. tooltip: Blockly.Msg.MQTT_COMMON_SETUP_TOOLTIP,
  5097. message0: Blockly.Msg.MQTT_COMMON_SETUP_MESSAGE0,
  5098. args0: [{
  5099. type: "input_dummy"
  5100. }, {
  5101. type: "input_value",
  5102. name: "client_id"
  5103. }, {
  5104. type: "input_value",
  5105. name: "server"
  5106. }, {
  5107. type: "input_value",
  5108. name: "port"
  5109. }, {
  5110. type: "input_value",
  5111. name: "user"
  5112. }, {
  5113. type: "input_value",
  5114. name: "password"
  5115. }, {
  5116. type: "input_value",
  5117. name: "keepalive"
  5118. }]
  5119. });
  5120. }
  5121. };
  5122. Blockly.Blocks.mqtt_tencent_setup = {
  5123. init: function init() {
  5124. this.jsonInit({
  5125. inputsInline: !1,
  5126. nextStatement: null,
  5127. previousStatement: null,
  5128. colour: CategoryColors.IoT_MQTT,
  5129. helpUrl: Blockly.Msg.MQTT_TENCENT_SETUP_HELPURL,
  5130. tooltip: Blockly.Msg.MQTT_TENCENT_SETUP_TOOLTIP,
  5131. message0: Blockly.Msg.MQTT_TENCENT_SETUP_MESSAGE0,
  5132. args0: [{
  5133. type: "input_dummy"
  5134. }, {
  5135. check: "String",
  5136. type: "input_value",
  5137. name: "Url"
  5138. }, {
  5139. check: "Number",
  5140. type: "input_value",
  5141. name: "Port"
  5142. }, {
  5143. check: "String",
  5144. type: "input_value",
  5145. name: "AppId"
  5146. }, {
  5147. check: "String",
  5148. type: "input_value",
  5149. name: "Device"
  5150. }, {
  5151. type: "input_dummy"
  5152. }, {
  5153. check: "String",
  5154. type: "input_value",
  5155. name: "ReportTopic"
  5156. }, {
  5157. check: "String",
  5158. type: "input_value",
  5159. name: "ControlTopic"
  5160. }]
  5161. });
  5162. }
  5163. };
  5164. Blockly.Blocks.mqtt_setup = {
  5165. init: function init() {
  5166. this.jsonInit({
  5167. nextStatement: null,
  5168. previousStatement: null,
  5169. colour: CategoryColors.IoT_MQTT,
  5170. helpUrl: Blockly.Msg.MQTT_SETUP_HELPURL,
  5171. tooltip: Blockly.Msg.MQTT_SETUP_TOOLTIP,
  5172. message0: Blockly.Msg.MQTT_SETUP_MESSAGE0,
  5173. args0: [{
  5174. type: "input_dummy"
  5175. }, {
  5176. check: "String",
  5177. type: "input_value",
  5178. name: "Server"
  5179. }, {
  5180. check: "String",
  5181. type: "input_value",
  5182. name: "Iot_id"
  5183. }, {
  5184. check: "String",
  5185. type: "input_value",
  5186. name: "Iot_pwd"
  5187. }, {
  5188. check: "String",
  5189. type: "input_value",
  5190. name: "Client_ID"
  5191. }]
  5192. });
  5193. }
  5194. };
  5195. Blockly.Blocks.mqtt_connect = {
  5196. init: function init() {
  5197. this.jsonInit({
  5198. inputsInline: !0,
  5199. nextStatement: null,
  5200. previousStatement: null,
  5201. colour: CategoryColors.IoT_MQTT,
  5202. helpUrl: Blockly.Msg.MQTT_CONNECT_HELPURL,
  5203. tooltip: Blockly.Msg.MQTT_CONNECT_TOOLTIP,
  5204. message0: Blockly.Msg.MQTT_CONNECT_MESSAGE0
  5205. });
  5206. }
  5207. };
  5208. Blockly.Blocks.mqtt_publish = {
  5209. init: function init() {
  5210. this.jsonInit({
  5211. inputsInline: !0,
  5212. nextStatement: null,
  5213. previousStatement: null,
  5214. colour: CategoryColors.IoT_MQTT,
  5215. helpUrl: Blockly.Msg.MQTT_PUBLISH_HELPURL,
  5216. tooltip: Blockly.Msg.MQTT_PUBLISH_TOOLTIP,
  5217. message0: Blockly.Msg.MQTT_PUBLISH_MESSAGE0,
  5218. args0: [{
  5219. type: "input_value",
  5220. name: "msg"
  5221. }, {
  5222. check: "String",
  5223. type: "input_value",
  5224. name: "topic"
  5225. }]
  5226. });
  5227. }
  5228. };
  5229. Blockly.Blocks.mqtt_receive = {
  5230. init: function init() {
  5231. this.jsonInit({
  5232. inputsInline: !0,
  5233. nextStatement: null,
  5234. previousStatement: null,
  5235. colour: CategoryColors.IoT_MQTT,
  5236. helpUrl: Blockly.Msg.MQTT_RECEIVE_HELPURL,
  5237. tooltip: Blockly.Msg.MQTT_RECEIVE_TOOLTIP,
  5238. message0: Blockly.Msg.MQTT_RECEIVE_MESSAGE0,
  5239. args0: [{
  5240. check: "Variable",
  5241. type: "input_value",
  5242. name: "topic"
  5243. }, {
  5244. type: "input_value",
  5245. name: "msg"
  5246. }]
  5247. });
  5248. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5249. }
  5250. };
  5251. Blockly.Blocks.mqtt_rec_from_topic = {
  5252. init: function init() {
  5253. this.jsonInit({
  5254. inputsInline: !0,
  5255. nextStatement: null,
  5256. previousStatement: null,
  5257. colour: CategoryColors.IoT_MQTT,
  5258. helpUrl: Blockly.Msg.MQTT_REC_FROM_TOPIC_HELPURL,
  5259. tooltip: Blockly.Msg.MQTT_REC_FROM_TOPIC_TOOLTIP,
  5260. message0: Blockly.Msg.MQTT_REC_FROM_TOPIC_MESSAGE0,
  5261. args0: [{
  5262. text: "rJO1km2oN",
  5263. type: "field_input",
  5264. name: "topic"
  5265. }, {
  5266. type: "input_value",
  5267. name: "msg"
  5268. }]
  5269. });
  5270. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5271. }
  5272. };
  5273. Blockly.Blocks.mqtt_wait_msg = {
  5274. init: function init() {
  5275. this.jsonInit({
  5276. inputsInline: !0,
  5277. nextStatement: null,
  5278. previousStatement: null,
  5279. colour: CategoryColors.IoT_MQTT,
  5280. helpUrl: Blockly.Msg.MQTT_WAIT_MSG_HELPURL,
  5281. tooltip: Blockly.Msg.MQTT_WAIT_MSG_TOOLTIP,
  5282. message0: Blockly.Msg.MQTT_WAIT_MSG_MESSAGE0,
  5283. args0: [{
  5284. options: [[Blockly.Msg.CocoRobo_USOCKET_BLOCK, "block"], [Blockly.Msg.CocoRobo_USOCKET_UNBLOCK, "unblock"]],
  5285. type: "field_dropdown",
  5286. name: "mode"
  5287. }]
  5288. });
  5289. }
  5290. };
  5291. Blockly.Blocks.mqtt_disconnect = {
  5292. init: function init() {
  5293. this.jsonInit({
  5294. inputsInline: !0,
  5295. nextStatement: null,
  5296. previousStatement: null,
  5297. colour: CategoryColors.IoT_MQTT,
  5298. helpUrl: Blockly.Msg.MQTT_DISCONNECT_HELPURL,
  5299. tooltip: Blockly.Msg.MQTT_DISCONNECT_TOOLTIP,
  5300. message0: Blockly.Msg.MQTT_DISCONNECT_MESSAGE0
  5301. });
  5302. }
  5303. };
  5304. Blockly.Blocks.mqtt_last_will = {
  5305. init: function init() {
  5306. this.jsonInit({
  5307. inputsInline: !0,
  5308. nextStatement: null,
  5309. previousStatement: null,
  5310. colour: CategoryColors.IoT_MQTT,
  5311. helpUrl: Blockly.Msg.MQTT_LAST_WILL_HELPURL,
  5312. tooltip: Blockly.Msg.MQTT_LAST_WILL_TOOLTIP,
  5313. message0: Blockly.Msg.MQTT_LAST_WILL_MESSAGE0,
  5314. args0: [{
  5315. check: "String",
  5316. type: "input_value",
  5317. name: "msg"
  5318. }, {
  5319. check: "String",
  5320. type: "input_value",
  5321. name: "topic"
  5322. }]
  5323. });
  5324. }
  5325. };
  5326. Blockly.Blocks.CocoRobo_tinywebio_start = {
  5327. init: function init() {
  5328. this.jsonInit({
  5329. inputsInline: !0,
  5330. nextStatement: null,
  5331. previousStatement: null,
  5332. colour: CategoryColors.IoT_TinyWebIO,
  5333. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  5334. tooltip: Blockly.Msg.CocoRobo_tinywebio_start_TOOLTIP,
  5335. message0: Blockly.Msg.CocoRobo_tinywebio_start_MESSAGE0,
  5336. args0: [{
  5337. name: "tinywebio_mode",
  5338. options: [[Blockly.Msg.CocoRobo_run_in_back, "0"], [Blockly.Msg.CocoRobo_run_in_front, "1"]],
  5339. type: "field_dropdown"
  5340. }]
  5341. });
  5342. }
  5343. };
  5344. Blockly.Blocks.CocoRobo_tinywebio_client_setup = {
  5345. init: function init() {
  5346. this.jsonInit({
  5347. inputsInline: !1,
  5348. nextStatement: null,
  5349. previousStatement: null,
  5350. colour: CategoryColors.IoT_TinyWebIO,
  5351. helpUrl: Blockly.Msg.CocoRobo_tinywebio_client_setup_HELPURL,
  5352. tooltip: Blockly.Msg.CocoRobo_tinywebio_client_setup_TOOLTIP,
  5353. message0: Blockly.Msg.CocoRobo_tinywebio_client_setup_MESSAGE0,
  5354. args0: [{
  5355. type: "input_dummy"
  5356. }, {
  5357. type: "input_value",
  5358. name: "db_server",
  5359. check: "String"
  5360. }, {
  5361. type: "input_value",
  5362. name: "send_items",
  5363. check: "String"
  5364. }, {
  5365. type: "input_value",
  5366. name: "recv_items",
  5367. check: "String"
  5368. }, {
  5369. name: "interval",
  5370. type: "input_value",
  5371. check: "Number"
  5372. }]
  5373. });
  5374. }
  5375. };
  5376. Blockly.Blocks.CocoRobo_tinywebio_client_action = {
  5377. init: function init() {
  5378. this.jsonInit({
  5379. inputsInline: !0,
  5380. nextStatement: null,
  5381. previousStatement: null,
  5382. colour: CategoryColors.IoT_TinyWebIO,
  5383. helpUrl: Blockly.Msg.CocoRobo_tinywebio_client_action_HELPURL,
  5384. tooltip: Blockly.Msg.CocoRobo_tinywebio_client_action_TOOLTIP,
  5385. message0: Blockly.Msg.CocoRobo_tinywebio_client_action_MESSAGE0,
  5386. args0: [{
  5387. name: "action_mode",
  5388. options: [[Blockly.Msg.CocoRobo_tinywebio_client_action_start, "start"], [Blockly.Msg.CocoRobo_tinywebio_client_action_stop, "stop"]],
  5389. type: "field_dropdown"
  5390. }]
  5391. });
  5392. }
  5393. };
  5394. Blockly.Blocks.CocoRobo_blynk_terminal_widget_vpin = {
  5395. init: function init() {
  5396. this.jsonInit({
  5397. inputsInline: !0,
  5398. nextStatement: null,
  5399. previousStatement: null,
  5400. colour: CategoryColors.IoT_Blynk,
  5401. helpUrl: Blockly.Msg.CocoRobo_BLYNK_TERMINAL_WIDGET_VPIN_HELPURL,
  5402. tooltip: Blockly.Msg.CocoRobo_BLYNK_TERMINAL_WIDGET_VPIN_TOOLTIP,
  5403. message0: Blockly.Msg.CocoRobo_BLYNK_TERMINAL_WIDGET_VPIN_MESSAGE0,
  5404. args0: [{
  5405. check: "Number",
  5406. type: "input_value",
  5407. name: "virtual_pin"
  5408. }]
  5409. });
  5410. }
  5411. };
  5412. Blockly.Blocks.CocoRobo_blynk_sync_virtual = {
  5413. init: function init() {
  5414. this.jsonInit({
  5415. inputsInline: !0,
  5416. nextStatement: null,
  5417. previousStatement: null,
  5418. colour: CategoryColors.IoT_Blynk,
  5419. helpUrl: Blockly.Msg.CocoRobo_BLYNK_SYNC_VIRTUAL_HELPURL,
  5420. tooltip: Blockly.Msg.CocoRobo_BLYNK_SYNC_VIRTUAL_TOOLTIP,
  5421. message0: Blockly.Msg.CocoRobo_BLYNK_SYNC_VIRTUAL_MESSAGE0,
  5422. args0: [{
  5423. check: "Number",
  5424. type: "input_value",
  5425. name: "virtual_pin"
  5426. }]
  5427. });
  5428. }
  5429. };
  5430. Blockly.Blocks.CocoRobo_blynk_on_disconnected = {
  5431. init: function init() {
  5432. this.jsonInit({
  5433. inputsInline: !0,
  5434. nextStatement: null,
  5435. previousStatement: null,
  5436. colour: CategoryColors.IoT_Blynk,
  5437. helpUrl: Blockly.Msg.CocoRobo_BLYNK_ON_DISCONNECTED_HELPURL,
  5438. tooltip: Blockly.Msg.CocoRobo_BLYNK_ON_DISCONNECTED_TOOLTIP,
  5439. message0: Blockly.Msg.CocoRobo_BLYNK_ON_DISCONNECTED_MESSAGE0
  5440. });
  5441. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5442. }
  5443. };
  5444. Blockly.Blocks.CocoRobo_blynk_on_connected = {
  5445. init: function init() {
  5446. this.jsonInit({
  5447. inputsInline: !0,
  5448. nextStatement: null,
  5449. previousStatement: null,
  5450. colour: CategoryColors.IoT_Blynk,
  5451. helpUrl: Blockly.Msg.CocoRobo_BLYNK_ON_CONNECTED_HELPURL,
  5452. tooltip: Blockly.Msg.CocoRobo_BLYNK_ON_CONNECTED_TOOLTIP,
  5453. message0: Blockly.Msg.CocoRobo_BLYNK_ON_CONNECTED_MESSAGE0
  5454. });
  5455. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5456. }
  5457. };
  5458. Blockly.Blocks.CocoRobo_blynktimer_run = {
  5459. init: function init() {
  5460. this.jsonInit({
  5461. inputsInline: !0,
  5462. nextStatement: null,
  5463. previousStatement: null,
  5464. colour: CategoryColors.IoT_Blynk,
  5465. helpUrl: Blockly.Msg.CocoRobo_BLYNKTIMER_RUN_HELPURL,
  5466. tooltip: Blockly.Msg.CocoRobo_BLYNKTIMER_RUN_TOOLTIP,
  5467. message0: Blockly.Msg.CocoRobo_BLYNKTIMER_RUN_MESSAGE0
  5468. });
  5469. }
  5470. };
  5471. Blockly.Blocks.CocoRobo_blynk_run = {
  5472. init: function init() {
  5473. this.jsonInit({
  5474. inputsInline: !0,
  5475. nextStatement: null,
  5476. previousStatement: null,
  5477. colour: CategoryColors.IoT_Blynk,
  5478. helpUrl: Blockly.Msg.CocoRobo_BLYNK_RUN_HELPURL,
  5479. tooltip: Blockly.Msg.CocoRobo_BLYNK_RUN_TOOLTIP,
  5480. message0: Blockly.Msg.CocoRobo_BLYNK_RUN_MESSAGE0
  5481. });
  5482. }
  5483. };
  5484. Blockly.Blocks.CocoRobo_blynk_app_notify = {
  5485. init: function init() {
  5486. this.jsonInit({
  5487. inputsInline: !0,
  5488. nextStatement: null,
  5489. previousStatement: null,
  5490. colour: CategoryColors.IoT_Blynk,
  5491. helpUrl: Blockly.Msg.CocoRobo_BLYNK_APP_NOTIFY_HELPURL,
  5492. tooltip: Blockly.Msg.CocoRobo_BLYNK_APP_NOTIFY_TOOLTIP,
  5493. message0: Blockly.Msg.CocoRobo_BLYNK_APP_NOTIFY_MESSAGE0,
  5494. args0: [{
  5495. check: "String",
  5496. type: "input_value",
  5497. name: "notification"
  5498. }]
  5499. });
  5500. }
  5501. };
  5502. Blockly.Blocks.CocoRobo_blynk_stop_timers = {
  5503. init: function init() {
  5504. this.jsonInit({
  5505. inputsInline: !0,
  5506. nextStatement: null,
  5507. previousStatement: null,
  5508. colour: CategoryColors.IoT_Blynk,
  5509. helpUrl: Blockly.Msg.CocoRobo_BLYNK_STOP_TIMERS_HELPURL,
  5510. tooltip: Blockly.Msg.CocoRobo_BLYNK_STOP_TIMERS_TOOLTIP,
  5511. message0: Blockly.Msg.CocoRobo_BLYNK_STOP_TIMERS_MESSAGE0,
  5512. args0: [{
  5513. check: "Number",
  5514. type: "input_value",
  5515. name: "timer_num"
  5516. }]
  5517. });
  5518. }
  5519. };
  5520. Blockly.Blocks.CocoRobo_blynk_set_property = {
  5521. init: function init() {
  5522. this.jsonInit({
  5523. inputsInline: !0,
  5524. nextStatement: null,
  5525. previousStatement: null,
  5526. colour: CategoryColors.IoT_Blynk,
  5527. helpUrl: Blockly.Msg.CocoRobo_BLYNK_SET_PROPERTY_HELPURL,
  5528. tooltip: Blockly.Msg.CocoRobo_BLYNK_SET_PROPERTY_TOOLTIP,
  5529. message0: Blockly.Msg.CocoRobo_BLYNK_SET_PROPERTY_MESSAGE0,
  5530. args0: [{
  5531. check: "String",
  5532. type: "input_value",
  5533. name: "attribute_name"
  5534. }, {
  5535. type: "input_value",
  5536. name: "attribute_value"
  5537. }]
  5538. });
  5539. }
  5540. };
  5541. Blockly.Blocks.CocoRobo_blynk_email = {
  5542. init: function init() {
  5543. this.jsonInit({
  5544. inputsInline: !1,
  5545. nextStatement: null,
  5546. previousStatement: null,
  5547. colour: CategoryColors.IoT_Blynk,
  5548. helpUrl: Blockly.Msg.CocoRobo_BLYNK_EMAIL_HELPURL,
  5549. tooltip: Blockly.Msg.CocoRobo_BLYNK_EMAIL_TOOLTIP,
  5550. message0: Blockly.Msg.CocoRobo_BLYNK_EMAIL_MESSAGE0,
  5551. args0: [{
  5552. type: "input_dummy"
  5553. }, {
  5554. check: "String",
  5555. type: "input_value",
  5556. name: "subject"
  5557. }, {
  5558. check: "String",
  5559. type: "input_value",
  5560. name: "body"
  5561. }]
  5562. });
  5563. }
  5564. };
  5565. Blockly.Blocks.CocoRobo_blynk_get_timers = {
  5566. init: function init() {
  5567. this.jsonInit({
  5568. inputsInline: !0,
  5569. output: null,
  5570. colour: CategoryColors.IoT_Blynk,
  5571. helpUrl: Blockly.Msg.CocoRobo_BLYNK_GET_TIMERS_HELPURL,
  5572. tooltip: Blockly.Msg.CocoRobo_BLYNK_GET_TIMERS_TOOLTIP,
  5573. message0: Blockly.Msg.CocoRobo_BLYNK_GET_TIMERS_MESSAGE0
  5574. });
  5575. }
  5576. };
  5577. Blockly.Blocks.CocoRobo_blynktimer = {
  5578. init: function init() {
  5579. this.jsonInit({
  5580. message0: Blockly.Msg.CocoRobo_BLYNKTIMER_MESSAGE0,
  5581. nextStatement: null,
  5582. previousStatement: null,
  5583. colour: CategoryColors.IoT_Blynk,
  5584. helpUrl: Blockly.Msg.CocoRobo_BLYNKTIMER_HELPURL,
  5585. tooltip: Blockly.Msg.CocoRobo_BLYNKTIMER_TOOLTIP,
  5586. args0: [{
  5587. check: "Number",
  5588. type: "input_value",
  5589. name: "Num"
  5590. }, {
  5591. options: [[Blockly.Msg.CocoRobo_PERIODIC, "False"], [Blockly.Msg.CocoRobo_ONE_SHOT, "True"]],
  5592. type: "field_dropdown",
  5593. name: "Timer_mode"
  5594. }, {
  5595. check: "Number",
  5596. type: "input_value",
  5597. name: "period"
  5598. }]
  5599. });
  5600. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5601. }
  5602. };
  5603. Blockly.Blocks.CocoRobo_blynk_sensor_data_to_app = {
  5604. init: function init() {
  5605. this.jsonInit({
  5606. inputsInline: !0,
  5607. nextStatement: null,
  5608. previousStatement: null,
  5609. colour: CategoryColors.IoT_Blynk,
  5610. helpUrl: Blockly.Msg.CocoRobo_BLYNK_SENSOR_DATA_TO_APP_HELPURL,
  5611. tooltip: Blockly.Msg.CocoRobo_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,
  5612. message0: Blockly.Msg.CocoRobo_BLYNK_SENSOR_DATA_TO_APP_MESSAGE0,
  5613. args0: [{
  5614. type: "input_value",
  5615. name: "sensor_data"
  5616. }, {
  5617. check: "Number",
  5618. type: "input_value",
  5619. name: "virtual_pin"
  5620. }]
  5621. });
  5622. }
  5623. };
  5624. Blockly.Blocks.CocoRobo_blynk_app_data = {
  5625. init: function init() {
  5626. this.jsonInit({
  5627. inputsInline: !0,
  5628. nextStatement: null,
  5629. previousStatement: null,
  5630. colour: CategoryColors.IoT_Blynk,
  5631. helpUrl: Blockly.Msg.CocoRobo_BLYNK_APP_DATA_HELPURL,
  5632. tooltip: Blockly.Msg.CocoRobo_BLYNK_APP_DATA_TOOLTIP,
  5633. message0: Blockly.Msg.CocoRobo_BLYNK_APP_DATA_MESSAGE0,
  5634. args0: [{
  5635. check: "Number",
  5636. type: "input_value",
  5637. name: "virtual_pin"
  5638. }, {
  5639. type: "input_value",
  5640. name: "virtual_pin_val"
  5641. }]
  5642. });
  5643. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5644. }
  5645. };
  5646. Blockly.Blocks.CocoRobo_blynk_setup = {
  5647. init: function init() {
  5648. this.jsonInit({
  5649. nextStatement: null,
  5650. previousStatement: null,
  5651. colour: CategoryColors.IoT_Blynk,
  5652. helpUrl: Blockly.Msg.CocoRobo_BLYNK_SETUP_HELPURL,
  5653. tooltip: Blockly.Msg.CocoRobo_BLYNK_SETUP_TOOLTIP,
  5654. message0: Blockly.Msg.CocoRobo_BLYNK_SETUP_MESSAGE0,
  5655. args0: [{
  5656. type: "input_dummy"
  5657. }, {
  5658. check: "String",
  5659. type: "input_value",
  5660. name: "server"
  5661. }, {
  5662. check: "Number",
  5663. type: "input_value",
  5664. name: "port"
  5665. }, {
  5666. check: "String",
  5667. type: "input_value",
  5668. name: "auth"
  5669. }]
  5670. });
  5671. }
  5672. };
  5673. Blockly.Blocks.CocoRobo_onenet_option_boards = {
  5674. init: function init() {
  5675. this.jsonInit({
  5676. inputsInline: !0,
  5677. nextStatement: null,
  5678. previousStatement: null,
  5679. colour: CategoryColors.IoT_OneNet_WeChat,
  5680. helpUrl: Blockly.Msg.CocoRobo_ONENET_OPTION_BOARDS_HELPURL,
  5681. tooltip: Blockly.Msg.CocoRobo_ONENET_OPTION_BOARDS_TOOLTIP,
  5682. message0: Blockly.Msg.CocoRobo_ONENET_OPTION_BOARDS_MESSAGE0,
  5683. args0: [{
  5684. options: WECHAT_APP_DEVICES,
  5685. type: "field_dropdown",
  5686. name: "option_boards"
  5687. }]
  5688. });
  5689. }
  5690. };
  5691. Blockly.Blocks.CocoRobo_onenet_setup = {
  5692. init: function init() {
  5693. this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);
  5694. this.setColour(CategoryColors.IoT_OneNet);
  5695. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_ONENET);
  5696. this.appendValueInput("server").setCheck("String").appendField(Blockly.Msg.CocoRobo_SERVER);
  5697. this.appendValueInput("device_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_DEVICE_ID);
  5698. this.appendValueInput("product_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_PRODUCT_ID);
  5699. this.appendValueInput("product_APIKey").setCheck("String").appendField(Blockly.Msg.CocoRobo_API_KEY);
  5700. this.setPreviousStatement(!0);
  5701. this.setNextStatement(!0);
  5702. this.setInputsInline(!1);
  5703. this.setTooltip(Blockly.Msg.CocoRobo_ONENET_TOOLTIP);
  5704. }
  5705. };
  5706. Blockly.Blocks.CocoRobo_onenet_setup = {
  5707. init: function init() {
  5708. this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);
  5709. this.setColour(CategoryColors.IoT_OneNet);
  5710. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_ONENET);
  5711. this.appendValueInput("server").setCheck("String").appendField(Blockly.Msg.CocoRobo_SERVER);
  5712. this.appendValueInput("device_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_DEVICE_ID);
  5713. this.appendValueInput("product_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_PRODUCT_ID);
  5714. this.appendValueInput("product_APIKey").setCheck("String").appendField(Blockly.Msg.CocoRobo_API_KEY);
  5715. this.setPreviousStatement(!0);
  5716. this.setNextStatement(!0);
  5717. this.setInputsInline(!1);
  5718. this.setTooltip(Blockly.Msg.CocoRobo_ONENET_TOOLTIP);
  5719. }
  5720. };
  5721. Blockly.Blocks.CocoRobo_onenet_setup_wechat_app = {
  5722. init: function init() {
  5723. this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);
  5724. this.setColour(CategoryColors.IoT_OneNet_WeChat);
  5725. this.appendDummyInput().appendField(Blockly.Msg.CocoRobo_ONENET_WECHAT_APP);
  5726. this.appendValueInput("server").setCheck("String").appendField(Blockly.Msg.CocoRobo_SERVER);
  5727. this.appendValueInput("device_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_DEVICE_ID);
  5728. this.appendValueInput("product_id").setCheck("String").appendField(Blockly.Msg.CocoRobo_PRODUCT_ID);
  5729. this.appendValueInput("product_APIKey").setCheck("String").appendField(Blockly.Msg.CocoRobo_API_KEY);
  5730. this.setPreviousStatement(!0);
  5731. this.setNextStatement(!0);
  5732. this.setInputsInline(!1);
  5733. this.setTooltip(Blockly.Msg.CocoRobo_ONENET_TOOLTIP);
  5734. }
  5735. };
  5736. Blockly.Blocks.CocoRobo_onenet_recv = {
  5737. init: function init() {
  5738. this.jsonInit({
  5739. message0: Blockly.Msg.CocoRobo_ONENET_RECV_MESSAGE0,
  5740. nextStatement: null,
  5741. previousStatement: null,
  5742. colour: CategoryColors.IoT_OneNet,
  5743. inputsInline: !0,
  5744. helpUrl: Blockly.Msg.CocoRobo_ONENET_RECV_HELPURL,
  5745. tooltip: Blockly.Msg.CocoRobo_ONENET_RECV_TOOLTIP,
  5746. args0: [{
  5747. type: "input_value",
  5748. name: "message"
  5749. }]
  5750. });
  5751. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5752. }
  5753. };
  5754. Blockly.Blocks.CocoRobo_onenet_recv_from_wechat_app = {
  5755. init: function init() {
  5756. this.jsonInit({
  5757. message0: Blockly.Msg.CocoRobo_ONENET_RECV_FROM_WECHAT_APP_MESSAGE0,
  5758. nextStatement: null,
  5759. previousStatement: null,
  5760. colour: CategoryColors.IoT_OneNet_WeChat,
  5761. inputsInline: !0,
  5762. helpUrl: Blockly.Msg.CocoRobo_ONENET_RECV_FROM_WECHAT_APP_HELPURL,
  5763. tooltip: Blockly.Msg.CocoRobo_ONENET_RECV_FROM_WECHAT_APP_TOOLTIP,
  5764. args0: [{
  5765. type: "input_value",
  5766. name: "name"
  5767. }, {
  5768. type: "input_value",
  5769. name: "value"
  5770. }]
  5771. });
  5772. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5773. }
  5774. };
  5775. Blockly.Blocks.CocoRobo_onenet_recv_msg = {
  5776. init: function init() {
  5777. this.jsonInit({
  5778. message0: Blockly.Msg.CocoRobo_ONENET_RECV_MSG_MESSAGE0,
  5779. nextStatement: null,
  5780. previousStatement: null,
  5781. colour: CategoryColors.IoT_OneNet,
  5782. inputsInline: !0,
  5783. helpUrl: Blockly.Msg.CocoRobo_ONENET_RECV_MSG_HELPURL,
  5784. tooltip: Blockly.Msg.CocoRobo_ONENET_RECV_MSG_TOOLTIP,
  5785. args0: [{
  5786. type: "field_input",
  5787. name: "message",
  5788. text: "on"
  5789. }]
  5790. });
  5791. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  5792. }
  5793. };
  5794. Blockly.Blocks.CocoRobo_onenet_pub_value = {
  5795. init: function init() {
  5796. this.jsonInit({
  5797. inputsInline: !0,
  5798. nextStatement: null,
  5799. previousStatement: null,
  5800. colour: CategoryColors.IoT_OneNet,
  5801. helpUrl: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE_HELPURL,
  5802. tooltip: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE_TOOLTIP,
  5803. message0: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE_MESSAGE0,
  5804. args0: [{
  5805. check: "String",
  5806. type: "input_value",
  5807. name: "NAME"
  5808. }, {
  5809. check: "Number",
  5810. type: "input_value",
  5811. name: "VALUE"
  5812. }]
  5813. });
  5814. }
  5815. };
  5816. Blockly.Blocks.CocoRobo_onenet_pub_value_wechat_app = {
  5817. init: function init() {
  5818. this.jsonInit({
  5819. inputsInline: !0,
  5820. nextStatement: null,
  5821. previousStatement: null,
  5822. colour: CategoryColors.IoT_OneNet_WeChat,
  5823. helpUrl: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE2_HELPURL,
  5824. tooltip: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE2_TOOLTIP,
  5825. message0: Blockly.Msg.CocoRobo_ONENET_PUB_VALUE2_MESSAGE0,
  5826. args0: [{
  5827. check: "String",
  5828. type: "input_value",
  5829. name: "NAME"
  5830. }, {
  5831. check: "Number",
  5832. type: "input_value",
  5833. name: "VALUE"
  5834. }]
  5835. });
  5836. }
  5837. };
  5838. Blockly.Blocks.CocoRobo_onenet_pub_dict = {
  5839. init: function init() {
  5840. this.jsonInit({
  5841. inputsInline: !0,
  5842. nextStatement: null,
  5843. previousStatement: null,
  5844. colour: CategoryColors.IoT_OneNet,
  5845. helpUrl: Blockly.Msg.CocoRobo_ONENET_PUB_DICT_HELPURL,
  5846. tooltip: Blockly.Msg.CocoRobo_ONENET_PUB_DICT_TOOLTIP,
  5847. message0: Blockly.Msg.CocoRobo_ONENET_PUB_DICT_MESSAGE0,
  5848. args0: [{
  5849. check: "Array",
  5850. type: "input_value",
  5851. name: "DICT"
  5852. }]
  5853. });
  5854. }
  5855. };
  5856. Blockly.Blocks.CocoRobo_onenet_disconnect = {
  5857. init: function init() {
  5858. this.jsonInit({
  5859. inputsInline: !0,
  5860. nextStatement: null,
  5861. previousStatement: null,
  5862. colour: CategoryColors.IoT_OneNet,
  5863. helpUrl: Blockly.Msg.CocoRobo_ONENET_DISCONNECT_HELPURL,
  5864. tooltip: Blockly.Msg.CocoRobo_ONENET_DISCONNECT_TOOLTIP,
  5865. message0: Blockly.Msg.CocoRobo_ONENET_DISCONNECT_MESSAGE0
  5866. });
  5867. }
  5868. };
  5869. Blockly.Blocks.list_first_index = {
  5870. init: function init() {
  5871. this.jsonInit({
  5872. inputsInline: !0,
  5873. output: "Number",
  5874. colour: CategoryColors.List,
  5875. helpUrl: Blockly.Msg.LIST_FIRST_INDEX_HELPURL,
  5876. // tooltip: Blockly.Msg.LIST_FIRST_INDEX_TOOLTIP,
  5877. message0: Blockly.Msg.LIST_FIRST_INDEX_MESSAGE0,
  5878. args0: [{
  5879. type: "input_value",
  5880. name: "elem"
  5881. }, {
  5882. check: "Array",
  5883. type: "input_value",
  5884. name: "my_list"
  5885. }, {
  5886. options: [[Blockly.Msg.FIRST, "first"], [Blockly.Msg.LAST, "last"]],
  5887. type: "field_dropdown",
  5888. name: "last_or_first"
  5889. }]
  5890. });
  5891. var thisBlock = this;
  5892. this.setTooltip(function () {
  5893. var mode = thisBlock.getFieldValue('last_or_first');
  5894. var TOOLTIPS = {
  5895. 'first': Blockly.Msg.LIST_FIRST_INDEX_TOOLTIP.replace('%3', Blockly.Msg.FIRST),
  5896. 'last': Blockly.Msg.LIST_FIRST_INDEX_TOOLTIP.replace('%3', Blockly.Msg.LAST)
  5897. };
  5898. return TOOLTIPS[mode];
  5899. });
  5900. }
  5901. };
  5902. Blockly.Blocks.list_item_exist = {
  5903. init: function init() {
  5904. this.jsonInit({
  5905. colour: CategoryColors.List,
  5906. args0: [{
  5907. type: "input_value",
  5908. name: "list_name"
  5909. }, {
  5910. type: "input_value",
  5911. name: "list_item"
  5912. }],
  5913. output: "Boolean",
  5914. inputsInline: !0,
  5915. helpUrl: Blockly.Msg.LIST_ITEM_EXIST_HELPURL,
  5916. tooltip: Blockly.Msg.LIST_ITEM_EXIST_TOOLTIP,
  5917. message0: Blockly.Msg.LIST_ITEM_EXIST_MESSAGE0
  5918. });
  5919. }
  5920. };
  5921. Blockly.Blocks.set_list_order_item = {
  5922. init: function init() {
  5923. this.jsonInit({
  5924. colour: CategoryColors.List,
  5925. args0: [{
  5926. type: "input_value",
  5927. name: "list_name"
  5928. }, {
  5929. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  5930. type: "field_dropdown",
  5931. name: "list_order"
  5932. }, {
  5933. check: "Number",
  5934. type: "input_value",
  5935. name: "list_order_item"
  5936. }, {
  5937. type: "input_value",
  5938. name: "set_value"
  5939. }],
  5940. inputsInline: !0,
  5941. nextStatement: null,
  5942. previousStatement: null,
  5943. helpUrl: Blockly.Msg.SET_LIST_ORDER_ITEM_HELPURL,
  5944. tooltip: Blockly.Msg.SET_LIST_ORDER_ITEM_TOOLTIP,
  5945. message0: Blockly.Msg.SET_LIST_ORDER_ITEM_MESSAGE0
  5946. });
  5947. }
  5948. };
  5949. Blockly.Blocks.insert_list_order_item = {
  5950. init: function init() {
  5951. this.jsonInit({
  5952. colour: CategoryColors.List,
  5953. args0: [{
  5954. type: "input_value",
  5955. name: "list_name"
  5956. }, {
  5957. options: [[Blockly.Msg.CocoRobo_ORDER, "("], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "(-"]],
  5958. type: "field_dropdown",
  5959. name: "list_order"
  5960. }, {
  5961. check: "Number",
  5962. type: "input_value",
  5963. name: "list_order_item"
  5964. }, {
  5965. type: "input_value",
  5966. name: "set_value"
  5967. }],
  5968. inputsInline: !0,
  5969. nextStatement: null,
  5970. previousStatement: null,
  5971. helpUrl: Blockly.Msg.INSERT_LIST_ORDER_ITEM_HELPURL,
  5972. tooltip: Blockly.Msg.INSERT_LIST_ORDER_ITEM_TOOLTIP,
  5973. message0: Blockly.Msg.INSERT_LIST_ORDER_ITEM_MESSAGE0
  5974. });
  5975. }
  5976. };
  5977. Blockly.Blocks.list_order_item = {
  5978. init: function init() {
  5979. this.jsonInit({
  5980. colour: CategoryColors.List,
  5981. args0: [{
  5982. type: "input_value",
  5983. name: "list_name"
  5984. }, {
  5985. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  5986. type: "field_dropdown",
  5987. name: "list_order"
  5988. }, {
  5989. check: "Number",
  5990. type: "input_value",
  5991. name: "list_order_item"
  5992. }],
  5993. output: ["Number", "String", "Boolean", "Array"],
  5994. inputsInline: !0,
  5995. helpUrl: Blockly.Msg.LIST_ORDER_ITEM_HELPURL,
  5996. tooltip: Blockly.Msg.LIST_ORDER_ITEM_TOOLTIP,
  5997. message0: Blockly.Msg.LIST_ORDER_ITEM_MESSAGE0
  5998. });
  5999. }
  6000. };
  6001. Blockly.Blocks.parts_of_list = {
  6002. init: function init() {
  6003. this.jsonInit({
  6004. colour: CategoryColors.List,
  6005. args0: [{
  6006. type: "input_value",
  6007. name: "list_name"
  6008. }, {
  6009. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  6010. type: "field_dropdown",
  6011. name: "list_start_order"
  6012. }, {
  6013. check: "Number",
  6014. type: "input_value",
  6015. name: "start_item"
  6016. }, {
  6017. options: [[Blockly.Msg.CocoRobo_ORDER, ":"], [Blockly.Msg.CocoRobo_REVERSE_ORDER, ":-"]],
  6018. type: "field_dropdown",
  6019. name: "list_end_order"
  6020. }, {
  6021. check: "Number",
  6022. type: "input_value",
  6023. name: "end_item"
  6024. }],
  6025. output: null,
  6026. inputsInline: !0,
  6027. helpUrl: Blockly.Msg.PARTS_OF_LIST_HELPURL,
  6028. tooltip: Blockly.Msg.PARTS_OF_LIST_TOOLTIP,
  6029. message0: Blockly.Msg.PARTS_OF_LIST_MESSAGE0
  6030. });
  6031. }
  6032. };
  6033. Blockly.Blocks.list_to_tuple = {
  6034. init: function init() {
  6035. this.jsonInit({
  6036. colour: CategoryColors.Tuple,
  6037. args0: [{
  6038. check: "Array",
  6039. type: "input_value",
  6040. name: "list_name"
  6041. }],
  6042. output: null,
  6043. inputsInline: !0,
  6044. helpUrl: Blockly.Msg.LIST_TO_TUPLE_HELPURL,
  6045. tooltip: Blockly.Msg.LIST_TO_TUPLE_TOOLTIP,
  6046. message0: Blockly.Msg.LIST_TO_TUPLE_MESSAGE0
  6047. });
  6048. }
  6049. };
  6050. Blockly.Blocks.lists_clear = {
  6051. init: function init() {
  6052. this.jsonInit({
  6053. message0: Blockly.Msg.CocoRobo_lists_clear_MESSAGE0,
  6054. args0: [{
  6055. check: "Array",
  6056. type: "input_value",
  6057. name: "list_name"
  6058. }],
  6059. nextStatement: null,
  6060. previousStatement: null,
  6061. inputsInline: !0,
  6062. colour: CategoryColors.List,
  6063. tooltip: Blockly.Msg.CocoRobo_lists_clear_TOOLTIP,
  6064. helpUrl: Blockly.Msg.CocoRobo_lists_clear_HELPURL
  6065. });
  6066. }
  6067. };
  6068. Blockly.Blocks.lists_append = {
  6069. init: function init() {
  6070. this.jsonInit({
  6071. message0: Blockly.Msg.CocoRobo_lists_append_MESSAGE0,
  6072. args0: [{
  6073. check: "Array",
  6074. type: "input_value",
  6075. name: "list_name"
  6076. }, {
  6077. type: "input_value",
  6078. name: "last_item",
  6079. check: ["String", "Number"]
  6080. }],
  6081. nextStatement: null,
  6082. previousStatement: null,
  6083. inputsInline: !0,
  6084. colour: CategoryColors.List,
  6085. tooltip: Blockly.Msg.CocoRobo_lists_append_TOOLTIP,
  6086. helpUrl: Blockly.Msg.CocoRobo_lists_append_HELPURL
  6087. });
  6088. }
  6089. };
  6090. Blockly.Blocks.lists_extend = {
  6091. init: function init() {
  6092. this.jsonInit({
  6093. message0: Blockly.Msg.CocoRobo_lists_extend_MESSAGE0,
  6094. args0: [{
  6095. check: "Array",
  6096. type: "input_value",
  6097. name: "list_name"
  6098. }, {
  6099. type: "input_value",
  6100. name: "extend_list",
  6101. check: "Array"
  6102. }],
  6103. nextStatement: null,
  6104. previousStatement: null,
  6105. inputsInline: !0,
  6106. colour: CategoryColors.List,
  6107. tooltip: Blockly.Msg.CocoRobo_lists_extend_TOOLTIP,
  6108. helpUrl: Blockly.Msg.CocoRobo_lists_extend_HELPURL
  6109. });
  6110. }
  6111. };
  6112. Blockly.Blocks.CocoRobo_return_list = {
  6113. init: function init() {
  6114. this.jsonInit({
  6115. colour: CategoryColors.List,
  6116. args0: [{
  6117. type: "input_value",
  6118. name: "list_name"
  6119. }, {
  6120. type: "input_value",
  6121. name: "list_items"
  6122. }],
  6123. nextStatement: null,
  6124. previousStatement: null,
  6125. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6126. tooltip: Blockly.Msg.CocoRobo_return_list_TOOLTIP,
  6127. message0: Blockly.Msg.CocoRobo_return_list_MESSAGE0,
  6128. inputsInline: !0
  6129. });
  6130. }
  6131. };
  6132. Blockly.Blocks.CocoRobo_music_note = {
  6133. init: function init() {
  6134. this.jsonInit({
  6135. inputsInline: !0,
  6136. colour: CategoryColors.Music,
  6137. output: "String",
  6138. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6139. tooltip: Blockly.Msg.CocoRobo_music_note_TOOLTIP,
  6140. message0: Blockly.Msg.CocoRobo_music_note_MESSAGE0,
  6141. args0: [{
  6142. name: "gamut",
  6143. options: [["A", "A"], ["B", "B"], ["C", "C"], ["D", "D"], ["E", "E"], ["F", "F"], ["G", "G"]],
  6144. type: "field_dropdown"
  6145. }, {
  6146. check: "Number",
  6147. type: "input_value",
  6148. name: "num1"
  6149. }, {
  6150. check: "Number",
  6151. type: "input_value",
  6152. name: "num2"
  6153. }]
  6154. });
  6155. }
  6156. };
  6157. Blockly.Blocks.CocoRobo_music_play = {
  6158. init: function init() {
  6159. this.jsonInit({
  6160. inputsInline: !1,
  6161. colour: CategoryColors.Music,
  6162. nextStatement: null,
  6163. previousStatement: null,
  6164. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6165. tooltip: Blockly.Msg.CocoRobo_MUSIC_PLAY_TOOLTIP,
  6166. message0: Blockly.Msg.CocoRobo_MUSIC_PLAY_MESSAGE0,
  6167. args0: [{
  6168. name: "melody",
  6169. options: [["DADADADUM", "DADADADUM"], ["ENTERTAINER", "ENTERTAINER"], ["PRELUDE", "PRELUDE"], ["ODE", "ODE"], ["NYAN", "NYAN"], ["RINGTONE", "RINGTONE"], ["FUNK", "FUNK"], ["BLUES", "BLUES"], ["BIRTHDAY", "BIRTHDAY"], ["WEDDING", "WEDDING"], ["FUNERAL", "FUNERAL"], ["PUNCHLINE", "PUNCHLINE"], ["PYTHON", "PYTHON"], ["BADDY", "BADDY"], ["CHASE", "CHASE"], ["BA_DING", "BA_DING"], ["WAWAWAWAA", "WAWAWAWAA"], ["JUMP_UP", "JUMP_UP"], ["JUMP_DOWN", "JUMP_DOWN"], ["POWER_UP", "POWER_UP"], ["POWER_DOWN", "POWER_DOWN"], [Blockly.Msg.CocoRobo_MUSIC_GE_CHANG_ZU_GUO, "GE_CHANG_ZU_GUO"], [Blockly.Msg.CocoRobo_MUSIC_DONG_FANG_HONG, "DONG_FANG_HONG"], [Blockly.Msg.CocoRobo_MUSIC_CAI_YUN_ZHUI_YUE, "CAI_YUN_ZHUI_YUE"], [Blockly.Msg.CocoRobo_MUSIC_ZOU_JIN_XIN_SHI_DAI, "ZOU_JIN_XIN_SHI_DAI"], [Blockly.Msg.CocoRobo_MUSIC_MO_LI_HUA, "MO_LI_HUA"], [Blockly.Msg.CocoRobo_MUSIC_YI_MENG_SHAN_XIAO_DIAO, "YI_MENG_SHAN_XIAO_DIAO"]],
  6170. type: "field_dropdown"
  6171. }, {
  6172. check: "Number",
  6173. type: "input_value",
  6174. name: "pin"
  6175. }]
  6176. });
  6177. }
  6178. };
  6179. Blockly.Blocks.CocoRobo_music_play_until_end = {
  6180. init: function init() {
  6181. this.jsonInit({
  6182. inputsInline: !1,
  6183. colour: CategoryColors.Music,
  6184. nextStatement: null,
  6185. previousStatement: null,
  6186. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6187. tooltip: Blockly.Msg.CocoRobo_MUSIC_PLAY_UNTIL_END_TOOLTIP,
  6188. message0: Blockly.Msg.CocoRobo_MUSIC_PLAY_UNTIL_END_MESSAGE0,
  6189. args0: [{
  6190. name: "melody",
  6191. options: [["DADADADUM", "DADADADUM"], ["ENTERTAINER", "ENTERTAINER"], ["PRELUDE", "PRELUDE"], ["ODE", "ODE"], ["NYAN", "NYAN"], ["RINGTONE", "RINGTONE"], ["FUNK", "FUNK"], ["BLUES", "BLUES"], ["BIRTHDAY", "BIRTHDAY"], ["WEDDING", "WEDDING"], ["FUNERAL", "FUNERAL"], ["PUNCHLINE", "PUNCHLINE"], ["PYTHON", "PYTHON"], ["BADDY", "BADDY"], ["CHASE", "CHASE"], ["BA_DING", "BA_DING"], ["WAWAWAWAA", "WAWAWAWAA"], ["JUMP_UP", "JUMP_UP"], ["JUMP_DOWN", "JUMP_DOWN"], ["POWER_UP", "POWER_UP"], ["POWER_DOWN", "POWER_DOWN"], [Blockly.Msg.CocoRobo_MUSIC_GE_CHANG_ZU_GUO, "GE_CHANG_ZU_GUO"], [Blockly.Msg.CocoRobo_MUSIC_DONG_FANG_HONG, "DONG_FANG_HONG"], [Blockly.Msg.CocoRobo_MUSIC_CAI_YUN_ZHUI_YUE, "CAI_YUN_ZHUI_YUE"], [Blockly.Msg.CocoRobo_MUSIC_ZOU_JIN_XIN_SHI_DAI, "ZOU_JIN_XIN_SHI_DAI"], [Blockly.Msg.CocoRobo_MUSIC_MO_LI_HUA, "MO_LI_HUA"], [Blockly.Msg.CocoRobo_MUSIC_YI_MENG_SHAN_XIAO_DIAO, "YI_MENG_SHAN_XIAO_DIAO"]],
  6192. type: "field_dropdown"
  6193. }, {
  6194. check: "Number",
  6195. type: "input_value",
  6196. name: "pin"
  6197. }]
  6198. });
  6199. }
  6200. };
  6201. Blockly.Blocks.microbit_music_play_built_in = {
  6202. init: function init() {
  6203. this.jsonInit({
  6204. inputsInline: !1,
  6205. colour: CategoryColors.Music,
  6206. nextStatement: null,
  6207. previousStatement: null,
  6208. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6209. tooltip: Blockly.Msg.MICROBIT_MUSIC_PLAY_BUILT_IN_TOOLTIP,
  6210. message0: Blockly.Msg.MICROBIT_MUSIC_PLAY_BUILT_IN_MESSAGE0,
  6211. args0: [{
  6212. name: "melody",
  6213. options: [["DADADADUM", "DADADADUM"], ["ENTERTAINER", "ENTERTAINER"], ["PRELUDE", "PRELUDE"], ["ODE", "ODE"], ["NYAN", "NYAN"], ["RINGTONE", "RINGTONE"], ["FUNK", "FUNK"], ["BLUES", "BLUES"], ["BIRTHDAY", "BIRTHDAY"], ["WEDDING", "WEDDING"], ["FUNERAL", "FUNERAL"], ["PUNCHLINE", "PUNCHLINE"], ["PYTHON", "PYTHON"], ["BADDY", "BADDY"], ["CHASE", "CHASE"], ["BA_DING", "BA_DING"], ["WAWAWAWAA", "WAWAWAWAA"], ["JUMP_UP", "JUMP_UP"], ["JUMP_DOWN", "JUMP_DOWN"], ["POWER_UP", "POWER_UP"], ["POWER_DOWN", "POWER_DOWN"], [Blockly.Msg.CocoRobo_MUSIC_GE_CHANG_ZU_GUO, "GE_CHANG_ZU_GUO"], [Blockly.Msg.CocoRobo_MUSIC_DONG_FANG_HONG, "DONG_FANG_HONG"], [Blockly.Msg.CocoRobo_MUSIC_CAI_YUN_ZHUI_YUE, "CAI_YUN_ZHUI_YUE"], [Blockly.Msg.CocoRobo_MUSIC_ZOU_JIN_XIN_SHI_DAI, "ZOU_JIN_XIN_SHI_DAI"], [Blockly.Msg.CocoRobo_MUSIC_MO_LI_HUA, "MO_LI_HUA"], [Blockly.Msg.CocoRobo_MUSIC_YI_MENG_SHAN_XIAO_DIAO, "YI_MENG_SHAN_XIAO_DIAO"]],
  6214. type: "field_dropdown"
  6215. }, {
  6216. checked: !0,
  6217. type: "field_checkbox",
  6218. name: "wait"
  6219. }, {
  6220. checked: !1,
  6221. type: "field_checkbox",
  6222. name: "loop"
  6223. }, {
  6224. check: "Number",
  6225. type: "input_value",
  6226. name: "pin"
  6227. }]
  6228. });
  6229. }
  6230. };
  6231. Blockly.Blocks.CocoRobo_music_pin_p6 = {
  6232. init: function init() {
  6233. this.jsonInit({
  6234. inputsInline: !0,
  6235. output: "Number",
  6236. colour: CategoryColors.Music,
  6237. helpUrl: Blockly.Msg.CocoRobo_MUSIC_PIN_P6_HELPURL,
  6238. tooltip: Blockly.Msg.CocoRobo_MUSIC_PIN_P6_TOOLTIP,
  6239. message0: "%1",
  6240. args0: [{
  6241. options: [[Blockly.Msg.CocoRobo_MUSIC_PIN_P6, "6"], ["P0", "0"], ["P1", "1"], ["P8", "8"], ["P9", "9"], ["P13", "13"], ["P14", "14"], ["P15", "15"], ["P16", "16"], ["P19", "19"], ["P20", "20"]],
  6242. type: "field_dropdown",
  6243. name: "music_pin"
  6244. }]
  6245. });
  6246. }
  6247. };
  6248. Blockly.Blocks.microbit_music_pitch = {
  6249. init: function init() {
  6250. this.jsonInit({
  6251. inputsInline: !0,
  6252. nextStatement: null,
  6253. previousStatement: null,
  6254. colour: CategoryColors.Music,
  6255. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6256. tooltip: Blockly.Msg.MICROBIT_MUSIC_PITCH_TOOLTIP,
  6257. message0: Blockly.Msg.MICROBIT_MUSIC_PITCH_MESSAGE0,
  6258. args0: [{
  6259. check: "Number",
  6260. type: "input_value",
  6261. name: "pitch"
  6262. }, {
  6263. type: "input_dummy"
  6264. }, {
  6265. check: "Number",
  6266. type: "input_value",
  6267. name: "duration"
  6268. }, {
  6269. check: "Number",
  6270. type: "input_value",
  6271. name: "pin"
  6272. }]
  6273. });
  6274. }
  6275. };
  6276. Blockly.Blocks.microbit_music_play_list_of_notes = {
  6277. init: function init() {
  6278. this.jsonInit({
  6279. colour: CategoryColors.Music,
  6280. nextStatement: null,
  6281. previousStatement: null,
  6282. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6283. tooltip: Blockly.Msg.MICROBIT_MUSIC_PLAY_LIST_OF_NOTES_TOOLTIP,
  6284. message0: Blockly.Msg.MICROBIT_MUSIC_PLAY_LIST_OF_NOTES_MESSAGE0,
  6285. args0: [{
  6286. check: "Array",
  6287. type: "input_value",
  6288. name: "notes"
  6289. }, {
  6290. checked: !0,
  6291. type: "field_checkbox",
  6292. name: "wait"
  6293. }, {
  6294. type: "input_dummy"
  6295. }, {
  6296. checked: !1,
  6297. type: "field_checkbox",
  6298. name: "loop"
  6299. }, {
  6300. check: "Number",
  6301. type: "input_value",
  6302. name: "pin"
  6303. }]
  6304. });
  6305. }
  6306. };
  6307. Blockly.Blocks.microbit_music_reset = {
  6308. init: function init() {
  6309. this.jsonInit({
  6310. colour: CategoryColors.Music,
  6311. nextStatement: null,
  6312. previousStatement: null,
  6313. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6314. tooltip: Blockly.Msg.MICROBIT_MUSIC_RESET_TOOLTIP,
  6315. message0: Blockly.Msg.MICROBIT_MUSIC_RESET_MESSAGE0
  6316. });
  6317. }
  6318. };
  6319. Blockly.Blocks.microbit_music_stop = {
  6320. init: function init() {
  6321. this.jsonInit({
  6322. colour: CategoryColors.Music,
  6323. nextStatement: null,
  6324. previousStatement: null,
  6325. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6326. tooltip: Blockly.Msg.MICROBIT_MUSIC_STOP_TOOLTIP,
  6327. message0: Blockly.Msg.MICROBIT_MUSIC_STOP_MESSAGE0,
  6328. args0: [{
  6329. check: "Number",
  6330. type: "input_value",
  6331. name: "pin"
  6332. }]
  6333. });
  6334. }
  6335. };
  6336. Blockly.Blocks.microbit_music_set_tempo = {
  6337. init: function init() {
  6338. this.jsonInit({
  6339. inputsInline: !0,
  6340. nextStatement: null,
  6341. previousStatement: null,
  6342. colour: CategoryColors.Music,
  6343. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6344. tooltip: Blockly.Msg.MICROBIT_MUSIC_SET_TEMPO_TOOLTIP,
  6345. message0: Blockly.Msg.MICROBIT_MUSIC_SET_TEMPO_MESSAGE0,
  6346. args0: [{
  6347. check: "Number",
  6348. type: "input_value",
  6349. name: "ticks"
  6350. }, {
  6351. check: "Number",
  6352. type: "input_value",
  6353. name: "bpm"
  6354. }]
  6355. });
  6356. }
  6357. };
  6358. Blockly.Blocks.microbit_music_set_tempo_speed = {
  6359. init: function init() {
  6360. this.jsonInit({
  6361. inputsInline: !0,
  6362. nextStatement: null,
  6363. previousStatement: null,
  6364. colour: CategoryColors.Music,
  6365. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6366. tooltip: Blockly.Msg.MICROBIT_MUSIC_SET_TEMPO_SPEED_TOOLTIP,
  6367. message0: Blockly.Msg.MICROBIT_MUSIC_SET_TEMPO_SPEED_MESSAGE0,
  6368. args0: [{
  6369. check: "Number",
  6370. type: "input_value",
  6371. name: "bpm"
  6372. }]
  6373. });
  6374. }
  6375. };
  6376. Blockly.Blocks.microbit_music_get_tempo = {
  6377. init: function init() {
  6378. this.jsonInit({
  6379. colour: CategoryColors.Music,
  6380. output: "Array",
  6381. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6382. tooltip: Blockly.Msg.MICROBIT_MUSIC_GET_TEMPO_TOOLTIP,
  6383. message0: Blockly.Msg.MICROBIT_MUSIC_GET_TEMPO_MESSAGE0
  6384. });
  6385. }
  6386. };
  6387. Blockly.Blocks.CocoRobo_music_range_pitch = {
  6388. init: function init() {
  6389. this.jsonInit({
  6390. colour: CategoryColors.Music,
  6391. inputsInline: !0,
  6392. nextStatement: null,
  6393. previousStatement: null,
  6394. helpUrl: Blockly.Msg.CocoRobo_music_HELPURL,
  6395. tooltip: Blockly.Msg.CocoRobo_music_range_pitch_TOOLTIP,
  6396. message0: Blockly.Msg.CocoRobo_music_range_pitch_MESSAGE0,
  6397. args0: [{
  6398. check: "Number",
  6399. type: "input_value",
  6400. name: "start"
  6401. }, {
  6402. check: "Number",
  6403. type: "input_value",
  6404. name: "end"
  6405. }, {
  6406. check: "Number",
  6407. type: "input_value",
  6408. name: "step"
  6409. }, {
  6410. check: "Number",
  6411. type: "input_value",
  6412. name: "time"
  6413. }, {
  6414. check: "Number",
  6415. type: "input_value",
  6416. name: "pin"
  6417. }]
  6418. });
  6419. }
  6420. };
  6421. Blockly.Blocks.CocoRobo_music_tone_tempo = {
  6422. init: function init() {
  6423. this.jsonInit({
  6424. inputsInline: !0,
  6425. nextStatement: null,
  6426. previousStatement: null,
  6427. colour: CategoryColors.Music,
  6428. helpUrl: Blockly.Msg.CocoRobo_MUSIC_TONE_TEMPO_HELPURL,
  6429. tooltip: Blockly.Msg.CocoRobo_MUSIC_TONE_TEMPO_TOOLTIP,
  6430. message0: Blockly.Msg.CocoRobo_MUSIC_TONE_TEMPO_MESSAGE0,
  6431. args0: [{
  6432. type: "input_value",
  6433. name: "musical_note",
  6434. check: "String"
  6435. }, {
  6436. type: "input_value",
  6437. name: "pin",
  6438. check: "Number"
  6439. }]
  6440. });
  6441. }
  6442. };
  6443. Blockly.Blocks.CocoRobo_music_tone = {
  6444. init: function init() {
  6445. this.jsonInit({
  6446. inputsInline: !0,
  6447. output: "Number",
  6448. colour: CategoryColors.Music,
  6449. helpUrl: Blockly.Msg.CocoRobo_MUSIC_TONE_HELPURL,
  6450. tooltip: Blockly.Msg.CocoRobo_MUSIC_TONE_TOOLTIP,
  6451. message0: Blockly.Msg.CocoRobo_MUSIC_TONE_MESSAGE0,
  6452. args0: [{
  6453. name: "music_tone",
  6454. options: music_tone_freq,
  6455. type: "field_dropdown"
  6456. }]
  6457. });
  6458. }
  6459. };
  6460. Blockly.Blocks.CocoRobo_music_musical_note = {
  6461. init: function init() {
  6462. this.jsonInit({
  6463. message0: Blockly.Msg.CocoRobo_MUSIC_MUSICAL_NOTE_MESSAGE0,
  6464. args0: [{
  6465. name: "musical_note",
  6466. options: musical_note,
  6467. type: "field_dropdown"
  6468. }, {
  6469. name: "music_tick",
  6470. options: music_tick,
  6471. type: "field_dropdown"
  6472. }],
  6473. inputsInline: !0,
  6474. output: "String",
  6475. colour: CategoryColors.Music,
  6476. helpUrl: Blockly.Msg.CocoRobo_MUSIC_MUSICAL_NOTE_HELPURL,
  6477. tooltip: Blockly.Msg.CocoRobo_MUSIC_MUSICAL_NOTE_TOOLTIP
  6478. });
  6479. }
  6480. };
  6481. Blockly.Blocks.CocoRobo_music_tick = {
  6482. init: function init() {
  6483. this.jsonInit({
  6484. inputsInline: !0,
  6485. output: "Number",
  6486. colour: CategoryColors.Music,
  6487. helpUrl: Blockly.Msg.CocoRobo_MUSIC_TICK_HELPURL,
  6488. tooltip: Blockly.Msg.CocoRobo_MUSIC_TICK_TOOLTIP,
  6489. message0: Blockly.Msg.CocoRobo_MUSIC_TICK_MESSAGE0,
  6490. args0: [{
  6491. name: "music_tick",
  6492. options: music_tick,
  6493. type: "field_dropdown"
  6494. }]
  6495. });
  6496. }
  6497. };
  6498. Blockly.Blocks.CocoRobo_neopixel_init = {
  6499. init: function init() {
  6500. this.jsonInit({
  6501. colour: CategoryColors.Neopixel,
  6502. inputsInline: !0,
  6503. nextStatement: null,
  6504. previousStatement: null,
  6505. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6506. tooltip: Blockly.Msg.CocoRobo_neopixel_init_TOOLTIP,
  6507. message0: Blockly.Msg.CocoRobo_neopixel_init_MESSAGE0,
  6508. args0: [{
  6509. type: "field_input",
  6510. name: "neopixel_name",
  6511. text: "my_rgb"
  6512. }, {
  6513. check: "Number",
  6514. type: "input_value",
  6515. name: "analogP_IO"
  6516. }, {
  6517. check: "Number",
  6518. type: "input_value",
  6519. name: "n"
  6520. }]
  6521. });
  6522. }
  6523. };
  6524. Blockly.Blocks.CocoRobo_neopixel_single = {
  6525. init: function init() {
  6526. this.jsonInit({
  6527. colour: CategoryColors.Neopixel,
  6528. inputsInline: !0,
  6529. nextStatement: null,
  6530. previousStatement: null,
  6531. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6532. tooltip: Blockly.Msg.CocoRobo_neopixel_single_TOOLTIP,
  6533. message0: Blockly.Msg.CocoRobo_neopixel_single_MESSAGE0,
  6534. args0: [{
  6535. type: "field_input",
  6536. name: "neopixel_name",
  6537. text: "my_rgb"
  6538. }, {
  6539. check: "Number",
  6540. type: "input_value",
  6541. name: "order"
  6542. }, {
  6543. check: "Number",
  6544. type: "input_value",
  6545. name: "r"
  6546. }, {
  6547. check: "Number",
  6548. type: "input_value",
  6549. name: "g"
  6550. }, {
  6551. check: "Number",
  6552. type: "input_value",
  6553. name: "b"
  6554. }]
  6555. });
  6556. }
  6557. };
  6558. Blockly.Blocks.CocoRobo_neopixel_single_gui = {
  6559. init: function init() {
  6560. this.jsonInit({
  6561. colour: CategoryColors.Neopixel,
  6562. inputsInline: !0,
  6563. nextStatement: null,
  6564. previousStatement: null,
  6565. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6566. tooltip: Blockly.Msg.CocoRobo_neopixel_single_gui_TOOLTIP,
  6567. message0: Blockly.Msg.CocoRobo_neopixel_single_gui_MESSAGE0,
  6568. args0: [{
  6569. type: "field_input",
  6570. name: "neopixel_name",
  6571. text: "my_rgb"
  6572. }, {
  6573. check: "Number",
  6574. type: "input_value",
  6575. name: "order"
  6576. }, {
  6577. type: "field_colour",
  6578. name: "COLOUR",
  6579. colour: "#ff0000"
  6580. }]
  6581. });
  6582. }
  6583. };
  6584. Blockly.Blocks.CocoRobo_neopixel_show = {
  6585. init: function init() {
  6586. this.jsonInit({
  6587. colour: CategoryColors.Neopixel,
  6588. inputsInline: !0,
  6589. nextStatement: null,
  6590. previousStatement: null,
  6591. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6592. tooltip: Blockly.Msg.CocoRobo_neopixel_show_TOOLTIP,
  6593. message0: Blockly.Msg.CocoRobo_neopixel_show_MESSAGE0,
  6594. args0: [{
  6595. type: "field_input",
  6596. name: "neopixel_name",
  6597. text: "my_rgb"
  6598. }]
  6599. });
  6600. }
  6601. };
  6602. Blockly.Blocks.CocoRobo_neopixel_off = {
  6603. init: function init() {
  6604. this.jsonInit({
  6605. colour: CategoryColors.Neopixel,
  6606. inputsInline: !0,
  6607. nextStatement: null,
  6608. previousStatement: null,
  6609. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6610. tooltip: Blockly.Msg.CocoRobo_neopixel_off_TOOLTIP,
  6611. message0: Blockly.Msg.CocoRobo_neopixel_off_MESSAGE0,
  6612. args0: [{
  6613. type: "field_input",
  6614. name: "neopixel_name",
  6615. text: "my_rgb"
  6616. }]
  6617. });
  6618. }
  6619. };
  6620. Blockly.Blocks.CocoRobo_neopixel_all = {
  6621. init: function init() {
  6622. this.jsonInit({
  6623. colour: CategoryColors.Neopixel,
  6624. inputsInline: !0,
  6625. nextStatement: null,
  6626. previousStatement: null,
  6627. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6628. tooltip: Blockly.Msg.CocoRobo_neopixel_all_TOOLTIP,
  6629. message0: Blockly.Msg.CocoRobo_neopixel_all_MESSAGE0,
  6630. args0: [{
  6631. type: "field_input",
  6632. name: "neopixel_name",
  6633. text: "my_rgb"
  6634. }, {
  6635. check: "Number",
  6636. type: "input_value",
  6637. name: "r"
  6638. }, {
  6639. check: "Number",
  6640. type: "input_value",
  6641. name: "g"
  6642. }, {
  6643. check: "Number",
  6644. type: "input_value",
  6645. name: "b"
  6646. }]
  6647. });
  6648. }
  6649. };
  6650. Blockly.Blocks.CocoRobo_neopixel_all_gui = {
  6651. init: function init() {
  6652. this.jsonInit({
  6653. colour: CategoryColors.Neopixel,
  6654. inputsInline: !0,
  6655. nextStatement: null,
  6656. previousStatement: null,
  6657. helpUrl: Blockly.Msg.CocoRobo_neopixel_init_HELPURL,
  6658. tooltip: Blockly.Msg.CocoRobo_neopixel_all_gui_TOOLTIP,
  6659. message0: Blockly.Msg.CocoRobo_neopixel_all_gui_MESSAGE0,
  6660. args0: [{
  6661. type: "field_input",
  6662. name: "neopixel_name",
  6663. text: "my_rgb"
  6664. }, {
  6665. type: "field_colour",
  6666. name: "COLOUR",
  6667. colour: "#ff0000"
  6668. }]
  6669. });
  6670. }
  6671. };
  6672. Blockly.Blocks.CocoRobo_neopixel_rainbow = {
  6673. init: function init() {
  6674. this.jsonInit({
  6675. colour: CategoryColors.Neopixel,
  6676. inputsInline: !0,
  6677. nextStatement: null,
  6678. previousStatement: null,
  6679. helpUrl: Blockly.Msg.CocoRobo_NEOPIXEL_RAINBOW_HELPURL,
  6680. tooltip: Blockly.Msg.CocoRobo_NEOPIXEL_RAINBOW_TOOLTIP,
  6681. message0: Blockly.Msg.CocoRobo_NEOPIXEL_RAINBOW_MESSAGE0,
  6682. args0: [{
  6683. type: "field_input",
  6684. name: "neopixel_name",
  6685. text: "my_rgb"
  6686. }, {
  6687. check: "Number",
  6688. type: "input_value",
  6689. name: "n"
  6690. }, {
  6691. check: "Number",
  6692. type: "input_value",
  6693. name: "bright"
  6694. }, {
  6695. check: "Number",
  6696. type: "input_value",
  6697. name: "offset"
  6698. }]
  6699. });
  6700. }
  6701. };
  6702. Blockly.Blocks.CocoRobo_neopixel_brightness = {
  6703. init: function init() {
  6704. this.jsonInit({
  6705. colour: CategoryColors.Neopixel,
  6706. inputsInline: !0,
  6707. nextStatement: null,
  6708. previousStatement: null,
  6709. helpUrl: Blockly.Msg.CocoRobo_NEOPIXEL_BRIGHTNESS_HELPURL,
  6710. tooltip: Blockly.Msg.CocoRobo_NEOPIXEL_BRIGHTNESS_TOOLTIP,
  6711. message0: Blockly.Msg.CocoRobo_NEOPIXEL_BRIGHTNESS_MESSAGE0,
  6712. args0: [{
  6713. type: "field_input",
  6714. name: "neopixel_name",
  6715. text: "my_rgb"
  6716. }, {
  6717. check: "Number",
  6718. type: "input_value",
  6719. name: "bright"
  6720. }]
  6721. });
  6722. }
  6723. };
  6724. Blockly.Blocks.CocoRobo_display_FrameBuffer = {
  6725. init: function init() {
  6726. this.jsonInit({
  6727. inputsInline: !0,
  6728. nextStatement: null,
  6729. previousStatement: null,
  6730. colour: CategoryColors.Show,
  6731. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6732. tooltip: Blockly.Msg.CocoRobo_display_FrameBuffer_TOOLTIP,
  6733. message0: Blockly.Msg.CocoRobo_display_FrameBuffer_MESSAGE0,
  6734. args0: [{
  6735. check: ["Array"],
  6736. type: "input_value",
  6737. name: "bmp"
  6738. }, {
  6739. check: "Number",
  6740. type: "input_value",
  6741. name: "w"
  6742. }, {
  6743. check: "Number",
  6744. type: "input_value",
  6745. name: "h"
  6746. }, {
  6747. name: "scan_mode",
  6748. options: [[Blockly.Msg.CocoRobo_horizontal, "HLSB"], [Blockly.Msg.CocoRobo_vertical, "VLSB"]],
  6749. type: "field_dropdown"
  6750. }]
  6751. });
  6752. }
  6753. };
  6754. Blockly.Blocks.CocoRobo_display_blit = {
  6755. init: function init() {
  6756. this.jsonInit({
  6757. inputsInline: !0,
  6758. nextStatement: null,
  6759. previousStatement: null,
  6760. colour: CategoryColors.Show,
  6761. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6762. tooltip: Blockly.Msg.CocoRobo_display_blit_TOOLTIP,
  6763. message0: Blockly.Msg.CocoRobo_display_blit_MESSAGE0,
  6764. args0: [{
  6765. check: "Number",
  6766. type: "input_value",
  6767. name: "x"
  6768. }, {
  6769. check: "Number",
  6770. type: "input_value",
  6771. name: "y"
  6772. }]
  6773. });
  6774. }
  6775. };
  6776. Blockly.Blocks.CocoRobo_front_reverse = {
  6777. init: function init() {
  6778. this.jsonInit({
  6779. inputsInline: !0,
  6780. nextStatement: null,
  6781. previousStatement: null,
  6782. colour: CategoryColors.Show,
  6783. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6784. tooltip: Blockly.Msg.CocoRobo_front_reverse_TOOLTIP,
  6785. message0: Blockly.Msg.CocoRobo_front_reverse_MESSAGE0,
  6786. args0: [{
  6787. name: "front_reverse",
  6788. options: [[Blockly.Msg.CocoRobo_front, "0"], [Blockly.Msg.CocoRobo_reverse, "1"]],
  6789. type: "field_dropdown"
  6790. }]
  6791. });
  6792. }
  6793. };
  6794. Blockly.Blocks.CocoRobo_images_append = {
  6795. init: function init() {
  6796. this.jsonInit({
  6797. inputsInline: !0,
  6798. nextStatement: null,
  6799. previousStatement: null,
  6800. colour: CategoryColors.Show,
  6801. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6802. tooltip: Blockly.Msg.CocoRobo_images_append_TOOLTIP,
  6803. message0: Blockly.Msg.CocoRobo_images_append_MESSAGE0,
  6804. args0: [{
  6805. check: "Number",
  6806. type: "input_value",
  6807. name: "num"
  6808. }, {
  6809. check: "Number",
  6810. type: "input_value",
  6811. name: "period"
  6812. }, {
  6813. check: "Number",
  6814. type: "input_value",
  6815. name: "Length"
  6816. }, {
  6817. check: "Number",
  6818. type: "input_value",
  6819. name: "Width"
  6820. }]
  6821. });
  6822. }
  6823. };
  6824. Blockly.Blocks.CocoRobo_display_Show = {
  6825. init: function init() {
  6826. this.jsonInit({
  6827. nextStatement: null,
  6828. previousStatement: null,
  6829. colour: CategoryColors.Show,
  6830. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6831. tooltip: Blockly.Msg.CocoRobo_display_Show_TOOLTIP,
  6832. message0: Blockly.Msg.CocoRobo_display_Show_MESSAGE0
  6833. });
  6834. }
  6835. };
  6836. Blockly.Blocks.CocoRobo_display_DispChar = {
  6837. init: function init() {
  6838. this.jsonInit({
  6839. inputsInline: !0,
  6840. nextStatement: null,
  6841. previousStatement: null,
  6842. colour: CategoryColors.Show,
  6843. helpUrl: Blockly.Msg.CocoRobo_display_DispChar_HELPURL,
  6844. tooltip: Blockly.Msg.CocoRobo_display_DispChar_TOOLTIP,
  6845. message0: Blockly.Msg.CocoRobo_display_DispChar_MESSAGE0,
  6846. args0: [{
  6847. check: "Number",
  6848. type: "input_value",
  6849. name: "x"
  6850. }, {
  6851. check: "Number",
  6852. type: "input_value",
  6853. name: "y"
  6854. }, {
  6855. check: "String",
  6856. type: "input_value",
  6857. name: "message"
  6858. }, {
  6859. options: [[Blockly.Msg.CocoRobo_DISPCHAR_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_2, "2"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_3, "3"], ["XOR", "4"]],
  6860. type: "field_dropdown",
  6861. name: "TEXTMODE"
  6862. }]
  6863. });
  6864. }
  6865. };
  6866. Blockly.Blocks.CocoRobo_display_DispChar_5lines = {
  6867. init: function init() {
  6868. this.jsonInit({
  6869. inputsInline: !0,
  6870. nextStatement: null,
  6871. previousStatement: null,
  6872. colour: CategoryColors.Show,
  6873. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6874. tooltip: Blockly.Msg.CocoRobo_display_DispChar_5lines_TOOLTIP,
  6875. message0: Blockly.Msg.CocoRobo_display_DispChar_5lines_MESSAGE0,
  6876. args0: [{
  6877. type: "input_value",
  6878. name: "DispChar_5lines"
  6879. }, {
  6880. check: "String",
  6881. type: "input_value",
  6882. name: "message"
  6883. }, {
  6884. options: [[Blockly.Msg.CocoRobo_DISPCHAR_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_2, "2"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_3, "3"], ["XOR", "4"]],
  6885. type: "field_dropdown",
  6886. name: "TEXTMODE"
  6887. }]
  6888. });
  6889. }
  6890. };
  6891. Blockly.Blocks.CocoRobo_clear_dispchar_5lines = {
  6892. init: function init() {
  6893. this.jsonInit({
  6894. inputsInline: !0,
  6895. nextStatement: null,
  6896. previousStatement: null,
  6897. colour: CategoryColors.Show,
  6898. helpUrl: Blockly.Msg.CocoRobo_CLEAR_DISPCHAR_5LINES_HELPURL,
  6899. tooltip: Blockly.Msg.CocoRobo_CLEAR_DISPCHAR_5LINES_TOOLTIP,
  6900. message0: Blockly.Msg.CocoRobo_CLEAR_DISPCHAR_5LINES_MESSAGE0,
  6901. args0: [{
  6902. name: "DispChar_5lines",
  6903. type: "input_value"
  6904. }]
  6905. });
  6906. }
  6907. };
  6908. Blockly.Blocks.CocoRobo_4_lines = {
  6909. init: function init() {
  6910. this.jsonInit({
  6911. message0: Blockly.Msg.CocoRobo_4_LINES_MESSAGE0,
  6912. args0: [{
  6913. name: "CocoRobo_4_lines",
  6914. options: [["1", "0"], ["2", "16"], ["3", "32"], ["4", "48"]],
  6915. type: "field_dropdown"
  6916. }],
  6917. inputsInline: !0,
  6918. output: "Number",
  6919. colour: CategoryColors.Show,
  6920. helpUrl: Blockly.Msg.CocoRobo_4_LINES_HELPURL,
  6921. tooltip: Blockly.Msg.CocoRobo_4_LINES_TOOLTIP
  6922. });
  6923. }
  6924. };
  6925. Blockly.Blocks.CocoRobo_display_fill = {
  6926. init: function init() {
  6927. this.jsonInit({
  6928. message0: "%1 %2 " + Blockly.Msg.CocoRobo_display_fill_MESSAGE0,
  6929. args0: [{
  6930. type: "field_image",
  6931. src: "blockly/media/screen_init_header.png",
  6932. width: "42",
  6933. height: "42",
  6934. alt: "*",
  6935. flipRtl: false
  6936. }, {
  6937. type: "input_dummy"
  6938. }],
  6939. colour: CategoryColors.Show,
  6940. // args0: [{
  6941. // name: "display_fill",
  6942. // options: [[Blockly.Msg.CocoRobo_display_fill_O, "fill(0)"]], //[Blockly.Msg.CocoRobo_display_fill_0, "fill(0)"], [Blockly.Msg.CocoRobo_display_fill_1, "fill(1)"], [Blockly.Msg.CocoRobo_display_invert_0, "invert(0)"], [Blockly.Msg.CocoRobo_display_invert_1, "invert(1)"]
  6943. // type: "field_dropdown"
  6944. // }],
  6945. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6946. tooltip: Blockly.Msg.CocoRobo_display_fill_TOOLTIP,
  6947. previousStatement: null,
  6948. nextStatement: null // message0:
  6949. });
  6950. }
  6951. };
  6952. Blockly.Blocks.CocoRobo_lcd_pixel_option = {
  6953. init: function init() {
  6954. this.jsonInit({
  6955. colour: CategoryColors.Show,
  6956. output: "Number",
  6957. helpUrl: "",
  6958. tooltip: "",
  6959. message0: "%1",
  6960. args0: [{
  6961. options: [[Blockly.Msg.CocoRobo_display_pixel_1, "1"], [Blockly.Msg.CocoRobo_display_pixel_0, "0"]],
  6962. type: "field_dropdown",
  6963. name: "VALUE"
  6964. }]
  6965. });
  6966. }
  6967. };
  6968. Blockly.Blocks.CocoRobo_display_pixel = {
  6969. init: function init() {
  6970. this.jsonInit({
  6971. inputsInline: !0,
  6972. nextStatement: null,
  6973. previousStatement: null,
  6974. colour: CategoryColors.Show,
  6975. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  6976. tooltip: Blockly.Msg.CocoRobo_display_pixel_TOOLTIP,
  6977. message0: Blockly.Msg.CocoRobo_display_pixel_MESSAGE0,
  6978. args0: [{
  6979. check: "Number",
  6980. type: "input_value",
  6981. name: "x"
  6982. }, {
  6983. check: "Number",
  6984. type: "input_value",
  6985. name: "y"
  6986. }, {
  6987. check: "Number",
  6988. type: "input_value",
  6989. name: "display_pixel"
  6990. }]
  6991. });
  6992. }
  6993. };
  6994. Blockly.Blocks.CocoRobo_ProgressBar = {
  6995. init: function init() {
  6996. this.jsonInit({
  6997. colour: CategoryColors.Show,
  6998. args0: [{
  6999. type: "input_dummy"
  7000. }, {
  7001. name: "x",
  7002. type: "input_value",
  7003. check: "Number"
  7004. }, {
  7005. name: "y",
  7006. type: "input_value",
  7007. check: "Number"
  7008. }, {
  7009. name: "width",
  7010. type: "input_value",
  7011. check: "Number"
  7012. }, {
  7013. name: "height",
  7014. type: "input_value",
  7015. check: "Number"
  7016. }, {
  7017. name: "progress",
  7018. type: "input_value",
  7019. check: "Number"
  7020. }],
  7021. inputsInline: !0,
  7022. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7023. tooltip: Blockly.Msg.CocoRobo_ProgressBar_TOOLTIP,
  7024. message0: Blockly.Msg.CocoRobo_ProgressBar_MESSAGE0,
  7025. nextStatement: null,
  7026. previousStatement: null
  7027. });
  7028. }
  7029. };
  7030. Blockly.Blocks.CocoRobo_stripBar = {
  7031. init: function init() {
  7032. this.jsonInit({
  7033. colour: CategoryColors.Show,
  7034. args0: [{
  7035. name: "dir_h_v",
  7036. options: [[Blockly.Msg.CocoRobo_vertical, "0"], [Blockly.Msg.CocoRobo_horizontal, "1"]],
  7037. type: "field_dropdown"
  7038. }, {
  7039. name: "x",
  7040. type: "input_value",
  7041. check: "Number"
  7042. }, {
  7043. name: "y",
  7044. type: "input_value",
  7045. check: "Number"
  7046. }, {
  7047. name: "width",
  7048. type: "input_value",
  7049. check: "Number"
  7050. }, {
  7051. name: "height",
  7052. type: "input_value",
  7053. check: "Number"
  7054. }, {
  7055. name: "progress",
  7056. type: "input_value",
  7057. check: "Number"
  7058. }],
  7059. inputsInline: !0,
  7060. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7061. tooltip: Blockly.Msg.CocoRobo_stripBar_TOOLTIP,
  7062. message0: Blockly.Msg.CocoRobo_stripBar_MESSAGE0,
  7063. nextStatement: null,
  7064. previousStatement: null
  7065. });
  7066. }
  7067. };
  7068. Blockly.Blocks.CocoRobo_display_hvline = {
  7069. init: function init() {
  7070. this.jsonInit({
  7071. colour: CategoryColors.Show,
  7072. args0: [{
  7073. name: "state",
  7074. options: [[Blockly.Msg.CocoRobo_DISPLAY_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPLAY_MODE_0, "0"]],
  7075. type: "field_dropdown"
  7076. }, {
  7077. name: "dir_h_v",
  7078. options: [[Blockly.Msg.CocoRobo_vertical, "0"], [Blockly.Msg.CocoRobo_horizontal, "1"]],
  7079. type: "field_dropdown"
  7080. }, {
  7081. type: "input_dummy"
  7082. }, {
  7083. name: "x",
  7084. type: "input_value",
  7085. check: "Number"
  7086. }, {
  7087. name: "y",
  7088. type: "input_value",
  7089. check: "Number"
  7090. }, {
  7091. name: "length",
  7092. type: "input_value",
  7093. check: "Number"
  7094. }],
  7095. inputsInline: !0,
  7096. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7097. tooltip: Blockly.Msg.CocoRobo_DISPLAY_HVLINE_TOOLTIP,
  7098. message0: Blockly.Msg.CocoRobo_DISPLAY_HVLINE_MESSAGE0,
  7099. nextStatement: null,
  7100. previousStatement: null
  7101. });
  7102. }
  7103. };
  7104. Blockly.Blocks.CocoRobo_display_hline = {
  7105. init: function init() {
  7106. this.jsonInit({
  7107. colour: CategoryColors.Show,
  7108. args0: [{
  7109. name: "state",
  7110. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7111. type: "field_dropdown"
  7112. }, {
  7113. type: "input_dummy"
  7114. }, {
  7115. name: "x",
  7116. type: "input_value",
  7117. check: "Number"
  7118. }, {
  7119. name: "y",
  7120. type: "input_value",
  7121. check: "Number"
  7122. }, {
  7123. name: "length",
  7124. type: "input_value",
  7125. check: "Number"
  7126. }],
  7127. inputsInline: !0,
  7128. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7129. tooltip: Blockly.Msg.CocoRobo_display_hline_TOOLTIP,
  7130. message0: Blockly.Msg.CocoRobo_display_hline_MESSAGE0,
  7131. nextStatement: null,
  7132. previousStatement: null
  7133. });
  7134. }
  7135. };
  7136. Blockly.Blocks.CocoRobo_display_vline = {
  7137. init: function init() {
  7138. this.jsonInit({
  7139. colour: CategoryColors.Show,
  7140. args0: [{
  7141. name: "state",
  7142. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7143. type: "field_dropdown"
  7144. }, {
  7145. type: "input_dummy"
  7146. }, {
  7147. name: "x",
  7148. type: "input_value",
  7149. check: "Number"
  7150. }, {
  7151. name: "y",
  7152. type: "input_value",
  7153. check: "Number"
  7154. }, {
  7155. name: "length",
  7156. type: "input_value",
  7157. check: "Number"
  7158. }],
  7159. inputsInline: !0,
  7160. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7161. tooltip: Blockly.Msg.CocoRobo_display_vline_TOOLTIP,
  7162. message0: Blockly.Msg.CocoRobo_display_vline_MESSAGE0,
  7163. nextStatement: null,
  7164. previousStatement: null
  7165. });
  7166. }
  7167. };
  7168. Blockly.Blocks.CocoRobo_display_line = {
  7169. init: function init() {
  7170. this.jsonInit({
  7171. colour: CategoryColors.Show,
  7172. args0: [{
  7173. name: "state",
  7174. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7175. type: "field_dropdown"
  7176. }, {
  7177. type: "input_dummy"
  7178. }, {
  7179. name: "x1",
  7180. type: "input_value",
  7181. check: "Number"
  7182. }, {
  7183. name: "y1",
  7184. type: "input_value",
  7185. check: "Number"
  7186. }, {
  7187. name: "x2",
  7188. type: "input_value",
  7189. check: "Number"
  7190. }, {
  7191. name: "y2",
  7192. type: "input_value",
  7193. check: "Number"
  7194. }],
  7195. inputsInline: !0,
  7196. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7197. tooltip: Blockly.Msg.CocoRobo_display_line_TOOLTIP,
  7198. message0: Blockly.Msg.CocoRobo_display_line_MESSAGE0,
  7199. nextStatement: null,
  7200. previousStatement: null
  7201. });
  7202. }
  7203. };
  7204. Blockly.Blocks.CocoRobo_display_shape_rect = {
  7205. init: function init() {
  7206. this.jsonInit({
  7207. colour: CategoryColors.Show,
  7208. args0: [{
  7209. name: "state",
  7210. options: [[Blockly.Msg.CocoRobo_DISPLAY_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPLAY_MODE_0, "0"]],
  7211. type: "field_dropdown"
  7212. }, {
  7213. name: "shape",
  7214. options: [[Blockly.Msg.CocoRobo_DISPLAY_HOLLOW, "rect"], [Blockly.Msg.CocoRobo_DISPLAY_SOLID, "fill_rect"]],
  7215. type: "field_dropdown"
  7216. }, {
  7217. type: "input_dummy"
  7218. }, {
  7219. name: "x",
  7220. type: "input_value",
  7221. check: "Number"
  7222. }, {
  7223. name: "y",
  7224. type: "input_value",
  7225. check: "Number"
  7226. }, {
  7227. name: "w",
  7228. type: "input_value",
  7229. check: "Number"
  7230. }, {
  7231. name: "h",
  7232. type: "input_value",
  7233. check: "Number"
  7234. }],
  7235. inputsInline: !0,
  7236. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7237. tooltip: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_RECT_TOOLTIP,
  7238. message0: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_RECT_MESSAGE0,
  7239. nextStatement: null,
  7240. previousStatement: null
  7241. });
  7242. }
  7243. };
  7244. Blockly.Blocks.CocoRobo_display_rect = {
  7245. init: function init() {
  7246. this.jsonInit({
  7247. colour: CategoryColors.Show,
  7248. args0: [{
  7249. name: "state",
  7250. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7251. type: "field_dropdown"
  7252. }, {
  7253. type: "input_dummy"
  7254. }, {
  7255. name: "x",
  7256. type: "input_value",
  7257. check: "Number"
  7258. }, {
  7259. name: "y",
  7260. type: "input_value",
  7261. check: "Number"
  7262. }, {
  7263. name: "w",
  7264. type: "input_value",
  7265. check: "Number"
  7266. }, {
  7267. name: "h",
  7268. type: "input_value",
  7269. check: "Number"
  7270. }],
  7271. inputsInline: !0,
  7272. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7273. tooltip: Blockly.Msg.CocoRobo_display_rect_TOOLTIP,
  7274. message0: Blockly.Msg.CocoRobo_display_rect_MESSAGE0,
  7275. nextStatement: null,
  7276. previousStatement: null
  7277. });
  7278. }
  7279. };
  7280. Blockly.Blocks.CocoRobo_display_RoundRect = {
  7281. init: function init() {
  7282. this.jsonInit({
  7283. colour: CategoryColors.Show,
  7284. args0: [{
  7285. name: "state",
  7286. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7287. type: "field_dropdown"
  7288. }, {
  7289. type: "input_dummy"
  7290. }, {
  7291. name: "x",
  7292. type: "input_value",
  7293. check: "Number"
  7294. }, {
  7295. name: "y",
  7296. type: "input_value",
  7297. check: "Number"
  7298. }, {
  7299. name: "w",
  7300. type: "input_value",
  7301. check: "Number"
  7302. }, {
  7303. name: "h",
  7304. type: "input_value",
  7305. check: "Number"
  7306. }, {
  7307. name: "r",
  7308. type: "input_value",
  7309. check: "Number"
  7310. }],
  7311. inputsInline: !0,
  7312. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7313. tooltip: Blockly.Msg.CocoRobo_display_RoundRect_TOOLTIP,
  7314. message0: Blockly.Msg.CocoRobo_display_RoundRect_MESSAGE0,
  7315. nextStatement: null,
  7316. previousStatement: null
  7317. });
  7318. }
  7319. };
  7320. Blockly.Blocks.CocoRobo_display_fill_rect = {
  7321. init: function init() {
  7322. this.jsonInit({
  7323. colour: CategoryColors.Show,
  7324. args0: [{
  7325. name: "state",
  7326. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7327. type: "field_dropdown"
  7328. }, {
  7329. type: "input_dummy"
  7330. }, {
  7331. name: "x",
  7332. type: "input_value",
  7333. check: "Number"
  7334. }, {
  7335. name: "y",
  7336. type: "input_value",
  7337. check: "Number"
  7338. }, {
  7339. name: "w",
  7340. type: "input_value",
  7341. check: "Number"
  7342. }, {
  7343. name: "h",
  7344. type: "input_value",
  7345. check: "Number"
  7346. }],
  7347. inputsInline: !0,
  7348. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7349. tooltip: Blockly.Msg.CocoRobo_display_fill_rect_TOOLTIP,
  7350. message0: Blockly.Msg.CocoRobo_display_fill_rect_MESSAGE0,
  7351. nextStatement: null,
  7352. previousStatement: null
  7353. });
  7354. }
  7355. };
  7356. Blockly.Blocks.CocoRobo_display_shape_circle = {
  7357. init: function init() {
  7358. this.jsonInit({
  7359. colour: CategoryColors.Show,
  7360. args0: [{
  7361. name: "state",
  7362. options: [[Blockly.Msg.CocoRobo_DISPLAY_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPLAY_MODE_0, "0"]],
  7363. type: "field_dropdown"
  7364. }, {
  7365. name: "shape",
  7366. options: [[Blockly.Msg.CocoRobo_DISPLAY_HOLLOW, "circle"], [Blockly.Msg.CocoRobo_DISPLAY_SOLID, "fill_circle"]],
  7367. type: "field_dropdown"
  7368. }, {
  7369. type: "input_dummy"
  7370. }, {
  7371. name: "x",
  7372. type: "input_value",
  7373. check: "Number"
  7374. }, {
  7375. name: "y",
  7376. type: "input_value",
  7377. check: "Number"
  7378. }, {
  7379. name: "radius",
  7380. type: "input_value",
  7381. check: "Number"
  7382. }],
  7383. inputsInline: !0,
  7384. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7385. tooltip: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_CIRCLE_TOOLTIP,
  7386. message0: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_CIRCLE_MESSAGE0,
  7387. nextStatement: null,
  7388. previousStatement: null
  7389. });
  7390. }
  7391. };
  7392. Blockly.Blocks.CocoRobo_display_fill_circle = {
  7393. init: function init() {
  7394. this.jsonInit({
  7395. colour: CategoryColors.Show,
  7396. args0: [{
  7397. name: "state",
  7398. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7399. type: "field_dropdown"
  7400. }, {
  7401. type: "input_dummy"
  7402. }, {
  7403. name: "x",
  7404. type: "input_value",
  7405. check: "Number"
  7406. }, {
  7407. name: "y",
  7408. type: "input_value",
  7409. check: "Number"
  7410. }, {
  7411. name: "radius",
  7412. type: "input_value",
  7413. check: "Number"
  7414. }],
  7415. inputsInline: !0,
  7416. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7417. tooltip: Blockly.Msg.CocoRobo_display_fill_circle_TOOLTIP,
  7418. message0: Blockly.Msg.CocoRobo_display_fill_circle_MESSAGE0,
  7419. nextStatement: null,
  7420. previousStatement: null
  7421. });
  7422. }
  7423. };
  7424. Blockly.Blocks.CocoRobo_display_circle = {
  7425. init: function init() {
  7426. this.jsonInit({
  7427. colour: CategoryColors.Show,
  7428. args0: [{
  7429. name: "state",
  7430. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7431. type: "field_dropdown"
  7432. }, {
  7433. type: "input_dummy"
  7434. }, {
  7435. name: "x",
  7436. type: "input_value",
  7437. check: "Number"
  7438. }, {
  7439. name: "y",
  7440. type: "input_value",
  7441. check: "Number"
  7442. }, {
  7443. name: "radius",
  7444. type: "input_value",
  7445. check: "Number"
  7446. }],
  7447. inputsInline: !0,
  7448. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7449. tooltip: Blockly.Msg.CocoRobo_display_circle_TOOLTIP,
  7450. message0: Blockly.Msg.CocoRobo_display_circle_MESSAGE0,
  7451. nextStatement: null,
  7452. previousStatement: null
  7453. });
  7454. }
  7455. };
  7456. Blockly.Blocks.CocoRobo_display_shape_triangle = {
  7457. init: function init() {
  7458. this.jsonInit({
  7459. colour: CategoryColors.Show,
  7460. args0: [{
  7461. name: "state",
  7462. options: [[Blockly.Msg.CocoRobo_DISPLAY_MODE_1, "1"], [Blockly.Msg.CocoRobo_DISPLAY_MODE_0, "0"]],
  7463. type: "field_dropdown"
  7464. }, {
  7465. name: "shape",
  7466. options: [[Blockly.Msg.CocoRobo_DISPLAY_HOLLOW, "triangle"], [Blockly.Msg.CocoRobo_DISPLAY_SOLID, "fill_triangle"]],
  7467. type: "field_dropdown"
  7468. }, {
  7469. type: "input_dummy"
  7470. }, {
  7471. name: "x",
  7472. type: "input_value",
  7473. check: "Number"
  7474. }, {
  7475. name: "y",
  7476. type: "input_value",
  7477. check: "Number"
  7478. }, {
  7479. name: "x2",
  7480. type: "input_value",
  7481. check: "Number"
  7482. }, {
  7483. name: "y2",
  7484. type: "input_value",
  7485. check: "Number"
  7486. }, {
  7487. name: "x3",
  7488. type: "input_value",
  7489. check: "Number"
  7490. }, {
  7491. name: "y3",
  7492. type: "input_value",
  7493. check: "Number"
  7494. }],
  7495. inputsInline: !0,
  7496. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7497. tooltip: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_TRIANGLE_TOOLTIP,
  7498. message0: Blockly.Msg.CocoRobo_DISPLAY_SHAPE_TRIANGLE_MESSAGE0,
  7499. nextStatement: null,
  7500. previousStatement: null
  7501. });
  7502. }
  7503. };
  7504. Blockly.Blocks.CocoRobo_display_triangle = {
  7505. init: function init() {
  7506. this.jsonInit({
  7507. colour: CategoryColors.Show,
  7508. args0: [{
  7509. name: "state",
  7510. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7511. type: "field_dropdown"
  7512. }, {
  7513. type: "input_dummy"
  7514. }, {
  7515. name: "x",
  7516. type: "input_value",
  7517. check: "Number"
  7518. }, {
  7519. name: "y",
  7520. type: "input_value",
  7521. check: "Number"
  7522. }, {
  7523. name: "x2",
  7524. type: "input_value",
  7525. check: "Number"
  7526. }, {
  7527. name: "y2",
  7528. type: "input_value",
  7529. check: "Number"
  7530. }, {
  7531. name: "x3",
  7532. type: "input_value",
  7533. check: "Number"
  7534. }, {
  7535. name: "y3",
  7536. type: "input_value",
  7537. check: "Number"
  7538. }],
  7539. inputsInline: !0,
  7540. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7541. tooltip: Blockly.Msg.CocoRobo_display_triangle_TOOLTIP,
  7542. message0: Blockly.Msg.CocoRobo_display_triangle_MESSAGE0,
  7543. nextStatement: null,
  7544. previousStatement: null
  7545. });
  7546. }
  7547. };
  7548. Blockly.Blocks.CocoRobo_display_fill_triangle = {
  7549. init: function init() {
  7550. this.jsonInit({
  7551. colour: CategoryColors.Show,
  7552. args0: [{
  7553. name: "state",
  7554. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7555. type: "field_dropdown"
  7556. }, {
  7557. type: "input_dummy"
  7558. }, {
  7559. name: "x",
  7560. type: "input_value",
  7561. check: "Number"
  7562. }, {
  7563. name: "y",
  7564. type: "input_value",
  7565. check: "Number"
  7566. }, {
  7567. name: "x2",
  7568. type: "input_value",
  7569. check: "Number"
  7570. }, {
  7571. name: "y2",
  7572. type: "input_value",
  7573. check: "Number"
  7574. }, {
  7575. name: "x3",
  7576. type: "input_value",
  7577. check: "Number"
  7578. }, {
  7579. name: "y3",
  7580. type: "input_value",
  7581. check: "Number"
  7582. }],
  7583. inputsInline: !0,
  7584. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7585. tooltip: Blockly.Msg.CocoRobo_display_fill_triangle_TOOLTIP,
  7586. message0: Blockly.Msg.CocoRobo_display_fill_triangle_MESSAGE0,
  7587. nextStatement: null,
  7588. previousStatement: null
  7589. });
  7590. }
  7591. };
  7592. Blockly.Blocks.CocoRobo_display_Bitmap = {
  7593. init: function init() {
  7594. this.jsonInit({
  7595. colour: CategoryColors.Show,
  7596. args0: [{
  7597. name: "state",
  7598. options: [[Blockly.Msg.CocoRobo_display_hline_1, "1"], [Blockly.Msg.CocoRobo_display_hline_0, "0"]],
  7599. type: "field_dropdown"
  7600. }, {
  7601. name: "x",
  7602. type: "input_value",
  7603. check: "Number"
  7604. }, {
  7605. name: "y",
  7606. type: "input_value",
  7607. check: "Number"
  7608. }, {
  7609. name: "w",
  7610. type: "input_value",
  7611. check: "Number"
  7612. }, {
  7613. name: "h",
  7614. type: "input_value",
  7615. check: "Number"
  7616. }, {
  7617. check: ["String", "Array"],
  7618. type: "input_value",
  7619. name: "Bitmap"
  7620. }],
  7621. inputsInline: !0,
  7622. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7623. tooltip: Blockly.Msg.CocoRobo_display_Bitmap_TOOLTIP,
  7624. message0: Blockly.Msg.CocoRobo_display_Bitmap_MESSAGE0,
  7625. nextStatement: null,
  7626. previousStatement: null
  7627. });
  7628. }
  7629. };
  7630. Blockly.Blocks.CocoRobo_get_pbm_data = {
  7631. init: function init() {
  7632. this.jsonInit({
  7633. colour: CategoryColors.Show,
  7634. args0: [{
  7635. check: "String",
  7636. type: "input_value",
  7637. name: "file_path"
  7638. }, {
  7639. name: "select",
  7640. check: "String",
  7641. type: "field_dropdown",
  7642. options: [[Blockly.Msg.CocoRobo_DISPCHAR_MODE_1, "0"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_2, "1"]]
  7643. }],
  7644. output: "Array",
  7645. helpUrl: Blockly.Msg.CocoRobo_GET_PBM_DATA_HELPURL,
  7646. tooltip: Blockly.Msg.CocoRobo_GET_PBM_DATA_TOOLTIP,
  7647. message0: Blockly.Msg.CocoRobo_GET_PBM_DATA_MESSAGE0
  7648. });
  7649. }
  7650. };
  7651. Blockly.Blocks.CocoRobo_get_pbm_data_custom = {
  7652. init: function init() {
  7653. this.jsonInit({
  7654. colour: CategoryColors.Show,
  7655. args0: [{
  7656. check: "String",
  7657. type: "input_value",
  7658. name: "file_path"
  7659. }, {
  7660. name: "select",
  7661. check: "String",
  7662. type: "field_dropdown",
  7663. options: [[Blockly.Msg.CocoRobo_DISPCHAR_MODE_1, "0"], [Blockly.Msg.CocoRobo_DISPCHAR_MODE_2, "1"]]
  7664. }],
  7665. output: "Array",
  7666. helpUrl: Blockly.Msg.CocoRobo_GET_PBM_DATA_HELPURL,
  7667. tooltip: Blockly.Msg.CocoRobo_GET_PBM_DATA_TOOLTIP,
  7668. message0: Blockly.Msg.CocoRobo_GET_PBM_DATA_CUSTOM_MESSAGE0
  7669. });
  7670. }
  7671. };
  7672. Blockly.Blocks.CocoRobo_display_pbm_data = {
  7673. init: function init() {
  7674. this.jsonInit({
  7675. colour: CategoryColors.Show,
  7676. args0: [{
  7677. name: "x",
  7678. type: "input_value",
  7679. check: "Number"
  7680. }, {
  7681. name: "y",
  7682. type: "input_value",
  7683. check: "Number"
  7684. }, {
  7685. check: "Array",
  7686. type: "input_value",
  7687. name: "pbm_data"
  7688. }],
  7689. inputsInline: !0,
  7690. helpUrl: Blockly.Msg.CocoRobo_DISPLAY_PBM_DATA_HELPURL,
  7691. tooltip: Blockly.Msg.CocoRobo_DISPLAY_PBM_DATA_TOOLTIP,
  7692. message0: Blockly.Msg.CocoRobo_DISPLAY_PBM_DATA_MESSAGE0,
  7693. nextStatement: null,
  7694. previousStatement: null
  7695. });
  7696. }
  7697. };
  7698. Blockly.Blocks.CocoRobo_bitmap_from_file = {
  7699. init: function init() {
  7700. this.jsonInit({
  7701. colour: CategoryColors.Show,
  7702. args0: [{
  7703. name: "x",
  7704. type: "input_value",
  7705. check: "Number"
  7706. }, {
  7707. name: "y",
  7708. type: "input_value",
  7709. check: "Number"
  7710. }, {
  7711. name: "w",
  7712. type: "input_value",
  7713. check: "Number"
  7714. }, {
  7715. name: "h",
  7716. type: "input_value",
  7717. check: "Number"
  7718. }, {
  7719. check: "Array",
  7720. type: "input_value",
  7721. name: "pbm_data"
  7722. }],
  7723. inputsInline: !0,
  7724. helpUrl: Blockly.Msg.CocoRobo_BITMAP_FROM_FILE_HELPURL,
  7725. tooltip: Blockly.Msg.CocoRobo_BITMAP_FROM_FILE_TOOLTIP,
  7726. message0: Blockly.Msg.CocoRobo_BITMAP_FROM_FILE_MESSAGE0,
  7727. nextStatement: null,
  7728. previousStatement: null
  7729. });
  7730. }
  7731. };
  7732. Blockly.Blocks.CocoRobo_pbm_image = {
  7733. init: function init() {
  7734. this.jsonInit({
  7735. colour: CategoryColors.Show,
  7736. args0: [{
  7737. type: "field_image",
  7738. name: "file_image",
  7739. src: "/static/face/1.png",
  7740. width: 128,
  7741. height: 64,
  7742. alt: "*"
  7743. }, {
  7744. name: "path",
  7745. options: [[Blockly.Msg.CocoRobo_FACE_1, "face/1.pbm"], [Blockly.Msg.CocoRobo_FACE_2, "face/2.pbm"], [Blockly.Msg.CocoRobo_FACE_3, "face/3.pbm"], [Blockly.Msg.CocoRobo_FACE_4, "face/4.pbm"], [Blockly.Msg.CocoRobo_FACE_5, "face/5.pbm"], [Blockly.Msg.CocoRobo_FACE_6, "face/6.pbm"], [Blockly.Msg.CocoRobo_FACE_7, "face/7.pbm"], [Blockly.Msg.CocoRobo_FACE_8, "face/8.pbm"], [Blockly.Msg.CocoRobo_FACE_9, "face/9.pbm"], [Blockly.Msg.CocoRobo_FACE_10, "face/10.pbm"], [Blockly.Msg.CocoRobo_FACE_11, "face/11.pbm"], [Blockly.Msg.CocoRobo_FACE_12, "face/12.pbm"], [Blockly.Msg.CocoRobo_FACE_ROCK, "face/rock.pbm"], [Blockly.Msg.CocoRobo_FACE_ROCK_S, "face/rock_s.pbm"], [Blockly.Msg.CocoRobo_FACE_PAPER, "face/paper.pbm"], [Blockly.Msg.CocoRobo_FACE_PAPER_S, "face/paper_s.pbm"], [Blockly.Msg.CocoRobo_FACE_SCISSORS, "face/scissors.pbm"], [Blockly.Msg.CocoRobo_FACE_SCISSORS_S, "face/scissors_s.pbm"], ["Expressions/Big smile.pbm", "face/Expressions/Big smile.pbm"], ["Expressions/Heart large.pbm", "face/Expressions/Heart large.pbm"], ["Expressions/Heart small.pbm", "face/Expressions/Heart small.pbm"], ["Expressions/Mouth 1 open.pbm", "face/Expressions/Mouth 1 open.pbm"], ["Expressions/Mouth 1 shut.pbm", "face/Expressions/Mouth 1 shut.pbm"], ["Expressions/Mouth 2 open.pbm", "face/Expressions/Mouth 2 open.pbm"], ["Expressions/Mouth 2 shut.pbm", "face/Expressions/Mouth 2 shut.pbm"], ["Expressions/Sad.pbm", "face/Expressions/Sad.pbm"], ["Expressions/Sick.pbm", "face/Expressions/Sick.pbm"], ["Expressions/Smile.pbm", "face/Expressions/Smile.pbm"], ["Expressions/Swearing.pbm", "face/Expressions/Swearing.pbm"], ["Expressions/Talking.pbm", "face/Expressions/Talking.pbm"], ["Expressions/Wink.pbm", "face/Expressions/Wink.pbm"], ["Expressions/ZZZ.pbm", "face/Expressions/ZZZ.pbm"], ["Eyes/Angry.pbm", "face/Eyes/Angry.pbm"], ["Eyes/Awake.pbm", "face/Eyes/Awake.pbm"], ["Eyes/Black eye.pbm", "face/Eyes/Black eye.pbm"], ["Eyes/Bottom left.pbm", "face/Eyes/Bottom left.pbm"], ["Eyes/Bottom right.pbm", "face/Eyes/Bottom right.pbm"], ["Eyes/Crazy 1.pbm", "face/Eyes/Crazy 1.pbm"], ["Eyes/Crazy 2.pbm", "face/Eyes/Crazy 2.pbm"], ["Eyes/Disappointed.pbm", "face/Eyes/Disappointed.pbm"], ["Eyes/Dizzy.pbm", "face/Eyes/Dizzy.pbm"], ["Eyes/Down.pbm", "face/Eyes/Down.pbm"], ["Eyes/Evil.pbm", "face/Eyes/Evil.pbm"], ["Eyes/Hurt.pbm", "face/Eyes/Hurt.pbm"], ["Eyes/Knocked out.pbm", "face/Eyes/Knocked out.pbm"], ["Eyes/Love.pbm", "face/Eyes/Love.pbm"], ["Eyes/Middle left.pbm", "face/Eyes/Middle left.pbm"], ["Eyes/Middle right.pbm", "face/Eyes/Middle right.pbm"], ["Eyes/Neutral.pbm", "face/Eyes/Neutral.pbm"], ["Eyes/Nuclear.pbm", "face/Eyes/Nuclear.pbm"], ["Eyes/Pinch left.pbm", "face/Eyes/Pinch left.pbm"], ["Eyes/Pinch middle.pbm", "face/Eyes/Pinch middle.pbm"], ["Eyes/Pinch right.pbm", "face/Eyes/Pinch right.pbm"], ["Eyes/Tear.pbm", "face/Eyes/Tear.pbm"], ["Eyes/Tired left.pbm", "face/Eyes/Tired left.pbm"], ["Eyes/Tired middle.pbm", "face/Eyes/Tired middle.pbm"], ["Eyes/Tired right.pbm", "face/Eyes/Tired right.pbm"], ["Eyes/Toxic.pbm", "face/Eyes/Toxic.pbm"], ["Eyes/Up.pbm", "face/Eyes/Up.pbm"], ["Eyes/Winking.pbm", "face/Eyes/Winking.pbm"], ["Information/Accept.pbm", "face/Information/Accept.pbm"], ["Information/Backward.pbm", "face/Information/Backward.pbm"], ["Information/Decline.pbm", "face/Information/Decline.pbm"], ["Information/Forward.pbm", "face/Information/Forward.pbm"], ["Information/Left.pbm", "face/Information/Left.pbm"], ["Information/No go.pbm", "face/Information/No go.pbm"], ["Information/Question mark.pbm", "face/Information/Question mark.pbm"], ["Information/Right.pbm", "face/Information/Right.pbm"], ["Information/Stop 1.pbm", "face/Information/Stop 1.pbm"], ["Information/Stop 2.pbm", "face/Information/Stop 2.pbm"], ["Information/Thumbs down.pbm", "face/Information/Thumbs down.pbm"], ["Information/Thumbs up.pbm", "face/Information/Thumbs up.pbm"], ["Information/Warning.pbm", "face/Information/Warning.pbm"], ["Objects/Bomb.pbm", "face/Objects/Bomb.pbm"], ["Objects/Boom.pbm", "face/Objects/Boom.pbm"], ["Objects/Fire.pbm", "face/Objects/Fire.pbm"], ["Objects/Flowers.pbm", "face/Objects/Flowers.pbm"], ["Objects/Forest.pbm", "face/Objects/Forest.pbm"], ["Objects/Light off.pbm", "face/Objects/Light off.pbm"], ["Objects/Light on.pbm", "face/Objects/Light on.pbm"], ["Objects/Lightning.pbm", "face/Objects/Lightning.pbm"], ["Objects/Night.pbm", "face/Objects/Night.pbm"], ["Objects/Pirate.pbm", "face/Objects/Pirate.pbm"], ["Objects/Snow.pbm", "face/Objects/Snow.pbm"], ["Objects/Target.pbm", "face/Objects/Target.pbm"], ["Progress/Bar 0.pbm", "face/Progress/Bar 0.pbm"], ["Progress/Bar 1.pbm", "face/Progress/Bar 1.pbm"], ["Progress/Bar 2.pbm", "face/Progress/Bar 2.pbm"], ["Progress/Bar 3.pbm", "face/Progress/Bar 3.pbm"], ["Progress/Bar 4.pbm", "face/Progress/Bar 4.pbm"], ["Progress/Dial 0.pbm", "face/Progress/Dial 0.pbm"], ["Progress/Dial 1.pbm", "face/Progress/Dial 1.pbm"], ["Progress/Dial 2.pbm", "face/Progress/Dial 2.pbm"], ["Progress/Dial 3.pbm", "face/Progress/Dial 3.pbm"], ["Progress/Dial 4.pbm", "face/Progress/Dial 4.pbm"], ["Progress/Dots 0.pbm", "face/Progress/Dots 0.pbm"], ["Progress/Dots 1.pbm", "face/Progress/Dots 1.pbm"], ["Progress/Dots 2.pbm", "face/Progress/Dots 2.pbm"], ["Progress/Dots 3.pbm", "face/Progress/Dots 3.pbm"], ["Progress/Hourglass 0.pbm", "face/Progress/Hourglass 0.pbm"], ["Progress/Hourglass 1.pbm", "face/Progress/Hourglass 1.pbm"], ["Progress/Hourglass 2.pbm", "face/Progress/Hourglass 2.pbm"], ["Progress/Timer 0.pbm", "face/Progress/Timer 0.pbm"], ["Progress/Timer 1.pbm", "face/Progress/Timer 1.pbm"], ["Progress/Timer 2.pbm", "face/Progress/Timer 2.pbm"], ["Progress/Timer 3.pbm", "face/Progress/Timer 3.pbm"], ["Progress/Timer 4.pbm", "face/Progress/Timer 4.pbm"], ["Progress/Water level 0.pbm", "face/Progress/Water level 0.pbm"], ["Progress/Water level 1.pbm", "face/Progress/Water level 1.pbm"], ["Progress/Water level 2.pbm", "face/Progress/Water level 2.pbm"], ["Progress/Water level 3.pbm", "face/Progress/Water level 3.pbm"], ["System/Accept_1.pbm", "face/System/Accept_1.pbm"], ["System/Accept_2.pbm", "face/System/Accept_2.pbm"], ["System/Alert.pbm", "face/System/Alert.pbm"], ["System/Box.pbm", "face/System/Box.pbm"], ["System/Busy_0.pbm", "face/System/Busy_0.pbm"], ["System/Busy_1.pbm", "face/System/Busy_1.pbm"], ["System/Decline_1.pbm", "face/System/Decline_1.pbm"], ["System/Decline_2.pbm", "face/System/Decline_2.pbm"], ["System/Dot_empty.pbm", "face/System/Dot_empty.pbm"], ["System/Dot_full.pbm", "face/System/Dot_full.pbm"], ["System/Play.pbm", "face/System/Play.pbm"], ["System/Slider_0.pbm", "face/System/Slider_0.pbm"], ["System/Slider_1.pbm", "face/System/Slider_1.pbm"], ["System/Slider_2.pbm", "face/System/Slider_2.pbm"], ["System/Slider_3.pbm", "face/System/Slider_3.pbm"], ["System/Slider_4.pbm", "face/System/Slider_4.pbm"], ["System/Slider_5.pbm", "face/System/Slider_5.pbm"], ["System/Slider_6.pbm", "face/System/Slider_6.pbm"], ["System/Slider_7.pbm", "face/System/Slider_7.pbm"], ["System/Slider_8.pbm", "face/System/Slider_8.pbm"]],
  7746. type: "field_dropdown"
  7747. }, {
  7748. type: "field_label",
  7749. name: "size_image",
  7750. text: "64 * 64"
  7751. }],
  7752. output: "String",
  7753. helpUrl: "",
  7754. tooltip: "",
  7755. message0: "%1 %2 %3"
  7756. });
  7757. }
  7758. };
  7759. Blockly.Blocks.CocoRobo_font = {
  7760. init: function init() {
  7761. this.jsonInit({
  7762. colour: CategoryColors.Show,
  7763. args0: [{
  7764. name: "font",
  7765. options: [[Blockly.Msg.CocoRobo_FONT_DIGIFACE_11, "font.digiface_11"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_16, "font.digiface_16"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_21, "font.digiface_21"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_30, "font.digiface_30"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_44, "font.digiface_44"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_IT_30, "font.digiface_it_30"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_IT_42, "font.digiface_it_42"], [Blockly.Msg.CocoRobo_FONT_DVSM_12, "font.dvsm_12"], [Blockly.Msg.CocoRobo_FONT_DVSM_16, "font.dvsm_16"], [Blockly.Msg.CocoRobo_FONT_DVSM_21, "font.dvsm_21"], [Blockly.Msg.CocoRobo_FONT_DVSMB_12, "font.dvsmb_12"], [Blockly.Msg.CocoRobo_FONT_DVSMB_16, "font.dvsmb_16"], [Blockly.Msg.CocoRobo_FONT_DVSMB_21, "font.dvsmb_21"]],
  7766. type: "field_dropdown"
  7767. }],
  7768. output: "String",
  7769. helpUrl: "",
  7770. tooltip: "",
  7771. message0: "%1"
  7772. });
  7773. }
  7774. };
  7775. Blockly.Blocks.CocoRobo_display_font = {
  7776. init: function init() {
  7777. this.jsonInit({
  7778. inputsInline: !0,
  7779. nextStatement: null,
  7780. previousStatement: null,
  7781. colour: CategoryColors.Show,
  7782. helpUrl: Blockly.Msg.CocoRobo_DISPLAY_FONT_HELPURL,
  7783. tooltip: Blockly.Msg.CocoRobo_DISPLAY_FONT_TOOLTIP,
  7784. message0: Blockly.Msg.CocoRobo_DISPLAY_FONT_MESSAGE0,
  7785. args0: [{
  7786. check: "Number",
  7787. type: "input_value",
  7788. name: "x"
  7789. }, {
  7790. check: "Number",
  7791. type: "input_value",
  7792. name: "y"
  7793. }, {
  7794. check: "String",
  7795. type: "input_value",
  7796. name: "message"
  7797. }, {
  7798. name: "font",
  7799. options: [[Blockly.Msg.CocoRobo_FONT_DIGIFACE_11, "font.digiface_11"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_16, "font.digiface_16"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_21, "font.digiface_21"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_30, "font.digiface_30"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_44, "font.digiface_44"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_IT_30, "font.digiface_it_30"], [Blockly.Msg.CocoRobo_FONT_DIGIFACE_IT_42, "font.digiface_it_42"], [Blockly.Msg.CocoRobo_FONT_DVSM_12, "font.dvsm_12"], [Blockly.Msg.CocoRobo_FONT_DVSM_16, "font.dvsm_16"], [Blockly.Msg.CocoRobo_FONT_DVSM_21, "font.dvsm_21"], [Blockly.Msg.CocoRobo_FONT_DVSMB_12, "font.dvsmb_12"], [Blockly.Msg.CocoRobo_FONT_DVSMB_16, "font.dvsmb_16"], [Blockly.Msg.CocoRobo_FONT_DVSMB_21, "font.dvsmb_21"]],
  7800. type: "field_dropdown"
  7801. }, {
  7802. name: "wrap",
  7803. options: [[Blockly.Msg.CocoRobo_FONT_NO_WRAP, "False"], [Blockly.Msg.CocoRobo_FONT_WRAP, "True"]],
  7804. type: "field_dropdown"
  7805. }]
  7806. });
  7807. }
  7808. };
  7809. Blockly.Blocks.CocoRobo_display_custom_font = {
  7810. init: function init() {
  7811. this.jsonInit({
  7812. inputsInline: !0,
  7813. nextStatement: null,
  7814. previousStatement: null,
  7815. colour: CategoryColors.Show,
  7816. helpUrl: Blockly.Msg.CocoRobo_DISPLAY_FONT_HELPURL,
  7817. tooltip: Blockly.Msg.CocoRobo_DISPLAY_FONT_TOOLTIP,
  7818. message0: Blockly.Msg.CocoRobo_DISPLAY_FONT_MESSAGE0,
  7819. args0: [{
  7820. check: "Number",
  7821. type: "input_value",
  7822. name: "x"
  7823. }, {
  7824. check: "Number",
  7825. type: "input_value",
  7826. name: "y"
  7827. }, {
  7828. check: "String",
  7829. type: "input_value",
  7830. name: "message"
  7831. }, {
  7832. name: "font",
  7833. text: "font.dvsm_16",
  7834. type: "field_input"
  7835. }, {
  7836. name: "wrap",
  7837. options: [[Blockly.Msg.CocoRobo_FONT_NO_WRAP, "False"], [Blockly.Msg.CocoRobo_FONT_WRAP, "True"]],
  7838. type: "field_dropdown"
  7839. }]
  7840. });
  7841. }
  7842. };
  7843. Blockly.Blocks.CocoRobo_image_to_oled = {
  7844. init: function init() {
  7845. this.jsonInit({
  7846. inputsInline: !1,
  7847. nextStatement: null,
  7848. previousStatement: null,
  7849. colour: CategoryColors.Show,
  7850. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  7851. tooltip: Blockly.Msg.CocoRobo_image_to_lcd_TOOLTIP,
  7852. message0: Blockly.Msg.CocoRobo_image_to_lcd_MESSAGE0,
  7853. args0: [{
  7854. check: "String",
  7855. type: "input_value",
  7856. name: "image_dir"
  7857. }, {
  7858. check: "Number",
  7859. type: "input_value",
  7860. name: "w"
  7861. }, {
  7862. check: "Number",
  7863. type: "input_value",
  7864. name: "h"
  7865. }]
  7866. });
  7867. }
  7868. };
  7869. Blockly.Blocks.CocoRobo_qr_code = {
  7870. init: function init() {
  7871. this.jsonInit({
  7872. inputsInline: !0,
  7873. nextStatement: null,
  7874. previousStatement: null,
  7875. colour: CategoryColors.Show,
  7876. helpUrl: Blockly.Msg.CocoRobo_QR_CODE_HELPURL,
  7877. tooltip: Blockly.Msg.CocoRobo_QR_CODE_TOOLTIP,
  7878. message0: Blockly.Msg.CocoRobo_QR_CODE_MESSAGE0,
  7879. args0: [{
  7880. check: "Number",
  7881. type: "input_value",
  7882. name: "x"
  7883. }, {
  7884. check: "Number",
  7885. type: "input_value",
  7886. name: "y"
  7887. }, {
  7888. check: "String",
  7889. type: "input_value",
  7890. name: "str"
  7891. }, {
  7892. name: "scale",
  7893. options: [["58 * 58", "2"], ["29 * 29", "1"]],
  7894. type: "field_dropdown"
  7895. }]
  7896. });
  7897. }
  7898. };
  7899. Blockly.Blocks.CocoRobo_radio_rec = {
  7900. init: function init() {
  7901. this.jsonInit({
  7902. inputsInline: !0,
  7903. output: null,
  7904. colour: CategoryColors.Radio,
  7905. helpUrl: Blockly.Msg.CocoRobo_RADIO_REC_HELPURL,
  7906. tooltip: Blockly.Msg.CocoRobo_RADIO_REC_TOOLTIP,
  7907. message0: Blockly.Msg.CocoRobo_RADIO_REC_MESSAGE0
  7908. });
  7909. }
  7910. };
  7911. Blockly.Blocks.CocoRobo_radio_send = {
  7912. init: function init() {
  7913. this.jsonInit({
  7914. inputsInline: !0,
  7915. nextStatement: null,
  7916. previousStatement: null,
  7917. colour: CategoryColors.Radio,
  7918. helpUrl: Blockly.Msg.CocoRobo_RADIO_SEND_HELPURL,
  7919. tooltip: Blockly.Msg.CocoRobo_RADIO_SEND_TOOLTIP,
  7920. message0: Blockly.Msg.CocoRobo_RADIO_SEND_MESSAGE0,
  7921. args0: [{
  7922. check: "String",
  7923. type: "input_value",
  7924. name: "send"
  7925. }]
  7926. });
  7927. }
  7928. };
  7929. Blockly.Blocks.CocoRobo_radio_channel = {
  7930. init: function init() {
  7931. this.jsonInit({
  7932. inputsInline: !0,
  7933. nextStatement: null,
  7934. previousStatement: null,
  7935. colour: CategoryColors.Radio,
  7936. helpUrl: Blockly.Msg.CocoRobo_RADIO_CHANNEL_HELPURL,
  7937. tooltip: Blockly.Msg.CocoRobo_RADIO_CHANNEL_TOOLTIP,
  7938. message0: Blockly.Msg.CocoRobo_RADIO_CHANNEL_MESSAGE0,
  7939. args0: [{
  7940. check: "Number",
  7941. type: "input_value",
  7942. name: "channel"
  7943. }]
  7944. });
  7945. }
  7946. };
  7947. Blockly.Blocks.CocoRobo_radio_on_off = {
  7948. init: function init() {
  7949. this.jsonInit({
  7950. inputsInline: !0,
  7951. nextStatement: null,
  7952. previousStatement: null,
  7953. colour: CategoryColors.Radio,
  7954. helpUrl: Blockly.Msg.CocoRobo_RADIO_ON_OFF_HELPURL,
  7955. tooltip: Blockly.Msg.CocoRobo_RADIO_ON_OFF_TOOLTIP,
  7956. message0: Blockly.Msg.CocoRobo_RADIO_ON_OFF_MESSAGE0,
  7957. args0: [{
  7958. options: [[Blockly.Msg.LABPLUS_USB_SWITCH_ON, "on"], [Blockly.Msg.LABPLUS_USB_SWITCH_OFF, "off"]],
  7959. type: "field_dropdown",
  7960. name: "on_off"
  7961. }]
  7962. });
  7963. }
  7964. };
  7965. Blockly.Blocks.CocoRobo_radio_recv = {
  7966. init: function init() {
  7967. this.jsonInit({
  7968. message0: Blockly.Msg.CocoRobo_RADIO_RECV_MESSAGE0,
  7969. colour: CategoryColors.Radio,
  7970. inputsInline: !0,
  7971. helpUrl: Blockly.Msg.CocoRobo_RADIO_RECV_HELPURL,
  7972. tooltip: Blockly.Msg.CocoRobo_RADIO_RECV_TOOLTIP,
  7973. args0: [{
  7974. type: "input_value",
  7975. name: "message"
  7976. }]
  7977. });
  7978. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  7979. }
  7980. };
  7981. Blockly.Blocks.CocoRobo_radio_recv_msg = {
  7982. init: function init() {
  7983. this.jsonInit({
  7984. message0: Blockly.Msg.CocoRobo_RADIO_RECV_MSG_MESSAGE0,
  7985. colour: CategoryColors.Radio,
  7986. inputsInline: !0,
  7987. helpUrl: Blockly.Msg.CocoRobo_RADIO_RECV_MSG_HELPURL,
  7988. tooltip: Blockly.Msg.CocoRobo_RADIO_RECV_MSG_TOOLTIP,
  7989. args0: [{
  7990. type: "field_input",
  7991. name: "message",
  7992. text: "on"
  7993. }]
  7994. });
  7995. this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
  7996. }
  7997. };
  7998. Blockly.Blocks.set_subset_superset = {
  7999. init: function init() {
  8000. this.jsonInit({
  8001. inputsInline: !0,
  8002. output: "Boolean",
  8003. colour: CategoryColors.Set,
  8004. helpUrl: Blockly.Msg.SUBSET_SUPERSET_HELPURL,
  8005. // tooltip: Blockly.Msg.SUBSET_SUPERSET_TOOLTIP,
  8006. message0: Blockly.Msg.SUBSET_SUPERSET_MESSAGE0,
  8007. args0: [{
  8008. type: "input_value",
  8009. name: "set_name"
  8010. }, {
  8011. type: "input_value",
  8012. name: "set_1_name"
  8013. }, {
  8014. options: [[Blockly.Msg.CocoRobo_SUBSET, ".issubset"], [Blockly.Msg.CocoRobo_SUPERSET, ".issuperset"]],
  8015. type: "field_dropdown",
  8016. name: "subset_superset"
  8017. }]
  8018. });
  8019. var thisBlock = this;
  8020. this.setTooltip(function () {
  8021. var mode = thisBlock.getFieldValue('subset_superset');
  8022. var TOOLTIPS = {
  8023. '.issubset': Blockly.Msg.SUBSET_SUPERSET_TOOLTIP.replace('%3', Blockly.Msg.CocoRobo_SUBSET),
  8024. '.issuperset': Blockly.Msg.SUBSET_SUPERSET_TOOLTIP.replace('%3', Blockly.Msg.CocoRobo_SUPERSET)
  8025. };
  8026. return TOOLTIPS[mode];
  8027. });
  8028. }
  8029. };
  8030. Blockly.Blocks.sets_update_ways = {
  8031. init: function init() {
  8032. this.jsonInit({
  8033. inputsInline: !0,
  8034. nextStatement: null,
  8035. previousStatement: null,
  8036. colour: CategoryColors.Set,
  8037. helpUrl: Blockly.Msg.SETS_UPDATE_WAYS_HELPURL,
  8038. // tooltip: Blockly.Msg.SETS_UPDATE_WAYS_TOOLTIP,
  8039. message0: Blockly.Msg.SETS_UPDATE_WAYS_MESSAGE0,
  8040. args0: [{
  8041. type: "input_value",
  8042. name: "set_name"
  8043. }, {
  8044. type: "input_value",
  8045. name: "set_1_name"
  8046. }, {
  8047. options: [[Blockly.Msg.CocoRobo_INTERSECTION, ".intersection_update"], [Blockly.Msg.CocoRobo_UNION, ".update"], [Blockly.Msg.CocoRobo_DIFFERENCE, ".difference_update"]],
  8048. type: "field_dropdown",
  8049. name: "sets_update_ways"
  8050. }]
  8051. });
  8052. var thisBlock = this;
  8053. this.setTooltip(function () {
  8054. var mode = thisBlock.getFieldValue('sets_update_ways');
  8055. var TOOLTIPS = {
  8056. '.intersection_update': Blockly.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace('%3', Blockly.Msg.CocoRobo_INTERSECTION),
  8057. '.update': Blockly.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace('%3', Blockly.Msg.CocoRobo_UNION),
  8058. '.difference_update': Blockly.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace('%3', Blockly.Msg.CocoRobo_DIFFERENCE)
  8059. };
  8060. return TOOLTIPS[mode];
  8061. });
  8062. }
  8063. };
  8064. Blockly.Blocks.get_sets_pop = {
  8065. init: function init() {
  8066. this.jsonInit({
  8067. inputsInline: !0,
  8068. output: null,
  8069. colour: CategoryColors.Set,
  8070. helpUrl: Blockly.Msg.GET_SETS_POP_HELPURL,
  8071. tooltip: Blockly.Msg.GET_SETS_POP_TOOLTIP,
  8072. message0: Blockly.Msg.GET_SETS_POP_MESSAGE0,
  8073. args0: [{
  8074. type: "input_value",
  8075. name: "set_name"
  8076. }]
  8077. });
  8078. }
  8079. };
  8080. Blockly.Blocks.len_of_sets = {
  8081. init: function init() {
  8082. this.jsonInit({
  8083. inputsInline: !0,
  8084. output: "Number",
  8085. colour: CategoryColors.Set,
  8086. helpUrl: Blockly.Msg.LEN_OF_SETS_HELPURL,
  8087. tooltip: Blockly.Msg.LEN_OF_SETS_TOOLTIP,
  8088. message0: Blockly.Msg.LEN_OF_SETS_MESSAGE0,
  8089. args0: [{
  8090. type: "input_value",
  8091. name: "set_name"
  8092. }]
  8093. });
  8094. }
  8095. };
  8096. Blockly.Blocks.intersection_of_sets = {
  8097. init: function init() {
  8098. this.jsonInit({
  8099. inputsInline: !0,
  8100. output: "Array",
  8101. colour: CategoryColors.Set,
  8102. helpUrl: Blockly.Msg.INTERSECTION_OF_SETS_HELPURL,
  8103. // tooltip: Blockly.Msg.INTERSECTION_OF_SETS_TOOLTIP,
  8104. message0: Blockly.Msg.INTERSECTION_OF_SETS_MESSAGE0,
  8105. args0: [{
  8106. options: [[Blockly.Msg.CocoRobo_INTERSECTION, " \x26 "], [Blockly.Msg.CocoRobo_UNION, " | "], [Blockly.Msg.CocoRobo_DIFFERENCE, " - "]],
  8107. type: "field_dropdown",
  8108. name: "set_operation_type"
  8109. }, {
  8110. type: "input_value",
  8111. name: "set_name"
  8112. }, {
  8113. type: "input_value",
  8114. name: "set_1_name"
  8115. }]
  8116. });
  8117. var thisBlock = this;
  8118. this.setTooltip(function () {
  8119. var mode = thisBlock.getFieldValue('set_operation_type');
  8120. var TOOLTIPS = {
  8121. " \x26 ": Blockly.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace('%1', Blockly.Msg.CocoRobo_INTERSECTION),
  8122. " | ": Blockly.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace('%1', Blockly.Msg.CocoRobo_UNION),
  8123. " - ": Blockly.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace('%1', Blockly.Msg.CocoRobo_DIFFERENCE)
  8124. };
  8125. return TOOLTIPS[mode];
  8126. });
  8127. }
  8128. };
  8129. Blockly.Blocks.set_update_with = {
  8130. init: function init() {
  8131. this.jsonInit({
  8132. inputsInline: !0,
  8133. nextStatement: null,
  8134. previousStatement: null,
  8135. colour: CategoryColors.Set,
  8136. helpUrl: Blockly.Msg.SET_UPDATE_WITH_HELPURL,
  8137. tooltip: Blockly.Msg.SET_UPDATE_WITH_TOOLTIP,
  8138. message0: Blockly.Msg.SET_UPDATE_WITH_MESSAGE0,
  8139. args0: [{
  8140. type: "input_value",
  8141. name: "set_name"
  8142. }, {
  8143. type: "input_value",
  8144. name: "set_items"
  8145. }]
  8146. });
  8147. }
  8148. };
  8149. Blockly.Blocks.set_create_with = {
  8150. init: function init() {
  8151. this.jsonInit({
  8152. inputsInline: !0,
  8153. nextStatement: null,
  8154. previousStatement: null,
  8155. colour: CategoryColors.Set,
  8156. helpUrl: Blockly.Msg.SET_CREATE_WITH_HELPURL,
  8157. tooltip: Blockly.Msg.SET_CREATE_WITH_TOOLTIP,
  8158. message0: Blockly.Msg.SET_CREATE_WITH_MESSAGE0,
  8159. args0: [{
  8160. type: "input_value",
  8161. name: "set_name"
  8162. }, {
  8163. type: "input_value",
  8164. name: "set_items"
  8165. }]
  8166. });
  8167. }
  8168. };
  8169. Blockly.Blocks.text_set = {
  8170. init: function init() {
  8171. this.setHelpUrl(Blockly.Msg.TEXT_SET_HELPURL);
  8172. this.setColour(CategoryColors.Set);
  8173. this.appendDummyInput().appendField(Blockly.Msg.TEXT_SET_START).appendField(new Blockly.FieldTextInput(""), "TEXT").appendField(Blockly.Msg.TEXT_SET_END);
  8174. this.setOutput(!0, "Array");
  8175. this.setTooltip(Blockly.Msg.Text_Set_TOOLTIP);
  8176. }
  8177. };
  8178. Blockly.Blocks.create_empty_set = {
  8179. init: function init() {
  8180. this.jsonInit({
  8181. inputsInline: !0,
  8182. nextStatement: null,
  8183. previousStatement: null,
  8184. colour: CategoryColors.Set,
  8185. helpUrl: Blockly.Msg.CREATE_EMPTY_SET_HELPURL,
  8186. tooltip: Blockly.Msg.CREATE_EMPTY_SET_TOOLTIP,
  8187. message0: Blockly.Msg.CREATE_EMPTY_SET_MESSAGE0,
  8188. args0: [{
  8189. type: "input_value",
  8190. name: "set_name"
  8191. }]
  8192. });
  8193. }
  8194. };
  8195. Blockly.Blocks.set_create_with_items_insert = {
  8196. init: function init() {
  8197. this.setHelpUrl(Blockly.Msg.SET_CREATE_WITH_ITEMS_INSERT_HELPURL);
  8198. this.setColour(CategoryColors.Set);
  8199. this.itemCount_ = 3;
  8200. this.updateShape_();
  8201. this.setOutput(!0, "Array");
  8202. this.setMutator(new Blockly.Mutator(["set_create_with_item"]));
  8203. this.setTooltip(Blockly.Msg.SET_CREATE_WITH_ITEMS_INSERT_TOOLTIP);
  8204. },
  8205. mutationToDom: function mutationToDom() {
  8206. var a = document.createElement("mutation");
  8207. a.setAttribute("items", this.itemCount_);
  8208. return a;
  8209. },
  8210. domToMutation: function domToMutation(a) {
  8211. this.itemCount_ = parseInt(a.getAttribute("items"), 10);
  8212. this.updateShape_();
  8213. },
  8214. decompose: function decompose(a) {
  8215. var b = a.newBlock("set_create_with_container");
  8216. b.initSvg();
  8217. for (var c = b.getInput("STACK").connection, e = 0; e < this.itemCount_; e++) {
  8218. var d = a.newBlock("set_create_with_item");
  8219. d.initSvg();
  8220. c.connect(d.previousConnection);
  8221. c = d.nextConnection;
  8222. }
  8223. return b;
  8224. },
  8225. compose: function compose(a) {
  8226. var b = a.getInputTargetBlock("STACK");
  8227. for (a = []; b;) {
  8228. a.push(b.valueConnection_), b = b.nextConnection && b.nextConnection.targetBlock();
  8229. }
  8230. for (b = 0; b < this.itemCount_; b++) {
  8231. var c = this.getInput("ADD" + b).connection.targetConnection;
  8232. c && -1 == a.indexOf(c) && c.disconnect();
  8233. }
  8234. this.itemCount_ = a.length;
  8235. this.updateShape_();
  8236. for (b = 0; b < this.itemCount_; b++) {
  8237. Blockly.Mutator.reconnect(a[b], this, "ADD" + b);
  8238. }
  8239. },
  8240. saveConnections: function saveConnections(a) {
  8241. a = a.getInputTargetBlock("STACK");
  8242. for (var b = 0; a;) {
  8243. var c = this.getInput("ADD" + b);
  8244. a.valueConnection_ = c && c.connection.targetConnection;
  8245. b++;
  8246. a = a.nextConnection && a.nextConnection.targetBlock();
  8247. }
  8248. },
  8249. updateShape_: function updateShape_() {
  8250. this.itemCount_ && this.getInput("EMPTY") ? this.removeInput("EMPTY") : this.itemCount_ || this.getInput("EMPTY") || this.appendDummyInput("EMPTY").appendField(Blockly.Msg.SET_CREATE_EMPTY_TITLE);
  8251. for (var a = 0; a < this.itemCount_; a++) {
  8252. if (!this.getInput("ADD" + a)) {
  8253. var b = this.appendValueInput("ADD" + a);
  8254. 0 == a && b.appendField(Blockly.Msg.SET_CREATE_WITH_INPUT_WITH);
  8255. }
  8256. }
  8257. for (; this.getInput("ADD" + a);) {
  8258. this.removeInput("ADD" + a), a++;
  8259. }
  8260. }
  8261. };
  8262. Blockly.Blocks.set_create_with_item = {
  8263. init: function init() {
  8264. this.setColour(CategoryColors.Set);
  8265. this.appendDummyInput().appendField(Blockly.Msg.SET_CREATE_WITH_ITEM_TITLE);
  8266. this.setPreviousStatement(!0);
  8267. this.setNextStatement(!0);
  8268. this.setTooltip(Blockly.Msg.SET_CREATE_WITH_ITEM_TOOLTIP);
  8269. this.contextMenu = !1;
  8270. }
  8271. };
  8272. Blockly.Blocks.set_create_with_container = {
  8273. init: function init() {
  8274. this.setColour(CategoryColors.Set);
  8275. this.appendDummyInput().appendField(Blockly.Msg.SET_CREATE_WITH_CONTAINER_TITLE_ADD);
  8276. this.appendStatementInput("STACK");
  8277. this.setTooltip(Blockly.Msg.SET_CREATE_WITH_CONTAINER_TOOLTIP);
  8278. this.contextMenu = !1;
  8279. }
  8280. };
  8281. Blockly.Blocks.set_tuple_order_item = {
  8282. init: function init() {
  8283. this.jsonInit({
  8284. colour: CategoryColors.Tuple,
  8285. args0: [{
  8286. type: "input_value",
  8287. name: "tuple_name"
  8288. }, {
  8289. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  8290. type: "field_dropdown",
  8291. name: "tuple_order"
  8292. }, {
  8293. check: "Number",
  8294. type: "input_value",
  8295. name: "tuple_order_item"
  8296. }, {
  8297. type: "input_value",
  8298. name: "set_value"
  8299. }],
  8300. inputsInline: !0,
  8301. nextStatement: null,
  8302. previousStatement: null,
  8303. helpUrl: Blockly.Msg.SET_TUPLE_ORDER_ITEM_HELPURL,
  8304. tooltip: Blockly.Msg.SET_TUPLE_ORDER_ITEM_TOOLTIP,
  8305. message0: Blockly.Msg.SET_TUPLE_ORDER_ITEM_MESSAGE0
  8306. });
  8307. }
  8308. };
  8309. Blockly.Blocks.tuple_create_with_items_insert = {
  8310. init: function init() {
  8311. this.setHelpUrl(Blockly.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL);
  8312. this.setColour(CategoryColors.Tuple);
  8313. this.itemCount_ = 3;
  8314. this.updateShape_();
  8315. this.setOutput(!0);
  8316. this.setMutator(new Blockly.Mutator(["tuple_create_with_item"]));
  8317. this.setTooltip(Blockly.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP);
  8318. },
  8319. mutationToDom: function mutationToDom() {
  8320. var a = document.createElement("mutation");
  8321. a.setAttribute("items", this.itemCount_);
  8322. return a;
  8323. },
  8324. domToMutation: function domToMutation(a) {
  8325. this.itemCount_ = parseInt(a.getAttribute("items"), 10);
  8326. this.updateShape_();
  8327. },
  8328. decompose: function decompose(a) {
  8329. var b = a.newBlock("tuple_create_with_container");
  8330. b.initSvg();
  8331. for (var c = b.getInput("STACK").connection, e = 0; e < this.itemCount_; e++) {
  8332. var d = a.newBlock("tuple_create_with_item");
  8333. d.initSvg();
  8334. c.connect(d.previousConnection);
  8335. c = d.nextConnection;
  8336. }
  8337. return b;
  8338. },
  8339. compose: function compose(a) {
  8340. var b = a.getInputTargetBlock("STACK");
  8341. for (a = []; b;) {
  8342. a.push(b.valueConnection_), b = b.nextConnection && b.nextConnection.targetBlock();
  8343. }
  8344. for (b = 0; b < this.itemCount_; b++) {
  8345. var c = this.getInput("ADD" + b).connection.targetConnection;
  8346. c && -1 == a.indexOf(c) && c.disconnect();
  8347. }
  8348. this.itemCount_ = a.length;
  8349. this.updateShape_();
  8350. for (b = 0; b < this.itemCount_; b++) {
  8351. Blockly.Mutator.reconnect(a[b], this, "ADD" + b);
  8352. }
  8353. },
  8354. saveConnections: function saveConnections(a) {
  8355. a = a.getInputTargetBlock("STACK");
  8356. for (var b = 0; a;) {
  8357. var c = this.getInput("ADD" + b);
  8358. a.valueConnection_ = c && c.connection.targetConnection;
  8359. b++;
  8360. a = a.nextConnection && a.nextConnection.targetBlock();
  8361. }
  8362. },
  8363. updateShape_: function updateShape_() {
  8364. this.itemCount_ && this.getInput("EMPTY") ? this.removeInput("EMPTY") : this.itemCount_ || this.getInput("EMPTY") || this.appendDummyInput("EMPTY").appendField(Blockly.Msg.TUPLE_CREATE_EMPTY_TITLE);
  8365. for (var a = 0; a < this.itemCount_; a++) {
  8366. if (!this.getInput("ADD" + a)) {
  8367. var b = this.appendValueInput("ADD" + a);
  8368. 0 == a && b.appendField(Blockly.Msg.TUPLE_CREATE_WITH_INPUT_WITH);
  8369. }
  8370. }
  8371. for (; this.getInput("ADD" + a);) {
  8372. this.removeInput("ADD" + a), a++;
  8373. }
  8374. }
  8375. };
  8376. Blockly.Blocks.tuple_create_with_item = {
  8377. init: function init() {
  8378. this.setColour(CategoryColors.Tuple);
  8379. this.appendDummyInput().appendField(Blockly.Msg.TUPLE_CREATE_WITH_ITEM_TITLE);
  8380. this.setPreviousStatement(!0);
  8381. this.setNextStatement(!0);
  8382. this.setTooltip(Blockly.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP);
  8383. this.contextMenu = !1;
  8384. }
  8385. };
  8386. Blockly.Blocks.tuple_create_with_container = {
  8387. init: function init() {
  8388. this.setColour(CategoryColors.Tuple);
  8389. this.appendDummyInput().appendField(Blockly.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD);
  8390. this.appendStatementInput("STACK");
  8391. this.setTooltip(Blockly.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP);
  8392. this.contextMenu = !1;
  8393. }
  8394. };
  8395. Blockly.Blocks.tuple_create_with = {
  8396. init: function init() {
  8397. this.jsonInit({
  8398. colour: CategoryColors.Tuple,
  8399. args0: [{
  8400. type: "input_value",
  8401. name: "tuple_name"
  8402. }, {
  8403. type: "input_value",
  8404. name: "tuple_items"
  8405. }],
  8406. inputsInline: !0,
  8407. nextStatement: null,
  8408. previousStatement: null,
  8409. helpUrl: Blockly.Msg.tuple_create_with_HELPURL,
  8410. tooltip: Blockly.Msg.tuple_create_with_TOOLTIP,
  8411. message0: Blockly.Msg.tuple_create_with_MESSAGE0
  8412. });
  8413. }
  8414. };
  8415. Blockly.Blocks.tuple_order_item = {
  8416. init: function init() {
  8417. this.jsonInit({
  8418. colour: CategoryColors.Tuple,
  8419. args0: [{
  8420. type: "input_value",
  8421. name: "tuple_name"
  8422. }, {
  8423. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  8424. type: "field_dropdown",
  8425. name: "tuple_order"
  8426. }, {
  8427. check: "Number",
  8428. type: "input_value",
  8429. name: "tuple_order_item"
  8430. }],
  8431. output: ["Number", "String", "Boolean", "Array"],
  8432. inputsInline: !0,
  8433. helpUrl: Blockly.Msg.tuple_order_item_HELPURL,
  8434. tooltip: Blockly.Msg.tuple_order_item_TOOLTIP,
  8435. message0: Blockly.Msg.tuple_order_item_MESSAGE0
  8436. });
  8437. }
  8438. };
  8439. Blockly.Blocks.tuple_min_max_len = {
  8440. init: function init() {
  8441. this.jsonInit({
  8442. colour: CategoryColors.Tuple,
  8443. args0: [{
  8444. type: "input_value",
  8445. name: "tuple_name"
  8446. }, {
  8447. options: [[Blockly.Msg.CocoRobo_MIN, "min"], [Blockly.Msg.CocoRobo_MAX, "max"], [Blockly.Msg.CocoRobo_LENTH, "len"]],
  8448. type: "field_dropdown",
  8449. name: "tuple_min_max_len"
  8450. }],
  8451. output: ["Number", "String"],
  8452. inputsInline: !0,
  8453. helpUrl: Blockly.Msg.TUPLE_MIN_MAX_LEN_HELPURL,
  8454. // tooltip: Blockly.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP,
  8455. message0: Blockly.Msg.TUPLE_MIN_MAX_LEN_MESSAGE0
  8456. });
  8457. var thisBlock = this;
  8458. this.setTooltip(function () {
  8459. var mode = thisBlock.getFieldValue('tuple_min_max_len');
  8460. var TOOLTIPS = {
  8461. 'min': Blockly.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace('%2', Blockly.Msg.CocoRobo_MIN),
  8462. 'max': Blockly.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace('%2', Blockly.Msg.CocoRobo_MAX),
  8463. 'len': Blockly.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace('%2', Blockly.Msg.CocoRobo_LENTH)
  8464. };
  8465. return TOOLTIPS[mode];
  8466. });
  8467. }
  8468. };
  8469. Blockly.Blocks.tuple_item_exist = {
  8470. init: function init() {
  8471. this.jsonInit({
  8472. colour: CategoryColors.Tuple,
  8473. args0: [{
  8474. type: "input_value",
  8475. name: "tuple_name"
  8476. }, {
  8477. type: "input_value",
  8478. name: "tuple_item"
  8479. }],
  8480. output: "Boolean",
  8481. inputsInline: !0,
  8482. helpUrl: Blockly.Msg.TUPLE_ITEM_EXIST_HELPURL,
  8483. tooltip: Blockly.Msg.TUPLE_ITEM_EXIST_TOOLTIP,
  8484. message0: Blockly.Msg.TUPLE_ITEM_EXIST_MESSAGE0
  8485. });
  8486. }
  8487. };
  8488. Blockly.Blocks.parts_of_tuple = {
  8489. init: function init() {
  8490. this.jsonInit({
  8491. colour: CategoryColors.Tuple,
  8492. args0: [{
  8493. type: "input_value",
  8494. name: "tuple_name"
  8495. }, {
  8496. check: "Number",
  8497. type: "input_value",
  8498. name: "tuple_item"
  8499. }],
  8500. output: null,
  8501. inputsInline: !0,
  8502. helpUrl: Blockly.Msg.PARTS_OF_TUPLE_HELPURL,
  8503. tooltip: Blockly.Msg.PARTS_OF_TUPLE_TOOLTIP,
  8504. message0: Blockly.Msg.PARTS_OF_TUPLE_MESSAGE0
  8505. });
  8506. }
  8507. };
  8508. Blockly.Blocks.parts_of_tuple2 = {
  8509. init: function init() {
  8510. this.jsonInit({
  8511. colour: CategoryColors.Tuple,
  8512. args0: [{
  8513. type: "input_value",
  8514. name: "tuple_name"
  8515. }, {
  8516. options: [[Blockly.Msg.CocoRobo_ORDER, "["], [Blockly.Msg.CocoRobo_REVERSE_ORDER, "[-"]],
  8517. type: "field_dropdown",
  8518. name: "tuple_start_order"
  8519. }, {
  8520. check: "Number",
  8521. type: "input_value",
  8522. name: "start_item"
  8523. }, {
  8524. options: [[Blockly.Msg.CocoRobo_ORDER, ":"], [Blockly.Msg.CocoRobo_REVERSE_ORDER, ":-"]],
  8525. type: "field_dropdown",
  8526. name: "tuple_end_order"
  8527. }, {
  8528. check: "Number",
  8529. type: "input_value",
  8530. name: "end_item"
  8531. }],
  8532. output: null,
  8533. inputsInline: !0,
  8534. helpUrl: Blockly.Msg.PARTS_OF_TUPLE2_HELPURL,
  8535. tooltip: Blockly.Msg.PARTS_OF_TUPLE2_TOOLTIP,
  8536. message0: Blockly.Msg.PARTS_OF_TUPLE2_MESSAGE0
  8537. });
  8538. }
  8539. };
  8540. Blockly.Blocks.CocoRobo_uart_input = {
  8541. init: function init() {
  8542. this.jsonInit({
  8543. inputsInline: !0,
  8544. output: "String",
  8545. colour: CategoryColors.UART,
  8546. helpUrl: Blockly.Msg.CocoRobo_UART_INPUT_HELPURL,
  8547. tooltip: Blockly.Msg.CocoRobo_UART_INPUT_TOOLTIP,
  8548. message0: Blockly.Msg.CocoRobo_UART_INPUT_MESSAGE0,
  8549. args0: [{
  8550. type: "field_input",
  8551. name: "title",
  8552. text: "Please enter: "
  8553. }]
  8554. });
  8555. }
  8556. };
  8557. Blockly.Blocks.CocoRobo_uart_write_bytes = {
  8558. init: function init() {
  8559. this.jsonInit({
  8560. inputsInline: !0,
  8561. nextStatement: null,
  8562. previousStatement: null,
  8563. colour: CategoryColors.UART,
  8564. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_HELPURL,
  8565. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_TOOLTIP,
  8566. message0: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_MESSAGE0,
  8567. args0: [{
  8568. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8569. type: "field_dropdown",
  8570. name: "uart_name"
  8571. }, {
  8572. check: "Array",
  8573. type: "input_value",
  8574. name: "write_byte_arrays"
  8575. }]
  8576. });
  8577. }
  8578. };
  8579. Blockly.Blocks.CocoRobo_uart_get_write_bytes = {
  8580. init: function init() {
  8581. this.jsonInit({
  8582. inputsInline: !0,
  8583. output: null,
  8584. colour: CategoryColors.UART,
  8585. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_HELPURL,
  8586. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_TOOLTIP,
  8587. message0: Blockly.Msg.CocoRobo_UART_WRITE_BYTES_MESSAGE0,
  8588. args0: [{
  8589. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8590. type: "field_dropdown",
  8591. name: "uart_name"
  8592. }, {
  8593. check: "Array",
  8594. type: "input_value",
  8595. name: "write_byte_arrays"
  8596. }]
  8597. });
  8598. }
  8599. };
  8600. Blockly.Blocks.CocoRobo_uart_write_byte = {
  8601. init: function init() {
  8602. this.jsonInit({
  8603. inputsInline: !0,
  8604. nextStatement: null,
  8605. previousStatement: null,
  8606. colour: CategoryColors.UART,
  8607. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_HELPURL,
  8608. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_TOOLTIP,
  8609. message0: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_MESSAGE0,
  8610. args0: [{
  8611. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8612. type: "field_dropdown",
  8613. name: "uart_name"
  8614. }, {
  8615. check: "Number",
  8616. type: "input_value",
  8617. name: "write_one_byte"
  8618. }]
  8619. });
  8620. }
  8621. };
  8622. Blockly.Blocks.CocoRobo_uart_get_write_byte = {
  8623. init: function init() {
  8624. this.jsonInit({
  8625. inputsInline: !0,
  8626. output: null,
  8627. colour: CategoryColors.UART,
  8628. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_HELPURL,
  8629. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_TOOLTIP,
  8630. message0: Blockly.Msg.CocoRobo_UART_WRITE_BYTE_MESSAGE0,
  8631. args0: [{
  8632. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8633. type: "field_dropdown",
  8634. name: "uart_name"
  8635. }, {
  8636. check: "Number",
  8637. type: "input_value",
  8638. name: "write_one_byte"
  8639. }]
  8640. });
  8641. }
  8642. };
  8643. Blockly.Blocks.CocoRobo_uart_read = {
  8644. init: function init() {
  8645. this.jsonInit({
  8646. inputsInline: !0,
  8647. output: null,
  8648. colour: CategoryColors.UART,
  8649. helpUrl: Blockly.Msg.CocoRobo_UART_READ_HELPURL,
  8650. tooltip: Blockly.Msg.CocoRobo_UART_READ_TOOLTIP,
  8651. message0: Blockly.Msg.CocoRobo_UART_READ_MESSAGE0,
  8652. args0: [{
  8653. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8654. type: "field_dropdown",
  8655. name: "uart_name"
  8656. }]
  8657. });
  8658. }
  8659. };
  8660. Blockly.Blocks.CocoRobo_uart_readinto = {
  8661. init: function init() {
  8662. this.jsonInit({
  8663. inputsInline: !0,
  8664. output: null,
  8665. colour: CategoryColors.UART,
  8666. helpUrl: Blockly.Msg.CocoRobo_UART_READINTO_HELPURL,
  8667. tooltip: Blockly.Msg.CocoRobo_UART_READINTO_TOOLTIP,
  8668. message0: Blockly.Msg.CocoRobo_UART_READINTO_MESSAGE0,
  8669. args0: [{
  8670. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8671. type: "field_dropdown",
  8672. name: "uart_name"
  8673. }]
  8674. });
  8675. }
  8676. };
  8677. Blockly.Blocks.CocoRobo_uart_read_length = {
  8678. init: function init() {
  8679. this.jsonInit({
  8680. inputsInline: !0,
  8681. output: null,
  8682. colour: CategoryColors.UART,
  8683. helpUrl: Blockly.Msg.CocoRobo_UART_READ_LENGTH_HELPURL,
  8684. tooltip: Blockly.Msg.CocoRobo_UART_READ_LENGTH_TOOLTIP,
  8685. message0: Blockly.Msg.CocoRobo_UART_READ_LENGTH_MESSAGE0,
  8686. args0: [{
  8687. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8688. type: "field_dropdown",
  8689. name: "uart_name"
  8690. }, {
  8691. check: "Number",
  8692. type: "input_value",
  8693. name: "read_length"
  8694. }]
  8695. });
  8696. }
  8697. };
  8698. Blockly.Blocks.CocoRobo_uart_readline = {
  8699. init: function init() {
  8700. this.jsonInit({
  8701. inputsInline: !0,
  8702. output: null,
  8703. colour: CategoryColors.UART,
  8704. helpUrl: Blockly.Msg.CocoRobo_UART_READLINE_HELPURL,
  8705. tooltip: Blockly.Msg.CocoRobo_UART_READLINE_TOOLTIP,
  8706. message0: Blockly.Msg.CocoRobo_UART_READLINE_MESSAGE0,
  8707. args0: [{
  8708. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8709. type: "field_dropdown",
  8710. name: "uart_name"
  8711. }]
  8712. });
  8713. }
  8714. };
  8715. Blockly.Blocks.CocoRobo_uart_has_data = {
  8716. init: function init() {
  8717. this.jsonInit({
  8718. inputsInline: !0,
  8719. output: "Boolean",
  8720. colour: CategoryColors.UART,
  8721. helpUrl: Blockly.Msg.CocoRobo_UART_HAS_DATA_HELPURL,
  8722. tooltip: Blockly.Msg.CocoRobo_UART_HAS_DATA_TOOLTIP,
  8723. message0: Blockly.Msg.CocoRobo_UART_HAS_DATA_MESSAGE0,
  8724. args0: [{
  8725. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8726. type: "field_dropdown",
  8727. name: "uart_name"
  8728. }]
  8729. });
  8730. }
  8731. };
  8732. Blockly.Blocks.CocoRobo_uart_write_hex = {
  8733. init: function init() {
  8734. this.jsonInit({
  8735. inputsInline: !0,
  8736. nextStatement: null,
  8737. previousStatement: null,
  8738. colour: CategoryColors.UART,
  8739. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_HEX_HELPURL,
  8740. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_HEX_TOOLTIP,
  8741. message0: Blockly.Msg.CocoRobo_UART_WRITE_HEX_MESSAGE0,
  8742. args0: [{
  8743. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8744. type: "field_dropdown",
  8745. name: "uart_name"
  8746. }, {
  8747. type: "field_input",
  8748. name: "data",
  8749. text: "0xff00ff"
  8750. }, {
  8751. options: [[Blockly.Msg.CocoRobo_FONT_NO_WRAP, "no_new"], [Blockly.Msg.CocoRobo_FONT_WRAP, "new"]],
  8752. type: "field_dropdown",
  8753. name: "newline"
  8754. }]
  8755. });
  8756. }
  8757. };
  8758. Blockly.Blocks.CocoRobo_uart_write_str = {
  8759. init: function init() {
  8760. this.jsonInit({
  8761. inputsInline: !0,
  8762. nextStatement: null,
  8763. previousStatement: null,
  8764. colour: CategoryColors.UART,
  8765. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_STR_HELPURL,
  8766. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_STR_TOOLTIP,
  8767. message0: Blockly.Msg.CocoRobo_UART_WRITE_STR_MESSAGE0,
  8768. args0: [{
  8769. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8770. type: "field_dropdown",
  8771. name: "uart_name"
  8772. }, {
  8773. check: "String",
  8774. type: "input_value",
  8775. name: "data"
  8776. }, {
  8777. options: [[Blockly.Msg.CocoRobo_FONT_NO_WRAP, "no_new"], [Blockly.Msg.CocoRobo_FONT_WRAP, "new"]],
  8778. type: "field_dropdown",
  8779. name: "newline"
  8780. }]
  8781. });
  8782. }
  8783. };
  8784. Blockly.Blocks.CocoRobo_uart_get_write_str = {
  8785. init: function init() {
  8786. this.jsonInit({
  8787. inputsInline: !0,
  8788. output: null,
  8789. colour: CategoryColors.UART,
  8790. helpUrl: Blockly.Msg.CocoRobo_UART_WRITE_STR_HELPURL,
  8791. tooltip: Blockly.Msg.CocoRobo_UART_WRITE_STR_TOOLTIP,
  8792. message0: Blockly.Msg.CocoRobo_UART_WRITE_STR_MESSAGE0,
  8793. args0: [{
  8794. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8795. type: "field_dropdown",
  8796. name: "uart_name"
  8797. }, {
  8798. check: "String",
  8799. type: "input_value",
  8800. name: "data"
  8801. }, {
  8802. options: [[Blockly.Msg.CocoRobo_FONT_NO_WRAP, "no_new"], [Blockly.Msg.CocoRobo_FONT_WRAP, "new"]],
  8803. type: "field_dropdown",
  8804. name: "newline"
  8805. }]
  8806. });
  8807. }
  8808. };
  8809. Blockly.Blocks.CocoRobo_uart_init = {
  8810. init: function init() {
  8811. this.jsonInit({
  8812. inputsInline: !0,
  8813. nextStatement: null,
  8814. previousStatement: null,
  8815. colour: CategoryColors.UART,
  8816. helpUrl: Blockly.Msg.CocoRobo_UART_INIT_HELPURL,
  8817. tooltip: Blockly.Msg.CocoRobo_UART_INIT_TOOLTIP,
  8818. message0: Blockly.Msg.CocoRobo_UART_INIT_MESSAGE0,
  8819. args0: [{
  8820. type: "input_value",
  8821. name: "baudrate"
  8822. }, {
  8823. check: "Number",
  8824. type: "input_value",
  8825. name: "tx"
  8826. }, {
  8827. check: "Number",
  8828. type: "input_value",
  8829. name: "rx"
  8830. }, {
  8831. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8832. type: "field_dropdown",
  8833. name: "uart_name"
  8834. }]
  8835. });
  8836. }
  8837. };
  8838. Blockly.Blocks.CocoRobo_uart_deinit = {
  8839. init: function init() {
  8840. this.jsonInit({
  8841. inputsInline: !0,
  8842. nextStatement: null,
  8843. previousStatement: null,
  8844. colour: CategoryColors.UART,
  8845. helpUrl: Blockly.Msg.CocoRobo_UART_DEINIT_HELPURL,
  8846. tooltip: Blockly.Msg.CocoRobo_UART_DEINIT_TOOLTIP,
  8847. message0: Blockly.Msg.CocoRobo_UART_DEINIT_MESSAGE0,
  8848. args0: [{
  8849. options: [["uart1", "uart1"], ["uart2", "uart2"]],
  8850. type: "field_dropdown",
  8851. name: "uart_name"
  8852. }]
  8853. });
  8854. }
  8855. };
  8856. Blockly.Blocks.CocoRobo_baudrate = {
  8857. init: function init() {
  8858. this.jsonInit({
  8859. inputsInline: !0,
  8860. output: "Number",
  8861. colour: CategoryColors.UART,
  8862. helpUrl: Blockly.Msg.CocoRobo_BAUDRATE_HELPURL,
  8863. tooltip: Blockly.Msg.CocoRobo_BAUDRATE_TOOLTIP,
  8864. message0: Blockly.Msg.CocoRobo_BAUDRATE_MESSAGE0,
  8865. args0: [{
  8866. options: [["115200", "115200"], ["57600", "57600"], ["56000", "56000"], ["43000", "43000"], ["38400", "38400"], ["31250", "31250"], ["28800", "28800"], ["19200", "19200"], ["14400", "14400"], ["9600", "9600"], ["4800", "4800"], ["2400", "2400"], ["1200", "1200"], ["600", "600"], ["300", "300"]],
  8867. type: "field_dropdown",
  8868. name: "baudrate"
  8869. }]
  8870. });
  8871. }
  8872. };
  8873. Blockly.Blocks.CocoRobo_usocket_read = {
  8874. init: function init() {
  8875. this.jsonInit({
  8876. inputsInline: !0,
  8877. output: null,
  8878. colour: CategoryColors.Network,
  8879. helpUrl: Blockly.Msg.CocoRobo_USOCKET_READ_HELPURL,
  8880. tooltip: Blockly.Msg.CocoRobo_USOCKET_READ_TOOLTIP,
  8881. message0: Blockly.Msg.CocoRobo_USOCKET_READ_MESSAGE0,
  8882. args0: [{
  8883. type: "field_input",
  8884. name: "socket_name",
  8885. text: "s"
  8886. }, {
  8887. check: "Number",
  8888. type: "input_value",
  8889. name: "size"
  8890. }]
  8891. });
  8892. }
  8893. };
  8894. Blockly.Blocks.CocoRobo_usocket_setblocking = {
  8895. init: function init() {
  8896. this.jsonInit({
  8897. inputsInline: !0,
  8898. nextStatement: null,
  8899. previousStatement: null,
  8900. colour: CategoryColors.Network,
  8901. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SETBLOCKING_HELPURL,
  8902. tooltip: Blockly.Msg.CocoRobo_USOCKET_SETBLOCKING_TOOLTIP,
  8903. message0: Blockly.Msg.CocoRobo_USOCKET_SETBLOCKING_MESSAGE0,
  8904. args0: [{
  8905. type: "field_input",
  8906. name: "socket_name",
  8907. text: "s"
  8908. }, {
  8909. options: [[Blockly.Msg.CocoRobo_USOCKET_BLOCK, "True"], [Blockly.Msg.CocoRobo_USOCKET_UNBLOCK, "False"]],
  8910. type: "field_dropdown",
  8911. name: "mode"
  8912. }]
  8913. });
  8914. }
  8915. };
  8916. Blockly.Blocks.CocoRobo_usocket_settimeout = {
  8917. init: function init() {
  8918. this.jsonInit({
  8919. inputsInline: !0,
  8920. nextStatement: null,
  8921. previousStatement: null,
  8922. colour: CategoryColors.Network,
  8923. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SETTIMEOUT_HELPURL,
  8924. tooltip: Blockly.Msg.CocoRobo_USOCKET_SETTIMEOUT_TOOLTIP,
  8925. message0: Blockly.Msg.CocoRobo_USOCKET_SETTIMEOUT_MESSAGE0,
  8926. args0: [{
  8927. type: "field_input",
  8928. name: "socket_name",
  8929. text: "s"
  8930. }, {
  8931. check: "Number",
  8932. type: "input_value",
  8933. name: "_nums"
  8934. }]
  8935. });
  8936. }
  8937. };
  8938. Blockly.Blocks.CocoRobo_text_ESC = {
  8939. init: function init() {
  8940. this.jsonInit({
  8941. inputsInline: !0,
  8942. output: null,
  8943. colour: Blockly.Blocks.texts.HUE,
  8944. helpUrl: Blockly.Msg.CocoRobo_TEXT_ESC_HELPURL,
  8945. tooltip: Blockly.Msg.CocoRobo_TEXT_ESC_TOOLTIP,
  8946. message0: Blockly.Msg.CocoRobo_TEXT_ESC_MESSAGE0,
  8947. args0: [{
  8948. options: [["\\n", "\\n"], ["\\n\\n", "\\n\\n"], ["\\r", "\\r"], ["\\r\\n", "\\r\\n"], ["\\b", "\\b"], ["\\other", "\\other"], ["\\", "\\"], ["\\\\", "\\\\"]],
  8949. type: "field_dropdown",
  8950. name: "mode"
  8951. }]
  8952. });
  8953. }
  8954. };
  8955. Blockly.Blocks.CocoRobo_usocket_recv = {
  8956. init: function init() {
  8957. this.jsonInit({
  8958. inputsInline: !0,
  8959. output: null,
  8960. colour: CategoryColors.Network,
  8961. helpUrl: Blockly.Msg.CocoRobo_USOCKET_RECV_HELPURL,
  8962. tooltip: Blockly.Msg.CocoRobo_USOCKET_RECV_TOOLTIP,
  8963. message0: Blockly.Msg.CocoRobo_USOCKET_RECV_MESSAGE0,
  8964. args0: [{
  8965. type: "field_input",
  8966. name: "socket_name",
  8967. text: "s"
  8968. }, {
  8969. check: "Number",
  8970. type: "input_value",
  8971. name: "_nums"
  8972. }]
  8973. });
  8974. }
  8975. };
  8976. Blockly.Blocks.CocoRobo_usocket_recvfrom = {
  8977. init: function init() {
  8978. this.jsonInit({
  8979. inputsInline: !0,
  8980. output: null,
  8981. colour: CategoryColors.Network,
  8982. helpUrl: Blockly.Msg.CocoRobo_USOCKET_RECVFROM_HELPURL,
  8983. tooltip: Blockly.Msg.CocoRobo_USOCKET_RECVFROM_TOOLTIP,
  8984. message0: Blockly.Msg.CocoRobo_USOCKET_RECVFROM_MESSAGE0,
  8985. args0: [{
  8986. type: "field_input",
  8987. name: "socket_name",
  8988. text: "s"
  8989. }, {
  8990. check: "Number",
  8991. type: "input_value",
  8992. name: "_nums"
  8993. }]
  8994. });
  8995. }
  8996. };
  8997. Blockly.Blocks.CocoRobo_usocket_sendall = {
  8998. init: function init() {
  8999. this.jsonInit({
  9000. inputsInline: !0,
  9001. nextStatement: null,
  9002. previousStatement: null,
  9003. colour: CategoryColors.Network,
  9004. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SENDALL_HELPURL,
  9005. tooltip: Blockly.Msg.CocoRobo_USOCKET_SENDALL_TOOLTIP,
  9006. message0: Blockly.Msg.CocoRobo_USOCKET_SENDALL_MESSAGE0,
  9007. args0: [{
  9008. type: "field_input",
  9009. name: "socket_name",
  9010. text: "s"
  9011. }, {
  9012. check: "String",
  9013. type: "input_value",
  9014. name: "_bytes"
  9015. }]
  9016. });
  9017. }
  9018. };
  9019. Blockly.Blocks.CocoRobo_usocket_sends = {
  9020. init: function init() {
  9021. this.jsonInit({
  9022. inputsInline: !0,
  9023. nextStatement: null,
  9024. previousStatement: null,
  9025. colour: CategoryColors.Network,
  9026. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SENDS_HELPURL,
  9027. tooltip: Blockly.Msg.CocoRobo_USOCKET_SENDS_TOOLTIP,
  9028. message0: Blockly.Msg.CocoRobo_USOCKET_SENDS_MESSAGE0,
  9029. args0: [{
  9030. type: "field_input",
  9031. name: "socket_name",
  9032. text: "s"
  9033. }, {
  9034. check: "String",
  9035. type: "input_value",
  9036. name: "_bytes"
  9037. }]
  9038. });
  9039. }
  9040. };
  9041. Blockly.Blocks.CocoRobo_usocket_send = {
  9042. init: function init() {
  9043. this.jsonInit({
  9044. inputsInline: !0,
  9045. output: "Number",
  9046. colour: CategoryColors.Network,
  9047. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SEND_HELPURL,
  9048. tooltip: Blockly.Msg.CocoRobo_USOCKET_SEND_TOOLTIP,
  9049. message0: Blockly.Msg.CocoRobo_USOCKET_SEND_MESSAGE0,
  9050. args0: [{
  9051. type: "field_input",
  9052. name: "socket_name",
  9053. text: "s"
  9054. }, {
  9055. check: "String",
  9056. type: "input_value",
  9057. name: "_bytes"
  9058. }]
  9059. });
  9060. }
  9061. };
  9062. Blockly.Blocks.CocoRobo_usocket_sendto = {
  9063. init: function init() {
  9064. this.jsonInit({
  9065. inputsInline: !1,
  9066. nextStatement: null,
  9067. previousStatement: null,
  9068. colour: CategoryColors.Network,
  9069. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SENDTO_HELPURL,
  9070. tooltip: Blockly.Msg.CocoRobo_USOCKET_SENDTO_TOOLTIP,
  9071. message0: Blockly.Msg.CocoRobo_USOCKET_SENDTO_MESSAGE0,
  9072. args0: [{
  9073. type: "field_input",
  9074. name: "socket_name",
  9075. text: "s"
  9076. }, {
  9077. check: "String",
  9078. type: "input_value",
  9079. name: "_bytes"
  9080. }, {
  9081. check: "Array",
  9082. type: "input_value",
  9083. name: "_address"
  9084. }]
  9085. });
  9086. }
  9087. };
  9088. Blockly.Blocks.CocoRobo_usocket_connect = {
  9089. init: function init() {
  9090. this.jsonInit({
  9091. inputsInline: !0,
  9092. nextStatement: null,
  9093. previousStatement: null,
  9094. colour: CategoryColors.Network,
  9095. helpUrl: Blockly.Msg.CocoRobo_USOCKET_CONNECT_HELPURL,
  9096. tooltip: Blockly.Msg.CocoRobo_USOCKET_CONNECT_TOOLTIP,
  9097. message0: Blockly.Msg.CocoRobo_USOCKET_CONNECT_MESSAGE0,
  9098. args0: [{
  9099. type: "field_input",
  9100. name: "socket_name",
  9101. text: "s"
  9102. }, {
  9103. check: "String",
  9104. type: "input_value",
  9105. name: "host"
  9106. }, {
  9107. check: "Number",
  9108. type: "input_value",
  9109. name: "port"
  9110. }]
  9111. });
  9112. }
  9113. };
  9114. Blockly.Blocks.CocoRobo_usocket_getaddrinfo = {
  9115. init: function init() {
  9116. this.jsonInit({
  9117. inputsInline: !0,
  9118. output: "String",
  9119. colour: CategoryColors.Network,
  9120. helpUrl: Blockly.Msg.CocoRobo_USOCKET_GETADDRINFO_HELPURL,
  9121. tooltip: Blockly.Msg.CocoRobo_USOCKET_GETADDRINFO_TOOLTIP,
  9122. message0: Blockly.Msg.CocoRobo_USOCKET_GETADDRINFO_MESSAGE0,
  9123. args0: [{
  9124. check: "String",
  9125. type: "input_value",
  9126. name: "host"
  9127. }, {
  9128. check: "Number",
  9129. type: "input_value",
  9130. name: "port"
  9131. }]
  9132. });
  9133. }
  9134. };
  9135. Blockly.Blocks.CocoRobo_usocket_accept = {
  9136. init: function init() {
  9137. this.jsonInit({
  9138. inputsInline: !0,
  9139. output: "Array",
  9140. colour: CategoryColors.Network,
  9141. helpUrl: Blockly.Msg.CocoRobo_USOCKET_ACCEPT_HELPURL,
  9142. tooltip: Blockly.Msg.CocoRobo_USOCKET_ACCEPT_TOOLTIP,
  9143. message0: Blockly.Msg.CocoRobo_USOCKET_ACCEPT_MESSAGE0,
  9144. args0: [{
  9145. type: "field_input",
  9146. name: "socket_name",
  9147. text: "s"
  9148. }]
  9149. });
  9150. }
  9151. };
  9152. Blockly.Blocks.CocoRobo_usocket_listen = {
  9153. init: function init() {
  9154. this.jsonInit({
  9155. inputsInline: !0,
  9156. nextStatement: null,
  9157. previousStatement: null,
  9158. colour: CategoryColors.Network,
  9159. helpUrl: Blockly.Msg.CocoRobo_USOCKET_LISTEN_HELPURL,
  9160. tooltip: Blockly.Msg.CocoRobo_USOCKET_LISTEN_TOOLTIP,
  9161. message0: Blockly.Msg.CocoRobo_USOCKET_LISTEN_MESSAGE0,
  9162. args0: [{
  9163. type: "field_input",
  9164. name: "socket_name",
  9165. text: "s"
  9166. }, {
  9167. check: "Number",
  9168. type: "input_value",
  9169. name: "backlog"
  9170. }]
  9171. });
  9172. }
  9173. };
  9174. Blockly.Blocks.CocoRobo_usocket_bind = {
  9175. init: function init() {
  9176. this.jsonInit({
  9177. inputsInline: !0,
  9178. nextStatement: null,
  9179. previousStatement: null,
  9180. colour: CategoryColors.Network,
  9181. helpUrl: Blockly.Msg.CocoRobo_USOCKET_BIND_HELPURL,
  9182. tooltip: Blockly.Msg.CocoRobo_USOCKET_BIND_TOOLTIP,
  9183. message0: Blockly.Msg.CocoRobo_USOCKET_BIND_MESSAGE0,
  9184. args0: [{
  9185. type: "field_input",
  9186. name: "socket_name",
  9187. text: "s"
  9188. }, {
  9189. check: "String",
  9190. type: "input_value",
  9191. name: "address"
  9192. }, {
  9193. check: "Number",
  9194. type: "input_value",
  9195. name: "port"
  9196. }]
  9197. });
  9198. }
  9199. };
  9200. Blockly.Blocks.CocoRobo_usocket_close = {
  9201. init: function init() {
  9202. this.jsonInit({
  9203. inputsInline: !0,
  9204. nextStatement: null,
  9205. previousStatement: null,
  9206. colour: CategoryColors.Network,
  9207. helpUrl: Blockly.Msg.CocoRobo_USOCKET_CLOSE_HELPURL,
  9208. tooltip: Blockly.Msg.CocoRobo_USOCKET_CLOSE_TOOLTIP,
  9209. message0: Blockly.Msg.CocoRobo_USOCKET_CLOSE_MESSAGE0,
  9210. args0: [{
  9211. type: "field_input",
  9212. name: "socket_name",
  9213. text: "s"
  9214. }]
  9215. });
  9216. }
  9217. };
  9218. Blockly.Blocks.CocoRobo_usocket_init = {
  9219. init: function init() {
  9220. this.jsonInit({
  9221. inputsInline: !0,
  9222. nextStatement: null,
  9223. previousStatement: null,
  9224. colour: CategoryColors.Network,
  9225. helpUrl: Blockly.Msg.CocoRobo_USOCKET_INIT_HELPURL,
  9226. tooltip: Blockly.Msg.CocoRobo_USOCKET_INIT_TOOLTIP,
  9227. message0: Blockly.Msg.CocoRobo_USOCKET_INIT_MESSAGE0,
  9228. args0: [{
  9229. type: "field_input",
  9230. name: "socket_name",
  9231. text: "s"
  9232. }, {
  9233. options: [["AF_INET", "AF_INET"], ["AF_INET6", "AF_INET6"]],
  9234. type: "field_dropdown",
  9235. name: "af"
  9236. }, {
  9237. options: [["SOCK_STREAM", "SOCK_STREAM"], ["SOCK_DGRAM", "SOCK_DGRAM"], ["SOCK_RAW", "SOCK_RAW"], ["SO_REUSEADDR", "SO_REUSEADDR"]],
  9238. type: "field_dropdown",
  9239. name: "_type"
  9240. }]
  9241. });
  9242. }
  9243. };
  9244. Blockly.Blocks.CocoRobo_usocket_setsockopt = {
  9245. init: function init() {
  9246. this.jsonInit({
  9247. inputsInline: !0,
  9248. nextStatement: null,
  9249. previousStatement: null,
  9250. colour: CategoryColors.Network,
  9251. helpUrl: Blockly.Msg.CocoRobo_USOCKET_SETSOCKOPT_HELPURL,
  9252. tooltip: Blockly.Msg.CocoRobo_USOCKET_SETSOCKOPT_TOOLTIP,
  9253. message0: Blockly.Msg.CocoRobo_USOCKET_SETSOCKOPT_MESSAGE0,
  9254. args0: [{
  9255. type: "field_input",
  9256. name: "socket_name",
  9257. text: "s"
  9258. }, {
  9259. options: [["SOCK_STREAM", "SOCK_STREAM"], ["SOCK_DGRAM", "SOCK_DGRAM"], ["SOCK_RAW", "SOCK_RAW"], ["SO_REUSEADDR", "SO_REUSEADDR"]],
  9260. type: "field_dropdown",
  9261. name: "_type"
  9262. }, {
  9263. check: "Number",
  9264. type: "input_value",
  9265. name: "value"
  9266. }]
  9267. });
  9268. }
  9269. };
  9270. Blockly.Blocks.CocoRobo_get_post = {
  9271. init: function init() {
  9272. this.jsonInit({
  9273. inputsInline: !1,
  9274. nextStatement: null,
  9275. previousStatement: null,
  9276. colour: CategoryColors.Network,
  9277. helpUrl: Blockly.Msg.CocoRobo_GET_POST_HELPURL,
  9278. tooltip: Blockly.Msg.CocoRobo_GET_POST_TOOLTIP,
  9279. message0: Blockly.Msg.CocoRobo_GET_POST_MESSAGE0,
  9280. args0: [{
  9281. options: [["get", "get"], ["post", "post"]],
  9282. type: "field_dropdown",
  9283. name: "get_post"
  9284. }, {
  9285. check: "String",
  9286. type: "input_value",
  9287. name: "url"
  9288. }, {
  9289. type: "input_value",
  9290. name: "json"
  9291. }]
  9292. });
  9293. }
  9294. };
  9295. Blockly.Blocks.CocoRobo_urequests_get_post = {
  9296. init: function init() {
  9297. this.jsonInit({
  9298. inputsInline: !1,
  9299. nextStatement: null,
  9300. previousStatement: null,
  9301. colour: CategoryColors.Network,
  9302. helpUrl: Blockly.Msg.CocoRobo_UREQUESTS_GET_POST_HELPURL,
  9303. tooltip: Blockly.Msg.CocoRobo_UREQUESTS_GET_POST_TOOLTIP,
  9304. message0: Blockly.Msg.CocoRobo_UREQUESTS_GET_POST_MESSAGE0,
  9305. args0: [{
  9306. options: [["Get", "get"], ["Post", "post"]],
  9307. type: "field_dropdown",
  9308. name: "method"
  9309. }, {
  9310. check: "String",
  9311. type: "input_value",
  9312. name: "url"
  9313. }, {
  9314. type: "input_value",
  9315. name: "json"
  9316. }]
  9317. });
  9318. }
  9319. };
  9320. Blockly.Blocks.CocoRobo_urequests_post_file = {
  9321. init: function init() {
  9322. this.jsonInit({
  9323. inputsInline: !1,
  9324. nextStatement: null,
  9325. previousStatement: null,
  9326. colour: CategoryColors.Network,
  9327. helpUrl: Blockly.Msg.CocoRobo_UREQUESTS_POST_FILE_HELPURL,
  9328. tooltip: Blockly.Msg.CocoRobo_UREQUESTS_POST_FILE_TOOLTIP,
  9329. message0: Blockly.Msg.CocoRobo_UREQUESTS_POST_FILE_MESSAGE0,
  9330. args0: [{
  9331. type: "input_dummy"
  9332. }, {
  9333. check: "String",
  9334. type: "input_value",
  9335. name: "url"
  9336. }, {
  9337. check: "String",
  9338. type: "input_value",
  9339. name: "file_name"
  9340. }, {
  9341. check: "String",
  9342. type: "input_value",
  9343. name: "file_type"
  9344. }, {
  9345. check: "Array",
  9346. type: "input_value",
  9347. name: "json"
  9348. }]
  9349. });
  9350. }
  9351. };
  9352. Blockly.Blocks.CocoRobo_response = {
  9353. init: function init() {
  9354. this.jsonInit({
  9355. inputsInline: !0,
  9356. output: null,
  9357. colour: CategoryColors.Network,
  9358. helpUrl: Blockly.Msg.CocoRobo_RESPONSE_HELPURL,
  9359. tooltip: Blockly.Msg.CocoRobo_RESPONSE_TOOLTIP,
  9360. message0: Blockly.Msg.CocoRobo_RESPONSE_MESSAGE0,
  9361. args0: [{
  9362. options: [[Blockly.Msg.TEXT, "text"], [Blockly.Msg._BYTE, "content"], [Blockly.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD, "json()"]],
  9363. type: "field_dropdown",
  9364. name: "response"
  9365. }]
  9366. });
  9367. }
  9368. };
  9369. Blockly.Blocks.CocoRobo_response_attribute = {
  9370. init: function init() {
  9371. this.jsonInit({
  9372. inputsInline: !0,
  9373. output: null,
  9374. colour: CategoryColors.Network,
  9375. helpUrl: Blockly.Msg.CocoRobo_RESPONSE_ATTRIBUTE_HELPURL,
  9376. tooltip: Blockly.Msg.CocoRobo_RESPONSE_ATTRIBUTE_TOOLTIP,
  9377. message0: Blockly.Msg.CocoRobo_RESPONSE_ATTRIBUTE_MESSAGE0,
  9378. args0: [{
  9379. options: [["encoding", "encoding"], ["status code", "status_code"], ["reason", "reason"]],
  9380. type: "field_dropdown",
  9381. name: "response_attribute"
  9382. }]
  9383. });
  9384. }
  9385. };
  9386. Blockly.Blocks.CocoRobo_init_wifi = {
  9387. init: function init() {
  9388. this.jsonInit({
  9389. inputsInline: !0,
  9390. nextStatement: null,
  9391. previousStatement: null,
  9392. colour: CategoryColors.Wifi,
  9393. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9394. tooltip: Blockly.Msg.CocoRobo_init_wifi_TOOLTIP,
  9395. message0: Blockly.Msg.CocoRobo_init_wifi_MESSAGE0,
  9396. args0: [{
  9397. check: "String",
  9398. type: "input_value",
  9399. name: "ssid"
  9400. }, {
  9401. check: "String",
  9402. type: "input_value",
  9403. name: "password"
  9404. }]
  9405. });
  9406. }
  9407. };
  9408. Blockly.Blocks.CocoRobo_wifi_all_config = {
  9409. init: function init() {
  9410. this.jsonInit({
  9411. inputsInline: !0,
  9412. output: "Array",
  9413. colour: CategoryColors.Wifi,
  9414. helpUrl: Blockly.Msg.CocoRobo_WIFI_ALL_CONFIG_HELPURL,
  9415. tooltip: Blockly.Msg.CocoRobo_WIFI_ALL_CONFIG_TOOLTIP,
  9416. message0: Blockly.Msg.CocoRobo_WIFI_ALL_CONFIG_MESSAGE0
  9417. });
  9418. }
  9419. };
  9420. Blockly.Blocks.CocoRobo_wifi_isconnected = {
  9421. init: function init() {
  9422. this.jsonInit({
  9423. inputsInline: !0,
  9424. output: "Boolean",
  9425. colour: CategoryColors.Wifi,
  9426. helpUrl: Blockly.Msg.CocoRobo_WIFI_ISCONNECTED_HELPURL,
  9427. tooltip: Blockly.Msg.CocoRobo_WIFI_ISCONNECTED_TOOLTIP,
  9428. message0: Blockly.Msg.CocoRobo_WIFI_ISCONNECTED_MESSAGE0
  9429. });
  9430. }
  9431. };
  9432. Blockly.Blocks.CocoRobo_WiFi_config = {
  9433. init: function init() {
  9434. this.jsonInit({
  9435. colour: CategoryColors.Wifi,
  9436. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9437. tooltip: Blockly.Msg.CocoRobo_WiFi_config_TOOLTIP,
  9438. message0: Blockly.Msg.CocoRobo_WiFi_config_MESSAGE0,
  9439. output: "String",
  9440. args0: [{
  9441. options: WiFi_config,
  9442. type: "field_dropdown",
  9443. name: "WiFi_config"
  9444. }]
  9445. });
  9446. }
  9447. };
  9448. Blockly.Blocks.CocoRobo_dis_WiFi = {
  9449. init: function init() {
  9450. this.jsonInit({
  9451. inputsInline: !0,
  9452. nextStatement: null,
  9453. previousStatement: null,
  9454. colour: CategoryColors.Wifi,
  9455. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9456. tooltip: Blockly.Msg.CocoRobo_dis_WiFi_TOOLTIP,
  9457. message0: Blockly.Msg.CocoRobo_dis_WiFi_MESSAGE0
  9458. });
  9459. }
  9460. };
  9461. Blockly.Blocks.CocoRobo_wifi_channel = {
  9462. init: function init() {
  9463. this.jsonInit({
  9464. inputsInline: !0,
  9465. colour: CategoryColors.Wifi,
  9466. helpUrl: "",
  9467. tooltip: "",
  9468. message0: "%1",
  9469. output: "Number",
  9470. args0: [{
  9471. options: WiFi_channel,
  9472. type: "field_dropdown",
  9473. name: "channel"
  9474. }]
  9475. });
  9476. }
  9477. };
  9478. Blockly.Blocks.CocoRobo_enable_APWiFi = {
  9479. init: function init() {
  9480. this.jsonInit({
  9481. inputsInline: !0,
  9482. nextStatement: null,
  9483. previousStatement: null,
  9484. colour: CategoryColors.Wifi,
  9485. helpUrl: Blockly.Msg.CocoRobo_ENABLE_APWIFI_HELPURL,
  9486. tooltip: Blockly.Msg.CocoRobo_ENABLE_APWIFI_TOOLTIP,
  9487. message0: Blockly.Msg.CocoRobo_ENABLE_APWIFI_MESSAGE0,
  9488. args0: [{
  9489. check: "String",
  9490. type: "input_value",
  9491. name: "essid"
  9492. }, {
  9493. check: "String",
  9494. type: "input_value",
  9495. name: "password"
  9496. }, {
  9497. check: "Number",
  9498. type: "input_value",
  9499. name: "channel"
  9500. }]
  9501. });
  9502. }
  9503. };
  9504. Blockly.Blocks.CocoRobo_disable_APWiFi = {
  9505. init: function init() {
  9506. this.jsonInit({
  9507. inputsInline: !0,
  9508. nextStatement: null,
  9509. previousStatement: null,
  9510. colour: CategoryColors.Wifi,
  9511. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9512. tooltip: Blockly.Msg.CocoRobo_disable_APWiFi_TOOLTIP,
  9513. message0: Blockly.Msg.CocoRobo_disable_APWiFi_MESSAGE0
  9514. });
  9515. }
  9516. };
  9517. Blockly.Blocks.CocoRobo_seniverse_city_weather = {
  9518. init: function init() {
  9519. this.jsonInit({
  9520. inputsInline: !1,
  9521. colour: CategoryColors.Weather,
  9522. helpUrl: Blockly.Msg.CocoRobo_SENIVERSE_CITY_WEATHER_HELPURL,
  9523. tooltip: Blockly.Msg.CocoRobo_SENIVERSE_CITY_WEATHER_TOOLTIP,
  9524. message0: Blockly.Msg.CocoRobo_SENIVERSE_CITY_WEATHER_MESSAGE0,
  9525. output: "Array",
  9526. args0: [{
  9527. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_API_1, "api_1"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_API_2, "api_2"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_API_3, "api_3"]],
  9528. type: "field_dropdown",
  9529. name: "api"
  9530. }, {
  9531. type: "input_dummy"
  9532. }, {
  9533. check: "String",
  9534. type: "input_value",
  9535. name: "location"
  9536. }, {
  9537. type: "field_input",
  9538. name: "key",
  9539. text: "your_private_key"
  9540. }, {
  9541. type: "input_dummy"
  9542. }, {
  9543. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_LANGUAGE_1, "zh-Hans"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_LANGUAGE_2, "zh-Hant"]],
  9544. type: "field_dropdown",
  9545. name: "language"
  9546. }, {
  9547. type: "input_dummy"
  9548. }, {
  9549. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_UNIT_1, "c"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_UNIT_2, "f"]],
  9550. type: "field_dropdown",
  9551. name: "unit"
  9552. }]
  9553. });
  9554. }
  9555. };
  9556. Blockly.Blocks.CocoRobo_define_seniverse_weather = {
  9557. init: function init() {
  9558. this.jsonInit({
  9559. inputsInline: !0,
  9560. nextStatement: null,
  9561. previousStatement: null,
  9562. colour: CategoryColors.Weather,
  9563. helpUrl: Blockly.Msg.CocoRobo_DEFINE_SENIVERSE_WEATHER_HELPURL,
  9564. tooltip: Blockly.Msg.CocoRobo_DEFINE_SENIVERSE_WEATHER_TOOLTIP,
  9565. message0: Blockly.Msg.CocoRobo_DEFINE_SENIVERSE_WEATHER_MESSAGE0,
  9566. args0: [{
  9567. type: "field_input",
  9568. name: "var_name",
  9569. text: "w1"
  9570. }, {
  9571. check: "Array",
  9572. type: "input_value",
  9573. name: "info"
  9574. }]
  9575. });
  9576. }
  9577. };
  9578. Blockly.Blocks.CocoRobo_get_seniverse_weather_info = {
  9579. init: function init() {
  9580. this.jsonInit({
  9581. inputsInline: !0,
  9582. output: ["String", "Array"],
  9583. colour: CategoryColors.Weather,
  9584. helpUrl: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO_HELPURL,
  9585. tooltip: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO_TOOLTIP,
  9586. message0: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO_MESSAGE0,
  9587. args0: [{
  9588. type: "field_input",
  9589. name: "var_name",
  9590. text: "w1"
  9591. }, {
  9592. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_city_name, "name"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_city_id, "id"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_country, "country"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_path, "path"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_timezone, "timezone"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_timezone_offset, "timezone_offset"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_last_update_date, "last_update_date"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_last_update, "last_update"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_object, "object"]],
  9593. type: "field_dropdown",
  9594. name: "type"
  9595. }]
  9596. });
  9597. }
  9598. };
  9599. Blockly.Blocks.CocoRobo_get_seniverse_weather_info1 = {
  9600. init: function init() {
  9601. this.jsonInit({
  9602. inputsInline: !0,
  9603. output: "String",
  9604. colour: CategoryColors.Weather,
  9605. helpUrl: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO1_HELPURL,
  9606. tooltip: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO1_TOOLTIP,
  9607. message0: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO1_MESSAGE0,
  9608. args0: [{
  9609. type: "field_input",
  9610. name: "var_name",
  9611. text: "w1"
  9612. }, {
  9613. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_text, "text"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_code, "code"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_temperature, "temperature"]],
  9614. type: "field_dropdown",
  9615. name: "type"
  9616. }]
  9617. });
  9618. }
  9619. };
  9620. Blockly.Blocks.CocoRobo_get_seniverse_weather_info2 = {
  9621. init: function init() {
  9622. this.jsonInit({
  9623. inputsInline: !0,
  9624. output: "String",
  9625. colour: CategoryColors.Weather,
  9626. helpUrl: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO2_HELPURL,
  9627. tooltip: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO2_TOOLTIP,
  9628. message0: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO2_MESSAGE0,
  9629. args0: [{
  9630. type: "field_input",
  9631. name: "var_name",
  9632. text: "w1"
  9633. }, {
  9634. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_today, "0"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_tomorrow, "1"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_the_day_after_tomorrow, "2"]],
  9635. type: "field_dropdown",
  9636. name: "date"
  9637. }, {
  9638. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_high, "high"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_low, "low"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_text_day, "text_day"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_code_day, "code_day"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_text_night, "text_night"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_code_night, "code_night"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_wind_direction, "wind_direction"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_wind_direction_degree, "wind_direction_degree"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_wind_speed, "wind_speed"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_wind_scale, "wind_scale"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_date, "date"]],
  9639. type: "field_dropdown",
  9640. name: "type"
  9641. }]
  9642. });
  9643. }
  9644. };
  9645. Blockly.Blocks.CocoRobo_get_seniverse_weather_info3 = {
  9646. init: function init() {
  9647. this.jsonInit({
  9648. inputsInline: !0,
  9649. output: "String",
  9650. colour: CategoryColors.Weather,
  9651. helpUrl: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO3_HELPURL,
  9652. tooltip: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO3_TOOLTIP,
  9653. message0: Blockly.Msg.CocoRobo_GET_SENIVERSE_WEATHER_INFO3_MESSAGE0,
  9654. args0: [{
  9655. type: "field_input",
  9656. name: "var_name",
  9657. text: "w1"
  9658. }, {
  9659. options: [[Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_car_washing, "car_washing"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_dressing, "dressing"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_flu, "flu"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_sport, "sport"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_travel, "travel"], [Blockly.Msg.CocoRobo_SENIVERSE_WEATHER_uv, "uv"]],
  9660. type: "field_dropdown",
  9661. name: "type"
  9662. }]
  9663. });
  9664. }
  9665. };
  9666. Blockly.Blocks.CocoRobo_ntptime_settime = {
  9667. init: function init() {
  9668. this.jsonInit({
  9669. inputsInline: !0,
  9670. nextStatement: null,
  9671. previousStatement: null,
  9672. colour: CategoryColors.Wifi,
  9673. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9674. tooltip: Blockly.Msg.CocoRobo_ntptime_settime_TOOLTIP,
  9675. message0: Blockly.Msg.CocoRobo_ntptime_settime_MESSAGE0 // args0: [{
  9676. // name: "timezone",
  9677. // options: [[Blockly.Msg.CocoRobo_ntptime_timezone_E8, "8"], [Blockly.Msg.CocoRobo_ntptime_timezone_E9, "9"], [Blockly.Msg.CocoRobo_ntptime_timezone_E10, "10"], [Blockly.Msg.CocoRobo_ntptime_timezone_E11, "11"], [Blockly.Msg.CocoRobo_ntptime_timezone_E12, "12"], [Blockly.Msg.CocoRobo_ntptime_timezone_W12, "-12"], [Blockly.Msg.CocoRobo_ntptime_timezone_W11, "-11"], [Blockly.Msg.CocoRobo_ntptime_timezone_W10, "-10"], [Blockly.Msg.CocoRobo_ntptime_timezone_W9, "-9"], [Blockly.Msg.CocoRobo_ntptime_timezone_W8, "-8"], [Blockly.Msg.CocoRobo_ntptime_timezone_W7, "-7"], [Blockly.Msg.CocoRobo_ntptime_timezone_W6, "-6"], [Blockly.Msg.CocoRobo_ntptime_timezone_W5, "-5"], [Blockly.Msg.CocoRobo_ntptime_timezone_W4, "-4"], [Blockly.Msg.CocoRobo_ntptime_timezone_W3, "-3"], [Blockly.Msg.CocoRobo_ntptime_timezone_W2, "-2"], [Blockly.Msg.CocoRobo_ntptime_timezone_W1, "-1"], [Blockly.Msg.CocoRobo_ntptime_timezone_0, "0"], [Blockly.Msg.CocoRobo_ntptime_timezone_E1, "1"], [Blockly.Msg.CocoRobo_ntptime_timezone_E2, "2"], [Blockly.Msg.CocoRobo_ntptime_timezone_E3, "3"], [Blockly.Msg.CocoRobo_ntptime_timezone_E4, "4"], [Blockly.Msg.CocoRobo_ntptime_timezone_E5, "5"], [Blockly.Msg.CocoRobo_ntptime_timezone_E6, "6"], [Blockly.Msg.CocoRobo_ntptime_timezone_E7, "7"]],
  9678. // type: "field_dropdown"
  9679. // }, {
  9680. // type: "field_input",
  9681. // name: "server",
  9682. // text: "time.windows.com"
  9683. // }]
  9684. });
  9685. }
  9686. };
  9687. Blockly.Blocks.CocoRobo_wifi_clock = {
  9688. init: function init() {
  9689. this.jsonInit({
  9690. inputsInline: !0,
  9691. nextStatement: null,
  9692. previousStatement: null,
  9693. colour: rgbColor,
  9694. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9695. tooltip: Blockly.Msg.CocoRobo_wifi_clock_TOOLTIP,
  9696. message0: Blockly.Msg.CocoRobo_wifi_clock_MESSAGE0,
  9697. args0: [{
  9698. check: "Number",
  9699. type: "input_value",
  9700. name: "x"
  9701. }, {
  9702. check: "Number",
  9703. type: "input_value",
  9704. name: "y"
  9705. }, {
  9706. check: "Number",
  9707. type: "input_value",
  9708. name: "radius"
  9709. }]
  9710. });
  9711. }
  9712. };
  9713. Blockly.Blocks.CocoRobobox_sound = {
  9714. init: function init() {
  9715. this.jsonInit({
  9716. colour: "#e8795b",
  9717. output: "Number",
  9718. helpUrl: Blockly.Msg.CocoRobobox_sound_HELPURL,
  9719. tooltip: Blockly.Msg.CocoRobobox_sound_TOOLTIP,
  9720. message0: Blockly.Msg.CocoRobobox_sound_MESSAGE0
  9721. });
  9722. }
  9723. };
  9724. Blockly.Blocks.CocoRobobox_light = {
  9725. init: function init() {
  9726. this.jsonInit({
  9727. colour: CategoryColors.Box,
  9728. output: "Number",
  9729. helpUrl: Blockly.Msg.CocoRobobox_light_HELPURL,
  9730. tooltip: Blockly.Msg.CocoRobobox_light_TOOLTIP,
  9731. message0: Blockly.Msg.CocoRobobox_light_MESSAGE0
  9732. });
  9733. }
  9734. };
  9735. Blockly.Blocks.CocoRobobox_slider = {
  9736. init: function init() {
  9737. this.jsonInit({
  9738. inputsInline: !0,
  9739. output: "Number",
  9740. colour: CategoryColors.Box,
  9741. helpUrl: Blockly.Msg.CocoRoboBOX_SLIDER_HELPURL,
  9742. tooltip: Blockly.Msg.CocoRoboBOX_SLIDER_TOOLTIP,
  9743. message0: Blockly.Msg.CocoRoboBOX_SLIDER_MESSAGE0
  9744. });
  9745. }
  9746. };
  9747. Blockly.Blocks.CocoRobobox_5button = {
  9748. init: function init() {
  9749. this.jsonInit({
  9750. colour: CategoryColors.Box,
  9751. args0: [{
  9752. name: "button_val",
  9753. type: "field_dropdown",
  9754. options: [["\u2191", "'up'"], ["\u2193", "'down'"], ["\u2190", "'left'"], ["\u2192", "'right'"], ["OK", "'ok'"]]
  9755. }],
  9756. output: "Boolean",
  9757. message0: Blockly.Msg.CocoRoboBOX_5BUTTON_MESSAGE0,
  9758. tooltip: Blockly.Msg.CocoRoboBOX_5BUTTON_TOOLTIP,
  9759. helpUrl: Blockly.Msg.CocoRoboBOX_5BUTTON_HELPURL
  9760. });
  9761. }
  9762. };
  9763. Blockly.Blocks.CocoRobobox_ultrasonic = {
  9764. init: function init() {
  9765. this.jsonInit({
  9766. inputsInline: !0,
  9767. output: null,
  9768. colour: CategoryColors.Box,
  9769. helpUrl: Blockly.Msg.CocoRoboBOX_ULTRASONIC_HELPURL,
  9770. tooltip: Blockly.Msg.CocoRoboBOX_ULTRASONIC_TOOLTIP,
  9771. message0: Blockly.Msg.CocoRoboBOX_ULTRASONIC_MESSAGE0
  9772. });
  9773. }
  9774. };
  9775. Blockly.Blocks.CocoRobobox_Thehumanbodyinfrare = {
  9776. init: function init() {
  9777. this.jsonInit({
  9778. inputsInline: !0,
  9779. output: null,
  9780. colour: CategoryColors.Box,
  9781. helpUrl: Blockly.Msg.CocoRoboBOX_THEHUMANBODYINFRARE_HELPURL,
  9782. tooltip: Blockly.Msg.CocoRoboBOX_THEHUMANBODYINFRARE_TOOLTIP,
  9783. message0: Blockly.Msg.CocoRoboBOX_THEHUMANBODYINFRARE_MESSAGE0
  9784. });
  9785. }
  9786. };
  9787. Blockly.Blocks.CocoRobo_bme280_hum_tem_pre = {
  9788. init: function init() {
  9789. this.jsonInit({
  9790. colour: CategoryColors.Box,
  9791. args0: [{
  9792. name: "hum_tem_pre",
  9793. options: [[Blockly.Msg.CocoRobo_tem, "temperature"], [Blockly.Msg.CocoRobo_hum, "humidity"], [Blockly.Msg.CocoRobo_pre, "pressure"]],
  9794. type: "field_dropdown"
  9795. }],
  9796. output: "Number",
  9797. helpUrl: Blockly.Msg.CocoRobo_HELPURL,
  9798. tooltip: Blockly.Msg.CocoRobo_bme280_hum_tem_pre_TOOLTIP,
  9799. message0: Blockly.Msg.CocoRobo_bme280_hum_tem_pre_MESSAGE0
  9800. });
  9801. }
  9802. };
  9803. Blockly.Blocks.CocoRobobox_motor = {
  9804. init: function init() {
  9805. this.jsonInit({
  9806. inputsInline: !0,
  9807. nextStatement: null,
  9808. previousStatement: null,
  9809. colour: CategoryColors.Box,
  9810. helpUrl: Blockly.Msg.CocoRoboBOX_MOTOR_HELPURL,
  9811. tooltip: Blockly.Msg.CocoRoboBOX_MOTOR_TOOLTIP,
  9812. message0: Blockly.Msg.CocoRoboBOX_MOTOR_MESSAGE0,
  9813. args0: [{
  9814. check: "Number",
  9815. type: "input_value",
  9816. name: "speed"
  9817. }]
  9818. });
  9819. }
  9820. };
  9821. Blockly.Blocks.CocoRobobox_RGB_clear = {
  9822. init: function init() {
  9823. this.jsonInit({
  9824. inputsInline: !0,
  9825. nextStatement: null,
  9826. previousStatement: null,
  9827. type: "field_dropdown",
  9828. colour: CategoryColors.Box,
  9829. message0: Blockly.Msg.CocoRoboBOX_RGB_clear_MESSAGE0,
  9830. tooltip: Blockly.Msg.CocoRoboBOX_RGB_clear_TOOLTIP,
  9831. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_clear_HELPURL
  9832. });
  9833. }
  9834. };
  9835. Blockly.Blocks.CocoRobobox_RGB_pixel = {
  9836. init: function init() {
  9837. this.jsonInit({
  9838. inputsInline: !0,
  9839. nextStatement: null,
  9840. previousStatement: null,
  9841. colour: CategoryColors.Box,
  9842. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_pixel_HELPURL,
  9843. tooltip: Blockly.Msg.CocoRoboBOX_RGB_pixel_TOOLTIP,
  9844. message0: Blockly.Msg.CocoRoboBOX_RGB_pixel_MESSAGE0,
  9845. args0: [{
  9846. check: "Number",
  9847. type: "input_value",
  9848. name: "speed1"
  9849. }, {
  9850. check: "Number",
  9851. type: "input_value",
  9852. name: "speed2"
  9853. }, {
  9854. check: "Number",
  9855. type: "input_value",
  9856. name: "speed3"
  9857. }, {
  9858. check: "Number",
  9859. type: "input_value",
  9860. name: "speed4"
  9861. }, {
  9862. check: "Number",
  9863. type: "input_value",
  9864. name: "speed5"
  9865. }]
  9866. });
  9867. }
  9868. };
  9869. Blockly.Blocks.CocoRobobox_RGB_get_pixel = {
  9870. init: function init() {
  9871. this.jsonInit({
  9872. output: "Number",
  9873. colour: CategoryColors.Box,
  9874. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_get_pixel_HELPURL,
  9875. tooltip: Blockly.Msg.CocoRoboBOX_RGB_get_pixel_TOOLTIP,
  9876. message0: Blockly.Msg.CocoRoboBOX_RGB_get_pixel_MESSAGE0,
  9877. args0: [{
  9878. check: "Number",
  9879. type: "input_value",
  9880. name: "speed1"
  9881. }, {
  9882. check: "Number",
  9883. type: "input_value",
  9884. name: "speed2"
  9885. }]
  9886. });
  9887. }
  9888. };
  9889. Blockly.Blocks.CocoRobobox_RGB_ImageText = {
  9890. init: function init() {
  9891. this.jsonInit({
  9892. inputsInline: !0,
  9893. nextStatement: null,
  9894. previousStatement: null,
  9895. colour: CategoryColors.Box,
  9896. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_ImageText_HELPURL,
  9897. tooltip: Blockly.Msg.CocoRoboBOX_RGB_ImageText_TOOLTIP,
  9898. message0: Blockly.Msg.CocoRoboBOX_RGB_ImageText_MESSAGE0,
  9899. args0: [{
  9900. check: "String",
  9901. type: "input_value",
  9902. name: "speed1"
  9903. }, {
  9904. check: "Number",
  9905. type: "input_value",
  9906. name: "speed2"
  9907. }]
  9908. });
  9909. }
  9910. };
  9911. Blockly.Blocks.CocoRobobox_RGB_SetImage = {
  9912. init: function init() {
  9913. this.jsonInit({
  9914. colour: CategoryColors.Box,
  9915. args0: [{
  9916. type: "input_dummy"
  9917. }, {
  9918. name: "row0",
  9919. type: "input_value",
  9920. check: "String"
  9921. }, {
  9922. name: "row1",
  9923. type: "input_value",
  9924. check: "String"
  9925. }, {
  9926. name: "row2",
  9927. type: "input_value",
  9928. check: "String"
  9929. }, {
  9930. name: "row3",
  9931. type: "input_value",
  9932. check: "String"
  9933. }, {
  9934. name: "row4",
  9935. type: "input_value",
  9936. check: "String"
  9937. }],
  9938. output: "microbit_image",
  9939. helpUrl: Blockly.Msg.MICROBIT_IMAGE_CREATE1_HELPURL,
  9940. tooltip: Blockly.Msg.MICROBIT_IMAGE_CREATE1_TOOLTIP,
  9941. message0: Blockly.Msg.MICROBIT_IMAGE_CREATE1_MESSAGE0
  9942. });
  9943. }
  9944. };
  9945. Blockly.Blocks.CocoRobobox_RGB_Image = {
  9946. init: function init() {
  9947. this.jsonInit({
  9948. colour: CategoryColors.Box,
  9949. nextStatement: null,
  9950. previousStatement: null,
  9951. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_HELPURL,
  9952. tooltip: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_TOOLTIP,
  9953. message0: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_MESSAGE0,
  9954. args0: [{
  9955. check: ["microbit_image", "String"],
  9956. type: "input_value",
  9957. name: "image"
  9958. }]
  9959. });
  9960. }
  9961. };
  9962. Blockly.Blocks.CocoRobobox_RGB_ImageImport = {
  9963. init: function init() {
  9964. this.jsonInit({
  9965. colour: CategoryColors.Box,
  9966. inputsInline: !0,
  9967. output: "String",
  9968. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGEImport_HELPURL,
  9969. tooltip: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGEImport_TOOLTIP,
  9970. message0: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGEImport_MESSAGE0,
  9971. args0: [{
  9972. check: ["microbit_image", "String"],
  9973. type: "input_value",
  9974. name: "image"
  9975. }]
  9976. });
  9977. }
  9978. };
  9979. Blockly.Blocks.CocoRobobox_RGB_ImageCopy = {
  9980. init: function init() {
  9981. this.jsonInit({
  9982. colour: CategoryColors.Box,
  9983. inputsInline: !0,
  9984. output: "String",
  9985. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_Copy_HELPURL,
  9986. tooltip: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_Copy_TOOLTIP,
  9987. message0: Blockly.Msg.CocoRoboBOX_RGB_SHOW_IMAGE_Copy_MESSAGE0,
  9988. args0: [{
  9989. check: ["microbit_image", "String"],
  9990. type: "input_value",
  9991. name: "image"
  9992. }]
  9993. });
  9994. }
  9995. };
  9996. Blockly.Blocks.CocoRobobox_RGB_ImageCot = {
  9997. init: function init() {
  9998. this.jsonInit({
  9999. output: "String",
  10000. inputsInline: !0,
  10001. colour: CategoryColors.Box,
  10002. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_ImageCot_HELPURL,
  10003. tooltip: Blockly.Msg.CocoRoboBOX_RGB_ImageCot_TOOLTIP,
  10004. message0: Blockly.Msg.CocoRoboBOX_RGB_ImageCot_MESSAGE0,
  10005. args0: [{
  10006. check: ["microbit_image", "String"],
  10007. type: "input_value",
  10008. name: "image"
  10009. }, {
  10010. check: "Number",
  10011. type: "input_value",
  10012. name: "speed2"
  10013. }, {
  10014. check: "Number",
  10015. type: "input_value",
  10016. name: "speed3"
  10017. }, {
  10018. check: "Number",
  10019. type: "input_value",
  10020. name: "speed4"
  10021. }, {
  10022. check: "Number",
  10023. type: "input_value",
  10024. name: "speed5"
  10025. }]
  10026. });
  10027. }
  10028. };
  10029. Blockly.Blocks.CocoRobo_image_builtins = {
  10030. init: function init() {
  10031. this.jsonInit({
  10032. colour: CategoryColors.Box,
  10033. args0: [{
  10034. name: "image",
  10035. options: [[Blockly.Msg.MICROBIT_IMAGE_HEART, "HEART"], [Blockly.Msg.MICROBIT_IMAGE_HEART_SMALL, "HEART_SMALL"], [Blockly.Msg.MICROBIT_IMAGE_HAPPY, "HAPPY"], [Blockly.Msg.MICROBIT_IMAGE_SMILE, "SMILE"], [Blockly.Msg.MICROBIT_IMAGE_SAD, "SAD"], [Blockly.Msg.MICROBIT_IMAGE_CONFUSED, "CONFUSED"], [Blockly.Msg.MICROBIT_IMAGE_ANGRY, "ANGRY"], [Blockly.Msg.MICROBIT_IMAGE_ASLEEP, "ASLEEP"], [Blockly.Msg.MICROBIT_IMAGE_SUPRISED, "SURPRISED"], [Blockly.Msg.MICROBIT_IMAGE_SILLY, "SILLY"], [Blockly.Msg.MICROBIT_IMAGE_FABULOUS, "FABULOUS"], [Blockly.Msg.MICROBIT_IMAGE_MEH, "MEH"], [Blockly.Msg.MICROBIT_IMAGE_YES, "YES"], [Blockly.Msg.MICROBIT_IMAGE_NO, "NO"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK12, "CLOCK12"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK11, "CLOCK11"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK10, "CLOCK10"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK9, "CLOCK9"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK8, "CLOCK8"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK7, "CLOCK7"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK6, "CLOCK6"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK5, "CLOCK5"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK4, "CLOCK4"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK3, "CLOCK3"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK2, "CLOCK2"], [Blockly.Msg.MICROBIT_IMAGE_CLOCK1, "CLOCK1"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_N, "ARROW_N"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_NE, "ARROW_NE"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_E, "ARROW_E"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_SE, "ARROW_SE"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_S, "ARROW_S"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_SW, "ARROW_SW"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_W, "ARROW_W"], [Blockly.Msg.MICROBIT_IMAGE_ARROW_NW, "ARROW_NW"], [Blockly.Msg.MICROBIT_IMAGE_TRIANGLE, "TRIANGLE"], [Blockly.Msg.MICROBIT_IMAGE_TRIANGLE_LEFT, "TRIANGLE_LEFT"], [Blockly.Msg.MICROBIT_IMAGE_CHESSBOARD, "CHESSBOARD"], [Blockly.Msg.MICROBIT_IMAGE_DIAMOND, "DIAMOND"], [Blockly.Msg.MICROBIT_IMAGE_DIAMOND_SMALL, "DIAMOND_SMALL"], [Blockly.Msg.MICROBIT_IMAGE_SQUARE, "SQUARE"], [Blockly.Msg.MICROBIT_IMAGE_SQUARE_SMALL, "SQUARE_SMALL"], [Blockly.Msg.MICROBIT_IMAGE_RABBIT, "RABBIT"], [Blockly.Msg.MICROBIT_IMAGE_COW, "COW"], [Blockly.Msg.MICROBIT_IMAGE_MUSIC_CROTCHET, "MUSIC_CROTCHET"], [Blockly.Msg.MICROBIT_IMAGE_MUSIC_QUAVER, "MUSIC_QUAVER"], [Blockly.Msg.MICROBIT_IMAGE_MUSIC_QUAVERS, "MUSIC_QUAVERS"], [Blockly.Msg.MICROBIT_IMAGE_PITCHFORK, "PITCHFORK"], [Blockly.Msg.MICROBIT_IMAGE_XMAS, "XMAS"], [Blockly.Msg.MICROBIT_IMAGE_PACMAN, "PACMAN"], [Blockly.Msg.MICROBIT_IMAGE_TARGET, "TARGET"], [Blockly.Msg.MICROBIT_IMAGE_TSHIRT, "TSHIRT"], [Blockly.Msg.MICROBIT_IMAGE_ROLLERSKATE, "ROLLERSKATE"], [Blockly.Msg.MICROBIT_IMAGE_DUCK, "DUCK"], [Blockly.Msg.MICROBIT_IMAGE_HOUSE, "HOUSE"], [Blockly.Msg.MICROBIT_IMAGE_TORTOISE, "TORTOISE"], [Blockly.Msg.MICROBIT_IMAGE_BUTTERFLY, "BUTTERFLY"], [Blockly.Msg.MICROBIT_IMAGE_STICKFIGURE, "STICKFIGURE"], [Blockly.Msg.MICROBIT_IMAGE_GHOST, "GHOST"], [Blockly.Msg.MICROBIT_IMAGE_SWORD, "SWORD"], [Blockly.Msg.MICROBIT_IMAGE_GIRAFFE, "GIRAFFE"], [Blockly.Msg.MICROBIT_IMAGE_SKULL, "SKULL"], [Blockly.Msg.MICROBIT_IMAGE_UMBRELLA, "UMBRELLA"], [Blockly.Msg.MICROBIT_IMAGE_SNAKE, "SNAKE"]],
  10036. type: "field_dropdown"
  10037. }],
  10038. output: ["microbit_image", "Array"],
  10039. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_BUILTINS_HELPURL,
  10040. tooltip: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_BUILTINS_TOOLTIP,
  10041. message0: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_BUILTINS_MESSAGE0
  10042. });
  10043. }
  10044. };
  10045. Blockly.Blocks.CocoRobobox_image_shift = {
  10046. init: function init() {
  10047. this.jsonInit({
  10048. colour: CategoryColors.Box,
  10049. args0: [{
  10050. check: "microbit_image",
  10051. type: "input_value",
  10052. name: "image"
  10053. }, {
  10054. name: "shift",
  10055. options: [[Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_LEFT, "LEFT"], [Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_RIGHT, "RIGHT"], [Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_UP, "UP"], [Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_DOWN, "DOWN"]],
  10056. type: "field_dropdown"
  10057. }, {
  10058. check: "Number",
  10059. type: "input_value",
  10060. name: "pos"
  10061. }],
  10062. output: "microbit_image",
  10063. helpUrl: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_HELPURL,
  10064. tooltip: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_TOOLTIP,
  10065. message0: Blockly.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_MESSAGE0
  10066. });
  10067. }
  10068. };
  10069. Blockly.Blocks.CocoRobobox_triaxial_acceleration = {
  10070. init: function init() {
  10071. this.jsonInit({
  10072. inputsInline: !0,
  10073. output: null,
  10074. colour: CategoryColors.Box,
  10075. helpUrl: Blockly.Msg.CocoRoboBOX_TRIAXIAL_ACCELERATION_HELPURL,
  10076. tooltip: Blockly.Msg.CocoRoboBOX_TRIAXIAL_ACCELERATION_TOOLTIP,
  10077. message0: Blockly.Msg.CocoRoboBOX_TRIAXIAL_ACCELERATION_MESSAGE0,
  10078. args0: [{
  10079. options: [["X", "0"], ["Y", "1"], ["Z", "2"]],
  10080. type: "field_dropdown",
  10081. name: "enable"
  10082. }]
  10083. });
  10084. }
  10085. };
  10086. Blockly.Blocks.CocoRobobox_triaxial_angular_velocity = {
  10087. init: function init() {
  10088. this.jsonInit({
  10089. inputsInline: !0,
  10090. output: null,
  10091. colour: CategoryColors.Box,
  10092. helpUrl: Blockly.Msg.CocoRoboBOX_TRIAXIAL_AUGULAR_VELOCITY_HELPURL,
  10093. tooltip: Blockly.Msg.CocoRoboBOX_TRIAXIAL_AUGULAR_VELOCITY_TOOLTIP,
  10094. message0: Blockly.Msg.CocoRoboBOX_TRIAXIAL_AUGULAR_VELOCITY_MESSAGE0,
  10095. args0: [{
  10096. options: [["X", "0"], ["Y", "1"], ["Z", "2"]],
  10097. type: "field_dropdown",
  10098. name: "enable"
  10099. }]
  10100. });
  10101. }
  10102. };
  10103. Blockly.Blocks.CocoRobobox_euler_angle = {
  10104. init: function init() {
  10105. this.jsonInit({
  10106. inputsInline: !0,
  10107. output: null,
  10108. colour: CategoryColors.Box,
  10109. helpUrl: Blockly.Msg.CocoRoboBOX_EULER_ANGLE_HELPURL,
  10110. tooltip: Blockly.Msg.CocoRoboBOX_EULER_ANGLE_TOOLTIP,
  10111. message0: Blockly.Msg.CocoRoboBOX_EULER_ANGLE_MESSAGE0,
  10112. args0: [{
  10113. options: [["P", "0"], ["R", "1"], ["Y", "2"]],
  10114. type: "field_dropdown",
  10115. name: "enable"
  10116. }]
  10117. });
  10118. }
  10119. };
  10120. Blockly.Blocks.CocoRobobox_quaternion = {
  10121. init: function init() {
  10122. this.jsonInit({
  10123. inputsInline: !0,
  10124. output: null,
  10125. colour: CategoryColors.Box,
  10126. helpUrl: Blockly.Msg.CocoRoboBOX_QUATERNION_HELPURL,
  10127. tooltip: Blockly.Msg.CocoRoboBOX_QUATERNION_TOOLTIP,
  10128. message0: Blockly.Msg.CocoRoboBOX_QUATERNION_MESSAGE0,
  10129. args0: [{
  10130. options: [["W", "0"], ["X", "1"], ["Y", "2"], ["Z", "3"]],
  10131. type: "field_dropdown",
  10132. name: "enable"
  10133. }]
  10134. });
  10135. }
  10136. };
  10137. Blockly.Blocks.CocoRobo_AI2_Face_tracking = {
  10138. init: function init() {
  10139. this.jsonInit({
  10140. inputsInline: !0,
  10141. nextStatement: null,
  10142. previousStatement: null,
  10143. colour: CategoryColors.AI_face,
  10144. helpUrl: Blockly.Msg.CocoRobo_AI2_FACE_TRACKING_HELPURL,
  10145. tooltip: Blockly.Msg.CocoRobo_AI2_FACE_TRACKING_TOOLTIP,
  10146. message0: Blockly.Msg.CocoRobo_AI2_FACE_TRACKING_MESSAGE0
  10147. });
  10148. }
  10149. };
  10150. Blockly.Blocks.CocoRobo_AI2_Face_photograph_tracking = {
  10151. init: function init() {
  10152. this.jsonInit({
  10153. inputsInline: !0,
  10154. nextStatement: null,
  10155. previousStatement: null,
  10156. colour: CategoryColors.AI_face,
  10157. helpUrl: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_TRACKING_HELPURL,
  10158. tooltip: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_TRACKING_TOOLTIP,
  10159. message0: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_TRACKING_MESSAGE0
  10160. });
  10161. }
  10162. };
  10163. Blockly.Blocks.CocoRobo_AI2_result_face = {
  10164. init: function init() {
  10165. this.jsonInit({
  10166. output: "String",
  10167. colour: CategoryColors.AI_face,
  10168. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_HELPURL,
  10169. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_TOOLTIP,
  10170. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_MESSAGE0
  10171. });
  10172. }
  10173. };
  10174. Blockly.Blocks.CocoRobo_AI2_result_face_x = {
  10175. init: function init() {
  10176. this.jsonInit({
  10177. output: "String",
  10178. colour: CategoryColors.AI_face,
  10179. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_X_HELPURL,
  10180. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_X_TOOLTIP,
  10181. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_X_MESSAGE0
  10182. });
  10183. }
  10184. };
  10185. Blockly.Blocks.CocoRobo_AI2_result_face_y = {
  10186. init: function init() {
  10187. this.jsonInit({
  10188. output: "String",
  10189. colour: CategoryColors.AI_face,
  10190. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_Y_HELPURL,
  10191. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_Y_TOOLTIP,
  10192. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_Y_MESSAGE0
  10193. });
  10194. }
  10195. };
  10196. Blockly.Blocks.CocoRobo_AI2_result_face_w = {
  10197. init: function init() {
  10198. this.jsonInit({
  10199. output: "String",
  10200. colour: CategoryColors.AI_face,
  10201. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_W_HELPURL,
  10202. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_W_TOOLTIP,
  10203. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_W_MESSAGE0
  10204. });
  10205. }
  10206. };
  10207. Blockly.Blocks.CocoRobo_AI2_result_face_h = {
  10208. init: function init() {
  10209. this.jsonInit({
  10210. output: "String",
  10211. colour: CategoryColors.AI_face,
  10212. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_H_HELPURL,
  10213. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_H_TOOLTIP,
  10214. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_H_MESSAGE0
  10215. });
  10216. }
  10217. };
  10218. Blockly.Blocks.CocoRobo_AI2_result_face_value = {
  10219. init: function init() {
  10220. this.jsonInit({
  10221. output: "String",
  10222. colour: CategoryColors.AI_face,
  10223. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_VALUE_HELPURL,
  10224. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_VALUE_TOOLTIP,
  10225. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_VALUE_MESSAGE0
  10226. });
  10227. }
  10228. };
  10229. Blockly.Blocks.CocoRobo_AI2_result_face_objnum = {
  10230. init: function init() {
  10231. this.jsonInit({
  10232. output: "String",
  10233. colour: CategoryColors.AI_face,
  10234. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_OBJNUM_HELPURL,
  10235. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_OBJNUM_TOOLTIP,
  10236. message0: Blockly.Msg.CocoRobo_AI2_RESULT_FACE_OBJNUM_MESSAGE0
  10237. });
  10238. }
  10239. };
  10240. Blockly.Blocks.CocoRobo_AI2_20classid_tracking = {
  10241. init: function init() {
  10242. this.jsonInit({
  10243. inputsInline: !0,
  10244. nextStatement: null,
  10245. previousStatement: null,
  10246. colour: CategoryColors.AI_20classid,
  10247. helpUrl: Blockly.Msg.CocoRobo_AI2_20class_TRACKING_HELPURL,
  10248. tooltip: Blockly.Msg.CocoRobo_AI2_20class_TRACKING_TOOLTIP,
  10249. message0: Blockly.Msg.CocoRobo_AI2_20class_TRACKING_MESSAGE0
  10250. });
  10251. }
  10252. };
  10253. Blockly.Blocks.CocoRobo_AI2_20classid_photograph_tracking = {
  10254. init: function init() {
  10255. this.jsonInit({
  10256. inputsInline: !0,
  10257. nextStatement: null,
  10258. previousStatement: null,
  10259. colour: CategoryColors.AI_20classid,
  10260. helpUrl: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_20TRACKING_HELPURL,
  10261. tooltip: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_20TRACKING_TOOLTIP,
  10262. message0: Blockly.Msg.CocoRobo_AI2_PHOTOGRAPH_20TRACKING_MESSAGE0
  10263. });
  10264. }
  10265. };
  10266. Blockly.Blocks.CocoRobo_AI2_result_20class = {
  10267. init: function init() {
  10268. this.jsonInit({
  10269. output: "String",
  10270. colour: CategoryColors.AI_20classid,
  10271. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_HELPURL,
  10272. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_TOOLTIP,
  10273. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_MESSAGE0
  10274. });
  10275. }
  10276. };
  10277. Blockly.Blocks.CocoRobo_AI2_result_20class_x = {
  10278. init: function init() {
  10279. this.jsonInit({
  10280. output: "String",
  10281. colour: CategoryColors.AI_20classid,
  10282. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_X_HELPURL,
  10283. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_X_TOOLTIP,
  10284. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_X_MESSAGE0
  10285. });
  10286. }
  10287. };
  10288. Blockly.Blocks.CocoRobo_AI2_result_20class_y = {
  10289. init: function init() {
  10290. this.jsonInit({
  10291. output: "String",
  10292. colour: CategoryColors.AI_20classid,
  10293. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_Y_HELPURL,
  10294. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_Y_TOOLTIP,
  10295. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_Y_MESSAGE0
  10296. });
  10297. }
  10298. };
  10299. Blockly.Blocks.CocoRobo_AI2_result_20class_w = {
  10300. init: function init() {
  10301. this.jsonInit({
  10302. output: "String",
  10303. colour: CategoryColors.AI_20classid,
  10304. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_W_HELPURL,
  10305. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_W_TOOLTIP,
  10306. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_W_MESSAGE0
  10307. });
  10308. }
  10309. };
  10310. Blockly.Blocks.CocoRobo_AI2_result_20class_h = {
  10311. init: function init() {
  10312. this.jsonInit({
  10313. output: "String",
  10314. colour: CategoryColors.AI_20classid,
  10315. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_H_HELPURL,
  10316. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_H_TOOLTIP,
  10317. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_H_MESSAGE0
  10318. });
  10319. }
  10320. };
  10321. Blockly.Blocks.CocoRobo_AI2_result_20class_value = {
  10322. init: function init() {
  10323. this.jsonInit({
  10324. output: "String",
  10325. colour: CategoryColors.AI_20classid,
  10326. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_VALUE_HELPURL,
  10327. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_VALUE_TOOLTIP,
  10328. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_VALUE_MESSAGE0
  10329. });
  10330. }
  10331. };
  10332. Blockly.Blocks.CocoRobo_AI2_result_20class_objnum = {
  10333. init: function init() {
  10334. this.jsonInit({
  10335. output: "String",
  10336. colour: CategoryColors.AI_20classid,
  10337. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_OBJNUM_HELPURL,
  10338. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_OBJNUM_TOOLTIP,
  10339. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_OBJNUM_MESSAGE0
  10340. });
  10341. }
  10342. };
  10343. Blockly.Blocks.CocoRobo_AI2_result_20class_classid = {
  10344. init: function init() {
  10345. this.jsonInit({
  10346. output: "String",
  10347. colour: CategoryColors.AI_20classid,
  10348. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_CLASSID_HELPURL,
  10349. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_CLASSID_TOOLTIP,
  10350. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_CLASSID_MESSAGE0
  10351. });
  10352. }
  10353. };
  10354. Blockly.Blocks.CocoRobo_AI2_result_20class_index = {
  10355. init: function init() {
  10356. this.jsonInit({
  10357. output: "String",
  10358. colour: CategoryColors.AI_20classid,
  10359. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_INDEX_HELPURL,
  10360. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_INDEX_TOOLTIP,
  10361. message0: Blockly.Msg.CocoRobo_AI2_RESULT_20CLASS_INDEX_MESSAGE0
  10362. });
  10363. }
  10364. };
  10365. Blockly.Blocks.CocoRobo_AI2_number_discern = {
  10366. init: function init() {
  10367. this.jsonInit({
  10368. inputsInline: !0,
  10369. nextStatement: null,
  10370. previousStatement: null,
  10371. colour: CategoryColors.AI_number,
  10372. helpUrl: Blockly.Msg.CocoRobo_AI2_NUMBER_DISCERN_HELPURL,
  10373. tooltip: Blockly.Msg.CocoRobo_AI2_NUMBER_DISCERN_TOOLTIP,
  10374. message0: Blockly.Msg.CocoRobo_AI2_NUMBER_DISCERN_MESSAGE0
  10375. });
  10376. }
  10377. };
  10378. Blockly.Blocks.CocoRobo_AI2_number_result = {
  10379. init: function init() {
  10380. this.jsonInit({
  10381. inputsInline: !0,
  10382. nextStatement: null,
  10383. previousStatement: null,
  10384. colour: CategoryColors.AI_number,
  10385. helpUrl: Blockly.Msg.CocoRobo_AI2_RESULT_NUMBER_DISCERN_HELPURL,
  10386. tooltip: Blockly.Msg.CocoRobo_AI2_RESULT_NUMBER_DISCERN_TOOLTIP,
  10387. message0: Blockly.Msg.CocoRobo_AI2_RESULT_NUMBER_DISCERN_MESSAGE0
  10388. });
  10389. }
  10390. };
  10391. Blockly.Blocks.CocoRobo_AI_NumberDetect_all = {
  10392. init: function init() {
  10393. this.jsonInit({
  10394. output: "Number",
  10395. colour: CategoryColors.AI_number,
  10396. helpUrl: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ALL_HELPURL,
  10397. tooltip: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ALL_TOOLTIP,
  10398. message0: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ALL_MESSAGE0
  10399. });
  10400. }
  10401. };
  10402. Blockly.Blocks.CocoRobo_AI_NumberDetect_number = {
  10403. init: function init() {
  10404. this.jsonInit({
  10405. output: "Number",
  10406. colour: CategoryColors.AI_number,
  10407. helpUrl: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_NUMBER_HELPURL,
  10408. tooltip: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_NUMBER_TOOLTIP,
  10409. message0: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_NUMBER_MESSAGE0
  10410. });
  10411. }
  10412. };
  10413. Blockly.Blocks.CocoRobo_AI_NumberDetect_adience = {
  10414. init: function init() {
  10415. this.jsonInit({
  10416. output: "Number",
  10417. colour: CategoryColors.AI_number,
  10418. helpUrl: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ADIENCE_HELPURL,
  10419. tooltip: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ADIENCE_TOOLTIP,
  10420. message0: Blockly.Msg.CocoRobo_AI2_NUMBER_DETECT_ADIENCE_MESSAGE0
  10421. });
  10422. }
  10423. };
  10424. Blockly.Blocks.CocoRobo_AI_trace_color = {
  10425. init: function init() {
  10426. this.jsonInit({
  10427. inputsInline: !0,
  10428. output: "Number",
  10429. colour: CategoryColors.AI_color,
  10430. helpUrl: Blockly.Msg.CocoRobo_AI_TRACE_COLOR_HELPURL,
  10431. tooltip: Blockly.Msg.CocoRobo_AI_TRACE_COLOR_TOOLTIP,
  10432. message0: Blockly.Msg.CocoRobo_AI_TRACE_COLOR_MESSAGE0,
  10433. args0: [{
  10434. check: "Number",
  10435. type: "input_value",
  10436. name: "lab"
  10437. }, {
  10438. check: "Number",
  10439. type: "input_value",
  10440. name: "pixel"
  10441. }, {
  10442. check: "Number",
  10443. type: "input_value",
  10444. name: "area"
  10445. }]
  10446. });
  10447. }
  10448. };
  10449. Blockly.Blocks.CocoRobo_AI_trace_color_displayten = {
  10450. init: function init() {
  10451. this.jsonInit({
  10452. inputsInline: !0,
  10453. nextStatement: null,
  10454. previousStatement: null,
  10455. colour: CategoryColors.AI_color,
  10456. helpUrl: Blockly.Msg.CocoRobo_AI_TRACE_CILOR_DISPLAYTEN_HELPURL,
  10457. tooltip: Blockly.Msg.CocoRobo_AI_TRACE_CILOR_DISPLAYTEN_TOOLTIP,
  10458. message0: Blockly.Msg.CocoRobo_AI_TRACE_CILOR_DISPLAYTEN_MESSAGE0,
  10459. args0: [{
  10460. options: [[Blockly.Msg.CocoRobo_AI_TRACE_COLOR_RECTANGLE, "rectangle(blob.rect())"], [Blockly.Msg.CocoRobo_AI_TRACE_COLOR_CROSS, "cross(blob.cx(), blob.cy())"]],
  10461. type: "field_dropdown",
  10462. name: "number"
  10463. }]
  10464. });
  10465. }
  10466. };
  10467. Blockly.Blocks.CocoRobo_AI2_blob_all = {
  10468. init: function init() {
  10469. this.jsonInit({
  10470. output: "Number",
  10471. colour: CategoryColors.AI_color,
  10472. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_ALL_HELPURL,
  10473. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_ALL_TOOLTIP,
  10474. message0: Blockly.Msg.CocoRobo_AI_BLOB_ALL_MESSAGE0,
  10475. args0: [{
  10476. check: "Number",
  10477. type: "input_value",
  10478. name: "variables"
  10479. }]
  10480. });
  10481. }
  10482. };
  10483. Blockly.Blocks.CocoRobo_AI2_blob_x = {
  10484. init: function init() {
  10485. this.jsonInit({
  10486. output: "Number",
  10487. colour: CategoryColors.AI_color,
  10488. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_X_HELPURL,
  10489. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_X_TOOLTIP,
  10490. message0: Blockly.Msg.CocoRobo_AI_BLOB_X_MESSAGE0,
  10491. args0: [{
  10492. check: "Number",
  10493. type: "input_value",
  10494. name: "variables"
  10495. }]
  10496. });
  10497. }
  10498. };
  10499. Blockly.Blocks.CocoRobo_AI2_blob_y = {
  10500. init: function init() {
  10501. this.jsonInit({
  10502. output: "Number",
  10503. colour: CategoryColors.AI_color,
  10504. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_Y_HELPURL,
  10505. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_Y_TOOLTIP,
  10506. message0: Blockly.Msg.CocoRobo_AI_BLOB_Y_MESSAGE0,
  10507. args0: [{
  10508. check: "Number",
  10509. type: "input_value",
  10510. name: "variables"
  10511. }]
  10512. });
  10513. }
  10514. };
  10515. Blockly.Blocks.CocoRobo_AI2_blob_w = {
  10516. init: function init() {
  10517. this.jsonInit({
  10518. output: "Number",
  10519. colour: CategoryColors.AI_color,
  10520. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_W_HELPURL,
  10521. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_W_TOOLTIP,
  10522. message0: Blockly.Msg.CocoRobo_AI_BLOB_W_MESSAGE0,
  10523. args0: [{
  10524. check: "Number",
  10525. type: "input_value",
  10526. name: "variables"
  10527. }]
  10528. });
  10529. }
  10530. };
  10531. Blockly.Blocks.CocoRobo_AI2_blob_h = {
  10532. init: function init() {
  10533. this.jsonInit({
  10534. output: "Number",
  10535. colour: CategoryColors.AI_color,
  10536. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_H_HELPURL,
  10537. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_H_TOOLTIP,
  10538. message0: Blockly.Msg.CocoRobo_AI_BLOB_H_MESSAGE0,
  10539. args0: [{
  10540. check: "Number",
  10541. type: "input_value",
  10542. name: "variables"
  10543. }]
  10544. });
  10545. }
  10546. };
  10547. Blockly.Blocks.CocoRobo_AI2_blob_number = {
  10548. init: function init() {
  10549. this.jsonInit({
  10550. output: "Number",
  10551. colour: CategoryColors.AI_color,
  10552. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_NUMBER_HELPURL,
  10553. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_NUMBER_TOOLTIP,
  10554. message0: Blockly.Msg.CocoRobo_AI_BLOB_NUMBER_MESSAGE0,
  10555. args0: [{
  10556. check: "Number",
  10557. type: "input_value",
  10558. name: "variables"
  10559. }]
  10560. });
  10561. }
  10562. };
  10563. Blockly.Blocks.CocoRobo_AI2_blob_center_x = {
  10564. init: function init() {
  10565. this.jsonInit({
  10566. output: "Number",
  10567. colour: CategoryColors.AI_color,
  10568. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_X_HELPURL,
  10569. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_X_TOOLTIP,
  10570. message0: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_X_MESSAGE0,
  10571. args0: [{
  10572. check: "Number",
  10573. type: "input_value",
  10574. name: "variables"
  10575. }]
  10576. });
  10577. }
  10578. };
  10579. Blockly.Blocks.CocoRobo_AI2_blob_center_y = {
  10580. init: function init() {
  10581. this.jsonInit({
  10582. output: "Number",
  10583. colour: CategoryColors.AI_color,
  10584. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_Y_HELPURL,
  10585. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_Y_TOOLTIP,
  10586. message0: Blockly.Msg.CocoRobo_AI_BLOB_CENTER_Y_MESSAGE0,
  10587. args0: [{
  10588. check: "Number",
  10589. type: "input_value",
  10590. name: "variables"
  10591. }]
  10592. });
  10593. }
  10594. };
  10595. Blockly.Blocks.CocoRobo_AI2_blob_orthogon = {
  10596. init: function init() {
  10597. this.jsonInit({
  10598. output: "Number",
  10599. colour: CategoryColors.AI_color,
  10600. helpUrl: Blockly.Msg.CocoRobo_AI_BLOB_ORTHOGON_HELPURL,
  10601. tooltip: Blockly.Msg.CocoRobo_AI_BLOB_ORTHOGON_TOOLTIP,
  10602. message0: Blockly.Msg.CocoRobo_AI_BLOB_ORTHOGON_MESSAGE0,
  10603. args0: [{
  10604. check: "Number",
  10605. type: "input_value",
  10606. name: "variables"
  10607. }]
  10608. });
  10609. }
  10610. };
  10611. Blockly.Blocks.CocoRobo_AI_sensor_reset = {
  10612. init: function init() {
  10613. this.jsonInit({
  10614. inputsInline: !0,
  10615. nextStatement: null,
  10616. previousStatement: null,
  10617. colour: CategoryColors.AI_camera,
  10618. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_RESET_HELPURL,
  10619. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_RESET_TOOLTIP,
  10620. message0: Blockly.Msg.CocoRobo_AI_SENSOR_RESET_MESSAGE0
  10621. });
  10622. }
  10623. };
  10624. Blockly.Blocks.CocoRobo_AI_sensor_images = {
  10625. init: function init() {
  10626. this.jsonInit({
  10627. inputsInline: !0,
  10628. nextStatement: null,
  10629. previousStatement: null,
  10630. colour: CategoryColors.AI_camera,
  10631. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_IMAGES_HELPURL,
  10632. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_IMAGES_TOOLTIP,
  10633. message0: Blockly.Msg.CocoRobo_AI_SENSOR_IMAGES_MESSAGE0
  10634. });
  10635. }
  10636. };
  10637. Blockly.Blocks.CocoRobo_AI_sensor_enable = {
  10638. init: function init() {
  10639. this.jsonInit({
  10640. inputsInline: !0,
  10641. nextStatement: null,
  10642. previousStatement: null,
  10643. colour: CategoryColors.AI_camera,
  10644. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_ENABLE_HELPURL,
  10645. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_ENABLE_TOOLTIP,
  10646. message0: Blockly.Msg.CocoRobo_AI_SENSOR_ENABLE_MESSAGE0,
  10647. args0: [{
  10648. options: [[Blockly.Msg.CocoRobo_AI_SENSOR_ENABLE_START, "1"], [Blockly.Msg.CocoRobo_AI_SENSOR_ENABLE_STOP, "0"]],
  10649. type: "field_dropdown",
  10650. name: "enable"
  10651. }]
  10652. });
  10653. }
  10654. };
  10655. Blockly.Blocks.CocoRobo_AI_sensor_return = {
  10656. init: function init() {
  10657. this.jsonInit({
  10658. output: "Number",
  10659. colour: CategoryColors.AI_camera,
  10660. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_RETURN_HELPURL,
  10661. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_RETURN_TOOLTIP,
  10662. message0: Blockly.Msg.CocoRobo_AI_SENSOR_RETURN_MESSAGE0,
  10663. args0: [{
  10664. options: [["\u5206\u8FA8\u7387\u5BBD\u5EA6", "width"], ["\u5206\u8FA8\u7387\u9AD8\u5EA6", "height"], ["\u56FE\u50CF\u5E27\u683C\u5F0F", "format"], ["\u56FE\u50CF\u5E27\u5927\u5C0F", "size"]],
  10665. type: "field_dropdown",
  10666. name: "enable"
  10667. }]
  10668. });
  10669. }
  10670. };
  10671. Blockly.Blocks.CocoRobo_AI_sensor_sets = {
  10672. init: function init() {
  10673. this.jsonInit({
  10674. inputsInline: !0,
  10675. nextStatement: null,
  10676. previousStatement: null,
  10677. colour: CategoryColors.AI_camera,
  10678. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_SETS_HELPURL,
  10679. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_SETS_TOOLTIP,
  10680. message0: Blockly.Msg.CocoRobo_AI_SENSOR_SETS_MESSAGE0,
  10681. args0: [{
  10682. options: [[Blockly.Msg.CocoRobo_AI_SENSOR_SETS_CONTRAST, "contrast"], [Blockly.Msg.CocoRobo_AI_SENSOR_SETS_BRIGHTNESS, "brightness"], [Blockly.Msg.CocoRobo_AI_SENSOR_SETS_SATURATION, "saturation"]],
  10683. type: "field_dropdown",
  10684. name: "pattern"
  10685. }, {
  10686. options: [["-2", "-2"], ["-1", "-1"], ["0", "0"], ["1", "1"], ["2", "2"]],
  10687. type: "field_dropdown",
  10688. name: "number"
  10689. }]
  10690. });
  10691. }
  10692. };
  10693. Blockly.Blocks.CocoRobo_AI_sensor_auto_gain = {
  10694. init: function init() {
  10695. this.jsonInit({
  10696. inputsInline: !0,
  10697. nextStatement: null,
  10698. previousStatement: null,
  10699. colour: CategoryColors.AI_camera,
  10700. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_GAIN_HELPURL,
  10701. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_GAIN_TOOLTIP,
  10702. message0: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_GAIN_MESSAGE0,
  10703. args0: [{
  10704. options: [[Blockly.Msg.CocoRobo_OPEN, "1"], [Blockly.Msg.CocoRobo_CLOSE, "0"]],
  10705. type: "field_dropdown",
  10706. name: "enable"
  10707. }]
  10708. });
  10709. }
  10710. };
  10711. Blockly.Blocks.CocoRobo_AI_sensor_auto_whitebal = {
  10712. init: function init() {
  10713. this.jsonInit({
  10714. inputsInline: !0,
  10715. nextStatement: null,
  10716. previousStatement: null,
  10717. colour: CategoryColors.AI_camera,
  10718. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_WHITEBAL_HELPURL,
  10719. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_WHITEBAL_TOOLTIP,
  10720. message0: Blockly.Msg.CocoRobo_AI_SENSOR_AUTO_WHITEBAL_MESSAGE0,
  10721. args0: [{
  10722. options: [[Blockly.Msg.CocoRobo_OPEN, "True"], [Blockly.Msg.CocoRobo_CLOSE, "False"]],
  10723. type: "field_dropdown",
  10724. name: "enable"
  10725. }]
  10726. });
  10727. }
  10728. };
  10729. Blockly.Blocks.CocoRobo_AI_sensor_level_MI = {
  10730. init: function init() {
  10731. this.jsonInit({
  10732. inputsInline: !0,
  10733. nextStatement: null,
  10734. previousStatement: null,
  10735. colour: CategoryColors.AI_camera,
  10736. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_HELPURL,
  10737. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_TOOLTIP,
  10738. message0: Blockly.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_MESSAGE0,
  10739. args0: [{
  10740. options: [[Blockly.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_H, "hmirror"], [Blockly.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_V, "vflip"]],
  10741. type: "field_dropdown",
  10742. name: "select"
  10743. }, {
  10744. options: [[Blockly.Msg.CocoRobo_OPEN, "1"], [Blockly.Msg.CocoRobo_CLOSE, "0"]],
  10745. type: "field_dropdown",
  10746. name: "enable"
  10747. }]
  10748. });
  10749. }
  10750. };
  10751. Blockly.Blocks.CocoRobo_AI_sensor_pattern = {
  10752. init: function init() {
  10753. this.jsonInit({
  10754. inputsInline: !0,
  10755. nextStatement: null,
  10756. previousStatement: null,
  10757. colour: CategoryColors.AI_camera,
  10758. helpUrl: Blockly.Msg.CocoRobo_AI_SENSOR_PATTERN_HELPURL,
  10759. tooltip: Blockly.Msg.CocoRobo_AI_SENSOR_PATTERN_TOOLTIP,
  10760. message0: Blockly.Msg.CocoRobo_AI_SENSOR_PATTERN_MESSAGE0,
  10761. args0: [{
  10762. options: [[Blockly.Msg.CocoRobo_AI_SENSOR_PATTERN_GRAYSCALE, "GRAYSCALE"], [Blockly.Msg.CocoRobo_AI_SENSOR_PATTERN_COLOR, "RGB565"]],
  10763. type: "field_dropdown",
  10764. name: "yolo"
  10765. }]
  10766. });
  10767. }
  10768. };
  10769. Blockly.Blocks.CocoRobo_AI_lcd_init = {
  10770. init: function init() {
  10771. this.jsonInit({
  10772. inputsInline: !0,
  10773. nextStatement: null,
  10774. previousStatement: null,
  10775. colour: CategoryColors.AI_LCD,
  10776. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_INIT_HELPURL,
  10777. tooltip: Blockly.Msg.CocoRobo_AI_LCD_INIT_TOOLTIP,
  10778. message0: Blockly.Msg.CocoRobo_AI_LCD_INIT_MESSAGE0
  10779. });
  10780. }
  10781. };
  10782. Blockly.Blocks.CocoRobo_AI_lcd_text = {
  10783. init: function init() {
  10784. this.jsonInit({
  10785. inputsInline: !0,
  10786. nextStatement: null,
  10787. previousStatement: null,
  10788. colour: CategoryColors.AI_LCD,
  10789. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_TEXT_HELPURL,
  10790. tooltip: Blockly.Msg.CocoRobo_AI_LCD_TEXT_TOOLTIP,
  10791. message0: Blockly.Msg.CocoRobo_AI_LCD_TEXT_MESSAGE0,
  10792. args0: [{
  10793. check: "Number",
  10794. type: "input_value",
  10795. name: "x"
  10796. }, {
  10797. check: "Number",
  10798. type: "input_value",
  10799. name: "y"
  10800. }, {
  10801. check: "String",
  10802. type: "input_value",
  10803. name: "message"
  10804. }]
  10805. });
  10806. }
  10807. };
  10808. Blockly.Blocks.CocoRobo_AI_LCD_clearall = {
  10809. init: function init() {
  10810. this.jsonInit({
  10811. inputsInline: !0,
  10812. nextStatement: null,
  10813. previousStatement: null,
  10814. colour: CategoryColors.AI_LCD,
  10815. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_CLEAR_ALL_HELPURL,
  10816. tooltip: Blockly.Msg.CocoRobo_AI_LCD_CLEAR_ALL_TOOLTIP,
  10817. message0: Blockly.Msg.CocoRobo_AI_LCD_CLEAR_ALL_MESSAGE0
  10818. });
  10819. }
  10820. };
  10821. Blockly.Blocks.CocoRobo_AI_lcd_pixel_colour = {
  10822. init: function init() {
  10823. this.jsonInit({
  10824. inputsInline: !0,
  10825. nextStatement: null,
  10826. previousStatement: null,
  10827. colour: CategoryColors.AI_LCD,
  10828. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_PIXEL_COLOUR_HELPURL,
  10829. tooltip: Blockly.Msg.CocoRobo_AI_LCD_PIXEL_COLOUR_TOOLTIP,
  10830. message0: Blockly.Msg.CocoRobo_AI_LCD_PIXEL_COLOUR_MESSAGE0,
  10831. args0: [{
  10832. check: "Number",
  10833. type: "input_value",
  10834. name: "x"
  10835. }, {
  10836. check: "Number",
  10837. type: "input_value",
  10838. name: "y"
  10839. }, {
  10840. check: "Number",
  10841. type: "input_value",
  10842. name: "r"
  10843. }, {
  10844. check: "Number",
  10845. type: "input_value",
  10846. name: "g"
  10847. }, {
  10848. check: "Number",
  10849. type: "input_value",
  10850. name: "b"
  10851. }]
  10852. });
  10853. }
  10854. };
  10855. Blockly.Blocks.CocoRobo_AI_lcd_colour = {
  10856. init: function init() {
  10857. this.jsonInit({
  10858. inputsInline: !0,
  10859. nextStatement: null,
  10860. previousStatement: null,
  10861. colour: CategoryColors.AI_LCD,
  10862. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_COLOUR_HELPURL,
  10863. tooltip: Blockly.Msg.CocoRobo_AI_LCD_COLOUR_TOOLTIP,
  10864. message0: Blockly.Msg.CocoRobo_AI_LCD_COLOUR_MESSAGE0,
  10865. args0: [{
  10866. check: "Number",
  10867. type: "input_value",
  10868. name: "r"
  10869. }, {
  10870. check: "Number",
  10871. type: "input_value",
  10872. name: "g"
  10873. }, {
  10874. check: "Number",
  10875. type: "input_value",
  10876. name: "b"
  10877. }]
  10878. });
  10879. }
  10880. };
  10881. Blockly.Blocks.CocoRobo_AI_lcd_display = {
  10882. init: function init() {
  10883. this.jsonInit({
  10884. inputsInline: !0,
  10885. nextStatement: null,
  10886. previousStatement: null,
  10887. colour: CategoryColors.AI_LCD,
  10888. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_HELPURL,
  10889. tooltip: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_TOOLTIP,
  10890. message0: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_MESSAGE0
  10891. });
  10892. }
  10893. };
  10894. Blockly.Blocks.CocoRobo_AI_lcd_display_size = {
  10895. init: function init() {
  10896. this.jsonInit({
  10897. inputsInline: !0,
  10898. nextStatement: null,
  10899. previousStatement: null,
  10900. colour: CategoryColors.AI_LCD,
  10901. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_SIZE_HELPURL,
  10902. tooltip: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_SIZE_TOOLTIP,
  10903. message0: Blockly.Msg.CocoRobo_AI_LCD_DISPLAY_SIZE_MESSAGE0,
  10904. args0: [{
  10905. check: "Number",
  10906. type: "input_value",
  10907. name: "x"
  10908. }, {
  10909. check: "Number",
  10910. type: "input_value",
  10911. name: "y"
  10912. }, {
  10913. check: "Number",
  10914. type: "input_value",
  10915. name: "w"
  10916. }, {
  10917. check: "Number",
  10918. type: "input_value",
  10919. name: "h"
  10920. }]
  10921. });
  10922. }
  10923. };
  10924. Blockly.Blocks.CocoRobo_AI_lcd_show_image_erosion = {
  10925. init: function init() {
  10926. this.jsonInit({
  10927. inputsInline: !0,
  10928. nextStatement: null,
  10929. previousStatement: null,
  10930. colour: CategoryColors.AI_LCD,
  10931. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_EROSION_HELPURL,
  10932. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_EROSION_TOOLTIP,
  10933. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_EROSION_MESSAGE0,
  10934. args0: [{
  10935. check: "Number",
  10936. type: "input_value",
  10937. name: "x"
  10938. }]
  10939. });
  10940. }
  10941. };
  10942. Blockly.Blocks.CocoRobo_AI_lcd_show_image_middle = {
  10943. init: function init() {
  10944. this.jsonInit({
  10945. inputsInline: !0,
  10946. nextStatement: null,
  10947. previousStatement: null,
  10948. colour: CategoryColors.AI_LCD,
  10949. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MIDDLE_HELPURL,
  10950. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MIDDLE_TOOLTIP,
  10951. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MIDDLE_MESSAGE0,
  10952. args0: [{
  10953. check: "Number",
  10954. type: "input_value",
  10955. name: "size"
  10956. }, {
  10957. check: "Number",
  10958. type: "input_value",
  10959. name: "bias"
  10960. }]
  10961. });
  10962. }
  10963. };
  10964. Blockly.Blocks.CocoRobo_AI_lcd_show_image_mode = {
  10965. init: function init() {
  10966. this.jsonInit({
  10967. inputsInline: !0,
  10968. nextStatement: null,
  10969. previousStatement: null,
  10970. colour: CategoryColors.AI_LCD,
  10971. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MODE_HELPURL,
  10972. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MODE_TOOLTIP,
  10973. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_MODE_MESSAGE0,
  10974. args0: [{
  10975. check: "Number",
  10976. type: "input_value",
  10977. name: "size"
  10978. }]
  10979. });
  10980. }
  10981. };
  10982. Blockly.Blocks.CocoRobo_AI_lcd_show_image_indistinct = {
  10983. init: function init() {
  10984. this.jsonInit({
  10985. inputsInline: !0,
  10986. nextStatement: null,
  10987. previousStatement: null,
  10988. colour: CategoryColors.AI_LCD,
  10989. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_INDISTINCT_HELPURL,
  10990. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_INDISTINCT_TOOLTIP,
  10991. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_INDISTINCT_MESSAGE0,
  10992. args0: [{
  10993. check: "Number",
  10994. type: "input_value",
  10995. name: "size"
  10996. }]
  10997. });
  10998. }
  10999. };
  11000. Blockly.Blocks.CocoRobo_AI_lcd_show_image_cartoon = {
  11001. init: function init() {
  11002. this.jsonInit({
  11003. inputsInline: !0,
  11004. nextStatement: null,
  11005. previousStatement: null,
  11006. colour: CategoryColors.AI_LCD,
  11007. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_CARTOON_HELPURL,
  11008. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_CARTOON_TOOLTIP,
  11009. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_CARTOON_MESSAGE0,
  11010. args0: [{
  11011. check: "Number",
  11012. type: "input_value",
  11013. name: "size"
  11014. }, {
  11015. check: "Number",
  11016. type: "input_value",
  11017. name: "seed"
  11018. }, {
  11019. check: "Number",
  11020. type: "input_value",
  11021. name: "floating"
  11022. }]
  11023. });
  11024. }
  11025. };
  11026. Blockly.Blocks.CocoRobo_AI_lcd_show_image_3D = {
  11027. init: function init() {
  11028. this.jsonInit({
  11029. inputsInline: !0,
  11030. nextStatement: null,
  11031. previousStatement: null,
  11032. colour: CategoryColors.AI_LCD,
  11033. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_3D_HELPURL,
  11034. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_3D_TOOLTIP,
  11035. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_3D_MESSAGE0,
  11036. args0: [{
  11037. check: "Number",
  11038. type: "input_value",
  11039. name: "x_rotation"
  11040. }, {
  11041. check: "Number",
  11042. type: "input_value",
  11043. name: "y_rotation"
  11044. }, {
  11045. check: "Number",
  11046. type: "input_value",
  11047. name: "z_rotation"
  11048. }, {
  11049. check: "Number",
  11050. type: "input_value",
  11051. name: "x_translation"
  11052. }, {
  11053. check: "Number",
  11054. type: "input_value",
  11055. name: "y_translation"
  11056. }, {
  11057. check: "Number",
  11058. type: "input_value",
  11059. name: "zoom"
  11060. }]
  11061. });
  11062. }
  11063. };
  11064. Blockly.Blocks.CocoRobo_AI_LCD_show_REC = {
  11065. init: function init() {
  11066. this.jsonInit({
  11067. inputsInline: !0,
  11068. nextStatement: null,
  11069. previousStatement: null,
  11070. colour: CategoryColors.AI_LCD,
  11071. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_REC_HELPURL,
  11072. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_REC_TOOLTIP,
  11073. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_REC_MESSAGE0,
  11074. args0: [{
  11075. options: [[Blockly.Msg.CocoRobo_DISPLAY_HOLLOW, "False"], [Blockly.Msg.CocoRobo_DISPLAY_SOLID, "True"]],
  11076. type: "field_dropdown",
  11077. name: "solid"
  11078. }, {
  11079. check: "Number",
  11080. type: "input_value",
  11081. name: "thickness"
  11082. }, {
  11083. check: "Number",
  11084. type: "input_value",
  11085. name: "x"
  11086. }, {
  11087. check: "Number",
  11088. type: "input_value",
  11089. name: "y"
  11090. }, {
  11091. check: "Number",
  11092. type: "input_value",
  11093. name: "w"
  11094. }, {
  11095. check: "Number",
  11096. type: "input_value",
  11097. name: "h"
  11098. }, {
  11099. check: "Number",
  11100. type: "input_value",
  11101. name: "r"
  11102. }, {
  11103. check: "Number",
  11104. type: "input_value",
  11105. name: "g"
  11106. }, {
  11107. check: "Number",
  11108. type: "input_value",
  11109. name: "b"
  11110. }]
  11111. });
  11112. }
  11113. };
  11114. Blockly.Blocks.CocoRobo_AI_LCD_show_string = {
  11115. init: function init() {
  11116. this.jsonInit({
  11117. inputsInline: !0,
  11118. nextStatement: null,
  11119. previousStatement: null,
  11120. colour: CategoryColors.AI_LCD,
  11121. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_STRING_HELPURL,
  11122. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_STRING_TOOLTIP,
  11123. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_STRING_MESSAGE0,
  11124. args0: [{
  11125. check: "Number",
  11126. type: "input_value",
  11127. name: "x"
  11128. }, {
  11129. check: "Number",
  11130. type: "input_value",
  11131. name: "y"
  11132. }, {
  11133. check: "Number",
  11134. type: "input_value",
  11135. name: "w"
  11136. }, {
  11137. check: "Number",
  11138. type: "input_value",
  11139. name: "h"
  11140. }, {
  11141. check: "Number",
  11142. type: "input_value",
  11143. name: "r"
  11144. }, {
  11145. check: "Number",
  11146. type: "input_value",
  11147. name: "g"
  11148. }, {
  11149. check: "Number",
  11150. type: "input_value",
  11151. name: "b"
  11152. }, {
  11153. check: "Number",
  11154. type: "input_value",
  11155. name: "thickness"
  11156. }]
  11157. });
  11158. }
  11159. };
  11160. Blockly.Blocks.CocoRobo_AI_LCD_return_colour = {
  11161. init: function init() {
  11162. this.jsonInit({
  11163. output: "String",
  11164. colour: CategoryColors.AI_LCD,
  11165. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_return_colour_HELPURL,
  11166. tooltip: Blockly.Msg.CocoRobo_AI_LCD_return_colour_TOOLTIP,
  11167. message0: Blockly.Msg.CocoRobo_AI_LCD_return_colour_MESSAGE0,
  11168. args0: [{
  11169. check: "Number",
  11170. type: "input_value",
  11171. name: "x"
  11172. }, {
  11173. check: "Number",
  11174. type: "input_value",
  11175. name: "y"
  11176. }]
  11177. });
  11178. }
  11179. };
  11180. Blockly.Blocks.CocoRobo_AI_LCD_show_circle = {
  11181. init: function init() {
  11182. this.jsonInit({
  11183. inputsInline: !0,
  11184. nextStatement: null,
  11185. previousStatement: null,
  11186. colour: CategoryColors.AI_LCD,
  11187. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_CIRCLE_HELPURL,
  11188. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_CIRCLE_TOOLTIP,
  11189. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_CIRCLE_MESSAGE0,
  11190. args0: [{
  11191. options: [[Blockly.Msg.CocoRobo_DISPLAY_HOLLOW, "False"], [Blockly.Msg.CocoRobo_DISPLAY_SOLID, "True"]],
  11192. type: "field_dropdown",
  11193. name: "fill"
  11194. }, {
  11195. check: "Number",
  11196. type: "input_value",
  11197. name: "x"
  11198. }, {
  11199. check: "Number",
  11200. type: "input_value",
  11201. name: "y"
  11202. }, {
  11203. check: "Number",
  11204. type: "input_value",
  11205. name: "radius"
  11206. }, {
  11207. check: "Number",
  11208. type: "input_value",
  11209. name: "r"
  11210. }, {
  11211. check: "Number",
  11212. type: "input_value",
  11213. name: "g"
  11214. }, {
  11215. check: "Number",
  11216. type: "input_value",
  11217. name: "b"
  11218. }, {
  11219. check: "Number",
  11220. type: "input_value",
  11221. name: "thickness"
  11222. }]
  11223. });
  11224. }
  11225. };
  11226. Blockly.Blocks.CocoRobo_AI_lcd_text_most = {
  11227. init: function init() {
  11228. this.jsonInit({
  11229. inputsInline: !0,
  11230. nextStatement: null,
  11231. previousStatement: null,
  11232. colour: CategoryColors.AI_LCD,
  11233. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_TEXT_MOST_HELPURL,
  11234. tooltip: Blockly.Msg.CocoRobo_AI_LCD_TEXT_MOST_TOOLTIP,
  11235. message0: Blockly.Msg.CocoRobo_AI_LCD_TEXT_MOST_MESSAGE0,
  11236. args0: [{
  11237. check: "Number",
  11238. type: "input_value",
  11239. name: "x"
  11240. }, {
  11241. check: "Number",
  11242. type: "input_value",
  11243. name: "y"
  11244. }, {
  11245. check: "String",
  11246. type: "input_value",
  11247. name: "message"
  11248. }, {
  11249. check: "Number",
  11250. type: "input_value",
  11251. name: "r"
  11252. }, {
  11253. check: "Number",
  11254. type: "input_value",
  11255. name: "g"
  11256. }, {
  11257. check: "Number",
  11258. type: "input_value",
  11259. name: "b"
  11260. }, {
  11261. check: "Number",
  11262. type: "input_value",
  11263. name: "scale"
  11264. }]
  11265. });
  11266. }
  11267. };
  11268. Blockly.Blocks.CocoRobo_AI_LCD_show_ten_string = {
  11269. init: function init() {
  11270. this.jsonInit({
  11271. inputsInline: !0,
  11272. nextStatement: null,
  11273. previousStatement: null,
  11274. colour: CategoryColors.AI_LCD,
  11275. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_TEN_STRING_HELPURL,
  11276. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_TEN_STRING_TOOLTIP,
  11277. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_TEN_STRING_MESSAGE0,
  11278. args0: [{
  11279. check: "Number",
  11280. type: "input_value",
  11281. name: "x"
  11282. }, {
  11283. check: "Number",
  11284. type: "input_value",
  11285. name: "y"
  11286. }, {
  11287. check: "Number",
  11288. type: "input_value",
  11289. name: "r"
  11290. }, {
  11291. check: "Number",
  11292. type: "input_value",
  11293. name: "g"
  11294. }, {
  11295. check: "Number",
  11296. type: "input_value",
  11297. name: "b"
  11298. }, {
  11299. check: "Number",
  11300. type: "input_value",
  11301. name: "size"
  11302. }, {
  11303. check: "Number",
  11304. type: "input_value",
  11305. name: "thickness"
  11306. }]
  11307. });
  11308. }
  11309. };
  11310. Blockly.Blocks.CocoRobo_AI_LCD_show_arrows = {
  11311. init: function init() {
  11312. this.jsonInit({
  11313. inputsInline: !0,
  11314. nextStatement: null,
  11315. previousStatement: null,
  11316. colour: CategoryColors.AI_LCD,
  11317. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ARROWS_HELPURL,
  11318. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ARROWS_TOOLTIP,
  11319. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ARROWS_MESSAGE0,
  11320. args0: [{
  11321. check: "Number",
  11322. type: "input_value",
  11323. name: "x"
  11324. }, {
  11325. check: "Number",
  11326. type: "input_value",
  11327. name: "y"
  11328. }, {
  11329. check: "Number",
  11330. type: "input_value",
  11331. name: "w"
  11332. }, {
  11333. check: "Number",
  11334. type: "input_value",
  11335. name: "h"
  11336. }, {
  11337. check: "Number",
  11338. type: "input_value",
  11339. name: "r"
  11340. }, {
  11341. check: "Number",
  11342. type: "input_value",
  11343. name: "g"
  11344. }, {
  11345. check: "Number",
  11346. type: "input_value",
  11347. name: "b"
  11348. }, {
  11349. check: "Number",
  11350. type: "input_value",
  11351. name: "thickness"
  11352. }]
  11353. });
  11354. }
  11355. };
  11356. Blockly.Blocks.CocoRobo_AI_lcd_show_image_picture = {
  11357. init: function init() {
  11358. this.jsonInit({
  11359. inputsInline: !0,
  11360. nextStatement: null,
  11361. previousStatement: null,
  11362. colour: CategoryColors.AI_LCD,
  11363. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_PIRCTURE_HELPURL,
  11364. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_PIRCTURE_TOOLTIP,
  11365. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_PIRCTURE_MESSAGE0,
  11366. args0: [{
  11367. check: "String",
  11368. type: "input_value",
  11369. name: "message"
  11370. }]
  11371. });
  11372. }
  11373. };
  11374. Blockly.Blocks.CocoRobo_AI_lcd_show_image_heat = {
  11375. init: function init() {
  11376. this.jsonInit({
  11377. inputsInline: !0,
  11378. nextStatement: null,
  11379. previousStatement: null,
  11380. colour: CategoryColors.AI_LCD,
  11381. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_HELPURL,
  11382. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_TOOLTIP,
  11383. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_MESSAGE0,
  11384. args0: [{
  11385. options: [[Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_GRAYSCALE, "to_grayscale"], [Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_RAINBOW, "to_rainbow"], [Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_NEGATE, "negate"], [Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_INVERT, "invert"]],
  11386. type: "field_dropdown",
  11387. name: "enable"
  11388. }]
  11389. });
  11390. }
  11391. };
  11392. Blockly.Blocks.CocoRobo_AI_lcd_show_image_descartes = {
  11393. init: function init() {
  11394. this.jsonInit({
  11395. inputsInline: !0,
  11396. nextStatement: null,
  11397. previousStatement: null,
  11398. colour: CategoryColors.AI_LCD,
  11399. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_HELPURL,
  11400. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_TOOLTIP,
  11401. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_MESSAGE0,
  11402. args0: [{
  11403. options: [[Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_LINPOLAR, "linpolar"], [Blockly.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_LOGPOLAR, "logpolar"]],
  11404. type: "field_dropdown",
  11405. name: "enable"
  11406. }, {
  11407. options: [[Blockly.Msg.CocoRobo_CLOSE, "False"], [Blockly.Msg.CocoRobo_OPEN, "True"]],
  11408. type: "field_dropdown",
  11409. name: "select"
  11410. }]
  11411. });
  11412. }
  11413. };
  11414. Blockly.Blocks.CocoRobo_AI_lcd_show_ectype = {
  11415. init: function init() {
  11416. this.jsonInit({
  11417. inputsInline: !0,
  11418. nextStatement: null,
  11419. previousStatement: null,
  11420. colour: CategoryColors.AI_LCD,
  11421. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_HELPURL,
  11422. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_TOOLTIP,
  11423. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_MESSAGE0,
  11424. args0: [{
  11425. check: "String",
  11426. type: "input_value",
  11427. name: "message"
  11428. }, {
  11429. check: "Number",
  11430. type: "input_value",
  11431. name: "x"
  11432. }, {
  11433. check: "Number",
  11434. type: "input_value",
  11435. name: "y"
  11436. }, {
  11437. check: "Number",
  11438. type: "input_value",
  11439. name: "w"
  11440. }, {
  11441. check: "Number",
  11442. type: "input_value",
  11443. name: "h"
  11444. }]
  11445. });
  11446. }
  11447. };
  11448. Blockly.Blocks.CocoRobo_AI_lcd_show_ectype_show = {
  11449. init: function init() {
  11450. this.jsonInit({
  11451. inputsInline: !0,
  11452. nextStatement: null,
  11453. previousStatement: null,
  11454. colour: CategoryColors.AI_LCD,
  11455. helpUrl: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_SHOW_HELPURL,
  11456. tooltip: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_SHOW_TOOLTIP,
  11457. message0: Blockly.Msg.CocoRobo_AI_LCD_SHOW_ECTYPE_SHOW_MESSAGE0,
  11458. args0: [{
  11459. check: "Number",
  11460. type: "input_value",
  11461. name: "x"
  11462. }, {
  11463. check: "Number",
  11464. type: "input_value",
  11465. name: "y"
  11466. }, {
  11467. check: "Number",
  11468. type: "input_value",
  11469. name: "w"
  11470. }, {
  11471. check: "Number",
  11472. type: "input_value",
  11473. name: "h"
  11474. }]
  11475. });
  11476. }
  11477. };