From d58cf86d01b6ce0c81c391f698252603f4480917 Mon Sep 17 00:00:00 2001 From: jhlee Date: Tue, 19 Apr 2016 22:54:09 +0900 Subject: [PATCH 1/3] commit --- dist/entry.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/dist/entry.js b/dist/entry.js index 8ee7c6a4c1..98e9f5c874 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -842,8 +842,8 @@ Blockly.Blocks.arduino_toggle_led = {init:function() { this.setNextStatement(!0); }}; Entry.block.arduino_toggle_led = function(a, b) { - var c = b.getNumberValue("VALUE"), d = "on" == b.getField("OPERATOR") ? 255 : 0; - Entry.hw.setDigitalPortValue(c, d); + var c = b.getNumberValue("VALUE"), d = b.getField("OPERATOR"); + Entry.hw.setDigitalPortValue(c, "on" == d ? 255 : 0); return b.callReturn(); }; Blockly.Blocks.arduino_toggle_pwm = {init:function() { @@ -1921,10 +1921,10 @@ Entry.block.wait_second = function(a, b) { } b.isStart = !0; b.timeFlag = 1; - var c = b.getNumberValue("SECOND", b), c = 60 / (Entry.FPS || 60) * c * 1E3; + var c = b.getNumberValue("SECOND", b); setTimeout(function() { b.timeFlag = 0; - }, c); + }, 60 / (Entry.FPS || 60) * c * 1E3); return b; }; Blockly.Blocks.repeat_basic = {init:function() { @@ -12419,37 +12419,36 @@ Entry.Func.generateWsBlock = function(a, b, c) { e.init(d); d = e; d.values && (d = e.values.FIELD); - e = ''; - c = b = ""; + c = ''; + b = e = ""; var f = 0, g = 0; a.stringHash = {}; for (a.booleanHash = {};;) { switch(d.type) { case "function_field_label": - e += '", ">") + '">'; - c += d.fields.NAME; + c += '", ">") + '">'; + b += d.fields.NAME; break; case "function_field_boolean": var h = d.values.PARAM.hashId; - e += ''; - b += ''; + c += ''; + e += ''; a.booleanHash[h] = g; g++; - c += "\ub17c\ub9ac\uac12" + g; + b += "\ub17c\ub9ac\uac12" + g; break; case "function_field_string": - h = d.values.PARAM.hashId, e += '', b += '', a.stringHash[h] = f, f++, c += "\ubb38\uc790\uac12" + f; + h = d.values.PARAM.hashId, c += '', e += '', a.stringHash[h] = f, f++, b += "\ubb38\uc790\uac12" + f; } if (d.values && d.values.NEXT) { d = d.values.NEXT; } else { break; } - c += " "; + b += " "; } - a = '' + (e + "") + b + ""; - c || (c = "\ud568\uc218"); - return {block:Blockly.Xml.textToDom(a).childNodes[0], description:c}; + b || (b = "\ud568\uc218"); + return {block:Blockly.Xml.textToDom('' + (c + "") + e + "").childNodes[0], description:b}; }; Entry.HWMontior = {}; Entry.HWMonitor = function(a) { From e6e6b5eda4002930114b855d8aacaaf3b1c2bae1 Mon Sep 17 00:00:00 2001 From: jhlee Date: Thu, 21 Apr 2016 19:56:10 +0900 Subject: [PATCH 2/3] commit --- src/hw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw.js b/src/hw.js index 1841377d5f..d214c0a7d2 100644 --- a/src/hw.js +++ b/src/hw.js @@ -214,7 +214,7 @@ p.closeConnection = function() { }; p.downloadConnector = function() { - var url = "https://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe"; + var url = "http://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe"; var win = window.open(url, '_blank'); win.focus(); }; From d3e4bbb15d0fc6692687a150ab92288aff0a54ae Mon Sep 17 00:00:00 2001 From: jhlee Date: Thu, 21 Apr 2016 20:02:29 +0900 Subject: [PATCH 3/3] modified hw-donwload-url --- dist/entry.js | 2 +- dist/entry.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/entry.js b/dist/entry.js index 20159f86fc..a1c2a8547a 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -12757,7 +12757,7 @@ p.closeConnection = function() { this.socket && this.socket.close(); }; p.downloadConnector = function() { - window.open("https://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe", "_blank").focus(); + window.open("http://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe", "_blank").focus(); }; p.downloadSource = function() { window.open("http://play-entry.com/down/board.ino", "_blank").focus(); diff --git a/dist/entry.min.js b/dist/entry.min.js index 459dbf2828..6627e070d6 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -1185,7 +1185,7 @@ function(){a.socketType="WebSocket";a.initHardware(b)};b.onmessage=function(b){b p.retryConnect=function(){this.connectTrial=0;this.initSocket()};p.initHardware=function(a){this.socket=a;this.connectTrial=0;this.connected=!0;Entry.dispatchEvent("hwChanged");Entry.playground&&Entry.playground.object&&Entry.playground.setMenu(Entry.playground.object.objectType)};p.setDigitalPortValue=function(a,b){this.sendQueue[a]=b;this.removePortReadable(a)};p.getAnalogPortValue=function(a){return this.connected?this.portData["a"+a]:0}; p.getDigitalPortValue=function(a){if(!this.connected)return 0;this.setPortReadable(a);return void 0!==this.portData[a]?this.portData[a]:0};p.setPortReadable=function(a){this.sendQueue.readablePorts||(this.sendQueue.readablePorts=[]);var b=!1,c;for(c in this.sendQueue.readablePorts)if(this.sendQueue.readablePorts[c]==a){b=!0;break}b||this.sendQueue.readablePorts.push(a)}; p.removePortReadable=function(a){if(this.sendQueue.readablePorts||Array.isArray(this.sendQueue.readablePorts)){var b,c;for(c in this.sendQueue.readablePorts)if(this.sendQueue.readablePorts[c]==a){b=c;break}this.sendQueue.readablePorts=b?this.sendQueue.readablePorts.slice(0,b).concat(this.sendQueue.readablePorts.slice(b+1,this.sendQueue.readablePorts.length)):[]}};p.update=function(){this.socket&&1==this.socket.readyState&&this.socket.send(JSON.stringify(this.sendQueue))}; -p.updatePortData=function(a){this.portData=a;this.hwMonitor&&this.hwMonitor.update()};p.closeConnection=function(){this.socket&&this.socket.close()};p.downloadConnector=function(){window.open("https://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe","_blank").focus()};p.downloadSource=function(){window.open("http://play-entry.com/down/board.ino","_blank").focus()};p.setZero=function(){Entry.hw.hwModule&&Entry.hw.hwModule.setZero()}; +p.updatePortData=function(a){this.portData=a;this.hwMonitor&&this.hwMonitor.update()};p.closeConnection=function(){this.socket&&this.socket.close()};p.downloadConnector=function(){window.open("http://github.com/entrylabs/entry-hw/releases/download/1.1.4/Entry_HW_v1.1.4.exe","_blank").focus()};p.downloadSource=function(){window.open("http://play-entry.com/down/board.ino","_blank").focus()};p.setZero=function(){Entry.hw.hwModule&&Entry.hw.hwModule.setZero()}; p.checkDevice=function(a){void 0!==a.company&&(a=""+a.company+a.model,a!=this.selectedDevice&&(this.selectedDevice=a,this.hwModule=this.hwInfo[a],Entry.dispatchEvent("hwChanged"),Entry.toast.success(Lang.Menus.connect_hw,Lang.Menus.connect_message.replace("%1",Lang.Device[Entry.hw.hwModule.name]),!1)))};p.banHW=function(){var a=this.hwInfo,b;for(b in a)Entry.playground.blockMenu.banClass(a[b].name)};Entry.BlockModel=function(){Entry.Model(this)};Entry.BlockModel.prototype.schema={id:null,x:0,y:0,type:null,params:{},statements:{},prev:null,next:null,view:null};Entry.BlockRenderModel=function(){Entry.Model(this)};Entry.BlockRenderModel.prototype.schema={id:0,type:Entry.STATIC.BLOCK_RENDER_MODEL,x:0,y:0,width:0,height:0,magneting:!1};Entry.BoxModel=function(){Entry.Model(this)};Entry.BoxModel.prototype.schema={id:0,type:Entry.STATIC.BOX_MODEL,x:0,y:0,width:0,height:0};Entry.DragInstance=function(a){Entry.Model(this);this.set(a)};Entry.DragInstance.prototype.schema={type:Entry.STATIC.DRAG_INSTANCE,startX:0,startY:0,offsetX:0,offsetY:0,prev:null,height:0,mode:0,isNew:!1};Entry.ThreadModel=function(){Entry.Model(this)};Entry.ThreadModel.prototype.schema={id:0,type:Entry.STATIC.THREAD_MODEL,x:0,y:0,width:0,minWidth:0,height:0};Entry.Variable=function(a){Entry.assert("string"==typeof a.name,"Variable name must be given");this.name_=a.name;this.id_=a.id?a.id:Entry.generateHash();this.type=a.variableType?a.variableType:"variable";this.object_=a.object||null;this.isCloud_=a.isCloud||!1;var b=Entry.parseNumber(a.value);this.value_="number"==typeof b?b:a.value?a.value:0;"slide"==this.type&&(this.minValue_=a.minValue?a.minValue:0,this.maxValue_=a.maxValue?a.maxValue:100);a.isClone||(this.visible_=a.visible||"boolean"==typeof a.visible? a.visible:!0,this.x_=a.x?a.x:null,this.y_=a.y?a.y:null,"list"==this.type&&(this.width_=a.width?a.width:100,this.height_=a.height?a.height:120,this.array_=a.array?a.array:[],this.scrollPosition=0),this.BORDER=6,this.FONT="10pt NanumGothic")}; Entry.Variable.prototype.generateView=function(a){var b=this.type;if("variable"==b||"timer"==b||"answer"==b)this.view_=new createjs.Container,this.rect_=new createjs.Shape,this.view_.addChild(this.rect_),this.view_.variable=this,this.wrapper_=new createjs.Shape,this.view_.addChild(this.wrapper_),this.textView_=new createjs.Text("asdf",this.FONT,"#000000"),this.textView_.textBaseline="alphabetic",this.textView_.x=4,this.textView_.y=1,this.view_.addChild(this.textView_),this.valueView_=new createjs.Text("asdf",