Changeset 18364 for trunk/FACT++


Ignore:
Timestamp:
11/07/15 18:42:15 (9 years ago)
Author:
tbretz
Message:
Updated handling of drive states.
File:
1 edited

Legend:

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

    r18359 r18364  
    27402740
    27412741        // ------------------ Drive -----------------
    2742         if (fDimDNS.online() && fDimDriveControl.state()>=Drive::State::kArmed)   // Armed, Moving, Tracking, OnTrack, Error
     2742        if (fDimDNS.online() && fDimDriveControl.state()>=Drive::State::kInitialized)   // Armed, Moving, Tracking, OnTrack, Error
    27432743        {
    27442744            const uint32_t dev = !fDriveControlTrackingDevHist.empty() ? round(fDriveControlTrackingDevHist.back()) : 0;
    27452745            const State rc = fDimDriveControl.description();
    27462746            string col = HTML::kGreen;
    2747             if (fDimDriveControl.state()==Drive::State::kMoving) // Moving
     2747            if (fDimDriveControl.state()==Drive::State::kInitialized)  // Armed
     2748                col = HTML::kWhite;
     2749            if (fDimDriveControl.state()>Drive::State::kInitialized && // Moving
     2750                fDimDriveControl.state()<Drive::State::kTracking)
    27482751                col = HTML::kBlue;
    2749             if (fDimDriveControl.state()==Drive::State::kArmed) // Armed
    2750                 col = HTML::kWhite;
    2751             if (fDimDriveControl.state()==Drive::State::kTracking || fDimDriveControl.state()==Drive::State::kOnTrack) // Tracking
     2752            if (fDimDriveControl.state()==Drive::State::kTracking ||   // Tracking
     2753                fDimDriveControl.state()==Drive::State::kOnTrack)
    27522754            {
    27532755                if (dev>60)   // ~1.5mm
     
    27562758                    col = HTML::kRed;
    27572759            }
    2758             if (fDimDriveControl.state()==0x100)
     2760            if (fDimDriveControl.state()>0xff)
    27592761                col = HTML::kRed;
    27602762            out << col << '\t';
     
    27642766            out << fDriveControlPointingZd  << "&deg;";
    27652767            out << setprecision(2);
    2766             if (fDimDriveControl.state()==Drive::State::kTracking || fDimDriveControl.state()==Drive::State::kOnTrack)
     2768            if (fDimDriveControl.state()==Drive::State::kTracking ||
     2769                fDimDriveControl.state()==Drive::State::kOnTrack)      // Tracking
    27672770            {
    27682771                out << " &plusmn; " << dev << '"';
     
    27702773                    out << " [" << fDriveControlSourceName  << ']';
    27712774            }
    2772             if (fDimDriveControl.state()==Drive::State::kMoving)
     2775            if (fDimDriveControl.state()>Drive::State::kInitialized && // Moving
     2776                fDimDriveControl.state()<Drive::State::kTracking)
    27732777                out << " &#10227;";
    27742778            out << setprecision(3);
     
    27822786            {
    27832787                out << " &#9788;";
    2784                 if (fDimDriveControl.state()<Drive::State::kArmed)
     2788                if (fDimDriveControl.state()<Drive::State::kInitialized)
    27852789                    out << " [" << fSun.fSetCivil.MinutesTo() << "&darr;]";
    27862790            }
     
    27892793                {
    27902794                    out << " &#9790;";
    2791                     if (fDimDriveControl.state()<Drive::State::kArmed)
     2795                    if (fDimDriveControl.state()<Drive::State::kInitialized)
    27922796                        out << " [" << fMoon.disk << "%]";
    27932797                }
    27942798        }
    2795         if (fDimDNS.online() && fDimDriveControl.state()==0x100)
     2799        if (fDimDNS.online() && fDimDriveControl.state()>0xff)
    27962800            out << " <ERR>";
    27972801        if (fDimDNS.online() && fDimDriveControl.state()==Drive::State::kLocked)
Note: See TracChangeset for help on using the changeset viewer.