Only send skybrowser topic message if data changed

Maybe a little ugly to check the jsonString, but it does the job for now. Later we should probably make a nicer implementation
This commit is contained in:
Emma Broman
2022-04-28 12:40:18 +02:00
parent 9d0e9c84d4
commit 8896b92f82
4 changed files with 58 additions and 40 deletions

View File

@@ -46,6 +46,8 @@ private:
int _targetDataCallbackHandle = UnsetOnChangeHandle;
bool _isDone = false;
std::chrono::system_clock::time_point _lastUpdateTime;
std::string _lastUpdateJsonString;
std::chrono::milliseconds _skyBrowserUpdateTime = std::chrono::milliseconds(100);
};