kylemcdonald / ofxdmx Goto Github PK
View Code? Open in Web Editor NEWDMX Pro wrapper for openFrameworks
License: Other
DMX Pro wrapper for openFrameworks
License: Other
Tried with latest develop branch from OF getting this error.
Seems to come from:
openframeworks/openFrameworks@c0dbd8a
Might be best to remove line 32 in ofxDmx.cpp?
Hi :)
I use ofxDMX a lot and it works beautifully.
But when trying to compile it in OF 0.10.1 I get a bunch of compile errors like this:
/Applications/of_v0.10.1_osx_release/addons/ofxDmx/src/ofxDmx.h:16:18: Unknown type name 'string'; did you mean 'std::string'?
/Applications/of_v0.10.1_osx_release/addons/ofxDmx/src/ofxDmx.h:31:2: Unknown type name 'vector'; did you mean 'std::vector'?
adding std:: does solve it.
is that now needed in OF 0.10.x ?
Hey Kyle.
Sometimes I don't want to connected to a specific indexed device, nor know the exact name.
So, I changed the code a bit to look for a partial name match.
dmx.connect("serial-EN", 512 );
maybe you think it makes sense to include it.
bool ofxDmx::connect(std::string device, unsigned int channels) {
vector<ofSerialDeviceInfo> serialDevices = serial.getDeviceList();
string deviceLine;
for(int i=0; i<serialDevices.size();i++){
deviceLine = serialDevices[i].getDeviceName().c_str();
if(ofIsStringInString(deviceLine, device)){
connected = serial.setup(deviceLine.c_str(), 57600);
setChannels(channels);
return connected;
}
}
}
I think there is a bug in example-controller at line 47 causing to jump over every 3th channel. Its one channel++ too much...
This:
for(int module = 1; module <= modules; module++) {
dmx.setLevel(channel++, red[module]*255);
dmx.setLevel(channel++, green[module]*255);
dmx.setLevel(channel++, blue[module]*255);
channel++;
}
should be
for(int module = 1; module <= modules; module++) {
dmx.setLevel(channel++, red[module]*255);
dmx.setLevel(channel++, green[module]*255);
dmx.setLevel(channel++, blue[module]*255);
}
When running the examples on OSX 10.11 with XCode 7.2 with OF 0.9.3 I'm noticing several issues when running the examples. For instance "The run destination My Mac is not valid for Running the scheme 'ofxDmxExample'." The example-controller has several more, including issues with "AssertMacros.h". Is it possible to update them? Thanks!
Just wanted to report that I've had some issues with the ofxDMX addon recently.
I've been using this device together with an Enttec DMX Usb Pro:
http://www.enttec.com/?main_menu=Products&pn=71003
The issue I had was occasional weird flickering when I was sending different data to each channel. I had no visual glitches when sending the same data to all four channels (testing with a sinusoidal signal).
I looked at the code but couldn't find any obvious bugs. I then swapped to ofxGenericDmx and my problems were gone.
I think it could be the serial driver vs FTDI driver....not sure really, but thought I'd flag it in case anyone else has had problems. This was on Ubuntu 12.10, 64 bit.
Also posted this here:
http://forum.openframeworks.cc/index.php/topic,7277.new/topicseen.html
I'm using the addon together with Enttec Dmx USB Pro and having low framerate (about two updates per second only) using only 6 channels.
The same setup runs nice with other applications.
here is the relevant part of the test code. Thanks
//--------------------------------------------------------------
void ofApp::setup(){
// dmx.connect("tty.usbserial-EN077864", 6*3);
dmx.connect("cu.usbserial-EN077864", 6*3);
}
//--------------------------------------------------------------
void ofApp::update(){
for (int a=0; a<6; a++) {
int gray = ofNoise(ofGetFrameNum()/10.0f)*255.0;
float qual = a/(float)6.0;
float r = gray;
float g = gray;
float b = gray;
dmx.setLevel(a*3 + 1, b);
dmx.setLevel(a*3 + 2, g);
dmx.setLevel(a*3 + 3, r);
}
// if(dmx.isConnected()) {
dmx.update();
// }
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.