From dc2f54bcd2802bbf0ef996ab53232893da09299b Mon Sep 17 00:00:00 2001 From: tzim Date: Wed, 20 May 2015 07:02:57 +0000 Subject: [PATCH] Modifs OSC --- DMX-2.0/DriverBoitierV2.cs | 2 +- DMX-2.0/OSCServer.cs | 13 ++++++++----- loupiottes.js | 21 ++++++++------------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/DMX-2.0/DriverBoitierV2.cs b/DMX-2.0/DriverBoitierV2.cs index 288ba07..bf8bcb6 100644 --- a/DMX-2.0/DriverBoitierV2.cs +++ b/DMX-2.0/DriverBoitierV2.cs @@ -43,7 +43,7 @@ namespace DMX2 Fin } - const int timeout = 200; + const int timeout = 1000; // tampons Entrée/Sortie public byte[] inputbuffer = new byte[532]; diff --git a/DMX-2.0/OSCServer.cs b/DMX-2.0/OSCServer.cs index d831ad9..83f8400 100644 --- a/DMX-2.0/OSCServer.cs +++ b/DMX-2.0/OSCServer.cs @@ -316,11 +316,14 @@ namespace DMX2 try { while (running) { recv = udpCli.Receive (ref remep); - Console.WriteLine(remep); + //Console.WriteLine(remep); OSCMessage msg = new OSCMessage(recv); - Console.WriteLine(msg.Address); +#if DEBUG + Console.Write(msg.Address); + Console.Write(" "); foreach(var arg in msg.Args) Console.WriteLine(arg.GetString()); +#endif try{ ProcessMessage(msg,remep); }catch{} @@ -502,7 +505,7 @@ namespace DMX2 break; case "off": if(!int.TryParse(toks[3],out dimId))return; - //if( msg.Args[0].GetInt() !=0) + if( msg.Args[0].GetInt() !=0) if(univ.AllumageForce.Contains(dimId)) univ.AllumageForce.Remove(dimId); break; @@ -540,13 +543,13 @@ namespace DMX2 int cirId; if (!int.TryParse (toks [2], out cirId)) return; - //if (msg.Args [0].GetInt () != 0) { + if (msg.Args [0].GetInt () != 0) { if (cirId > 0 && cirId <= Conduite.Courante.Circuits.Count) { Circuit c = Conduite.Courante.Circuits [cirId - 1]; if (Conduite.Courante.CircuitTelecomande.Contains (c)) Conduite.Courante.CircuitTelecomande.Remove (c); } - //} + } } break; case "alloff": diff --git a/loupiottes.js b/loupiottes.js index 05cd926..a1acc67 100644 --- a/loupiottes.js +++ b/loupiottes.js @@ -67,7 +67,7 @@ control.modeFunc = function(p1){ if( control.regMode == "UNI") lblMode.setValue("Mode : Univers n°"+control.regUniv); - + control.reglValChange(reglval.value); } control.reglValChange = function(val){ @@ -87,12 +87,7 @@ control.reglValChange = function(val){ control.btnRegl = function(id,val) { - //if(val==0)return; - /*for(var i = 0;i