summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Eefting <edwin@datux.nl>2012-11-06 23:48:46 (GMT)
committer Edwin Eefting <edwin@datux.nl>2012-11-06 23:48:46 (GMT)
commitd01f6f72e9689e6fcf23d3e72fb295d2dc8b6982 (patch)
tree60fc1d74998ec913efff0bc45f3011261406bf27
parent9f0ed3095fd597dc91951ac1bc995736a10168e1 (diff)
modfied for nurdspace
-rw-r--r--libs/cnetman.cpp2
-rw-r--r--modules/dmx.module/module.cpp18
-rw-r--r--modules/play_vlc.module/CMakeLists.txt2
-rw-r--r--wwwdir/dmx.html48
4 files changed, 50 insertions, 20 deletions
diff --git a/libs/cnetman.cpp b/libs/cnetman.cpp
index b4ebde7..dcd8093 100644
--- a/libs/cnetman.cpp
+++ b/libs/cnetman.cpp
@@ -206,7 +206,7 @@ bool CnetMan<Tnet>::runAccept(int port, int id)
{
- FIXEN: dit word niet gedaan bij exception, en exception word niet door called afgehandled!
+// FIXEN: dit word niet gedaan bij exception, en exception word niet door caller afgehandled!
lock_guard<mutex> lock(threadMutex);
//we're done, remove the Cnetobject from the list
nets.erase(id);
diff --git a/modules/dmx.module/module.cpp b/modules/dmx.module/module.cpp
index e9260db..383d088 100644
--- a/modules/dmx.module/module.cpp
+++ b/modules/dmx.module/module.cpp
@@ -95,7 +95,7 @@ SYNAPSE_REGISTER(module_Init)
out.clear();
out.event="dmx_Connect";
out["id"]=1;
- out["host"]="192.168.14.77";
+ out["host"]="192.168.1.6";
// out["host"]="localhost";
out["port"]=777;
out.send();
@@ -120,8 +120,12 @@ class CnetDmx : public synapse::Cnet
out.send();
//password
- string s("777\n\r");
- doWrite(s);
+ string s("777\r\n");
+ doWrite(s);
+
+ //16bits mode
+// s="*65FF#\n";
+ // doWrite(s);
}
void received(int id, asio::streambuf &readBuffer, std::size_t bytesTransferred)
@@ -219,17 +223,17 @@ SYNAPSE_REGISTER(dmx_Set)
if (msg["value"]>255 || msg["value"]<0)
throw(synapse::runtime_error("Illegal value"));
- if (msg["channel"]==6 && msg["value"]<180)
- msg["value"]=180;
+// if (msg["channel"]==6 && msg["value"]<180)
+// msg["value"]=180;
stringstream dmxStr;
//*C9<layer><channel><value>#
- dmxStr << "*C9fe";
+ dmxStr << "*C901";
dmxStr << setfill('0');
dmxStr << hex << setw(2) << (int)msg["channel"];
dmxStr << hex << setw(2) << (int)msg["value"];
- dmxStr << "#";
+ dmxStr << "#\n";
string s=dmxStr.str();
net.doWrite(msg["id"], s);
diff --git a/modules/play_vlc.module/CMakeLists.txt b/modules/play_vlc.module/CMakeLists.txt
index 141205d..5969111 100644
--- a/modules/play_vlc.module/CMakeLists.txt
+++ b/modules/play_vlc.module/CMakeLists.txt
@@ -10,7 +10,7 @@ MESSAGE(STATUS "Module name of ${CMAKE_CURRENT_BINARY_DIR} is: '${module_name}'"
#we really at least need 1.1.x, since the API has changed
INCLUDE(FindPkgConfig)
-pkg_check_modules (VLC libvlc>=1.1.0)
+#pkg_check_modules (VLC libvlc>=1.1.0)
IF(VLC_FOUND)
diff --git a/wwwdir/dmx.html b/wwwdir/dmx.html
index 7234993..e389847 100644
--- a/wwwdir/dmx.html
+++ b/wwwdir/dmx.html
@@ -7,6 +7,8 @@
<title>playlist test</title>
<script type="text/javascript" src="/synapse/synapse.js?1"></script>
+ <script type="text/javascript" src="lib/raphael.js"></script>
+ <script type="text/javascript" src="lib/colorwheel.js"></script>
<script type="text/javascript">
@@ -55,7 +57,37 @@
top:ui.offset.top
});
}
- });
+ });
+
+// $(".colorwheel").each(function()
+// {
+
+ var cw = Raphael.colorwheel(10,0,300);
+ cw.onchange=function(color)
+ {
+ var channel=15;
+ console.log(color);
+ var c = Raphael.color(color);
+ console.log(c);
+/// var channel=$(this).attr('_channel');
+ send(0,"dmx_Set",{
+ id:1,
+ 'channel':channel,
+ value:c.r
+ });
+ send(0,"dmx_Set",{
+ id:1,
+ 'channel':channel+1,
+ value:c.g
+ });
+ send(0,"dmx_Set",{
+ id:1,
+ 'channel':channel+2,
+ value:c.b
+ });
+ };
+
+// });
synapse_register("dmx_Update",function(msg_src, msg_dst, msg_event, msg)
{
@@ -108,21 +140,15 @@
<h1>Dyne village light controller</h1>
<div>
- <div class='draggable' _channel='1'>
+ <div class='draggable' _channel='1' style='left:150px'>
<div class='slider' _channel='1'></div>
</div>
- <div class='draggable' _channel='2'>
- <div class='slider' _channel='2'></div>
- </div>
+ <div class='Xdraggable' _channel='15' >
+ <div class='colorwheel' _channel='15' style='left:300px; position:absolute'></div>
+ </div>
- <div class='draggable' _channel='3'>
- <div class='slider' _channel='3'></div>
- </div>
- <div class='draggable' _channel='4'>
- <div class='slider' _channel='4'></div>
- </div>
<!--
<div class='draggable' _channel='5'>
<div class='slider' _channel='5'></div>