Went back to previous working version - commented out new changes for bug fixing 🐛

This commit is contained in:
aniisaaden
2020-09-15 11:15:48 +02:00
parent 8c300d7d85
commit 465b377515

View File

@@ -103,15 +103,6 @@ namespace openspace {
return _socket.get();
}
//Connection
bool SoftwareConnection::sendMessage(std::string message) {
if (!_socket->put<char>(message.data(), message.size())) {
return false;
}
return true;
}
// Connection
SoftwareConnection::Message SoftwareConnection::receiveMessage() {
// Header consists of version (1 char), message type (4 char) & message size (4 char)
@@ -142,10 +133,9 @@ namespace openspace {
throw SoftwareConnectionLostError();
}
//sendMessage(messageBuffer);
std::string header = "O";
sendMessage(header);
LERROR(fmt::format("Meddelandet som skickas {}", header));
//std::string header = "O";
//sendMessage(header);
//LERROR(fmt::format("Meddelandet som skickas {}", header));
// Read message typ: byte 1-4
std::string type;
@@ -186,6 +176,15 @@ namespace openspace {
}
}
//Connection
bool SoftwareConnection::sendMessage(std::string message) {
if (!_socket->put<char>(message.data(), message.size())) {
return false;
}
return true;
}
// Server
void SoftwareIntegrationModule::start(int port)
{
@@ -351,7 +350,7 @@ namespace openspace {
float opacity = readFloatValue(message);
// Update opacity of renderable
const Renderable* myrenderable = renderable(identifier);
const Renderable* myrenderable = renderable("RenderablePointsCloud");
properties::Property* opacityProperty = myrenderable->property("Opacity");
opacityProperty->set(opacity);
break;
@@ -360,8 +359,8 @@ namespace openspace {
std::string identifier = readIdentifier(message);
float size = readFloatValue(message);
// Update color of renderable
const Renderable * myrenderable = renderable(identifier);
// Update size of renderable
const Renderable * myrenderable = renderable("RenderablePointsCloud");
properties::Property* sizeProperty = myrenderable->property("Size");
sizeProperty->set(size);
break;