Moved FEATURE_CLOUD and FEATURE_UDPCLOUD into config-system

This commit is contained in:
CommanderRedYT
2022-01-17 22:10:07 +01:00
parent ffd98375cc
commit 9890c9fb24
22 changed files with 38 additions and 71 deletions

View File

@@ -24,7 +24,6 @@ namespace {
constexpr const char * const TAG = "BOBBYCLOUD";
} // namespace
#ifdef FEATURE_CLOUD
espcpputils::websocket_client cloudClient;
bool cloudStarted{};
@@ -53,6 +52,9 @@ void initCloud()
void updateCloud()
{
if (!configs.feature.cloud.value)
return;
const auto now = espchrono::millis_clock::now();
if (!lastCloudCollect || now - *lastCloudCollect >= std::chrono::milliseconds{configs.boardcomputerHardware.timersSettings.cloudCollectRate.value})
@@ -284,5 +286,3 @@ void destroyCloud()
cloudClient = {};
cloudStarted = false;
}
#endif