summaryrefslogtreecommitdiffstats
path: root/manager.cpp
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-05-03 12:46:14 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-05-03 12:46:14 +0530
commitcd569d24cd46e0d6a68654b979b1ddd00bc86cd8 (patch)
tree3f4dbce4cc456583362b933e859043c3ac972227 /manager.cpp
parentd53de6fc3b9a6542f67c572cca5326a0e23f99c6 (diff)
downloadphosphor-led-manager-cd569d24cd46e0d6a68654b979b1ddd00bc86cd8.tar.gz
phosphor-led-manager-cd569d24cd46e0d6a68654b979b1ddd00bc86cd8.zip
Fix LED action priority inconsistency
When certain LED is first set to "Blink" and is set to "ON" again, LED needs to stay "Blink" as opposed to turning "ON". This is the default behavior needed on all systems unless overridden. Change-Id: Ied52bb60c538516802b05eb72c139a31499178f5 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'manager.cpp')
-rw-r--r--manager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/manager.cpp b/manager.cpp
index 26f00a5..4ebc024 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -38,7 +38,8 @@ bool Manager::setGroupState(const std::string& path, bool assert,
group transient {};
std::set_difference(currentState.begin(), currentState.end(),
desiredState.begin(), desiredState.end(),
- std::inserter(transient, transient.begin()));
+ std::inserter(transient, transient.begin()),
+ ledComp);
if(transient.size())
{
// We really do not want the Manager to know how a particular LED
@@ -68,7 +69,8 @@ bool Manager::setGroupState(const std::string& path, bool assert,
// Turn on these
std::set_difference(desiredState.begin(), desiredState.end(),
currentState.begin(), currentState.end(),
- std::inserter(ledsAssert, ledsAssert.begin()));
+ std::inserter(ledsAssert, ledsAssert.begin()),
+ ledComp);
// Done.. Save the latest and greatest.
OpenPOWER on IntegriCloud