Ignore:
Timestamp:
06/14/13 11:06:18 (11 years ago)
Author:
tbretz
Message:
Added 'Overcurrent' as possible status.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/lidctrl.cc

    r16727 r16837  
    166166        fRdfData = "";
    167167
    168         if ((fLid1.status!="Open" && fLid1.status!="Closed" && fLid1.status!="Power Problem" && fLid1.status!="Unknown") ||
    169             (fLid2.status!="Open" && fLid2.status!="Closed" && fLid2.status!="Power Problem" && fLid2.status!="Unknown"))
     168        if ((fLid1.status!="Open" && fLid1.status!="Closed" && fLid1.status!="Power Problem" && fLid1.status!="Unknown" && fLid1.status!="Overcurrent") ||
     169            (fLid2.status!="Open" && fLid2.status!="Closed" && fLid2.status!="Power Problem" && fLid2.status!="Unknown" && fLid1.status!="Overcurrent"))
    170170            Warn("Lid reported status unknown by lidctrl ("+fLid1.status+"/"+fLid2.status+")");
    171171
     
    355355
    356356        // Unidentified state detected
    357         if ((!fLid1.status.empty() && fLid1.status!="Open" && fLid1.status!="Closed" && fLid1.status!="Power Problem" && fLid1.status!="Unknown") ||
    358             (!fLid2.status.empty() && fLid2.status!="Open" && fLid2.status!="Closed" && fLid2.status!="Power Problem" && fLid2.status!="Unknown"))
     357        if ((!fLid1.status.empty() && fLid1.status!="Open" && fLid1.status!="Closed" && fLid1.status!="Power Problem" && fLid1.status!="Unknown" && fLid1.status!="Overcurrent") ||
     358            (!fLid2.status.empty() && fLid2.status!="Open" && fLid2.status!="Closed" && fLid2.status!="Power Problem" && fLid2.status!="Unknown" && fLid2.status!="Overcurrent"))
    359359            return State::kUnidentified;
    360360
     
    380380        if (fLid1.status=="Power Problem")
    381381            return State::kPowerProblem;
     382
     383        // Overcurrent
     384        if (fLid1.status=="Overcurrent")
     385            return State::kOvercurrent;
    382386
    383387        // Closed
Note: See TracChangeset for help on using the changeset viewer.