add block type to setter and getter
This commit is contained in:
		
							parent
							
								
									da4c8840ea
								
							
						
					
					
						commit
						5304907fd0
					
				| @ -56,7 +56,7 @@ Blockly.Blocks['io_digitalread'] = { | |||||||
|             .appendField(Blockly.Msg.ARD_DIGITALREAD) |             .appendField(Blockly.Msg.ARD_DIGITALREAD) | ||||||
|             .appendField(new Blockly.FieldDropdown( |             .appendField(new Blockly.FieldDropdown( | ||||||
|                 selectedBoard().digitalPins), 'PIN'); |                 selectedBoard().digitalPins), 'PIN'); | ||||||
|         this.setOutput(true, Types.BOOLEAN); |         this.setOutput(true, 'boolean'); | ||||||
|         this.setTooltip(Blockly.Msg.ARD_DIGITALREAD_TIP); |         this.setTooltip(Blockly.Msg.ARD_DIGITALREAD_TIP); | ||||||
|     }, |     }, | ||||||
|     /** @return {!string} The type of return value for the block, an integer. */ |     /** @return {!string} The type of return value for the block, an integer. */ | ||||||
|  | |||||||
| @ -50,6 +50,8 @@ Blockly.Blocks['sensebox_display_printDisplay'] = { | |||||||
|             .setCheck(null); |             .setCheck(null); | ||||||
|         this.setPreviousStatement(true, null); |         this.setPreviousStatement(true, null); | ||||||
|         this.setNextStatement(true, null); |         this.setNextStatement(true, null); | ||||||
|  |         let variableName = this.getField('COLOR'); | ||||||
|  |         console.log(variableName.getValue()); | ||||||
|         this.setTooltip(Blockly.Msg.senseBox_display_printDisplay_tip); |         this.setTooltip(Blockly.Msg.senseBox_display_printDisplay_tip); | ||||||
|         this.setHelpUrl('https://sensebox.de/books'); |         this.setHelpUrl('https://sensebox.de/books'); | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ import Blockly from 'blockly'; | |||||||
| import { getColour } from '../helpers/colour' | import { getColour } from '../helpers/colour' | ||||||
| import * as Types from '../helpers/types' | import * as Types from '../helpers/types' | ||||||
| import { selectedBoard } from '../helpers/board' | import { selectedBoard } from '../helpers/board' | ||||||
|  | import { colors } from '@material-ui/core'; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * HDC1080 Temperature and Humidity Sensor |  * HDC1080 Temperature and Humidity Sensor | ||||||
| @ -16,7 +17,7 @@ Blockly.Blocks['sensebox_sensor_temp_hum'] = { | |||||||
|       .setAlign(Blockly.ALIGN_RIGHT) |       .setAlign(Blockly.ALIGN_RIGHT) | ||||||
|       .appendField(Blockly.Msg.senseBox_value) |       .appendField(Blockly.Msg.senseBox_value) | ||||||
|       .appendField(new Blockly.FieldDropdown([[Blockly.Msg.senseBox_temp, "Temperature"], [Blockly.Msg.senseBox_hum, "Humidity"]]), "NAME"); |       .appendField(new Blockly.FieldDropdown([[Blockly.Msg.senseBox_temp, "Temperature"], [Blockly.Msg.senseBox_hum, "Humidity"]]), "NAME"); | ||||||
|     this.setOutput(true, Types.NUMBER.typeId); |     this.setOutput(true, Types.DECIMAL.typeId); | ||||||
|     this.setColour(getColour().sensebox); |     this.setColour(getColour().sensebox); | ||||||
|     this.setTooltip(Blockly.Msg.senseBox_temp_hum_tip); |     this.setTooltip(Blockly.Msg.senseBox_temp_hum_tip); | ||||||
|     this.setHelpUrl('https://edu.books.sensebox.de/de/projekte/diy_umweltstation/temp_und_luftfeuchte.html'); |     this.setHelpUrl('https://edu.books.sensebox.de/de/projekte/diy_umweltstation/temp_und_luftfeuchte.html'); | ||||||
| @ -124,6 +125,8 @@ Blockly.Blocks['sensebox_sensor_pressure'] = { | |||||||
|     this.setOutput(true, Types.NUMBER.typeId); |     this.setOutput(true, Types.NUMBER.typeId); | ||||||
|     this.setTooltip(Blockly.Msg.senseBox_pressure_tip); |     this.setTooltip(Blockly.Msg.senseBox_pressure_tip); | ||||||
|     this.setHelpUrl('https://edu.books.sensebox.de/de/projekte/diy_umweltstation/luftdruck.html'); |     this.setHelpUrl('https://edu.books.sensebox.de/de/projekte/diy_umweltstation/luftdruck.html'); | ||||||
|  |     var input = this.getFieldValue('NAME'); | ||||||
|  |     console.log(input); | ||||||
|   }, |   }, | ||||||
|   /** |   /** | ||||||
|    * Parse XML to restore the number of pins available. |    * Parse XML to restore the number of pins available. | ||||||
| @ -231,7 +234,7 @@ Blockly.Blocks['sensebox_sensor_ultrasonic_ranger'] = { | |||||||
|       .appendField(Blockly.Msg.senseBox_ultrasonic_echo) |       .appendField(Blockly.Msg.senseBox_ultrasonic_echo) | ||||||
|       .appendField(new Blockly.FieldDropdown( |       .appendField(new Blockly.FieldDropdown( | ||||||
|         selectedBoard().digitalPins), 'ultrasonic_echo'); |         selectedBoard().digitalPins), 'ultrasonic_echo'); | ||||||
|     this.setOutput(true, Types.NUMBER.typeId); |     this.setOutput(true, 'int'); | ||||||
|     this.setTooltip(Blockly.Msg.senseBox_ultrasonic_tip); |     this.setTooltip(Blockly.Msg.senseBox_ultrasonic_tip); | ||||||
|     this.setHelpUrl('https://sensebox.de/books'); |     this.setHelpUrl('https://sensebox.de/books'); | ||||||
|   }, |   }, | ||||||
| @ -283,7 +286,7 @@ Blockly.Blocks['sensebox_sensor_ultrasonic_ranger'] = { | |||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   getBlockType: function () { |   getBlockType: function () { | ||||||
|     return Blockly.Types.NUMBER; |     return Blockly.Types.SHORT_NUMBER; | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,167 +1,41 @@ | |||||||
| import Blockly from 'blockly/core'; | import Blockly, { FieldVariable } from 'blockly/core'; | ||||||
| import { getColour } from '../helpers/colour'; | import { getColour } from '../helpers/colour'; | ||||||
|  | import { getCompatibleTypes } from '../helpers/types' | ||||||
| 
 | 
 | ||||||
| Blockly.defineBlocksWithJsonArray([ | 
 | ||||||
|     // BEGIN JSON EXTRACT
 | Blockly.Blocks['variables_set_dynamic'] = { | ||||||
|     { |     init: function () { | ||||||
|         type: 'variables_get_number', | 
 | ||||||
|         message0: '= number variable %1', |         // const type = myVar.type;
 | ||||||
|         args0: [ |         this.setColour(getColour().variables); | ||||||
|             { |         this.setPreviousStatement(true, null); | ||||||
|                 type: 'field_variable', |         this.setNextStatement(true, null); | ||||||
|                 name: 'VAR', |         this.appendValueInput('VALUE') | ||||||
|                 variable: null, |             .appendField('set', 'set') | ||||||
|                 variableTypes: ['Number'], |             .appendField(new Blockly.FieldVariable('VAR'), 'VAR') | ||||||
|                 defaultType: 'Number', |             .appendField('to'); | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         output: 'Number', |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |     }, | ||||||
|     { |     onchange: function (e) { | ||||||
|         type: 'variables_set_number', |         let variableID = this.getFieldValue('VAR'); | ||||||
|         message0: 'Number variable %1 = %2', |         let variable = Blockly.getMainWorkspace().getVariableMap().getVariableById(variableID) | ||||||
|         args0: [ |         this.getInput('VALUE').setCheck(getCompatibleTypes(variable.type)); | ||||||
|             { | 
 | ||||||
|                 type: 'field_variable', |     } | ||||||
|                 name: 'VAR', | } | ||||||
|                 variable: null, | 
 | ||||||
|                 variableTypes: ['Number'], | Blockly.Blocks['variables_get_dynamic'] = { | ||||||
|                 defaultType: 'Number', |     init: function () { | ||||||
|                 createNewVariable: false, |         this.setColour(getColour().variables); | ||||||
|             }, |         this.appendDummyInput() | ||||||
|             { |             .appendField('', 'type') | ||||||
|                 type: 'input_value', |             .appendField(new Blockly.FieldVariable('VAR'), 'VAR'); | ||||||
|                 name: 'VALUE', |         this.setOutput(true); | ||||||
|                 check: 'Number', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         previousStatement: null, |  | ||||||
|         nextStatement: null, |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |     }, | ||||||
|     { |     onchange: function (e) { | ||||||
|         type: 'variables_get_colour', |         let variableID = this.getFieldValue('VAR'); | ||||||
|         message0: '= color variable %1', |         let variable = Blockly.getMainWorkspace().getVariableMap().getVariableById(variableID) | ||||||
|         args0: [ |         this.getField('type').setValue(variable.type); | ||||||
|             { | 
 | ||||||
|                 type: 'field_variable', |     } | ||||||
|                 name: 'VAR', | } | ||||||
|                 variable: null, | 
 | ||||||
|                 variableTypes: ['Colour'], |  | ||||||
|                 defaultType: 'Colour', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         output: 'Colour', |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type: 'variables_set_colour', |  | ||||||
|         message0: 'Color variable %1 = %2', |  | ||||||
|         args0: [ |  | ||||||
|             { |  | ||||||
|                 type: 'field_variable', |  | ||||||
|                 name: 'VAR', |  | ||||||
|                 variable: null, |  | ||||||
|                 variableTypes: ['Colour'], |  | ||||||
|                 defaultType: 'Colour', |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type: 'input_value', |  | ||||||
|                 name: 'VALUE', |  | ||||||
|                 check: 'Colour', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         previousStatement: null, |  | ||||||
|         nextStatement: null, |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type: 'variables_get_string', |  | ||||||
|         message0: '= text variable %1', |  | ||||||
|         args0: [ |  | ||||||
|             { |  | ||||||
|                 type: 'field_variable', |  | ||||||
|                 name: 'VAR', |  | ||||||
|                 variable: null, |  | ||||||
|                 variableTypes: ['String'], |  | ||||||
|                 defaultType: 'String', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         output: 'String', |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type: 'variables_set_string', |  | ||||||
|         message0: 'Text variable %1 = %2', |  | ||||||
|         args0: [ |  | ||||||
|             { |  | ||||||
|                 type: 'field_variable', |  | ||||||
|                 name: 'VAR', |  | ||||||
|                 variable: null, |  | ||||||
|                 variableTypes: ['String'], |  | ||||||
|                 defaultType: 'String', |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type: 'input_value', |  | ||||||
|                 name: 'VALUE', |  | ||||||
|                 check: 'String', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         previousStatement: null, |  | ||||||
|         nextStatement: null, |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type: 'variables_get_boolean', |  | ||||||
|         message0: '= boolean variable %1', |  | ||||||
|         args0: [ |  | ||||||
|             { |  | ||||||
|                 type: 'field_variable', |  | ||||||
|                 name: 'VAR', |  | ||||||
|                 variable: null, |  | ||||||
|                 variableTypes: ['Boolean'], |  | ||||||
|                 defaultType: 'Boolean', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         output: 'Boolean', |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|         type: 'variables_set_boolean', |  | ||||||
|         message0: 'Boolean variable %1 = %2', |  | ||||||
|         args0: [ |  | ||||||
|             { |  | ||||||
|                 type: 'field_variable', |  | ||||||
|                 name: 'VAR', |  | ||||||
|                 variable: null, |  | ||||||
|                 variableTypes: ['Boolean'], |  | ||||||
|                 defaultType: 'Boolean', |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|                 type: 'input_value', |  | ||||||
|                 name: 'VALUE', |  | ||||||
|                 check: 'Boolean', |  | ||||||
|             }, |  | ||||||
|         ], |  | ||||||
|         previousStatement: null, |  | ||||||
|         nextStatement: null, |  | ||||||
|         colour: getColour().variables, |  | ||||||
|         tooltip: '', |  | ||||||
|         helpUrl: '', |  | ||||||
|     }, |  | ||||||
| ]); // END JSON EXTRACT (Do not delete this comment.)
 |  | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ const setVariableFunction = function (defaultValue) { | |||||||
|         const allVars = Blockly.getMainWorkspace().getVariableMap().getAllVariables(); |         const allVars = Blockly.getMainWorkspace().getVariableMap().getAllVariables(); | ||||||
|         const myVar = allVars.filter(v => v.name === variableName)[0] |         const myVar = allVars.filter(v => v.name === variableName)[0] | ||||||
| 
 | 
 | ||||||
|         Blockly.Arduino.setupCode_[''] = myVar.type + " " + myVar.name + ';\n'; |         Blockly.Arduino.variables_[myVar] = myVar.type + " " + myVar.name + ';\n'; | ||||||
|         return variableName + ' = ' + (variableValue || defaultValue) + ';\n'; |         return variableName + ' = ' + (variableValue || defaultValue) + ';\n'; | ||||||
|     }; |     }; | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ | |||||||
| /** Single character. */ | /** Single character. */ | ||||||
| export const CHARACTER = { | export const CHARACTER = { | ||||||
|     typeId: 'Character', |     typeId: 'Character', | ||||||
|  |     typeName: 'char', | ||||||
|     typeMsgName: 'ARD_TYPE_CHAR', |     typeMsgName: 'ARD_TYPE_CHAR', | ||||||
|     compatibleTypes: [] |     compatibleTypes: [] | ||||||
| } | } | ||||||
| @ -31,14 +32,15 @@ export const TEXT = { | |||||||
| 
 | 
 | ||||||
| /** Short integer number. */ | /** Short integer number. */ | ||||||
| export const SHORT_NUMBER = { | export const SHORT_NUMBER = { | ||||||
|     typeId: 'Short Number', |     typeId: 'Short_Number', | ||||||
|  |     typeName: 'int', | ||||||
|     typeMsgName: 'ARD_TYPE_SHORT', |     typeMsgName: 'ARD_TYPE_SHORT', | ||||||
|     compatibleTypes: []    // Circular dependencies, add after all declarations
 |     compatibleTypes: ['int', 'float',]    // Circular dependencies, add after all declarations
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** Integer number. */ | /** Integer number. */ | ||||||
| export const NUMBER = { | export const NUMBER = { | ||||||
|     typeId: 'Number', |     typeId: 'int', | ||||||
|     typeMsgName: 'ARD_TYPE_NUMBER', |     typeMsgName: 'ARD_TYPE_NUMBER', | ||||||
|     compatibleTypes: ['Number']    // Circular dependencies, add after all declarations
 |     compatibleTypes: ['Number']    // Circular dependencies, add after all declarations
 | ||||||
| } | } | ||||||
| @ -52,12 +54,12 @@ export const LARGE_NUMBER = { | |||||||
| 
 | 
 | ||||||
| /** Decimal/floating point number. */ | /** Decimal/floating point number. */ | ||||||
| export const DECIMAL = { | export const DECIMAL = { | ||||||
|     typeId: 'Decimal', |     typeId: 'float', | ||||||
|     typeMsgName: 'ARD_TYPE_DECIMAL', |     typeMsgName: 'ARD_TYPE_DECIMAL', | ||||||
|     compatibleTypes: [BOOLEAN.typeId, |     compatibleTypes: [BOOLEAN.typeId, | ||||||
|         NUMBER, |     NUMBER.typeId, | ||||||
|         SHORT_NUMBER, |     SHORT_NUMBER.typeId, | ||||||
|         LARGE_NUMBER] |     LARGE_NUMBER.typeId] | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** Array/List of items. */ | /** Array/List of items. */ | ||||||
| @ -88,8 +90,23 @@ export const CHILD_BLOCK_MISSING = { | |||||||
|     compatibleTypes: [] |     compatibleTypes: [] | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | const compatibleTypes = { | ||||||
|  |     boolean: ['boolean'], | ||||||
|  |     int: ['int'], | ||||||
|  |     char: ['char'], | ||||||
|  |     string: ['String'], | ||||||
|  |     void: ['void'], | ||||||
|  |     long: ['int', 'long'], | ||||||
|  |     double: ['int', 'long', 'double'], | ||||||
|  |     float: ['int', 'long', 'double', 'float'] | ||||||
| 
 | 
 | ||||||
| export const VARIABLE_TYPES = ['Number', 'String', 'Boolean', 'Colour']; | } | ||||||
|  | 
 | ||||||
|  | export const getCompatibleTypes = (type) => { | ||||||
|  |     return compatibleTypes[type]; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | export const VARIABLE_TYPES = [['SHORT_NUMBER', 'char'], ['NUMBER', 'int'], ['DECIMAL', 'long'], ['TEXT', 'String'], ['CHARACTER', 'char'], ['BOOLEAN', 'boolean'], ['NULL', 'void'], ['UNDEF', 'undefined']]; | ||||||
| 
 | 
 | ||||||
| // /**
 | // /**
 | ||||||
| //  * Some Types have circular dependencies on their compatibilities, so add them
 | //  * Some Types have circular dependencies on their compatibilities, so add them
 | ||||||
|  | |||||||
| @ -15,8 +15,8 @@ class Toolbox extends React.Component { | |||||||
|     componentDidUpdate() { |     componentDidUpdate() { | ||||||
|         this.props.workspace.registerToolboxCategoryCallback('CREATE_TYPED_VARIABLE', this.createFlyout); |         this.props.workspace.registerToolboxCategoryCallback('CREATE_TYPED_VARIABLE', this.createFlyout); | ||||||
| 
 | 
 | ||||||
|          const typedVarModal = new TypedVariableModal(this.props.workspace, 'callbackName', [['SHORT_NUMBER', 'char'], ['NUMBER', 'int'], ['DECIMAL', 'long'], ['TEXT', 'String'], ['CHARACTER', 'char'], ['BOOLEAN', 'boolean'], ['NULL', 'void'], ['UNDEF', 'undefined']]); |         const typedVarModal = new TypedVariableModal(this.props.workspace, 'callbackName', [['SHORT_NUMBER', 'char'], ['NUMBER', 'int'], ['DECIMAL', 'float'], ['TEXT', 'String'], ['CHARACTER', 'char'], ['BOOLEAN', 'boolean'], ['NULL', 'void'], ['UNDEF', 'undefined']]); | ||||||
|          typedVarModal.init(); |         typedVarModal.init(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     createFlyout(workspace) { |     createFlyout(workspace) { | ||||||
| @ -38,169 +38,169 @@ class Toolbox extends React.Component { | |||||||
|     render() { |     render() { | ||||||
|         return ( |         return ( | ||||||
|             <xml xmlns="https://developers.google.com/blockly/xml" id="blockly" style={{ display: 'none' }} ref={this.props.toolbox}> |             <xml xmlns="https://developers.google.com/blockly/xml" id="blockly" style={{ display: 'none' }} ref={this.props.toolbox}> | ||||||
|                     <Category name="Sensoren" colour={getColour().sensebox}> |                 <Category name="Sensoren" colour={getColour().sensebox}> | ||||||
|                         <Block type="sensebox_sensor_temp_hum" /> |                     <Block type="sensebox_sensor_temp_hum" /> | ||||||
|                         <Block type="sensebox_sensor_uv_light" /> |                     <Block type="sensebox_sensor_uv_light" /> | ||||||
|                         <Block type="sensebox_sensor_bmx055_accelerometer" /> |                     <Block type="sensebox_sensor_bmx055_accelerometer" /> | ||||||
|                         <Block type="sensebox_sensor_sds011" /> |                     <Block type="sensebox_sensor_sds011" /> | ||||||
|                         <Block type="sensebox_sensor_pressure" /> |                     <Block type="sensebox_sensor_pressure" /> | ||||||
|                         <Block type="sensebox_sensor_bme680_bsec" /> |                     <Block type="sensebox_sensor_bme680_bsec" /> | ||||||
|                         <Block type="sensebox_sensor_ultrasonic_ranger" /> |                     <Block type="sensebox_sensor_ultrasonic_ranger" /> | ||||||
|                         <Block type="sensebox_sensor_sound" /> |                     <Block type="sensebox_sensor_sound" /> | ||||||
|                     </Category > |                 </Category > | ||||||
|                     <Category name="WIFI" colour={getColour().sensebox}> |                 <Category name="WIFI" colour={getColour().sensebox}> | ||||||
|                         <Block type="sensebox_wifi" /> |                     <Block type="sensebox_wifi" /> | ||||||
|                         <Block type="sensebox_startap" /> |                     <Block type="sensebox_startap" /> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category name="SD" colour={getColour().sensebox}> | ||||||
|  |                     <Block type="sensebox_sd_create_file" /> | ||||||
|  |                     <Block type="sensebox_sd_open_file" /> | ||||||
|  |                     <Block type="sensebox_sd_write_file" /> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category name="LED" colour={getColour().sensebox}> | ||||||
|  |                     <Block type="sensebox_rgb_led" /> | ||||||
|  |                     <Block type="sensebox_led" /> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category name="Display" colour={getColour().sensebox}> | ||||||
|  |                     <Block type="sensebox_display_beginDisplay" /> | ||||||
|  |                     <Block type="sensebox_display_show" /> | ||||||
|  |                     <Block type="sensebox_display_clearDisplay" /> | ||||||
|  |                     <Block type="sensebox_display_printDisplay"> | ||||||
|  |                         <Value name="SIZE"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">1</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="X"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="Y"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                     </Block> | ||||||
|  |                     <Block type="sensebox_display_plotDisplay"> | ||||||
|  |                         <Value name="Title"> | ||||||
|  |                             <Block type="text"> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="YLabel"> | ||||||
|  |                             <Block type="text"> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="XLabel"> | ||||||
|  |                             <Block type="text"> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="XRange1"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="XRange2"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">15</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="YRange1"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="YRange2"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">50</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="XTick"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">5</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="YTick"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="TimeFrame"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">15</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                     </Block> | ||||||
|  |                     <Block type="sensebox_display_fillCircle"> | ||||||
|  |                         <Value name="X"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="Y"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="Radius"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                     </Block> | ||||||
|  |                     <Block type="sensebox_display_drawRectangle"> | ||||||
|  |                         <Value name="X"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="Y"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="height"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                         <Value name="width"> | ||||||
|  |                             <Block type="math_number"> | ||||||
|  |                                 <Field name="NUM">0</Field> | ||||||
|  |                             </Block> | ||||||
|  |                         </Value> | ||||||
|  |                     </Block> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category name="Telegram" colour={getColour().sensebox}> | ||||||
|  |                     <Block type="sensebox_telegram" /> | ||||||
|  |                     <Block type="sensebox_telegram_do" /> | ||||||
|  |                     <Block type="sensebox_telegram_do_on_message" /> | ||||||
|  |                     <Block type="sensebox_telegram_send" /> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category name="openSenseMap" colour={getColour().sensebox}> | ||||||
|  |                     <Block type="sensebox_osem_connection" /> | ||||||
|  |                     <Block type="sensebox_send_to_osem" /> | ||||||
|  |                 </Category> | ||||||
|  |                 <Category id="catSenseBoxOutput_LoRa" name="  LoRa" colour={getColour().sensebox}> | ||||||
|  |                     <Category id="catSenseBoxOutput_LoRa_activation" name="  Activation" colour={getColour().sensebox}> | ||||||
|  |                         <Block type="sensebox_lora_initialize_otaa" /> | ||||||
|  |                         <Block type="sensebox_lora_initialize_abp" /> | ||||||
|                     </Category> |                     </Category> | ||||||
|                     <Category name="SD" colour={getColour().sensebox}> |                     <Category id="catSenseBoxOutput_LoRa_loramessage" name="    Lora Message" colour={getColour().sensebox}> | ||||||
|                         <Block type="sensebox_sd_create_file" /> |                         <Block type="sensebox_lora_message_send" /> | ||||||
|                         <Block type="sensebox_sd_open_file" /> |                         <Block type="sensebox_send_lora_sensor_value" /> | ||||||
|                         <Block type="sensebox_sd_write_file" /> |  | ||||||
|                     </Category> |                     </Category> | ||||||
|                     <Category name="LED" colour={getColour().sensebox}> |                     <Category id="catSenseBoxOutput_LoRa_cayenne" name="    Cayenne LPP" colour={getColour().sensebox}> | ||||||
|                         <Block type="sensebox_rgb_led" /> |                         <Block type="sensebox_lora_cayenne_send" /> | ||||||
|                         <Block type="sensebox_led" /> |                         <Block type="sensebox_lora_cayenne_temperature" /> | ||||||
|                     </Category> |                         <Block type="sensebox_lora_cayenne_humidity" /> | ||||||
|                     <Category name="Display" colour={getColour().sensebox}> |                         <Block type="sensebox_lora_cayenne_pressure" /> | ||||||
|                         <Block type="sensebox_display_beginDisplay" /> |                         <Block type="sensebox_lora_cayenne_luminosity" /> | ||||||
|                         <Block type="sensebox_display_show" /> |                         <Block type="sensebox_lora_cayenne_sensor" /> | ||||||
|                         <Block type="sensebox_display_clearDisplay" /> |                         <Block type="sensebox_lora_cayenne_accelerometer" /> | ||||||
|                         <Block type="sensebox_display_printDisplay"> |                         <Block type="sensebox_lora_cayenne_gps" /> | ||||||
|                             <Value name="SIZE"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">1</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="X"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="Y"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                         </Block> |  | ||||||
|                         <Block type="sensebox_display_plotDisplay"> |  | ||||||
|                             <Value name="Title"> |  | ||||||
|                                 <Block type="text"> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="YLabel"> |  | ||||||
|                                 <Block type="text"> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="XLabel"> |  | ||||||
|                                 <Block type="text"> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="XRange1"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="XRange2"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">15</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="YRange1"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="YRange2"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">50</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="XTick"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">5</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="YTick"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="TimeFrame"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">15</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                         </Block> |  | ||||||
|                         <Block type="sensebox_display_fillCircle"> |  | ||||||
|                             <Value name="X"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="Y"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="Radius"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                         </Block> |  | ||||||
|                         <Block type="sensebox_display_drawRectangle"> |  | ||||||
|                             <Value name="X"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="Y"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="height"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                             <Value name="width"> |  | ||||||
|                                 <Block type="math_number"> |  | ||||||
|                                     <Field name="NUM">0</Field> |  | ||||||
|                                 </Block> |  | ||||||
|                             </Value> |  | ||||||
|                         </Block> |  | ||||||
|                     </Category> |  | ||||||
|                     <Category name="Telegram" colour={getColour().sensebox}> |  | ||||||
|                         <Block type="sensebox_telegram" /> |  | ||||||
|                         <Block type="sensebox_telegram_do" /> |  | ||||||
|                         <Block type="sensebox_telegram_do_on_message" /> |  | ||||||
|                         <Block type="sensebox_telegram_send" /> |  | ||||||
|                     </Category> |  | ||||||
|                     <Category name="openSenseMap" colour={getColour().sensebox}> |  | ||||||
|                         <Block type="sensebox_osem_connection" /> |  | ||||||
|                         <Block type="sensebox_send_to_osem" /> |  | ||||||
|                     </Category> |  | ||||||
|                     <Category id="catSenseBoxOutput_LoRa" name="  LoRa" colour={getColour().sensebox}> |  | ||||||
|                         <Category id="catSenseBoxOutput_LoRa_activation" name="  Activation" colour={getColour().sensebox}> |  | ||||||
|                             <Block type="sensebox_lora_initialize_otaa" /> |  | ||||||
|                             <Block type="sensebox_lora_initialize_abp" /> |  | ||||||
|                         </Category> |  | ||||||
|                         <Category id="catSenseBoxOutput_LoRa_loramessage" name="    Lora Message" colour={getColour().sensebox}> |  | ||||||
|                             <Block type="sensebox_lora_message_send" /> |  | ||||||
|                             <Block type="sensebox_send_lora_sensor_value" /> |  | ||||||
|                         </Category> |  | ||||||
|                         <Category id="catSenseBoxOutput_LoRa_cayenne" name="    Cayenne LPP" colour={getColour().sensebox}> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_send" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_temperature" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_humidity" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_pressure" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_luminosity" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_sensor" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_accelerometer" /> |  | ||||||
|                             <Block type="sensebox_lora_cayenne_gps" /> |  | ||||||
|                         </Category> |  | ||||||
|                     </Category> |                     </Category> | ||||||
|  |                 </Category> | ||||||
|                 <Category name="Logic" colour={getColour().logic}> |                 <Category name="Logic" colour={getColour().logic}> | ||||||
|                     <Block type="controls_if" /> |                     <Block type="controls_if" /> | ||||||
|                     <Block type="controls_ifelse" /> |                     <Block type="controls_ifelse" /> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user