Changeset 13957 for trunk/FACT++/src


Ignore:
Timestamp:
05/29/12 12:44:30 (13 years ago)
Author:
tbretz
Message:
Implemented TimeCheck and changed Idle-color for the main status to white.
File:
1 edited

Legend:

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

    r13955 r13957  
    403403    DimDescribedState fDimDataLogger;
    404404    DimDescribedState fDimDriveControl;
     405    DimDescribedState fDimTimeCheck;
    405406    DimDescribedState fDimMagicWeather;
    406407    DimDescribedState fDimTngWeather;
     
    16091610            msg << "Moon within the field-of-view of the camera<br/>";
    16101611
     1612        if (fDimTimeCheck.state()==2)
     1613            msg << "Warning NTP time difference of drive PC exceeds 1s.<br/>";
     1614
    16111615
    16121616        if (fDimFeedback.state()!=Feedback::State::kCalibrating &&
     
    16641668        {
    16651669            string col = HTML::kBlue;
    1666             if (fMcpConfigurationState!=MCP::State::kIdle &&       // Idle
    1667                 fMcpConfigurationState!=MCP::State::kTriggerOn &&  // Trigger On
    1668                 fMcpConfigurationState!=MCP::State::kTakingData)  // Taking Data
    1669                 col = HTML::kYellow;
    1670             else
     1670            switch (fMcpConfigurationState)
     1671            {
     1672            case MCP::State::kIdle:
     1673                col = HTML::kWhite;
     1674                break;
     1675            case MCP::State::kConfiguring1:
     1676            case MCP::State::kConfiguring2:
     1677            case MCP::State::kConfiguring3:
     1678            case MCP::State::kConfigured:
     1679            case MCP::State::kTriggerOn:
     1680                col = HTML::kBlue;
     1681                break;
     1682            case MCP::State::kTakingData:
     1683                col = HTML::kBlue;
    16711684                if (fDimFadControl.state()==FAD::State::kWritingData)
    16721685                    col = HTML::kGreen;
     1686                break;
     1687            }
     1688
     1689            const bool other =
     1690                fDimRateControl.state()==RateControl::State::kSettingGlobalThreshold ||
     1691                fDimRateScan.state()!=RateScan::State::kInProgress;
     1692
     1693            if (other)
     1694                col = HTML::kBlue;
    16731695
    16741696            out << col << '\t';
    16751697
    1676             if (fDimRateControl.state()!=RateControl::State::kSettingGlobalThreshold &&
    1677                 fDimRateScan.state()!=RateScan::State::kInProgress)
     1698            if (!other)
    16781699            {
    16791700                switch (fMcpConfigurationState)
     
    19872008        fDimDataLogger  ("DATA_LOGGER"),
    19882009        fDimDriveControl("DRIVE_CONTROL"),
     2010        fDimTimeCheck   ("TIME_CHECK"),
    19892011        fDimMagicWeather("MAGIC_WEATHER"),
    19902012        fDimTngWeather  ("TNG_WEATHER"),
     
    20032025        fDimDataLogger.Subscribe(*this);
    20042026        fDimDriveControl.Subscribe(*this);
     2027        fDimTimeCheck.Subscribe(*this);
    20052028        fDimMagicWeather.Subscribe(*this);
    20062029        fDimTngWeather.Subscribe(*this);
Note: See TracChangeset for help on using the changeset viewer.