Utility graphs update when they receive data ...
... instead of at specified intervals
This commit is contained in:
parent
7b932f406d
commit
8bb89440c1
Binary file not shown.
@ -11,7 +11,7 @@
|
||||
<Widget>
|
||||
<Kind>2</Kind>
|
||||
<Name>Toggle Clamp Y Values</Name>
|
||||
<Value>0</Value>
|
||||
<Value>1</Value>
|
||||
</Widget>
|
||||
<Widget>
|
||||
<Kind>4</Kind>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
Build started 21/1/2014 2:24:25 AM.
|
||||
Build started 21/1/2014 2:40:34 AM.
|
||||
1>Project "C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\Utility_Box.vcxproj" on node 2 (Build target(s)).
|
||||
1>ClCompile:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /I..\..\..\libs\openFrameworks /I..\..\..\libs\openFrameworks\graphics /I..\..\..\libs\openFrameworks\app /I..\..\..\libs\openFrameworks\sound /I..\..\..\libs\openFrameworks\utils /I..\..\..\libs\openFrameworks\communication /I..\..\..\libs\openFrameworks\video /I..\..\..\libs\openFrameworks\types /I..\..\..\libs\openFrameworks\math /I..\..\..\libs\openFrameworks\3d /I..\..\..\libs\openFrameworks\gl /I..\..\..\libs\openFrameworks\events /I..\..\..\libs\glut\include /I..\..\..\libs\rtAudio\include /I..\..\..\libs\quicktime\include /I..\..\..\libs\freetype\include /I..\..\..\libs\freetype\include\freetype2 /I..\..\..\libs\freeImage\include /I..\..\..\libs\fmodex\include /I..\..\..\libs\videoInput\include /I..\..\..\libs\glew\include\ /I..\..\..\libs\glu\include /I..\..\..\libs\tess2\include /I..\..\..\libs\cairo\include\cairo /I..\..\..\libs\poco\include /I..\..\..\libs\glfw\include /I..\..\..\..\libs\openssl\include /I..\..\..\addons /Isrc /Isrc\data /Isrc\gui /Isrc\visual /Isrc\visual\graph /I..\..\..\addons\ofxLibwebsockets\libs\jsoncpp /I..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\ /I..\..\..\addons\ofxLibwebsockets\libs\openssl\openssl /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src /I..\..\..\addons\ofxLibwebsockets\src /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers /I..\..\..\addons\ofxSpacebrew\src /I..\..\..\addons\ofxUI\src /I..\..\..\addons\ofxXmlSettings\libs /I..\..\..\addons\ofxXmlSettings\src /I..\..\..\addons\ofxFTGL\src /I..\..\..\addons\ofxFTGL\libs\FTGL\include\FTGL /I..\..\..\addons\ofxFTGL\libs\FTGL\include /I..\..\..\addons\ofxFTGL\libs\FTGL /I..\..\..\addons\ofxOsc\libs /I..\..\..\addons\ofxOsc\libs\oscpack /I..\..\..\addons\ofxOsc\libs\oscpack\src /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32 /I..\..\..\addons\ofxOsc\libs\oscpack\src\osc /I..\..\..\addons\ofxOsc\src /Zi /nologo /W3 /WX- /O2 /Oy- /D WIN32 /D NDEBUG /D _CONSOLE /D POCO_STATIC /D CAIRO_WIN32_STATIC_BUILD /D DISABLE_SOME_FLOATING_POINT /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"obj\Release\\" /Fd"obj\Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt src\visual\Scene.cpp
|
||||
Scene.cpp
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /I..\..\..\libs\openFrameworks /I..\..\..\libs\openFrameworks\graphics /I..\..\..\libs\openFrameworks\app /I..\..\..\libs\openFrameworks\sound /I..\..\..\libs\openFrameworks\utils /I..\..\..\libs\openFrameworks\communication /I..\..\..\libs\openFrameworks\video /I..\..\..\libs\openFrameworks\types /I..\..\..\libs\openFrameworks\math /I..\..\..\libs\openFrameworks\3d /I..\..\..\libs\openFrameworks\gl /I..\..\..\libs\openFrameworks\events /I..\..\..\libs\glut\include /I..\..\..\libs\rtAudio\include /I..\..\..\libs\quicktime\include /I..\..\..\libs\freetype\include /I..\..\..\libs\freetype\include\freetype2 /I..\..\..\libs\freeImage\include /I..\..\..\libs\fmodex\include /I..\..\..\libs\videoInput\include /I..\..\..\libs\glew\include\ /I..\..\..\libs\glu\include /I..\..\..\libs\tess2\include /I..\..\..\libs\cairo\include\cairo /I..\..\..\libs\poco\include /I..\..\..\libs\glfw\include /I..\..\..\..\libs\openssl\include /I..\..\..\addons /Isrc /Isrc\data /Isrc\gui /Isrc\visual /Isrc\visual\graph /I..\..\..\addons\ofxLibwebsockets\libs\jsoncpp /I..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\ /I..\..\..\addons\ofxLibwebsockets\libs\openssl\openssl /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets /I..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src /I..\..\..\addons\ofxLibwebsockets\src /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port /I..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\win32port\win32helpers /I..\..\..\addons\ofxSpacebrew\src /I..\..\..\addons\ofxUI\src /I..\..\..\addons\ofxXmlSettings\libs /I..\..\..\addons\ofxXmlSettings\src /I..\..\..\addons\ofxFTGL\src /I..\..\..\addons\ofxFTGL\libs\FTGL\include\FTGL /I..\..\..\addons\ofxFTGL\libs\FTGL\include /I..\..\..\addons\ofxFTGL\libs\FTGL /I..\..\..\addons\ofxOsc\libs /I..\..\..\addons\ofxOsc\libs\oscpack /I..\..\..\addons\ofxOsc\libs\oscpack\src /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix /I..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32 /I..\..\..\addons\ofxOsc\libs\oscpack\src\osc /I..\..\..\addons\ofxOsc\src /Zi /nologo /W3 /WX- /O2 /Oy- /D WIN32 /D NDEBUG /D _CONSOLE /D POCO_STATIC /D CAIRO_WIN32_STATIC_BUILD /D DISABLE_SOME_FLOATING_POINT /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"obj\Release\\" /Fd"obj\Release\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt src\data\DataManager.cpp src\visual\graph\GraphManager.cpp
|
||||
DataManager.cpp
|
||||
1>C:\Users\James Alliban\Work\of_v0.8.0_vs_release\libs\poco\include\Poco/StreamConverter.h(126): warning C4250: 'Poco::InputStreamConverter' : inherits 'std::basic_istream<_Elem,_Traits>::std::basic_istream<_Elem,_Traits>::_Add_vtordisp1' via dominance
|
||||
with
|
||||
[
|
||||
@ -27,6 +27,32 @@
|
||||
_Elem=char,
|
||||
_Traits=std::char_traits<char>
|
||||
]
|
||||
GraphManager.cpp
|
||||
1>C:\Users\James Alliban\Work\of_v0.8.0_vs_release\libs\poco\include\Poco/StreamConverter.h(126): warning C4250: 'Poco::InputStreamConverter' : inherits 'std::basic_istream<_Elem,_Traits>::std::basic_istream<_Elem,_Traits>::_Add_vtordisp1' via dominance
|
||||
with
|
||||
[
|
||||
_Elem=char,
|
||||
_Traits=std::char_traits<char>
|
||||
]
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\istream(74) : see declaration of 'std::basic_istream<_Elem,_Traits>::_Add_vtordisp1'
|
||||
with
|
||||
[
|
||||
_Elem=char,
|
||||
_Traits=std::char_traits<char>
|
||||
]
|
||||
1>C:\Users\James Alliban\Work\of_v0.8.0_vs_release\libs\poco\include\Poco/StreamConverter.h(144): warning C4250: 'Poco::OutputStreamConverter' : inherits 'std::basic_ostream<_Elem,_Traits>::std::basic_ostream<_Elem,_Traits>::_Add_vtordisp2' via dominance
|
||||
with
|
||||
[
|
||||
_Elem=char,
|
||||
_Traits=std::char_traits<char>
|
||||
]
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\ostream(90) : see declaration of 'std::basic_ostream<_Elem,_Traits>::_Add_vtordisp2'
|
||||
with
|
||||
[
|
||||
_Elem=char,
|
||||
_Traits=std::char_traits<char>
|
||||
]
|
||||
Generating Code...
|
||||
Link:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"bin\Utility_Box.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:..\..\..\libs\glut\lib\vs /LIBPATH:..\..\..\libs\glfw\lib\vs /LIBPATH:..\..\..\libs\rtAudio\lib\vs /LIBPATH:..\..\..\libs\FreeImage\lib\vs /LIBPATH:..\..\..\libs\freetype\lib\vs /LIBPATH:..\..\..\libs\quicktime\lib\vs /LIBPATH:..\..\..\libs\fmodex\lib\vs /LIBPATH:..\..\..\libs\videoInput\lib\vs /LIBPATH:..\..\..\libs\cairo\lib\vs /LIBPATH:..\..\..\libs\glew\lib\vs /LIBPATH:..\..\..\libs\glu\lib\vs /LIBPATH:..\..\..\libs\openssl\lib\vs /LIBPATH:..\..\..\libs\Poco\lib\vs /LIBPATH:..\..\..\libs\tess2\lib\vs /LIBPATH:..\..\..\addons\ofxFTGL\libs\FTGL\lib\vs2012 /LIBPATH:..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\win32\Release "cairo-static.lib" "pixman-1.lib" msimg32.lib OpenGL32.lib GLu32.lib kernel32.lib setupapi.lib Vfw32.lib comctl32.lib glut32.lib rtAudio.lib videoInput.lib libfreetype.lib FreeImage.lib qtmlClient.lib dsound.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib glew32s.lib fmodex_vc.lib glu32.lib crypt32.lib libeay32MD.lib ssleay32MD.lib PocoFoundationmd.lib PocoNetmd.lib PocoUtilmd.lib PocoXMLmd.lib Ws2_32.lib tess2.lib glfw3.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib websockets_static.lib ZLIB.lib ftgl_static.lib /NODEFAULTLIB:PocoFoundationd.lib /NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:LIBC.lib /NODEFAULTLIB:LIBCMT /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"bin\Utility_Box.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE:NO /NXCOMPAT /IMPLIB:"bin\Utility_Box.lib" /MACHINE:X86 /SAFESEH obj\Release\icon.res
|
||||
obj\Release\ofxFTGLFont.obj
|
||||
@ -106,4 +132,4 @@
|
||||
|
||||
Build succeeded.
|
||||
|
||||
Time Elapsed 00:00:07.11
|
||||
Time Elapsed 00:00:10.80
|
||||
|
||||
@ -1578,3 +1578,8 @@ C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Util
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.lib
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.exp
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.exp
|
||||
^C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\Utility_Box.vcxproj
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.lib
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.lib
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.exp
|
||||
C:\Users\James Alliban\Work\of_v0.8.0_vs_release\CRITICAL-INFRASTRUCTURE\of\Utility_Box\bin\Utility_Box.exp
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -53,9 +53,9 @@ void DataManager::update()
|
||||
dataObject.max = 1;
|
||||
|
||||
dataObjects.push_back(dataObject);
|
||||
app->scene.addNewData(i, dataObject);
|
||||
}
|
||||
|
||||
app->scene.addNewData(dataObjects);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -64,25 +64,23 @@ void DataManager::update()
|
||||
if (ofGetElapsedTimef() >= nextDataSendTime + sendDataSpeed)
|
||||
{
|
||||
nextDataSendTime += sendDataSpeed;
|
||||
app->scene.addNewData(newData);
|
||||
//app->scene.addNewData(newData);
|
||||
|
||||
|
||||
ofstream logFile;
|
||||
logFile.open(ofToDataPath("subscriber_log.txt").c_str());
|
||||
string str;
|
||||
//ofstream logFile;
|
||||
//logFile.open(ofToDataPath("subscriber_log.txt").c_str());
|
||||
//string str;
|
||||
|
||||
for (int i = 0; i < newData.size(); i++)
|
||||
{
|
||||
DataObject data = newData[i];
|
||||
str += ofToString(i) + " = " + data.info + "\n";
|
||||
|
||||
}
|
||||
unsigned char buf = ofToChar(str);
|
||||
// write data to txt file
|
||||
logFile << str[0] << str <<"\n";
|
||||
|
||||
logFile.close();
|
||||
//for (int i = 0; i < newData.size(); i++)
|
||||
//{
|
||||
// DataObject data = newData[i];
|
||||
// str += ofToString(i) + " = " + data.info + "\n";
|
||||
//}
|
||||
//unsigned char buf = ofToChar(str);
|
||||
//// write data to txt file
|
||||
//logFile << str[0] << str <<"\n";
|
||||
|
||||
//logFile.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,6 +135,7 @@ void DataManager::onMessage( Spacebrew::Message & m )
|
||||
{
|
||||
//isPublisher0DataReceived = true;
|
||||
newData[i] = dataObject;
|
||||
app->scene.addNewData(i, newData[i]);
|
||||
//printf("- - - adding %s to dataObject %i, info:%s, min:%f \n", m.name.c_str(), i, newData[i].info.c_str(), newData[i].min);
|
||||
|
||||
}
|
||||
|
||||
@ -28,8 +28,6 @@ void Scene::setup()
|
||||
isCamAutoSwap = true;
|
||||
|
||||
setViewport();
|
||||
|
||||
//setupTitleFbo();
|
||||
}
|
||||
|
||||
|
||||
@ -147,9 +145,9 @@ void Scene::setViewport()
|
||||
|
||||
|
||||
|
||||
void Scene::addNewData(vector<DataObject> newData)
|
||||
void Scene::addNewData(int i, DataObject newData)
|
||||
{
|
||||
graphManager.addNewData(newData);
|
||||
graphManager.addNewData(i, newData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ public:
|
||||
void draw();
|
||||
void setViewport();
|
||||
void drawTextBox(string copy, string align);
|
||||
void addNewData(vector<DataObject> newData);
|
||||
void addNewData(int i, DataObject newData);
|
||||
void clearGraphData();
|
||||
void keyPressed(int key);
|
||||
void switchCamera();
|
||||
|
||||
@ -51,13 +51,13 @@ void GraphManager::draw()
|
||||
|
||||
|
||||
|
||||
void GraphManager::addNewData(vector<DataObject> newData)
|
||||
void GraphManager::addNewData(int i, DataObject newData)
|
||||
{
|
||||
for (int i = 0; i < graphs.size(); i++)
|
||||
{
|
||||
//for (int i = 0; i < graphs.size(); i++)
|
||||
//{
|
||||
Graph *graph = graphs[i];
|
||||
graph->addNewData(newData[i]);
|
||||
}
|
||||
graph->addNewData(newData);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ public:
|
||||
void setup();
|
||||
void update(ofVec3f ativeCamPos);
|
||||
void draw();
|
||||
void addNewData(vector<DataObject> newData);
|
||||
void addNewData(int i, DataObject newData);
|
||||
void clearGraphData();
|
||||
void updateInfoText();
|
||||
void outputData();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user