action: use PDI type
Rather than define our own enumeration for the LED Actions,
reuse the one from Led.Physical's dbus interface.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4615bed9e87c61d2632fe790bd50892a7f51e2ab
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index cd87bc2..2c93333 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -88,15 +88,15 @@
Layout::Action LampTest::getActionFromString(const std::string& str)
{
- Layout::Action action = Layout::Off;
+ Layout::Action action = Layout::Action::Off;
if (str == "xyz.openbmc_project.Led.Physical.Action.On")
{
- action = Layout::On;
+ action = Layout::Action::On;
}
else if (str == "xyz.openbmc_project.Led.Physical.Action.Blink")
{
- action = Layout::Blink;
+ action = Layout::Action::Blink;
}
return action;
@@ -151,10 +151,11 @@
}
phosphor::led::Layout::Action action = getActionFromString(state);
- if (action != phosphor::led::Layout::Off)
+ if (action != phosphor::led::Layout::Action::Off)
{
phosphor::led::Layout::LedAction ledAction{
- name, action, dutyOn, period, phosphor::led::Layout::On};
+ name, action, dutyOn, period,
+ phosphor::led::Layout::Action::On};
physicalLEDStatesPriorToLampTest.emplace(ledAction);
}
}