- corrected forcevnet bug
This commit is contained in:
+5
-3
@@ -330,19 +330,21 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
||||
|
||||
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertiesValue[name]) + " km/h", DEBUG);
|
||||
|
||||
for (i=0; i<forceVent.size();i++)
|
||||
for (i=0; i < forceVent.size();i++)
|
||||
{
|
||||
if (propertiesValue[name] <= forceVent[i][0].toDouble())
|
||||
if (propertiesValue[name] < forceVent[i][0].toUInt())
|
||||
{
|
||||
i -= 1;
|
||||
msg = forceVent[i][1].toString();
|
||||
windPriority = forceVent[i][2].toUInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
propertyList[name] = "- Vent - " + msg + " : " + QByteArray::number(propertiesValue[name]) + " Km/h\n";
|
||||
propertiesValue["forcevent"] = i;
|
||||
|
||||
if (i >= 5)
|
||||
if (i >= 7)
|
||||
{
|
||||
if (announced[name] != windPriority)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user