debug
This commit is contained in:
3
main.cpp
3
main.cpp
@@ -25,7 +25,7 @@
|
||||
#define BROKER_ADDRESS "localhost"
|
||||
#define MQTT_PORT 1883;
|
||||
|
||||
uint debugLevel = INFO | NOTICE | INFO | WARNING | ERROR | ALERT;
|
||||
uint debugLevel = DEBUG | INFO | NOTICE | INFO | WARNING | ERROR | ALERT;
|
||||
QByteArray toFollow;
|
||||
|
||||
//class MqttClient;
|
||||
@@ -37,6 +37,7 @@ Pws2mqtt *pws2mqtt;
|
||||
MqttClient *mqttClient;
|
||||
QHttpServer *httpServer;
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
|
||||
@@ -110,10 +110,8 @@ void Pws2mqtt::listeningHttp()
|
||||
if (!port)
|
||||
{
|
||||
debug(DEBUGMACRO, "Http Server failed to listen on a port.", ERROR);
|
||||
//return 0;
|
||||
}
|
||||
debug(DEBUGMACRO, "Listening on port " + QString::number(port));
|
||||
|
||||
}
|
||||
|
||||
void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
@@ -285,7 +283,6 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
{
|
||||
jsonString = jsonString +", " + deviceString + "}}";
|
||||
mqttClient->send_message(jsonString);
|
||||
//debug(DEBUGMACRO, "sent => " + jsonString, DEBUG);
|
||||
}else
|
||||
{
|
||||
debug(DEBUGMACRO, "No values to send", DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user