From 9fc43cf8a3879a8603d0f71579c7dad980be60b4 Mon Sep 17 00:00:00 2001 From: anbranci <alexandru.n.branciog@intel.com> Date: Fri, 4 Dec 2015 15:37:55 +0200 Subject: [PATCH] ledstatus: use internally stored state when checking if led is on LED driver will be removed for Edison. ledservice should use the internally stored state to check if LED is on when lights hal is available. This will fix the weave toggle command issue. BUG=None Change-Id: I83086517ad1a066c8212253ac99bd5a92c37a26a --- src/ledservice/ledstatus.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ledservice/ledstatus.cpp b/src/ledservice/ledstatus.cpp index a51ea2a..6ce65c6 100644 --- a/src/ledservice/ledstatus.cpp +++ b/src/ledservice/ledstatus.cpp @@ -109,6 +109,9 @@ std::vector<bool> LedStatus::GetStatus() const { } bool LedStatus::IsLedOn(size_t index) const { + if (lights_hal_) + return hal_led_status_[index]; + brillo::StreamPtr stream = GetLEDDataStream(index, false); if (!stream) return false; -- GitLab