diff --git a/SMSubServer.cpp b/SMSubServer.cpp index aa1cf6e..20a5672 100644 --- a/SMSubServer.cpp +++ b/SMSubServer.cpp @@ -164,7 +164,7 @@ bool SMSubServer::messageReceived(QObject *socket, const QByteArray &message) #ifdef BOOST_JSON boost::json::object object; object["type"] = "status"; - object["status"] = status ? "on" : "off"; + object["status"] = status; object["start"] = startTime; object["stop"] = stopTime; const std::string json = boost::json::serialize(object) + '\n'; @@ -172,7 +172,7 @@ bool SMSubServer::messageReceived(QObject *socket, const QByteArray &message) #else QJsonObject object; object["type"] = "status"; - object["status"] = status ? "on" : "off"; + object["status"] = status; object["start"] = startTime; object["stop"] = stopTime; sendMessage(socket, QJsonDocument(object).toJson(QJsonDocument::Compact) + '\n'); @@ -371,14 +371,14 @@ void SMSubServer::statusUpdated(const bool status_, const qint64 time) #ifdef BOOST_JSON boost::json::object object; object["type"] = "status"; - object["status"] = status ? "on" : "off"; + object["status"] = status; object["start"] = startTime; object["stop"] = stopTime; json_output = QByteArray::fromStdString(boost::json::serialize(object) + '\n'); #else QJsonObject object; object["type"] = "status"; - object["status"] = status ? "on" : "off"; + object["status"] = status; object["start"] = startTime; object["stop"] = stopTime; json_output = QJsonDocument(object).toJson(QJsonDocument::Compact) + '\n';