Simplify eventmask parsing

This commit is contained in:
Robert Nelson 2015-05-26 22:07:32 -07:00
parent aeb66d4e27
commit 8a3d4ef204
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ my ($sensor_id, $name, $type, $value, $units, $eventmask) = split(/,/, $res);
#Output the value
if ($value eq 'N/A') {
if ($eventmask =~ /([0-9A-Fa-f]+)h/) {
print hex substr($eventmask, 0, -1);
print hex $1;
} else {
print $eventmask;
}