diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-08-09 11:42:23 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-08-09 11:42:23 +0200 |
commit | 2c088f61bf4d73964e4d73f09412ec74a52e5518 (patch) | |
tree | 63f521249dbc05c69c3b05e757882232714a2d8b /util/oem_hp.c | |
parent | 9d9bae11084226b2e1473243d546b149cdf9e5c9 (diff) |
changes to version 2.9.4
Diffstat (limited to 'util/oem_hp.c')
-rw-r--r-- | util/oem_hp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/oem_hp.c b/util/oem_hp.c index 29a813f..4c5b4f9 100644 --- a/util/oem_hp.c +++ b/util/oem_hp.c @@ -86,12 +86,6 @@ int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring, int slen) if ((reading[2] & 0x40) == 0x40) { /*Init/Unavail state*/ strncpy(pstring,"Init",slen); rv = 0; - } else if ((sdr[20] & 0xC0) == 0xC0) { /*unit1==discrete*/ - b = reading[2] & 0x3f; - pstr = "DiscreteUnit"; - if (evtype == 0x0b) pstr = redund_str(b); - snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr); - rv = 0; } else if (evtype == 0x6f) { /*evtype==0x6f special*/ pstr = "DiscreteEvt"; if (stype == 0x08) { /*Power Supply presence*/ @@ -127,6 +121,12 @@ int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring, int slen) else pstr = "Unknown"; snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr); rv = 0; + } else if ((sdr[20] & 0xC0) == 0xC0) { /*unit1==discrete*/ + b = reading[2] & 0x3f; + pstr = "DiscreteUnit"; + if (evtype == 0x0b) pstr = redund_str(b); + snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr); + rv = 0; } } return(rv); |