Files
bobbycar-boardcomputer-firm…/main/cloudtexthelpers.cpp
T
2021-11-02 14:18:28 +01:00

31 lines
623 B
C++

#include "cloudtexthelpers.h"
// 3rdparty lib includes
#include <fmt/core.h>
// local includes
#include "cloud.h"
#ifdef FEATURE_CLOUD
std::string CloudCreatedText::text() const
{
return fmt::format("created: {}", cloudClient ? "true" : "false");
}
std::string CloudStartedText::text() const
{
std::string text = "started: ";
if (cloudClient)
text += cloudStarted ? "true" : "false";
return text;
}
std::string CloudConnectedText::text() const
{
std::string text = "connected: ";
if (cloudClient)
text += cloudClient.is_connected() ? "true" : "false";
return text;
}
#endif