summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@getdrop.com>2017-08-31 12:43:03 +0100
committerTim Redfern <tim@getdrop.com>2017-08-31 12:43:03 +0100
commit809dbfb4e437c5c991d8ed4d9b8c097ac95abda9 (patch)
tree82e08c7cd6f61424ca65cd0174c62297b1daaa2a /gui/src/ofApp.cpp
parent742e27767fd4208afe99ac42f243b88eef0ed7b3 (diff)
prototype DMX control
Diffstat (limited to 'gui/src/ofApp.cpp')
-rw-r--r--gui/src/ofApp.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp
index b026984..11ca50d 100644
--- a/gui/src/ofApp.cpp
+++ b/gui/src/ofApp.cpp
@@ -1,10 +1,15 @@
#include "ofApp.h"
#include "glew.h"
+
//--------------------------------------------------------------
void ofApp::setup(){
+ if (dmx.connect("tty.usbserial-EN143965")){
+ printf("DMX connected!\n");
-
+ map.push_back(dmxMap(&dmx,1,2,3,100,100));
+ }
+ else printf("DMX not connected.\n");
}
@@ -22,6 +27,12 @@ void ofApp::updateOutput(ofEventArgs & args){
images.update();
+ if (dmx.isConnected()){
+ for (auto m=map.begin();m!=map.end();m++){
+ m->update();
+ }
+ }
+
}