Browse Source

added pimapper libs, fixed tcp value

tsns-map
cailean 5 months ago
parent
commit
2fe1fc6a69
  1. 20
      .vscode/c_cpp_properties.json
  2. 3
      .vscode/settings.json
  3. 2
      addons.make
  4. 3
      src/Server.cpp
  5. 4
      src/main.cpp
  6. 3
      src/ofApp.h

20
.vscode/c_cpp_properties.json

@ -114,7 +114,24 @@
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxTSNE/src", "/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxTSNE/src",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOsc/libs/oscpack/src/osc", "/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOsc/libs/oscpack/src/osc",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOsc/libs/oscpack/src/ip", "/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOsc/libs/oscpack/src/ip",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxTSNE/src/bhtsne" "/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxTSNE/src/bhtsne",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Sources",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Application",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Info",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Surfaces",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Types",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Types",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Gui",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Gui",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Gui/Widgets",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Utils",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/MediaServer",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxXmlSettings/src",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxXmlSettings/libs",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/UserInterface",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Commands",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src/Application/Modes"
], ],
"browse": { "browse": {
"limitSymbolsToIncludedHeaders": true, "limitSymbolsToIncludedHeaders": true,
@ -126,6 +143,7 @@
"${workspaceRoot}/../../../addons", "${workspaceRoot}/../../../addons",
"${workspaceRoot}/../../../libs/openFrameworks", "${workspaceRoot}/../../../libs/openFrameworks",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOpenCv/src", "/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxOpenCv/src",
"/home/cailean/Desktop/openframeworks/of_v0.12.0_linux64gcc6_release/addons/ofxPiMapper/src",
"/usr/local/onnxruntime-linux-x64-gpu-1.19.2/include" "/usr/local/onnxruntime-linux-x64-gpu-1.19.2/include"
] ]
}, },

3
.vscode/settings.json

@ -0,0 +1,3 @@
{
"C_Cpp.errorSquiggles": "enabled"
}

2
addons.make

@ -8,3 +8,5 @@ ofxGui
ofxGui ofxGui
ofxTSNE ofxTSNE
ofxTSNE ofxTSNE
ofxPiMapper
ofxPiMapper

3
src/Server.cpp

@ -50,7 +50,7 @@ void Server::addOrUpdateClient(int client_id, float value, const std::string& ip
void Server::updateEmbedding(){ void Server::updateEmbedding(){
for(const auto& c : clients){ for(const auto& c : clients){
const ClientInfo& info = c.second; const ClientInfo& info = c.second;
float val = (std::round(info.value * 1000.0f) / 1000.0f) / 100.0f; float val = std::round(info.value * 100.0f) / 100.0f;
switch(c.first){ switch(c.first){
case 0: case 0:
embedding.angry = val; embedding.angry = val;
@ -106,7 +106,6 @@ void Server::checkActivity(){
if (duration >= 2) { if (duration >= 2) {
is_active = false; is_active = false;
std::cout << is_active << std::endl;
} }
} }
} }

4
src/main.cpp

@ -6,9 +6,9 @@ int main( ){
//Use ofGLFWWindowSettings for more options like multi-monitor fullscreen //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen
ofGLWindowSettings settings; ofGLWindowSettings settings;
settings.setSize(1920, 720); settings.setSize(1512, 1080);
settings.setGLVersion(3, 2); settings.setGLVersion(3, 2);
settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN settings.windowMode = OF_FULLSCREEN; //can also be OF_FULLSCREEN
auto window = ofCreateWindow(settings); auto window = ofCreateWindow(settings);

3
src/ofApp.h

@ -13,6 +13,7 @@
#include "ModelThread.h" #include "ModelThread.h"
#include "Server.h" #include "Server.h"
#include "Request.h" #include "Request.h"
// #include "ofxPiMapper.h"
class ofApp : public ofBaseApp{ class ofApp : public ofBaseApp{
@ -81,4 +82,6 @@ class ofApp : public ofBaseApp{
std::unique_ptr<Server> server; std::unique_ptr<Server> server;
Vector7D embedding; Vector7D embedding;
//ofxPiMapper mapper;
}; };

Loading…
Cancel
Save