- corrected forcevnet bug

This commit is contained in:
DTux committed 2026-05-16 19:15:36 +02:00
1 parent 64ee52a8ab
commit fcfaf065ea
1 file changed
+5 -3
+5 -3
View File
@@ -330,19 +330,21 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertiesValue[name]) + " km/h", DEBUG); 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(); msg = forceVent[i][1].toString();
windPriority = forceVent[i][2].toUInt(); windPriority = forceVent[i][2].toUInt();
break;
} }
} }
propertyList[name] = "- Vent - " + msg + " : " + QByteArray::number(propertiesValue[name]) + " Km/h\n"; propertyList[name] = "- Vent - " + msg + " : " + QByteArray::number(propertiesValue[name]) + " Km/h\n";
propertiesValue["forcevent"] = i; propertiesValue["forcevent"] = i;
if (i >= 5) if (i >= 7)
{ {
if (announced[name] != windPriority) if (announced[name] != windPriority)
{ {