Selaa lähdekoodia

DMX : default speed limit

eLandon 4 vuotta sitten
vanhempi
commit
d4a5648f3a
1 muutettua tiedostoa jossa 10 lisäystä ja 10 poistoa
  1. 10 10
      soft/DMXlyre.js

+ 10 - 10
soft/DMXlyre.js

@@ -25,7 +25,7 @@ function defaultState(){
 	local.send(11, 0); // STATIC GOBO
 	local.send(9, 41); // ROTATING GOBO
 	local.send(10,13); // GOBO ROTATION
-
+	local.send(5, 200); //SPEED LIMIT
 }
 
 function float2DMX(value){
@@ -43,23 +43,23 @@ function scriptParameterChanged(param)
 		local.send(1, values[0]);
 		local.send(3, values[1]);
 	}
-	if(param.is(tilt_DMX)){
+	else if(param.is(tilt_DMX)){
 		var  values = float2DMX(param.get());
 		local.send(2, values[0]);
 		local.send(4, values[1]);
 	}
-	if(param.is(zoom_DMX)){local.send(14, param.get()*255);}
-	if(param.is(focus_DMX)){local.send(13, param.get()*255);}
-	if(param.is(dimmer_DMX)){local.send(6, param.get()*255);}
+	else if(param.is(zoom_DMX)){local.send(14, param.get()*255);}
+	else if(param.is(focus_DMX)){local.send(13, param.get()*255);}
+	else if(param.is(dimmer_DMX)){local.send(6, param.get()*255);}
 
-	if(param.is(defaultTrigger)){defaultState();}
+	else if(param.is(defaultTrigger)){defaultState();}
 
 
 	//You can use the script.log() function to show an information inside the logger panel. To be able to actuallt see it in the logger panel, you will have to turn on "Log" on this script.
-	script.log("Parameter changed : "+param.name); //All parameters have "name" property
-	if(param.is(myTrigger)) script.log("Trigger !"); //You can check if two variables are the reference to the same parameter or object with the method .is()
-	else if(param.is(myEnumParam)) script.log("Key = "+param.getKey()+", data = "+param.get()); //The enum parameter has a special function getKey() to get the key associated to the option. .get() will give you the data associated
-	else script.log("Value is "+param.get()); //All parameters have a get() method that will return their value
+	// script.log("Parameter changed : "+param.name); //All parameters have "name" property
+	else if(param.is(myTrigger)) {script.log("Trigger !");} //You can check if two variables are the reference to the same parameter or object with the method .is()
+	else if(param.is(myEnumParam)) {script.log("Key = "+param.getKey()+", data = "+param.get());} //The enum parameter has a special function getKey() to get the key associated to the option. .get() will give you the data associated
+	else {script.log("Value is "+param.get());}; //All parameters have a get() method that will return their value
 }
 
 /*