From 2fe1fc6a6996135f4ce27d2511bf96ddc8a9a7d2 Mon Sep 17 00:00:00 2001 From: cailean Date: Wed, 9 Oct 2024 18:42:47 +0100 Subject: [PATCH] added pimapper libs, fixed tcp value --- .vscode/c_cpp_properties.json | 20 +++++++++++++++++++- .vscode/settings.json | 3 +++ addons.make | 4 +++- src/Server.cpp | 3 +-- src/main.cpp | 4 ++-- src/ofApp.cpp | 2 +- src/ofApp.h | 3 +++ 7 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 9866e07..690731f 100644 --- a/.vscode/c_cpp_properties.json +++ b/.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/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/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": { "limitSymbolsToIncludedHeaders": true, @@ -126,6 +143,7 @@ "${workspaceRoot}/../../../addons", "${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/ofxPiMapper/src", "/usr/local/onnxruntime-linux-x64-gpu-1.19.2/include" ] }, diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fc4c15b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "C_Cpp.errorSquiggles": "enabled" +} \ No newline at end of file diff --git a/addons.make b/addons.make index c9ca0d6..3fb9991 100644 --- a/addons.make +++ b/addons.make @@ -7,4 +7,6 @@ ofxNetwork ofxGui ofxGui ofxTSNE -ofxTSNE \ No newline at end of file +ofxTSNE +ofxPiMapper +ofxPiMapper \ No newline at end of file diff --git a/src/Server.cpp b/src/Server.cpp index be0e25c..ad58a57 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -50,7 +50,7 @@ void Server::addOrUpdateClient(int client_id, float value, const std::string& ip void Server::updateEmbedding(){ for(const auto& c : clients){ 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){ case 0: embedding.angry = val; @@ -106,7 +106,6 @@ void Server::checkActivity(){ if (duration >= 2) { is_active = false; - std::cout << is_active << std::endl; } } } diff --git a/src/main.cpp b/src/main.cpp index 0afab0b..8cee13f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,9 +6,9 @@ int main( ){ //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen ofGLWindowSettings settings; - settings.setSize(1920, 720); + settings.setSize(1512, 1080); 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); diff --git a/src/ofApp.cpp b/src/ofApp.cpp index 23601f6..18b3581 100644 --- a/src/ofApp.cpp +++ b/src/ofApp.cpp @@ -70,7 +70,7 @@ void ofApp::setup(){ //-------------------------------------------------------------- void ofApp::update(){ - /* update server - check for clients and values */ + /* update server - check for clients and values */ server->update(); /* Check to see if the application has moved to the first frame diff --git a/src/ofApp.h b/src/ofApp.h index a330f2a..47f104f 100644 --- a/src/ofApp.h +++ b/src/ofApp.h @@ -13,6 +13,7 @@ #include "ModelThread.h" #include "Server.h" #include "Request.h" +// #include "ofxPiMapper.h" class ofApp : public ofBaseApp{ @@ -81,4 +82,6 @@ class ofApp : public ofBaseApp{ std::unique_ptr server; Vector7D embedding; + + //ofxPiMapper mapper; };