Added Spacebrew auto-reconnect
Millis between reconnect checks added to GUI
This commit is contained in:
@@ -26,6 +26,9 @@ void DataManager::setupSpacebrew()
|
||||
string host = "54.194.189.129"; // Spacebrew::SPACEBREW_CLOUD; // "localhost";
|
||||
string name = "CRITICAL INFRASTRUCTURE UTILITY BOX" + subscriberDevName;
|
||||
string description = "Description goes here. Not sure why. Let me know if you see this and tell me if you need it";
|
||||
|
||||
spacebrew.setAutoReconnect(true);
|
||||
spacebrew.setReconnectRate(reconnectFrequency);
|
||||
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ class DataManager
|
||||
|
||||
// create your spacebrew object
|
||||
Spacebrew::Connection spacebrew;
|
||||
|
||||
float reconnectFrequency;
|
||||
vector<DataObject> newData;
|
||||
|
||||
//bool isPublisher0DataReceived;
|
||||
|
||||
@@ -64,6 +64,11 @@ void GUI::addGraphGlobalGUI()
|
||||
string title = "GRAPH GLOBAL";
|
||||
ofxUICanvas* gui = getNewGUI(title);
|
||||
// gui->addLabel("GRAPH TEXT");
|
||||
|
||||
gui->addSpacer(length, 1);
|
||||
gui->addSlider("Reconnect Frequency", 1000, 60000, &app->dataManager.reconnectFrequency, length, dim);
|
||||
|
||||
|
||||
//gui->addSpacer(length, 1);
|
||||
//gui->addSlider("Size", 5, 50, &app->scene.graphTextSize, length, dim);
|
||||
//gui->addSlider("Red", 0, 255, &app->scene.graphTextColour[0], length, dim);
|
||||
|
||||
Reference in New Issue
Block a user