Expose time interval to user in config file for sky browser topic. This will give the user control over how often data is passed. Hopefully a future proof fix for GPU crash

This commit is contained in:
Ylva Selling
2022-04-26 14:39:00 -04:00
parent 19103a1540
commit 8a292c1645
5 changed files with 24 additions and 4 deletions

View File

@@ -72,6 +72,10 @@ ServerInterface* ServerModule::serverInterfaceByIdentifier(const std::string& id
return si->get();
}
int ServerModule::skyBrowserUpdateTime() const {
return _skyBrowserUpdate;
}
void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) {
global::callback::preSync->emplace_back([this]() {
ZoneScopedN("ServerModule")
@@ -110,6 +114,12 @@ void ServerModule::internalInitialize(const ghoul::Dictionary& configuration) {
_interfaces.push_back(std::move(serverInterface));
}
}
// Ylva Selling, 2022-04-26 hasValue<int> doesn't find the variable
if (configuration.hasValue<double>("SkyBrowserUpdateTime")) {
_skyBrowserUpdate = static_cast<int>(
configuration.value<double>("SkyBrowserUpdateTime")
);
}
}
void ServerModule::preSync() {