From c07db58a7e7121801b54e83af4ce8d66d9dd09ff Mon Sep 17 00:00:00 2001 From: Daniel TARTAVEL Date: Wed, 5 Nov 2025 13:29:14 +0100 Subject: [PATCH] modif priority of rain in hour --- src/barometertrend.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/barometertrend.h b/src/barometertrend.h index 2e2e138..7b53aab 100644 --- a/src/barometertrend.h +++ b/src/barometertrend.h @@ -157,7 +157,7 @@ public: r.urgency = 0; icons << "sunny"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); - }else if (p >= 1020 && (d3 <= +0.5 && d3 >= -0.5)) + }else if (p >= 1020 && (d3 <= +1.0 && d3 >= -1.0)) { r.message = "- Beau temps stable"; r.urgency = 0; @@ -175,7 +175,7 @@ public: r.urgency = 1; icons << "sun_behind_small_cloud"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); - }else if (p >= 1020 && (d3 <= 0.5 && d3 >= -0.5)) + }else if (p >= 1020 && (d3 <= 1.0 && d3 >= -1.0)) { r.message = "- Beau temps stable"; r.urgency = 0; @@ -205,7 +205,7 @@ public: r.urgency = 2; icons << "sun_behind_rain_cloud"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); - }else if (p >= 1010 && (d3 <= 0.5 && d3 >= 0.5)) + }else if (p >= 1010 && (d3 <= 1.0 && d3 >= 1.0)) { r.message = "- Nuageux avec des éclaircies"; r.urgency = 2; @@ -231,13 +231,13 @@ public: debug(DEBUGMACRO, "message : " + r.message, DEBUG); }else if (p >= 1000 && d3 <= -1.0) { - r.message = "- Pluie ou perturbation stable"; + r.message = "- Pluie ou perturbation"; r.urgency = 2; icons << "cloud_with_rain"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); - }else if (p >= 1000 && (d3 <= 0.5 && d3 >= -0.5)) + }else if (p >= 1000 && (d3 <= 1.0 && d3 >= -1.0)) { - r.message = "- Pluie ou perturbation"; + r.message = "- Pluie ou perturbation stable"; r.urgency = 2; icons << "cloud_with_rain"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); @@ -259,7 +259,7 @@ public: r.urgency = 4; icons << "cloud_with_rain"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); - }else if (p < 1000 && (d3 <= 0.5 && d3 >= -0.5)) + }else if (p < 1000 && (d3 <= 1.0 && d3 >= -1.0)) { r.message = "- Mauvais temps stable"; r.urgency = 4; @@ -289,7 +289,7 @@ public: { r.rainRisk = true; r.message += "- Risque de pluie"; - r.urgency = qMax(r.urgency, 2); + r.urgency = qMax(r.urgency, 3); icons << "cloud_with_rain"; debug(DEBUGMACRO, "message : " + r.message, DEBUG); } @@ -327,7 +327,7 @@ public: if (d <= -1.5 && p < 1010 && humidityPercent > 80.0) { r.prevision1h = "- Pluie probable dans l'heure"; - r.urgency = qMax(r.urgency, 4); + r.urgency = qMax(r.urgency, 3); r.confiance = 80; }else if (d >= +1.5 && p > 1015) {