- debug
This commit is contained in:
+7
-14
@@ -283,16 +283,18 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
if (compare (propertiesValue[name], propertyValue, 1)) // and timeTemp < QDateTime::currentDateTime())
|
||||
{
|
||||
//notif += formatNotifString (propertyName[name].first, propertyName[name].second, QByteArray::number(qPow(propertyValue, 1.0)));
|
||||
//debug (DEBUGMACRO, "", DEBUG);
|
||||
//timeTemp = timeTemp.currentDateTime().addSecs(300);
|
||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||
propertiesValue[name] = propertyValue;
|
||||
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue) , DEBUG);
|
||||
if (propertyValue > 35 and announced[name] != 5)
|
||||
{
|
||||
debug(DEBUGMACRO, "Nofifying external temp > 35°C");
|
||||
notify (notif, priorityList[5]);
|
||||
announced[name] = 5;
|
||||
}else if (propertyValue > 27 and announced[name] != 4)
|
||||
{
|
||||
debug(DEBUGMACRO, "Nofifying external temp > 27°C");
|
||||
notify (notif, priorityList[4]);
|
||||
announced[name] = 4;
|
||||
}else
|
||||
@@ -307,7 +309,6 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
|
||||
if (compare (propertiesValue[name], propertyValue, 3))
|
||||
{
|
||||
//notif += formatNotifString (propertyName[name].first, propertyName[name].second , value);
|
||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||
propertiesValue[name] = propertyValue;
|
||||
}
|
||||
@@ -402,7 +403,6 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
{
|
||||
QString pluviosite = getPluviosite(propertyValue, raininPriority);
|
||||
priority[name] = setPriority (priority[name], raininPriority);
|
||||
//debug (DEBUGMACRO, "Notif = #" + notif + "#", DEBUG);
|
||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||
propertiesValue[name] = propertyValue;
|
||||
if (announced[name] != raininPriority)
|
||||
@@ -486,7 +486,7 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
//debug (DEBUGMACRO, "Notif = #" + notif + "#", DEBUG);
|
||||
propertyList[name] = "- UV - " + QByteArray::number(propertyValue) + "\n";
|
||||
|
||||
if (priority[name] > 4)
|
||||
if (priority[name] >= 4)
|
||||
{
|
||||
if (announced[name] != priority[name])
|
||||
{
|
||||
@@ -510,16 +510,9 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
if (pair.second.toUInt() != 0)
|
||||
{
|
||||
priority[name] = 5;
|
||||
if (announced[name] == priority[name])
|
||||
{
|
||||
announced [name] = 5;
|
||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||
propertiesValue[name] = propertyValue;
|
||||
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue), DEBUG);
|
||||
}
|
||||
}else
|
||||
{
|
||||
announced [name] = 0;
|
||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||
propertiesValue[name] = propertyValue;
|
||||
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue), DEBUG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user