summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-05-15 12:08:42 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-05-17 23:25:21 +0530
commitc5e127d6122f2c8ba9d2b65edf2db10518ac4639 (patch)
tree6d0753f73a46574d9372a94eb7362a8aab61c506
parentc17001d7f872a1a8aee183bb0bffd8137c51da8e (diff)
downloadphosphor-mrw-tools-c5e127d6122f2c8ba9d2b65edf2db10518ac4639.tar.gz
phosphor-mrw-tools-c5e127d6122f2c8ba9d2b65edf2db10518ac4639.zip
LEDS: Create LampTest group containing all the LEDs
LampTest currently expects all the LEDs to be blinking. Fixes openbmc/openbmc#1288 Change-Id: Idf6728853612f6536e78f0f3c6555379e5b4e1b8 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
-rwxr-xr-xgen_led_groups.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/gen_led_groups.pl b/gen_led_groups.pl
index 2c5ca33..9b8922b 100755
--- a/gen_led_groups.pl
+++ b/gen_led_groups.pl
@@ -44,6 +44,9 @@ my @encFaults;
# Its fine if they don't map to any physical LED
my @defaultGroup = ("BmcBooted", "PowerOn");
+# This group contains all the LEDs with the action Blink
+my $lampTest = "LampTest";
+
# API used to access parsed XML data
my $targetObj = Targets->new;
if($verbose == 1)
@@ -169,6 +172,11 @@ foreach my $target (sort keys %{$targetObj->getAllTargets()})
$hashGroup{$groupName}{$fru}{"Action"} = $action;
$hashGroup{$groupName}{$fru}{"Period"} = $period;
$hashGroup{$groupName}{$fru}{"DutyOn"} = $dutyCycle;
+
+ # Need to update the LampTest group.
+ $hashGroup{$lampTest}{$fru}{"Action"} = "'Blink'";
+ $hashGroup{$lampTest}{$fru}{"Period"} = 1000;
+ $hashGroup{$lampTest}{$fru}{"DutyOn"} = 50;
}
} # Walk CONTROL_GROUP
} # Has LED target
@@ -236,9 +244,9 @@ sub generateYamlFile
$ledCopy = '';
}
- foreach my $led (keys %{ $hashGroup{$group} })
+ foreach my $led (sort keys %{ $hashGroup{$group} })
{
- foreach my $property (keys %{ $hashGroup{$group}{$led}})
+ foreach my $property (sort keys %{ $hashGroup{$group}{$led}})
{
if($group ne $groupCopy)
{
OpenPOWER on IntegriCloud