summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch')
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch b/meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch
new file mode 100644
index 0000000000..20033f8f45
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/sensors/dbus-sensors/0003-Add-temp-high-thresholds.patch
@@ -0,0 +1,30 @@
+From f73c22d90eee5dd18f9f6b84aa19064437f19be3 Mon Sep 17 00:00:00 2001
+From: "Evgeny Alekseev (IBS Group)" <ealekseev@ibs.sila.ru>
+Date: Wed, 12 Oct 2022 17:21:52 +0300
+Subject: [PATCH] Add temp high thresholds
+
+---
+ src/Thresholds.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
+index 610e68e..9bc8098 100644
+--- a/src/Thresholds.cpp
++++ b/src/Thresholds.cpp
+@@ -516,6 +516,16 @@ bool parseThresholdsFromAttr(
+ }
+ thresholdVector.emplace_back(level, direction, *val);
+ }
++ else
++ {
++ if( inputPath.find("temp") != std::string::npos )
++ {
++ if(( level == Level::WARNING) && (direction == Direction::HIGH))
++ thresholdVector.emplace_back(level, direction, 65.0);
++ if(( level == Level::CRITICAL) && (direction == Direction::HIGH))
++ thresholdVector.emplace_back(level, direction, 75.0);
++ }
++ }
+ }
+ }
+ }