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