');}", "_onLeave": "function(){$('.active_indicator').remove();}", "title": "Save to Robot Brain", "onMousedown": "console.debug('mousedown');", "onClick": "function(){CommunicationManager.saveToSlot(); return false;}", "type": "Container", "name": "save_to_robot_brain_button"}, {"styles": {"active": {"backgroundPosition": "-42px -120px"}, "hover": {"backgroundPosition": "-42px -60px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 0, "height": 40, "cursor": "pointer", "width": 39, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-42px 0px", "left": 38}}, "_onEnter": "function(){var active_block = $('#blocks_pad .block.active').first(); active_block.append('
');}", "_onLeave": "function(){$('.active_indicator').remove();}", "title": "Play Program", "onClick": "function(){CommunicationManager.play(); return false;}", "type": "Container", "name": "play_button"}, {"styles": {"active": {"backgroundPosition": "-81px -120px"}, "hover": {"backgroundPosition": "-81px -60px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 0, "height": 40, "cursor": "pointer", "width": 38, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-81px 0px", "left": 77}}, "type": "Container", "name": "stop_button", "onClick": "function(){CommunicationManager.stop(); return false;}", "title": "Stop Program"}, {"styles": {"active": {"backgroundPosition": "-4px -160px"}, "hover": {"backgroundPosition": "-4px -100px"}, "normal": {"backgroundRepeat": "no-repeat", "top": 40, "height": 19, "cursor": "pointer", "width": 115, "backgroundImage": "url(images/vex/play_download_stop_slots_sprite.png)", "backgroundPosition": "-4px -40px", "left": 0}}, "elements": [{"styles": {"normal": {"color": "#2c3d57", "height": "auto", "width": 95, "fontSize": 10, "marginTop": 1, "textAlign": "center", "textShadow": "0 1px 0 rgba(255,255,255,0.7)"}}, "text": "Select a Slot", "type": "FrameworkText", "onLoad": "Events.register('UpdateProgrammingSlot',function(slot){if(slot!=undefined){this.setText('Slot '+slot);}else{ this.setText('Select a Slot'); } },this);"}], "name": "SlotDropdown", "onClick": "function(){Events.register('UpdateProgrammingSlot',function(slot){this.slots={};if(slot!=undefined){this.slots[slot]=true;}},this); Events.broadcast('component.popoverShowContent', [this, {uid:'ui.saveToSlot.modk.it', modal:true, cancelable:true, saveButtonText:'OK', slots:this.slots, positions: ['bottom','left','right','top'] }, function(obj){Events.broadcast('UpdateProgrammingSlot',[obj.slot]); }, this]); }", "type": "Container", "id": "slot_dropdown"}], "type": "Container", "uid": "1.vex.iq.ui.downloadPlayStop.modk.it"}, "1.vex.iq.playTone.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.playTone.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "Plays a note for the selected duration. The duration can be a QUARTER, HALF, or WHOLE note.", "parameters": [{"type": "name", "description": "select a **note** from the list", "name": "note"}, {"type": "name", "description": "select a **duration** from the list", "name": "duration"}], "hint": "", "type": "StatementBlock", "name": "play note"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "play note", "type": "CodeElement", "value": "BRAIN.playTone("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["C1", "D1", "E1", "F1", "G1", "A1", "B1", "C2", "D2", "E2", "F2", "G2", "A2", "B2", "C3", "D3", "E3", "F3", "G3", "A3", "B3", "C4", "D4", "E4", "F4", "G4", "A4", "B4", "C5", "D5", "E5", "F5", "G5", "A5", "B5", "C6", "D6", "E6", "F6", "G6", "A6", "B6", "C7", "D7", "E7", "F7", "G7", "A7", "B7", "C8", "D8", "E8", "F8", "G8", "A8", "B8"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "C1"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "elements": [{"feed": "@id@.amounts", "values": ["QUARTER", "HALF", "WHOLE"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "HALF"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["playNote"], "sibling": null}, "1.motorOff.blocks.modk.it": {"category": "output", "uid": "1.motorOff.blocks.modk.it", "color": "blue", "docs": {"parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}], "type": "StatementBlock", "description": "The motorOff command turns off a motor.", "name": "motorOff", "hint": ""}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "motorOff", "type": "CodeElement", "value": "motorOff("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "MOTORComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorOff"], "sibling": null, "params": ["MOTOR1"]}, "1.vex.iq.drivetrainTurnDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/rotation-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainTurnDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "turn direction", "type": "CodeElement", "value": "turnDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Drivetrain** is turning.", "name": "direction", "hint": ""}, "enumValues": ["RIGHT", "LEFT", "NONE"], "tokens": ["drivetrainTurnDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inTurnDirection.values", "uid": "1.vex.iq.drivetrainTurnDirection.blocks.modk.it"}, "1.vex.iq.common.blocks.modk.it": {"blocks": [{"uid": "1.when.blocks.modk.it"}, {"uid": "1.broadcast.blocks.modk.it"}, {"uid": "1.forever.blocks.modk.it"}, {"uid": "1.repeat.blocks.modk.it"}, {"uid": "1.if.blocks.modk.it"}, {"uid": "1.if_else.blocks.modk.it"}, {"uid": "1.while.blocks.modk.it"}, {"uid": "1.wait.blocks.modk.it"}, {"uid": "1.break.blocks.modk.it"}, {"uid": "1.plus.blocks.modk.it"}, {"uid": "1.minus.blocks.modk.it"}, {"uid": "1.multiply.blocks.modk.it"}, {"uid": "1.divide.blocks.modk.it"}, {"uid": "1.greater.blocks.modk.it"}, {"uid": "1.lesser.blocks.modk.it"}, {"uid": "1.equals.blocks.modk.it"}, {"uid": "1.not.blocks.modk.it"}, {"uid": "1.and.blocks.modk.it"}, {"uid": "1.or.blocks.modk.it"}, {"uid": "1.math.blocks.modk.it"}, {"uid": "1.comment.blocks.modk.it"}], "excluded_blocks": [{"uid": "1.randomNumber.blocks.modk.it"}], "uid": "1.vex.iq.common.blocks.modk.it"}, "1.wait.blocks.modk.it": {"category": "control", "uid": "1.wait.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "*Waits* for a set amount of *time* (in seconds) before the blocks below run.", "parameters": [{"type": "num", "description": "Type a number, or use a variable. Time can be any positive number.", "name": "time"}], "hint": "Numbers with decimals are allowed. The smallest amount of time is 0.001 seconds.", "type": "StatementBlock", "name": "wait"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "wait", "type": "CodeElement", "value": "wait("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "editable": true, "value": "1", "color": "orange", "maxDecimals": 3, "allowChars": "0-9.", "validate": "if(this.value.split('.').length > 2){var newValue = this.value.split('.'); this.value = newValue.shift()+'.'+newValue.shift()+newValue; }", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"assetGlobals": {"params": {"1": "value"}}, "readonly": true, "elements": [{"values": ["sec"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "value": "sec"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["delay"], "sibling": null}, "1.not.blocks.modk.it": {"category": "operators", "groupElements": [{"text": "not", "type": "CodeElement", "value": "not("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "orange", "type": "BooleanArgument"}], "accepts": ["BooleanBlock"]}, {"type": "CodeElement", "value": ")"}], "uid": "1.not.blocks.modk.it", "color": "green", "docs": {"parameters": [{"type": "bool", "description": "Drag in an operator >, <, =, not, and, or.", "name": "condition"}], "description": "This block is true when the **condition** is false, and this block is false if the **condition** is true.", "name": "not", "hint": ""}, "extensionOf": "1.boolean.blocks.modk.it", "tokens": ["not"]}, "1.knob.crimpcards.hardware.modk.it": {"elements": [{"src": "images/hardware/knobcard_wires.png", "layer": "wires", "type": "SimpleImage", "top": "126px", "left": "386px"}, {"src": "images/hardware/knobcard_hardware_block.png", "layer": "base", "type": "SimpleImage", "top": "480px", "left": "325px"}], "uid": "1.knob.crimpcards.hardware.modk.it", "stateVars": {"draggable": true, "wires": true}, "hardwareComponents": [{"assetGlobals": {"wires": {"0": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED1"}, {"assetGlobals": {"wires": {"1": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED2"}, {"assetGlobals": {"wires": {"2": "wire"}}, "isInstance": true, "uid": "1.led.components.modk.it", "name": "LED3"}, {"assetGlobals": {"wires": {"3": "wire"}}, "isInstance": true, "uid": "1.knob.components.modk.it", "name": "KNOB1"}], "type": "GenericHardware", "thumbnail": "images/hardware/knobcard-tiny.png", "name": "Modkit KnobCard"}, "1.vibe.lilypad.components.modk.it": {"elements": [{"assetGlobals": {"componentImage": {"src": "src", "top": "top", "left": "left"}}, "position": "relative", "type": "SimpleImage"}, {"color": "blue", "top": "34px", "right": "-22px", "type": "ComponentWire", "elements": [{"feed": "digitalOutPinsListChange", "layer": "pins", "angle": 0, "assetGlobals": {"wire": "name"}, "top": "-3px", "values": [], "mode": "OUTPUT_COMPONENT", "type": "DigitalPin", "left": "15px"}]}, {"color": "black", "top": "60px", "right": "-22px", "type": "ComponentWire", "elements": [{"layer": "pins", "angle": 0, "name": "GND", "top": "-3px", "mode": "GROUND_COMPONENT", "type": "DigitalPin", "left": "15px"}]}], "blocks": [{"uid": "1.setVibration.blocks.modk.it"}], "uid": "1.vibe.lilypad.components.modk.it", "library": "1.vibe.library.modk.it", "hideBorder": true, "defaultName": "VIBE", "componentImage": {"src": "images/hardware/lilypad/lilypad_vibe_board.png", "top": "1px", "left": "1px"}, "stateVars": {"top": true, "wire": false, "name": true, "left": true}, "componentArray": "int vibeArray", "configuration": [{"type": "text", "value": "vibeSetup("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ","}, {"type": "objectVar", "value": "wire"}, {"type": "text", "value": ");"}], "type": "GenericComponent"}, "1.vex.iq.print.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.print.blocks.modk.it", "settings": {"widthAuto": true, "width": "5", "justification": "LEFT_JUSTIFIED", "plus": "NO_PLUS_SIGN", "decimals": "3"}, "color": "blue", "docs": {"category": "output", "description": "*Print* letters and numbers on the **Brain's LCD** screen. ", "parameters": [{"type": "num bool enum string", "description": "Type a message or drag in a variable.", "name": "message"}], "hint": "The *print* command moves the text entry point to the end of whatever was printed, just like when you are typing in a word processor.", "type": "StatementBlock", "name": "print"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "print ", "type": "CodeElement", "value": "BRAIN.print("}, {"onAddSubBlock": "if(this.subBlock.type=='NumberBlock'){this.topLevelWidget.showConfigButton=true; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]); }", "onLoad": "if(Boolean(this.subBlock)){if(this.subBlock.type=='NumberBlock'){this.topLevelWidget.showConfigButton=true; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]);}}", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": 30, "value": "Hello", "color": "blue", "allowChars": "A-Za-z0-9 _\\.\\-\\(\\)\\*&\\^%\\$\\#\\@\\!\\+\\=\\:\\;\\,\\<\\>\\?\\/\\{\\}\\[\\]\\|\\`\\~", "type": "StringArgument"}], "assetGlobals": {"subBlocks": {"1": "subBlock"}}, "accepts": ["NumberBlock", "BooleanBlock", "EnumBlock.rotaryDirection", "EnumBlock.color"], "onRemoveSubBlock": "this.topLevelWidget.showConfigButton=false; Events.broadcast(this.topLevelWidget.id+'.changeConfigButton',[]); ", "type": "BlockHolder"}, {"styles": {"shown": {"styleCondition": "this.topLevelWidget.showConfigButton == true", "display": "block", "visibility": "visible"}, "normal": {"bottom": 0, "visibility": "hidden", "height": 21, "width": 25, "marginLeft": 6, "marginRight": 1, "position": "relative", "display": "none", "left": 0}}, "onLoad": " Events.register(this.topLevelWidget.id+'.changeConfigButton',function(){this.testStyleConditions();},this); this.getCode=function(){var settings = this.settingsPopover.settings; var width=settings.width; if(Boolean(settings.widthAuto)){width='0';} return ','+settings.justification+','+width+','+settings.plus+','+settings.decimals;};if(Boolean(this.topLevelWidget.settings)){this.settingsPopover = modkitNamespace.AssetFactory.loadAsset({'type':'SettingsPopover','settings':{'uid':'1.vex.iq.settingsPrint.blocks.modk.it','justification':this.topLevelWidget.settings.justification, 'width':this.topLevelWidget.settings.width, 'widthAuto':this.topLevelWidget.settings.widthAuto,'plus':this.topLevelWidget.settings.plus, 'decimals':this.topLevelWidget.settings.decimals}});}else{ this.settingsPopover = modkitNamespace.AssetFactory.loadAsset({'type':'SettingsPopover','settings':{'uid':'1.vex.iq.settingsPrint.blocks.modk.it'}}); } this.topLevelWidget.settingsPopover = this.settingsPopover; this.settingsPopover.callback = function(oldSettings,newSettings,isHidden){if(this.topLevelWidget.settings==undefined){this.topLevelWidget.settings={};} for(var setting in newSettings){if (setting!='uid'){ this.topLevelWidget.settings[setting]=newSettings[setting];} } if (Boolean(this.$markup.parents('.block').last().get(0).blockObject)) { if (Boolean(this.$markup.parents('.block').last().get(0).blockObject.container)) {this.$markup.parents('.block').last().get(0).blockObject.container.codeUpdate();}}}; this.settingsPopover.context = this;this.testStyleConditions();", "elements": [], "name": "TestConfigButton", "type": "ConfigButton", "onClick": "function(){ this.settingsPopover.showPopover(this);}", "htmlClass": "print_settings_button"}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["print"], "sibling": null, "params": ["HELLO"], "stateVars": {"settings": true, "top": true, "subBlocks": false, "sibling": false, "params": false, "left": true}}, "1.vex.iq.setMotorSpeed.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMotorSpeed.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-150 rpm", "type": "num", "description": "Select from the list, type a number, or use a variable. Speed ranges from +100% to -100%, and from +120 to -120 RPM.", "name": "speed"}], "type": "StatementBlock", "description": "*Set velocity* sets the velocity of the __COMPONENT__ in percent or revolutions per minute (RPM). Velocity has both speed and direction. The number entered is the speed. The positive (+) or negative (-) sign sets direction. You can ignore the sign and just enter posative numbers, then set the direction as needed.", "name": "set velocity", "hint": "Negative **speed** will go in the opposite direction that is selected. Numbers with decimals are allowed."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set velocity to", "type": "CodeElement", "value": "setSpeed("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"onLoad": "Events.register(this.block.id+'_rangeMinMax',function(min,max){this.rangeMin=min;this.rangeMax=max;this.testAllowChars();},this);", "elements": [{"feed": "@id@.speeds", "values": ["0", "25", "50", "75", "100"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "50", "color": "darkblue", "readonly": false, "rangeMin": -100, "type": "NumberArgument", "allowChars": "0-9\\-", "rangeMax": 100, "_onBlur": "console.log(this.value);"}], "accepts": ["NumberBlock"]}, {"text": "", "type": "CodeElement", "value": ","}, {"_hideCodeView": true, "code": "SPEED_PERCENT", "assetGlobals": {"params": {"1": "value"}}, "value": "%", "readonly": true, "elements": [{"values": [{"trigger": "Events.broadcast(this.container.container.container.block.id+'_rangeMinMax',[-100,100]); Events.broadcast(this.container.container.container.block.id+'.speeds',[['0','25','50','75','100']]);", "code": "SPEED_PERCENT", "name": "%", "value": "%"}, {"trigger": "Events.broadcast(this.container.container.container.block.id+'_rangeMinMax',[-120,120]);Events.broadcast(this.container.container.container.block.id+'.speeds',[['0','25','50','80','100','120']]);", "code": "RPM", "name": "RPM", "value": "RPM"}], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}, "ui.login.modk.it": {"styles": {"hide": {"styleCondition": "pyInterface =='cfe'", "display": "none", "visibility": "hidden"}, "normal": {"_width": "110px", "height": 46, "width": 46, "boxFloat": "right", "marginRight": "10px", "position": "relative", "marginTop": "8px"}}, "onLoad": "this.testStyleConditions(); Events.register('SignedInOut', function(status,email){ if(status=='signed_in'){ this.signedIn = true; this.$markup.find('.user_name').html(((email.length > 20) ? email.split('@')[0] : email) + '
'); this.$markup.attr('title', email);} if(status=='signed_out'){ this.signedIn = false; this.$markup.find('.user_name').html('Sign In'); } },this);", "uid": "ui.login.modk.it", "type": "HTMLContainer", "html": "
", "onClick": "function(){ if(this.signedIn == true){Events.broadcast('component.popoverShowContent', [this, {uid:'ui.logoutPopover.modk.it', modal:false, cancelable:true, loggedIn:false, positions: ['bottom','left','right','top'] }, this]); }else{ Events.broadcast('component.popoverShowContent', [this, {uid:'ui.loginPopover.modk.it', modal:false, cancelable:true, loggedIn:false, positions: ['bottom','left','right','top'] }, this]);}}", "htmlClass": "user overflow_visible", "name": "LoaderLogin"}, "ui.projectListing.modk.it": {"styles": {"selected": {"zIndex": 998}, "hover": {"zIndex": 999}, "push_left": {"styleCondition": "(this.number%2 == 1 && this.$markup.hasClass('selected'))", "_left": -100}, "normal": {"zIndex": "auto", "float": "left", "transition": "left 300ms ease-in-out", "borderRadius": 3, "marginBottom": 8, "height": 134, "cursor": "pointer", "width": 335, "marginLeft": 8, "background": "transparent", "marginRight": 8, "position": "relative", "marginTop": 8, "border": "3px solid transparent", "left": 0}}, "onLoad": "Events.register('SelectProjectToLoad', function(projectID){ if(projectID==this.id){ this.elements[0].$markup.addClass('selected'); this.$markup.addClass('selected'); }else{ this.elements[0].$markup.removeClass('selected'); this.$markup.removeClass('selected'); }; this.testStyleConditions(); }, this);", "elements": [{"styles": {"hover": {"opacity": "1", "styleCondition": "container.hover", "display": "block", "visibility": "visible"}, "selected": {"opacity": "1", "_border": "3px solid rgba(35, 124, 245, 0.4)", "_backgroundColor": "rgba(141,206,252,0.3)", "visibility": "visible", "backgroundColor": "rgb(214, 233, 247)", "border": "3px solid rgb(161, 196, 245)", "display": "block"}, "normal": {"opacity": "0", "_border": "3px solid rgba(35, 124, 245, .7)", "_backgroundColor": "rgba(141,206,252,0.4)", "top": -3, "transition": "all 300ms ease-in-out", "visibility": "hidden", "height": "134px !important", "padding": 0, "width": "340px !important", "backgroundColor": "rgb(203, 229, 248)", "position": "absolute", "border": "3px solid rgb(97, 160, 245)", "display": "none", "borderRadius": 3, "left": -3}}, "htmlClass": "selection_box", "elements": [{"styles": {"selected": {"opacity": 1, "styleCondition": "container.selected", "display": "block", "visibility": "visible"}, "normal": {"transition": "opacity 300ms ease-in-out", "opacity": 0, "right": 10, "fontWeight": "bold", "top": 55, "float": "left", "visibility": "hidden", "height": "auto", "width": 90, "fontSize": 15, "position": "absolute", "display": "none"}}, "name": "ProjectOpenButton", "text": "
open ", "onClick": "function(evt){StateManager.doLoad({'UserID': this.topLevelWidget.userID,'ProjectID': this.topLevelWidget.projectID}); }", "_onClick": "function(evt){console.debug('open project', this.container.id)}", "type": "FrameworkButton"}, {"styles": {"selected": {"opacity": 1, "styleCondition": "container.selected", "display": "block", "visibility": "visible"}, "normal": {"transition": "opacity 300ms ease-in-out", "opacity": 0, "right": 10, "fontWeight": "bold", "top": 90, "float": "left", "visibility": "hidden", "height": "auto", "width": 90, "fontSize": 15, "position": "absolute", "display": "none"}}, "name": "ProjectDeleteButton", "text": "
delete", "onClick": "function(evt){ this.setText('deleting...');this.container.elements[0].hide(); StateManager.doDelete({'UserID': this.topLevelWidget.userID,'ProjectID': this.topLevelWidget.projectID},function(project){this.topLevelWidget.remove(500);},this );}", "_onClick": "function(evt){console.debug('delete project', this.container.id)}", "type": "FrameworkButton"}], "type": "Container", "onLoad": "Events.register('SelectProjectToLoad', function(projectID){});"}, {"styles": {"normal": {"top": 0, "left": 0}}, "src": "images/vex/project_default-128x128.jpg", "type": "Image"}, {"assetGlobals": {"projectName": "text"}, "text": "Project Name", "styles": {"normal": {"comment": ".9 below is somehow necessary to avoid text from being rendered invisible on safari", "opacity": 0.9, "whiteSpace": "nowrap", "top": 16, "transition": "all 300ms ease-in-out", "fontWeight": "bold", "fontSize": 20, "max-width": 195, "overflow": "hidden", "left": 140}}, "type": "FrameworkText"}, {"assetGlobals": {"projectDate": "text"}, "text": "date", "styles": {"normal": {"top": 40, "fontSize": 12, "whiteSpace": "nowrap", "left": 140}}, "type": "FrameworkText"}, {"styles": {"normal": {"top": 60, "left": 140}}, "src": "images/indicator_code-30x22.png", "type": "Image"}, {"assetGlobals": {"projectCodeCount": "text"}, "text": "", "styles": {"normal": {"fontWeight": "bold", "top": 60, "fontSize": 12, "whiteSpace": "nowrap", "left": 170}}, "type": "FrameworkText"}, {"styles": {"normal": {"top": 84, "left": 140}}, "src": "images/vex/indicator_parts-27x19.png", "type": "Image"}, {"assetGlobals": {"projectPartCount": "text"}, "text": "", "styles": {"normal": {"fontWeight": "bold", "top": 87, "fontSize": 12, "whiteSpace": "nowrap", "left": 170}}, "type": "FrameworkText"}, {"assetGlobals": {"projectTags": "text"}, "text": "Tags", "hidden": true, "type": "FrameworkText", "styles": {"normal": {"whiteSpace": "nowrap", "fontWeight": "bold", "top": 100, "visible": "hidden", "fontSize": 12, "display": "none", "left": 140}}}], "uid": "ui.projectListing.modk.it", "_onMouseover": "this.elements[0].$markup.addClass('hover');", "_onMouseout": "this.elements[0].$markup.removeClass('hover');", "number": 0, "stateVars": {"projectID": true, "projectName": true, "projectTags": true, "userID": true, "projectCodeCount": true, "projectDate": true, "projectPartCount": true}, "onClick": "function(evt){Events.broadcast('SelectProjectToLoad', [this.id]);}", "_onClick": "function(evt){ for(var pr in this.container.elements){ console.debug(pr); pr.testStyleConditions();} this.$markup.add('selected'); pr.testStyleConditions();}", "type": "Container"}, "1.vex.iq.drivetrainDriveDirection.blocks.modk.it": {"category": "input", "enumIcon": "images/vex/enum_icons/direction-white.png", "extensionOf": "1.enum.blocks.modk.it", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.drivetrainDriveDirection.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "drive direction", "type": "CodeElement", "value": "driveDirection("}, {"type": "CodeElement", "value": ")"}], "color": "purple", "docs": {"category": "input", "type": "EnumBlock", "description": "Gets the *direction* the **Drivetrain** is driving.", "name": "direction", "hint": ""}, "enumValues": ["FWD", "REV", "NONE"], "tokens": ["drivetrainDriveDirection"], "stateVars": {"instance": false, "params": false, "subBlocks": false, "localScope": false}, "enumFeed": "@name@.inDriveDirection.values", "uid": "1.vex.iq.drivetrainDriveDirection.blocks.modk.it"}, "1.vex.iq.rotatorCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.rotatorCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.rotatorCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the **Rotator** is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentRotatorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.motorCurrent.blocks.modk.it": {"category": "input", "groupElements": [{"assetGlobals": {"localScope": "ignore", "subBlocks": {"0": "subBlock"}}, "ignore": true, "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "readonly": true, "elements": [{"feed": "1.vex.iq.motorCurrent.blocks.modk.itComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument"}], "accepts": ["NoBlock"], "type": "BlockHolder"}, {"assetGlobals": {"localScope": "ignore"}, "ignore": true, "type": "CodeElement", "value": ".", "text": ""}, {"text": "current in", "type": "CodeElement", "value": "current("}, {"elements": [{"values": ["amps"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "amps", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"type": "CodeElement", "value": ")"}], "uid": "1.vex.iq.motorCurrent.blocks.modk.it", "color": "purple", "docs": {"category": "input", "type": "NumberBlock", "description": "Gets the *current* the __COMPONENT__ is drawing in amps.", "name": "current ", "hint": ""}, "extensionOf": "1.number.blocks.modk.it", "tokens": ["currentMotorEncoder"], "stateVars": {"localScope": false, "params": false, "subBlocks": false}}, "1.vex.iq.turnMotorFor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnMotorFor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Turns* the **Motor** a selected direction for an amount of time. The *direction* is either FWD or REV. The *time* is in seconds (sec).", "parameters": [{"options": ["FWD", "REV"], "type": "rotation", "description": "Select from the list.", "name": "direction"}, {"type": "num", "description": "Type a number, or use a variable. Time can be any positive number.", "name": "time"}], "hint": "Numbers with decimals are allowed.", "type": "StatementBlock", "name": "turn for"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn ", "type": "CodeElement", "value": "turnSeconds("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "@name@.outDirection.values", "values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"text": "for", "type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["1", "5", "10", "60"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "maxChars": "32", "color": "blue", "allowChars": "0-9.", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["sec"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"2": "value"}}, "value": "sec", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnMotorFor"], "sibling": null}, "1.vex.iq.setI2CRegister.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.setI2CRegister.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The digitalWrite command sets the value of a digital pin.", "parameters": [{"type": "num", "description": "determines which pin you are setting", "name": "pin"}, {"type": "num", "description": "determines whether the pin will be HIGH or LOW", "name": "state"}], "hint": "", "type": "StatementBlock", "name": "set I2C register"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "send i2c register", "type": "CodeElement", "value": "vexPtr->WriteI2CDeviceRegister("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "color": "blue", "elements": [{"feed": "digitalOutPinsListChange", "readonly": false, "values": [], "autoMinWidth": "true", "type": "DropdownMenu", "block": null}], "type": "NumberArgument", "block": null}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0x00"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"2": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"2": "value"}}, "color": "blue", "readonly": true, "type": "NumberArgument", "value": "0"}], "accepts": ["NumberBlock"], "block": null}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["digitalWrite"]}, "1.break.blocks.modk.it": {"category": "control", "uid": "1.break.blocks.modk.it", "color": "orange", "docs": {"category": "control", "description": "Exits loop blocks *forever, repeat, and while*. The program moves on to the next block in the stack below the current loop block. If not within loop block, break exits the *when* event handler altogether.", "parameters": [], "hint": "", "type": "StatementBlock", "name": "break"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "break", "type": "CodeElement", "value": "break;"}], "type": "LineElement"}], "tokens": ["break"], "sibling": null}, "1.vex.iq.drivetrain.controllerActions.components.modk.it": {"uid": "1.vex.iq.drivetrain.controllerActions.components.modk.it", "extensionOf": "1.vex.iq.controllerActions.components.modk.it", "controllerEvents": {"REV_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setDriveSpeed(100);drive(REV);"}, "LEFT_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setTurnSpeed(100);turn(LEFT);"}, "FWD_REV_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; updateFwdReverse(speed);"}, "RIGHT_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setTurnSpeed(100);turn(RIGHT);"}, "FWD_DIGITAL": {"RELEASED": "stop();", "PRESSED": "setDriveSpeed(100);drive(FWD);"}, "TANK_RIGHT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; tankRight(speed);"}, "RIGHT_LEFT_ANALOG": {"CHANGED": "int speed = 0.0 - (CONTROLLER.@joystick@.position()*1.2); updateLeftRight(speed);"}, "REV_FWD_ANALOG": {"CHANGED": "int speed = 0.0 - (CONTROLLER.@joystick@.position()*1.2); updateFwdReverse(speed);"}, "TANK_LEFT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; tankLeft(speed);"}, "LEFT_RIGHT_ANALOG": {"CHANGED": "int speed = CONTROLLER.@joystick@.position()*1.2; updateLeftRight(speed);"}}, "analogControllerValuesY": [{"name": "None", "value": "none"}, {"name": "Drive ▲/▼", "value": "FWD_REV_ANALOG"}, {"name": "Turn ◄/►", "value": "LEFT_RIGHT_ANALOG"}, {"name": "L-Drive ▲/▼", "value": "TANK_LEFT_ANALOG"}, {"name": "R-Drive ▲/▼", "value": "TANK_RIGHT_ANALOG"}], "analogControllerValuesX": [{"name": "None", "value": "none"}, {"name": "Drive ▲/▼", "value": "REV_FWD_ANALOG"}, {"name": "Turn ◄/►", "value": "LEFT_RIGHT_ANALOG"}, {"name": "L-Drive ▲/▼", "value": "TANK_RIGHT_ANALOG"}, {"name": "R-Drive ▲/▼", "value": "TANK_LEFT_ANALOG"}], "digitalControllerValues": [{"name": "None", "value": "NONE"}, {"name": "Drive ▲", "value": "FWD_DIGITAL"}, {"name": "Drive ▼", "value": "REV_DIGITAL"}, {"name": "Turn ◄", "value": "LEFT_DIGITAL"}, {"name": "Turn ►", "value": "RIGHT_DIGITAL"}]}, "1.led.library.modk.it": {"definitions": "#define ON HIGH\n#define OFF LOW\nvoid setupLED(int ledNum,int pinNum){ledNum-=LED_OFFSET;\nledArray[ledNum]=pinNum;\npinMode(ledArray[ledNum],OUTPUT);}\nvoid setLED(int ledNum,int value){ledNum-=LED_OFFSET;\ndigitalWrite(ledArray[ledNum],value);}", "componentArray": "ledArray", "type": "ComponentLibrary", "uid": "1.led.library.modk.it"}, "1.vex.wizard.linknotcurrent.modk.it": {"extensionOf": "wizard.modk.it", "uid": "1.vex.wizard.linknotcurrent.modk.it", "currentStep": {"uid": "1.vex.wizard.linknotcurrent.steps.modk.it"}}, "ui.dropdownMenuItem.modk.it": {"styles": {"mouseover": {"backgroundColor": "#cccccc"}, "normal": {"float": "left", "min-width": "100%", "height": 24, "padding": "5px 20px 5px 20px", "width": "auto", "position": "relative"}}, "onLoad": "this.getSubMenu=function(){if(Boolean(this.elements[1])){ if(Boolean(this.elements[1].elements[0])) return this.elements[1].elements[0]; }};", "elements": [{"assetGlobals": {"name": "text"}, "text": "item", "styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "auto", "fontSize": "12px", "position": "relative", "textAlign": "left"}}, "type": "FrameworkText"}, {"styles": {"normal": {"width": 10, "position": "absolute", "right": "2px", "height": 10}}, "htmlClass": "submenu_holder", "type": "Container", "assetGlobals": {"RightElements": "elements"}, "onLoad": "this.setValue = function(v){ this.container.container.container.container.setValue(v); this.container.container.container.remove()};"}], "uid": "ui.dropdownMenuItem.modk.it", "type": "Container", "value": "value", "htmlClass": "dropdownItem"}, "1.motorOn.blocks.modk.it": {"category": "output", "uid": "1.motorOn.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "The motorOn command turns on a _Motor_ and sets its direction.", "parameters": [{"type": "num", "description": "determines which _Motor_ you are controlling", "name": "motor"}, {"type": "num", "description": "sets the direction the _Motor_ will move", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "motorOn"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "motorOn", "type": "CodeElement", "value": "motorOn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"feed": "MOTORComponentListChange", "values": [], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ","}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "blue", "elements": [{"values": ["FWD", "REV"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NumberArgument", "value": "FWD"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["motorOn"], "sibling": null, "params": ["MOTOR1", "FWD"]}, "1.repeat.blocks.modk.it": {"category": "control", "uid": "1.repeat.blocks.modk.it", "color": "orange", "docs": {"parameters": [{"type": "num", "description": "Type a value or drag in a variable.", "name": "count"}], "description": "Blocks placed inside the *repeat* loop will be run **count** times.", "name": "repeat", "hint": "**Count** can be any whole number 1 or greater. Numbers with decimals will be rounded down to a whole number."}, "extensionOf": "1.c.autoyield.blocks.modk.it", "statementElements": [{"elements": [{"text": "repeat", "type": "CodeElement", "value": "repeat("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"0": "value"}}, "maxChars": "10", "value": "10", "color": "orange", "allowChars": "0-9", "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": "){"}], "type": "LineElement"}], "includes": ["1.modkit.h.code.modk.it"], "tokens": ["repeat"]}, "1.vex.iq.stopMotor.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.stopMotor.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Stops* the __COMPONENT__ from turning.", "title": "stop motor", "hint": "", "type": "StatementBlock", "name": "stop"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "stop ", "type": "CodeElement", "value": "stop();"}], "type": "LineElement"}], "tokens": ["goMotor"], "sibling": null}, "1.vex.iq.setSoundEffect.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setSoundEffect.blocks.modk.it", "color": "darkblue", "docs": {"category": "setup", "description": "Plays a tone.", "parameters": [{"type": "name", "description": "sets the **sound effect** from the list", "name": "effect"}], "hint": "", "type": "StatementBlock", "name": "play tone"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set sound effect to", "type": "CodeElement", "value": "BRAIN.setSoundEffect("}, {"assetGlobals": {"subBlocks": {"1": "subBlock"}}, "type": "BlockHolder", "elements": [{"assetGlobals": {"params": {"1": "value"}}, "color": "darkblue", "elements": [{"feed": "@id@.amounts", "values": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"], "type": "DropdownMenu", "autoMinWidth": "true"}], "type": "NameArgument", "maxChars": "32"}], "accepts": []}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setSoundEffect"], "sibling": null}, "1.vex.iq.drivetrain.components.modk.it": {"uid": "1.vex.iq.drivetrain.components.modk.it", "library": "1.motor.library.modk.it", "maxComponents": 1, "_elements": [{"styles": {"normal": {"borderRadius": "15px", "top": -50, "height": 350, "width": 480, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": 10}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"opacity": 0.6, "top": 32, "left": 330}}, "src": "images/vex/drivetrain/compass_rotate_iso.png", "type": "Image"}, {"styles": {"normal": {"right": 5, "bottom": 5, "height": 20, "zIndex": 1, "width": 20, "position": "absolute", "left": "auto"}}, "elements": [], "name": "DrivetrainConfigButton", "type": "ConfigButton", "onClick": "function(){this.container.container.showComponentSettings(this);}", "htmlClass": "hardware_settings_button"}, {"uid": "ui.button.controllerConfig.modk.it"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": 0, "left": 0}, "normal": {"width": "auto", "top": 45, "height": "42px", "_opacity": 0.5, "left": 60}}, "htmlClass": "vex_component_label vex_component_drivetrain clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "_opacity": 0.5, "marginLeft": 92, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Drivetrain", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/standard_drivetrain-150x.png"}, {"styles": {"normal": {"top": -20, "_transform": "scale(0.8, 0.8)", "height": "275px", "width": "388px", "_-ms-transform": "scale(0.8, 0.8)", "position": "absolute", "_-webkit-transform": "scale(0.8, 0.8)", "left": 16}}, "htmlClass": "isometric_drivetrain vex_component_pad_image", "elements": [{"styles": {"normal": {"position": "absolute"}}, "htmlClass": "iso_drivetrain_shadow", "type": "Image", "src": "images/vex/drivetrain/drivetrain_shadow.png"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "top": -8, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'", "left": 83}, "normal": {"top": -3, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 92}}, "htmlClass": "iso_left_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "travel250_position": {"top": 47, "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.frontWheelType != 'FRONT_250_TRACTION'", "left": -11}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "normal": {"top": 49, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 2}, "LWB": {"top": 63, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": -38}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}}, "htmlClass": "iso_left_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 12, "height": 198, "width": 432, "background": "transparent url(images/vex/drivetrain/chassis_left.png) no-repeat", "position": "absolute", "left": 18}}, "htmlClass": "iso_chassis_left", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_back_flipped-selected.png)", "backgroundPosition": "0 2px"}, "normal": {"top": 58, "visibility": "hidden", "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back_flipped.png) no-repeat", "position": "absolute", "display": "none", "left": 174}}, "htmlClass": "left_front_motor", "elements": [{"wireIndex": 0, "componentPath": "this.container.container.container", "_disabled": true, "y": -8, "x": 103, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor_back-selected.png)"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 97, "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back.png) no-repeat", "position": "absolute", "left": 106}}, "htmlClass": "left_rear_motor", "elements": [{"wireIndex": 2, "angle": 270, "componentPath": "this.container.container.container", "_disabled": true, "y": 72, "x": -17, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_flipped-selected.png)", "backgroundPosition": "5px 0"}, "normal": {"top": 96, "visibility": "hidden", "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor_flipped.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "display": "none", "left": 231}}, "htmlClass": "right_front_motor", "elements": [{"wireIndex": 1, "componentPath": "this.container.container.container", "_disabled": true, "y": -28, "x": 78, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 135, "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 163}}, "htmlClass": "right_rear_motor", "elements": [{"wireIndex": 3, "angle": 90, "componentPath": "this.container.container.container", "_disabled": true, "y": 50, "x": -42, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 121, "height": 168, "width": 353, "background": "transparent url(images/vex/drivetrain/chassis_right.png) no-repeat", "position": "absolute", "left": 97}}, "htmlClass": "iso_chassis_right", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'"}, "normal": {"top": 108, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 294}}, "htmlClass": "iso_right_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"LWB": {"top": 174, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": 179}, "travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "normal": {"top": 160, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 205}}, "htmlClass": "iso_right_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}], "type": "Container", "name": "Isomentric_drivetrain"}, {"styles": {"normal": {"maxWidth": 320, "bottom": -196, "minHeight": 60, "height": "auto", "zIndex": 2, "width": 226, "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": 14}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "90px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"0": "this"}, "wires": {"0": "name"}}, "label": "LEFT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "95px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"1": "this"}, "wires": {"1": "name"}}, "label": "RIGHT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "90px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"2": "this"}, "wires": {"2": "name"}}, "label": "LEFT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftRearMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "95px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"3": "this"}, "wires": {"3": "name"}}, "label": "RIGHT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightRearMotorOver', []);"}], "_excluded_blocks": [{"uid": "1.vex.iq.goMotor.blocks.modk.it"}, {"uid": "1.vex.iq.goMotorBy.blocks.modk.it"}, {"uid": "1.vex.iq.goMotorFor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotor.blocks.modk.it"}, {"uid": "1.vex.iq.stopMotor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorFor.blocks.modk.it"}, {"uid": "1.vex.iq.turnMotorRevolutions.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.motorSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.motorDirection.blocks.modk.it"}, {"uid": "1.vex.iq.speed.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainPower.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainTurnDirection.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainDriveDirection.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainTurnSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainDriveSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.drivetrainCurrent.blocks.modk.it"}], "componentImage": {"src": "images/hardware/lilypad/lilypad_rgb_led.png", "top": "1px", "left": "1px"}, "otherBlocksCategory": "Drivetrain", "onSettingsHide": "if(this.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'){ this.pins[3].resetValue(); this.pins[2].resetValue(); } if(this.settingsPopover.settings.motorLayout == 'TWO_REAR_MOTORS'){ this.pins[0].resetValue(); this.pins[1].resetValue(); }", "type": "VexComponent", "styles": {"normal": {"width": "170px", "height": "100px"}}, "onLoad": "this.renameHelper=function(name){this.$markup.find('.vex_component_label_name').get(0).blockObject.setText(name);};", "elements": [{"styles": {"normal": {"borderRadius": "15px", "top": -50, "height": 350, "width": 480, "backgroundColor": "", "position": "absolute", "border": "4px solid rgba(18, 52, 86, 0.4)", "display": "none", "left": 10}}, "htmlClass": "vex_component_wrapper", "elements": [{"styles": {"normal": {"opacity": 0.6, "top": 32, "left": 330}}, "src": "images/vex/drivetrain/compass_rotate_iso.png", "type": "Image"}, {"styles": {"normal": {"right": 5, "bottom": 5, "height": 20, "zIndex": 1, "width": 20, "position": "absolute", "left": "auto"}}, "elements": [], "name": "DrivetrainConfigButton", "type": "ConfigButton", "onClick": "function(){this.container.container.showComponentSettings(this);}", "htmlClass": "hardware_settings_button"}, {"uid": "ui.button.controllerConfig.modk.it"}], "type": "Container", "name": "Wrapper"}, {"styles": {"placed": {"top": 0, "left": 0}, "normal": {"width": "auto", "top": 45, "height": "42px", "_opacity": 0.5, "left": 60}}, "htmlClass": "vex_component_label vex_component_drivetrain clearfix", "elements": [{"styles": {"placed": {"marginLeft": "10px"}, "normal": {"width": "auto", "color": "#2a323d", "marginBottom": "auto", "height": "auto", "fontWeight": "bold", "_opacity": 0.5, "marginLeft": 92, "fontSize": "20px", "marginRight": "10px", "position": "relative", "marginTop": "10px", "textShadow": "0px 1px 0 #C4C4C4"}}, "text": "Drivetrain", "type": "FrameworkText", "htmlClass": "vex_component_label_name"}], "type": "Container"}, {"styles": {"normal": {"position": "absolute"}}, "htmlClass": "vex_component_drawer_image", "type": "Image", "src": "images/vex/components/standard_drivetrain-150x.png"}, {"styles": {"normal": {"top": -20, "_transform": "scale(0.8, 0.8)", "height": "275px", "width": "388px", "_-ms-transform": "scale(0.8, 0.8)", "position": "absolute", "_-webkit-transform": "scale(0.8, 0.8)", "left": 16}}, "htmlClass": "isometric_drivetrain vex_component_pad_image", "elements": [{"styles": {"normal": {"position": "absolute"}}, "htmlClass": "iso_drivetrain_shadow", "type": "Image", "src": "images/vex/drivetrain/drivetrain_shadow.png"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "top": -8, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'", "left": 83}, "normal": {"top": -3, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 92}}, "htmlClass": "iso_left_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "travel250_position": {"top": 47, "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.frontWheelType != 'FRONT_250_TRACTION'", "left": -11}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "normal": {"top": 49, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_left-200mm.png) no-repeat", "position": "absolute", "left": 2}, "LWB": {"top": 63, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": -38}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_left-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}}, "htmlClass": "iso_left_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_left-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 12, "height": 198, "width": 432, "background": "transparent url(images/vex/drivetrain/chassis_left.png) no-repeat", "position": "absolute", "left": 18}}, "htmlClass": "iso_chassis_left", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_back_flipped-selected.png)", "backgroundPosition": "0 2px"}, "normal": {"top": 58, "visibility": "hidden", "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back_flipped.png) no-repeat", "position": "absolute", "display": "none", "left": 174}}, "htmlClass": "left_front_motor", "elements": [{"wireIndex": 0, "componentPath": "this.container.container.container", "_disabled": true, "y": -8, "x": 103, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor_back-selected.png)"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 97, "height": 103, "width": 129, "background": "transparent url(images/vex/components/motor_back.png) no-repeat", "position": "absolute", "left": 106}}, "htmlClass": "left_rear_motor", "elements": [{"wireIndex": 2, "angle": 270, "componentPath": "this.container.container.container", "_disabled": true, "y": 72, "x": -17, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.leftRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.leftRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"show": {"styleCondition": "this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS' ", "display": "block", "visibility": "visible"}, "selected": {"backgroundImage": "url(images/vex/components/motor_flipped-selected.png)", "backgroundPosition": "5px 0"}, "normal": {"top": 96, "visibility": "hidden", "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor_flipped.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "display": "none", "left": 231}}, "htmlClass": "right_front_motor", "elements": [{"wireIndex": 1, "componentPath": "this.container.container.container", "_disabled": true, "y": -28, "x": 78, "side": "back", "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightFrontMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightFrontMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"selected": {"backgroundImage": "url(images/vex/components/motor-selected.png)", "backgroundPosition": "5px 0"}, "hide": {"styleCondition": "(this.container.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS')", "display": "none", "visibility": "hidden"}, "normal": {"top": 135, "height": 115, "width": 134, "background": "transparent url(images/vex/components/motor.png) no-repeat", "position": "absolute", "backgroundPosition": "0 0", "left": 163}}, "htmlClass": "right_rear_motor", "elements": [{"wireIndex": 3, "angle": 90, "componentPath": "this.container.container.container", "_disabled": true, "y": 50, "x": -42, "uid": "1.vex.iq.ui.wire.modk.it"}], "type": "Container", "onLoad": "Events.register('drivetrain.rightRearMotorOver', function(){this.select();}, this); Events.register('drivetrain.rightRearMotorOut', function(){this.deselect();}, this); Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged.png)", "styleCondition": "this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "LWB": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "LWB_ganged": {"backgroundImage": "url(images/vex/drivetrain/chassis_right-ganged-LWB.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION' && this.container.container.settingsPopover.settings.wheelGrouping == 'WHEELS_COUPLED'"}, "normal": {"top": 121, "height": 168, "width": 353, "background": "transparent url(images/vex/drivetrain/chassis_right.png) no-repeat", "position": "absolute", "left": 97}}, "htmlClass": "iso_chassis_right", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION'"}, "normal": {"top": 108, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 294}}, "htmlClass": "iso_right_front_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}, {"styles": {"LWB": {"top": 174, "styleCondition": "this.container.container.settingsPopover.settings.frontWheelType == 'FRONT_250_TRACTION' && this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'", "left": 179}, "travel160": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-160mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_160_TRACTION'"}, "omni": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-omni.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_200_OMNI'"}, "travel250": {"backgroundImage": "url(images/vex/drivetrain/wheel_right-250mm.png)", "styleCondition": "this.container.container.settingsPopover.settings.rearWheelType == 'REAR_250_TRACTION'"}, "normal": {"top": 160, "height": 202, "width": 195, "background": "transparent url(images/vex/drivetrain/wheel_right-200mm.png) no-repeat", "position": "absolute", "left": 205}}, "htmlClass": "iso_right_rear_wheel", "type": "Container", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);"}], "type": "Container", "name": "Isomentric_drivetrain"}, {"styles": {"normal": {"maxWidth": 320, "bottom": -196, "minHeight": 60, "height": "auto", "zIndex": 2, "width": 226, "background": "rgba(18, 52, 86, 0.4);", "position": "absolute", "left": 14}}, "htmlClass": "vex_component_pins clearfix", "type": "HorizontalContainer"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "90px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"0": "this"}, "wires": {"0": "name"}}, "label": "LEFT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"show": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS' || this.container.settingsPopover.settings.motorLayout == 'FOUR_MOTORS'", "display": "inline-block", "visibility": "visible"}, "normal": {"width": "95px", "display": "none", "visibility": "hidden"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightFrontMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"1": "this"}, "wires": {"1": "name"}}, "label": "RIGHT FRONT", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightFrontMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "90px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.leftRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"2": "this"}, "wires": {"2": "name"}}, "label": "LEFT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.leftRearMotorOver', []);"}, {"feed": "digitalOutPinsListChange", "styles": {"hide": {"styleCondition": "this.container.settingsPopover.settings.motorLayout == 'TWO_FRONT_MOTORS'", "display": "none", "visibility": "hidden"}, "normal": {"width": "95px", "display": "inline-block", "visibility": "visible"}}, "layer": "pins", "angle": 0, "onMouseout": "Events.broadcast('drivetrain.rightRearMotorOut', []);", "onLoad": "Events.register('SettingsUpdate', function(){ this.testStyleConditions();}, this);", "assetGlobals": {"pins": {"3": "this"}, "wires": {"3": "name"}}, "label": "RIGHT REAR", "values": [], "mode": "OUTPUT_COMPONENT", "type": "VexPin", "onMouseover": "Events.broadcast('drivetrain.rightRearMotorOver', []);"}], "blocks": [{"uid": "1.vex.iq.setDrivetrainTurnSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainDriveSpeed.blocks.modk.it"}, {"uid": "1.vex.iq.setMotorTimeout.blocks.modk.it"}, {"uid": "1.vex.iq.setDrivetrainHolding.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrain.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrain.blocks.modk.it"}, {"uid": "1.vex.iq.driveDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.turnDrivetrainRelative.blocks.modk.it"}, {"uid": "1.vex.iq.stopMotor.blocks.modk.it"}], "docs": {"type": "VexComponent", "description": "The drivetrain component configures two regular DC motor. You can control the motor's speed and direction.", "title": "Motor"}, "classBased": true, "defaultName": "DRIVETRAIN", "componentArray": "int motorArray[3]", "configuration": [{"type": "text", "value": "#define Untitled INVALID_PORT\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l1 = VexMotor("}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseFrontLeft", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r1 = VexMotor("}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseFrontRight", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l2 = VexMotor("}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseRearLeft", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexMotor "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r2 = VexMotor("}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": ","}, {"index": "reverseRearRight", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ",true);\n"}, {"type": "text", "value": "VexDriveTrain "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": " = VexDriveTrain("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l1, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r1, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_l2, "}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": "_r2, "}, {"index": "wheelGrouping", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "frontWheelType", "type": "objectArray", "value": "settings"}, {"type": "text", "value": "_"}, {"index": "rearWheelType", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "motorLayout", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "track", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "wheelbase", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"_comment": "was offsetX", "type": "text", "value": "0"}, {"type": "text", "value": ","}, {"index": "offsetY", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "ratioFront", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "ratioRear", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ","}, {"index": "cosTheta", "type": "objectArray", "value": "settings"}, {"type": "text", "value": ");"}, {"type": "text", "value": "Scope("}, {"type": "objectVar", "value": "name"}, {"type": "text", "value": ",VexDriveTrain);"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 0, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 1, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 2, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}, {"type": "text", "value": "\n#endif //ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifdef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n#define IQ_"}, {"index": 3, "type": "objectArray", "value": "wires"}, {"type": "text", "value": "_DEVICE_ID_STR IQ_MOTOR_SENSOR_STR//set device id\n#endif //IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n\n#ifndef IQ_GET_JUMPTABLE_DEFINE_MODKIT_VEX\n"}], "icon": "images/vex/components/drawer_icons/standard_drivetrain2.png", "displayName": "Drivetrain", "onStartDrag": "if(Boolean(modkitNamespace.GenericComponent.managers[this.uid]) && modkitNamespace.GenericComponent.managers[this.uid].count >= this.maxComponents || this.maxComponents == 0 || this.maxComponents == 0){ if(!Boolean(this.container) || this.container.id != 'hardware_pad'){ this.$markup.removeClass('myAcceptableClass');}}", "onConfigOverride": "var wheelbaseX = this.settingsPopover.settings.track/2; var wheelbaseY = this.settingsPopover.settings.wheelbase/2; wheelbaseY -= this.settingsPopover.settings.offsetY; var theta = Math.atan(wheelbaseY / wheelbaseX); var cosTheta = Math.cos(theta); var wheelGrouping = this.settingsPopover.settings.wheelGrouping; var motorLayout = this.settingsPopover.settings.motorLayout; this.configOverrides={'wires':this.getFullState()['wires'],'settings':this.getFullState()['settings'] }; this.configOverrides['settings']['cosTheta']=cosTheta; this.configOverrides['settings']['reverseFrontLeft'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionFrontLeft); this.configOverrides['settings']['reverseFrontRight'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionFrontRight); this.configOverrides['settings']['reverseRearLeft'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionRearLeft); this.configOverrides['settings']['reverseRearRight'] = ' '+Boolean(this.settingsPopover.settings.reverseDirectionRearRight); if(motorLayout == 'TWO_FRONT_MOTORS' || motorLayout == 'TWO_REAR_MOTORS' || wheelGrouping == 'WHEELS_COUPLED'){ this.configOverrides['settings']['ratioInRear'] = this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOutRear'] = this.settingsPopover.settings.ratioOut; this.configOverrides['settings']['ratioInFront'] = this.settingsPopover.settings.ratioIn; this.configOverrides['settings']['ratioOutFront'] = this.settingsPopover.settings.ratioOut; } this.configOverrides['settings']['ratioFront'] = ''+ parseFloat(this.configOverrides['settings']['ratioInFront'])/parseFloat(this.configOverrides['settings']['ratioOutFront']); this.configOverrides['settings']['ratioRear'] = ''+ parseFloat(this.configOverrides['settings']['ratioOutRear'])/parseFloat(this.configOverrides['settings']['ratioInRear']); if(motorLayout=='TWO_FRONT_MOTORS'){this.configOverrides['wires'][2]='INVALID_PORT';this.configOverrides['wires'][3]='INVALID_PORT'; } if(motorLayout=='TWO_REAR_MOTORS'){this.configOverrides['wires'][0]='INVALID_PORT';this.configOverrides['wires'][1]='INVALID_PORT';}", "stateVars": {"top": true, "wires": true, "name": true, "left": true}, "settingsPopover": {"type": "SettingsPopover", "settings": {"uid": "1.vex.iq.settingsDrivetrain.components.modk.it"}}, "controllerActionsPopover": {"type": "ControllerActionsPopover", "settings": {"uid": "1.vex.iq.drivetrain.controllerActions.components.modk.it"}}, "hack_to_disabled_dropping": false, "otherBlocks": []}, "ui.saveToSlot.modk.it": {"styles": {"normal": {"width": 350, "height": "auto"}}, "elements": [{"styles": {"normal": {"fontFamily": "Helvetica, Arial, sans-serif", "height": "auto", "width": "100%", "fontSize": "18px", "position": "relative", "textAlign": "left"}}, "text": "Select a Program Slot…", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "15px", "marginBottom": "15px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"width": "100%", "color": "#333", "height": "auto", "fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "13px", "position": "relative", "textAlign": "left"}}, "text": "Please pick a slot where programs will be downloaded.", "type": "FrameworkText"}, {"styles": {"normal": {"position": "relative", "marginTop": "15px", "marginBottom": "15px", "width": "100%", "height": "auto"}}, "type": "HorizontalRule"}, {"styles": {"normal": {"marginBottom": 15, "height": "auto", "width": "82px", "marginLeft": "7px", "marginRight": "5px", "position": "relative"}}, "assetGlobals": {"slots": {"1": "checked"}}, "value": "1", "label": "Slot 1", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "marginRight": "5px", "width": "82px", "marginBottom": 15, "height": "auto"}}, "assetGlobals": {"slots": {"2": "checked"}}, "value": "2", "label": "Slot 2", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "marginRight": "5px", "width": "82px", "height": "auto"}}, "assetGlobals": {"slots": {"3": "checked"}}, "value": "3", "label": "Slot 3", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}, {"styles": {"normal": {"position": "relative", "width": "82px", "height": "auto"}}, "assetGlobals": {"slots": {"4": "checked"}}, "value": "4", "label": "Slot 4", "key": "slot", "onChange": "this.container[this.key] = this.value; /*Events.broadcast('ComponentNameChange', [], true);*/", "type": "Input", "inputType": "radio"}], "uid": "ui.saveToSlot.modk.it", "stateVars": {"slot": false}, "type": "Container", "id": "select_slot_dialog"}, "1.vex.iq.turnDrivetrain.blocks.modk.it": {"category": "output", "uid": "1.vex.iq.turnDrivetrain.blocks.modk.it", "color": "blue", "docs": {"category": "output", "description": "*Turns* the **Drivetrain** in the selected direction until it is stopped. The direction is either LEFT or RIGHT.", "parameters": [{"options": ["LEFT", "RIGHT"], "type": "rotation", "description": "Sets the direction to turn.", "name": "direction"}], "hint": "", "type": "StatementBlock", "name": "turn drivetrain"}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "turn ", "type": "CodeElement", "value": "turn("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["LEFT", "RIGHT"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "value": "", "color": "blue", "readonly": true, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["turnMotor"], "sibling": null}, "1.knob.library.modk.it": {"definitions": "#ifndef FRAMEWORK_ENERGIA\nvoid setupKnob(int knobNum,int pinNum){knobNum-=KNOB_OFFSET;\nknobArray[knobNum]=pinNum;\npinMode(knobArray[knobNum],INPUT);}\nint readKnob(int knobNum){\nknobNum-=KNOB_OFFSET;\n//hack for analog FIXME\nreturn map(analogRead(knobArray[knobNum]-14),0,1023,0,100);\n}\n#else\nvoid setupKnob(int knobNum,int pinNum){knobNum-=KNOB_OFFSET;\nknobArray[knobNum]=pinNum;\npinMode(knobArray[knobNum],INPUT);}\nint readKnob(int knobNum){\nknobNum-=KNOB_OFFSET;\n//hack for analog FIXME\nreturn map(analogRead(knobArray[knobNum]-2),0,1023,0,100);\n}\n#endif\n", "componentArray": "knobArray", "type": "ComponentLibrary", "uid": "1.knob.library.modk.it"}, "1.vex.iq.setMaxRangefinderDistance.blocks.modk.it": {"category": "setup", "uid": "1.vex.iq.setMaxRangefinderDistance.blocks.modk.it", "color": "darkblue", "docs": {"parameters": [{"range": "0-?", "options": ["250", "500", "1000", "2000", "4000"], "type": "num", "description": "Select from the list, type a number, or use a variable. Distances range from 75 to 4,000 mm.", "name": "distance"}], "type": "StatementBlock", "description": "Sets the maximum distance the **Distance Sensor** looks for objects. The **distance** is in millimeters (mm).", "name": "set max distance", "hint": "The lower the value, the better results you will get."}, "extensionOf": "1.statement.blocks.modk.it", "statementElements": [{"elements": [{"text": "set max distance to", "type": "CodeElement", "value": "setMaxDistance("}, {"assetGlobals": {"subBlocks": {"0": "subBlock"}}, "type": "BlockHolder", "elements": [{"elements": [{"values": ["250", "500", "1000", "2000", "4000"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"0": "value"}}, "maxChars": "32", "value": "500", "color": "darkblue", "readonly": false, "rangeMin": 100, "allowChars": "0-9", "rangeMax": 4000, "type": "NumberArgument"}], "accepts": ["NumberBlock"]}, {"elements": [{"values": ["mm"], "type": "DropdownMenu", "autoMinWidth": "true"}], "assetGlobals": {"params": {"1": "value"}}, "value": "mm", "readonly": true, "hideCodeView": true, "type": "NameArgument"}, {"text": "", "type": "CodeElement", "value": ");"}], "type": "LineElement"}], "tokens": ["setMotorSpeed"]}};