resolve warnings
This commit is contained in:
		
							parent
							
								
									a163c76463
								
							
						
					
					
						commit
						31e0880e7a
					
				| @ -136,11 +136,12 @@ Blockly.Blocks['controls_if'] = { | ||||
|     saveConnections: function (containerBlock) { | ||||
|         var clauseBlock = containerBlock.nextConnection.targetBlock(); | ||||
|         var i = 1; | ||||
|         var inputDo; | ||||
|         while (clauseBlock) { | ||||
|             switch (clauseBlock.type) { | ||||
|                 case 'controls_if_elseif': | ||||
|                     var inputIf = this.getInput('IF' + i); | ||||
|                     var inputDo = this.getInput('DO' + i); | ||||
|                     inputDo = this.getInput('DO' + i); | ||||
|                     clauseBlock.valueConnection_ = | ||||
|                         inputIf && inputIf.connection.targetConnection; | ||||
|                     clauseBlock.statementConnection_ = | ||||
| @ -148,7 +149,7 @@ Blockly.Blocks['controls_if'] = { | ||||
|                     i++; | ||||
|                     break; | ||||
|                 case 'controls_if_else': | ||||
|                     var inputDo = this.getInput('ELSE'); | ||||
|                     inputDo = this.getInput('ELSE'); | ||||
|                     clauseBlock.statementConnection_ = | ||||
|                         inputDo && inputDo.connection.targetConnection; | ||||
|                     break; | ||||
| @ -169,11 +170,11 @@ Blockly.Blocks['controls_if'] = { | ||||
|         if (this.getInput('ELSE')) { | ||||
|             this.removeInput('ELSE'); | ||||
|         } | ||||
|         var i = 1; | ||||
|         while (this.getInput('IF' + i)) { | ||||
|             this.removeInput('IF' + i); | ||||
|             this.removeInput('DO' + i); | ||||
|             i++; | ||||
|         var j = 1; | ||||
|         while (this.getInput('IF' + j)) { | ||||
|             this.removeInput('IF' + j); | ||||
|             this.removeInput('DO' + j); | ||||
|             j++; | ||||
|         } | ||||
|         // Rebuild block.
 | ||||
|         for (var i = 1; i <= this.elseifCount_; i++) { | ||||
|  | ||||
| @ -112,7 +112,7 @@ Blockly.Blocks['sensebox_display_fastPrint'] = { | ||||
|         // Is the block nested in a loop?
 | ||||
|         var block = this; | ||||
|         do { | ||||
|             if (this.LOOP_TYPES.indexOf(block.type) != -1) { | ||||
|             if (this.LOOP_TYPES.indexOf(block.type) !== -1) { | ||||
|                 legal = true; | ||||
|                 break; | ||||
|             } | ||||
|  | ||||
| @ -24,7 +24,7 @@ Blockly.Arduino.sensebox_osem_connection = function (Block) { | ||||
|   var ssl = this.getFieldValue('SSL'); | ||||
|   var port = 0; | ||||
|   var count = 0; | ||||
|   if (blocks != undefined) { | ||||
|   if (blocks !== undefined) { | ||||
|     for (var i = 0; i < blocks.length; i++) { | ||||
|       if (blocks[i].type === 'sensebox_send_to_osem') { | ||||
|         count++; | ||||
|  | ||||
| @ -350,6 +350,7 @@ Blockly.Arduino.sensebox_sensor_truebner_smt50 = function () { | ||||
|   var dropdown_port = this.getFieldValue('Port') | ||||
|   var dropdown_value = this.getFieldValue('value'); | ||||
|   var dropdown_pin = 1; | ||||
|   var code = ''; | ||||
|   if (dropdown_value === 'temp') { | ||||
|     if (dropdown_port === 'A') { | ||||
|       dropdown_pin = 1; | ||||
| @ -361,7 +362,7 @@ Blockly.Arduino.sensebox_sensor_truebner_smt50 = function () { | ||||
|       dropdown_pin = 5; | ||||
|     } | ||||
|     Blockly.Arduino.codeFunctions_['sensebox_smt50_temp'] = 'float getSMT50Temperature(int analogPin){\n  int sensorValue = analogRead(analogPin);\n  float voltage = sensorValue * (3.3 / 1024.0);\n   return (voltage - 0.5) * 100;\n}'; | ||||
|     var code = 'getSMT50Temperature(' + dropdown_pin + ')'; | ||||
|     code = 'getSMT50Temperature(' + dropdown_pin + ')'; | ||||
|     return [code, Blockly.Arduino.ORDER_ATOMIC]; | ||||
|   } | ||||
|   else if (dropdown_value === 'soil') { | ||||
| @ -375,7 +376,7 @@ Blockly.Arduino.sensebox_sensor_truebner_smt50 = function () { | ||||
|       dropdown_pin = 6; | ||||
|     } | ||||
|     Blockly.Arduino.codeFunctions_['sensebox_smt50_soil'] = 'float getSMT50Moisture(int analogPin){\n   int sensorValue = analogRead(analogPin);\n    float voltage = sensorValue * (3.3 / 1024.0);\n   return (voltage * 50) / 3;\n}'; | ||||
|     var code = 'getSMT50Moisture(' + dropdown_pin + ')'; | ||||
|     code = 'getSMT50Moisture(' + dropdown_pin + ')'; | ||||
|     return [code, Blockly.Arduino.ORDER_ATOMIC]; | ||||
|   } | ||||
| 
 | ||||
|  | ||||
| @ -33,7 +33,6 @@ export const DISPLAY = { | ||||
|     senseBox_display_plotYRange2: "Y-Wertebereich Ende", | ||||
|     senseBox_display_plotXTick: "X-Linienabstand", | ||||
|     senseBox_display_plotYTick: "Y-Linienabstand", | ||||
|     senseBox_display_printDisplay_tooltip: "Mit diesem Block können automatisch Diagramme auf dem Display erstellt werden.", | ||||
|     senseBox_display_plotTimeFrame: "Zeitabschnitt", | ||||
|     sensebox_display_fillCircle: "Zeichne Punkt", | ||||
|     sensebox_display_fillCircle_radius: "Radius", | ||||
|  | ||||
| @ -40,7 +40,5 @@ export const LORA = { | ||||
|     senseBox_LoRa_sensor_tip: "Sende einen Sensorwert mit einer bestimmten Anzahl an Bytes", | ||||
|     senseBox_LoRa_init_abp_tooltip: "Initialisiere die LoRa übertragung. Die Aktivierung erfolgt über ABP. Registriere eine Application auf [thethingsnetwork](https://thethingsnetwork.com) und kopiere den **Network Session Key** und den **App Session Key** im **msb Format** und die **Device ID** im **hex Format**.", | ||||
|     senseBox_LoRa_init_helpurl: "https://docs.sensebox.de/blockly/blockly-web-lora/", | ||||
| 
 | ||||
|     senseBox_LoRa_init_otaa_tooltip: "Initialisiere die LoRa übertragung. Die Aktivierung erfolgt über OTAA. Registriere eine Application auf [thethingsnetwork](https://thethingsnetwork.com) und kopiere die **DEVICE EUI** und die **Application EUI** im **lsb Format** den **App Key** im **msb Format**.", | ||||
|     senseBox_LoRa_init_helpurl: "https://docs.sensebox.de/blockly/blockly-web-lora/", | ||||
| } | ||||
| @ -8,7 +8,6 @@ export const OSEM = { | ||||
|     senseBox_osem_connection: "Verbinde mit openSenseMap:", | ||||
|     senseBox_osem_host: "opensensemap.org", | ||||
|     senseBox_osem_host_workshop: "workshop.opensensemap.org", | ||||
|     senseBox_osem_connection: "Verbinde mit openSenseMap", | ||||
|     senseBox_osem_exposure: "Typ", | ||||
|     senseBox_osem_stationary: "Stationär", | ||||
|     senseBox_osem_mobile: "Mobil", | ||||
|  | ||||
| @ -108,7 +108,6 @@ export const TRANSLATIONS = { | ||||
|     NEW_VARIABLE_TITLE: "Name der neuen Variable:", | ||||
|     ORDINAL_NUMBER_SUFFIX: "", | ||||
|     PROCEDURES_ALLOW_STATEMENTS: "Aussagen erlauben", | ||||
|     PROCEDURES_BEFORE_PARAMS: "mit:", | ||||
|     PROCEDURES_CALLNORETURN_HELPURL: "https://de.wikipedia.org/wiki/Prozedur_%28Programmierung%29", | ||||
|     PROCEDURES_CALLNORETURN_TOOLTIP: "Rufe einen Funktionsblock ohne Rückgabewert auf.", | ||||
|     PROCEDURES_CALLRETURN_HELPURL: "https://de.wikipedia.org/wiki/Prozedur_%28Programmierung%29", | ||||
|  | ||||
| @ -28,10 +28,8 @@ export const DISPLAY = { | ||||
|     senseBox_display_plotXRange2: "X-Range End", | ||||
|     senseBox_display_plotYRange1: "Y-Range Begin", | ||||
|     senseBox_display_plotYRange2: "Y-Range End", | ||||
|     senseBox_display_plotXTick: "X-Linienabstand", | ||||
|     senseBox_display_plotYTick: "Y-Tick", | ||||
|     senseBox_display_plotXTick: "X-Tick", | ||||
|     senseBox_display_printDisplay_tooltip: "Use this Block to plot values on the OLED Display", | ||||
|     senseBox_display_plotTimeFrame: "TimeFrame", | ||||
|     sensebox_display_fillCircle: "Draw Point", | ||||
|     sensebox_display_fillCircle_radius: "Radius", | ||||
|  | ||||
| @ -44,7 +44,6 @@ export const LORA = { | ||||
|     senseBox_LoRa_init_helpurl: "https://en.docs.sensebox.de/blockly/blockly-web-lora/", | ||||
| 
 | ||||
|     senseBox_LoRa_init_otaa_tooltip: "Initialize the LoRa transmission. The activation is done via OTAA. Register an application on [thethingsnetwork](https://thethingsnetwork.com) and copy the **DEVICE EUI** and the **Application EUI** in **lsb format** the **App Key** in **msb format**.", | ||||
|     senseBox_LoRa_init_helpurl: "https://en.docs.sensebox.de/blockly/blockly-web-lora/", | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -167,6 +167,11 @@ class Navbar extends Component { | ||||
|                   </Link> | ||||
|                 ); | ||||
|               } | ||||
|               else { | ||||
|                 return( | ||||
|                   null | ||||
|                   ) | ||||
|               } | ||||
|             } | ||||
|             )} | ||||
|           </List> | ||||
| @ -188,7 +193,14 @@ class Navbar extends Component { | ||||
|                   </Link> | ||||
|                 ); | ||||
|               } | ||||
|               else { | ||||
|                 return( | ||||
|                   null | ||||
|                   ) | ||||
|               } | ||||
|                | ||||
|             } | ||||
|              | ||||
|             )} | ||||
|           </List> | ||||
|         </Drawer> | ||||
|  | ||||
| @ -38,7 +38,7 @@ class Tutorial extends Component { | ||||
|       // authentication is completed
 | ||||
|       this.props.getTutorial(this.props.match.params.tutorialId); | ||||
|     } | ||||
|     else if(this.props.tutorial && !this.props.isLoading && this.props.tutorial._id != this.props.match.params.tutorialId) { | ||||
|     else if(this.props.tutorial && !this.props.isLoading && this.props.tutorial._id !== this.props.match.params.tutorialId) { | ||||
|       this.props.getTutorial(this.props.match.params.tutorialId); | ||||
|     } | ||||
|     if (this.props.message.id === 'GET_TUTORIAL_FAIL') { | ||||
|  | ||||
| @ -9,7 +9,7 @@ const initialState = { | ||||
|   user: null | ||||
| }; | ||||
| 
 | ||||
| export default function(state = initialState, action){ | ||||
| export default function foo(state = initialState, action){ | ||||
|   switch(action.type){ | ||||
|     case USER_LOADING: | ||||
|       return { | ||||
|  | ||||
| @ -32,7 +32,7 @@ const initialState = { | ||||
|   statistics: initialStatistics() | ||||
| }; | ||||
| 
 | ||||
| export default function(state = initialState, action){ | ||||
| export default function foo(state = initialState, action){ | ||||
|   switch(action.type){ | ||||
|     case VISIT: | ||||
|       return { | ||||
|  | ||||
| @ -6,7 +6,7 @@ const initialState = { | ||||
|   id: null | ||||
| }; | ||||
| 
 | ||||
| export default function(state = initialState, action){ | ||||
| export default function foo(state = initialState, action){ | ||||
|   switch(action.type){ | ||||
|     case GET_ERRORS: | ||||
|     case GET_SUCCESS: | ||||
|  | ||||
| @ -7,7 +7,7 @@ const initialState = { | ||||
|   progress: false | ||||
| }; | ||||
| 
 | ||||
| export default function (state = initialState, action) { | ||||
| export default function foo(state = initialState, action) { | ||||
|   switch (action.type) { | ||||
|     case PROJECT_PROGRESS: | ||||
|       return { | ||||
|  | ||||
| @ -21,7 +21,7 @@ const initialState = { | ||||
|   } | ||||
| }; | ||||
| 
 | ||||
| export default function(state = initialState, action){ | ||||
| export default function foo(state = initialState, action){ | ||||
|   switch(action.type){ | ||||
|     case BUILDER_CHANGE: | ||||
|       return { | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| import { TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, GET_STATUS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID, TUTORIAL_STEP } from '../actions/types'; | ||||
| import { TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, GET_STATUS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_STEP } from '../actions/types'; | ||||
| 
 | ||||
| 
 | ||||
| //
 | ||||
| @ -21,7 +21,7 @@ const initialState = { | ||||
|   progress: false | ||||
| }; | ||||
| 
 | ||||
| export default function (state = initialState, action) { | ||||
| export default function foo(state = initialState, action) { | ||||
|   switch (action.type) { | ||||
|     case TUTORIAL_PROGRESS: | ||||
|       return { | ||||
|  | ||||
| @ -16,7 +16,7 @@ const initialState = { | ||||
|   name: null | ||||
| }; | ||||
| 
 | ||||
| export default function(state = initialState, action){ | ||||
| export default function foo(state = initialState, action){ | ||||
|   switch(action.type){ | ||||
|     case NEW_CODE: | ||||
|       return { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user