Changeset 13952


Ignore:
Timestamp:
05/28/12 10:48:05 (12 years ago)
Author:
tbretz
Message:
Write drive info as single line; display when sun is up.
File:
1 edited

Legend:

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

    r13944 r13952  
    393393     int64_t fFadControlNumEvents;
    394394     int32_t fFadControlDrsStep;
    395     uint32_t fFadControlDrsRuns[3];
     395    vector<uint32_t> fFadControlDrsRuns;
    396396
    397397    float  fFtmControlTriggerRateCam;
     
    406406    uint8_t   fRateScanBoard;
    407407    deque<float> fRateScanDataHist[41];
     408
     409    bool fSunIsVisible;
    408410
    409411    int fHasError;
     
    534536        string msg;
    535537        msg += str==time ? "--:--:-- " : time;
    536         msg += "<->"+string(d.Ptr<char>())+"</->";
     538        msg += d.Ptr<char>();
    537539
    538540        fControlMessageHist.push_back(msg);
     
    543545        out << HTML::kWhite << '\t';
    544546
     547        out << "<->";
    545548        for (auto it=fControlMessageHist.begin(); it!=fControlMessageHist.end(); it++)
    546549            out << *it << "<br/>";
     550        out << "</->";
    547551
    548552        out << '\n';
     
    667671        else
    668672            out << "\t\n";
     673
     674        fSunIsVisible = astro.state>=3 && astro.state<=5;
    669675
    670676        ofstream(fPath+"/weather.data") << out.str();
     
    13241330        }
    13251331
    1326         switch (d.GetQoS())
     1332        switch (fFadControlDrsStep)
    13271333        {
    13281334        case 0:  WriteBinary(d, "fadcontrol-eventdata", max, 2,   -1); break;
     
    16071613
    16081614
    1609         if (!fDimFeedback.state()==Feedback::State::kCalibrating &&
     1615        if (fDimFeedback.state()!=Feedback::State::kCalibrating &&
    16101616            fDimBiasControl.state()==BIAS::State::kVoltageOn &&
    16111617            fBiasControlVoltageMed>3 &&
     
    17671773            const State rc = fDimDriveControl.description();
    17681774            string col = HTML::kGreen;
    1769             if (rc.index==6) // Moving
     1775            if (rc.index==Drive::State::kMoving) // Moving
    17701776                col = HTML::kBlue;
    1771             if (rc.index==5) // Armed
     1777            if (rc.index==Drive::State::kArmed) // Armed
    17721778                col = HTML::kWhite;
    1773             if (rc.index==7) // Tracking
     1779            if (rc.index==Drive::State::kTracking) // Tracking
    17741780            {
    17751781                if (dev>60)   // ~1.5mm
     
    17811787
    17821788            //out << rc.name << '\t';
    1783             out << fDriveControlPointingZd  << '\t';
     1789            out << fDriveControlPointingAz << ' ';
    17841790            out << setprecision(2);
    1785             out << fDriveControlPointingAz  << '\t';
    1786             if (fDimDriveControl.state()==7)
     1791            out << fDriveControlPointingZd  << "&deg;";
     1792            if (fDimDriveControl.state()==Drive::State::kTracking)
    17871793            {
    1788                 out << fDriveControlSourceName  << '\t';
    1789                 out << dev << '\n';
     1794                out << " &plusmn; " << dev << '"';
     1795                if (!fDriveControlSourceName.empty())
     1796                    out << '[' << fDriveControlSourceName  << ']';
    17901797            }
    1791             else
    1792                 out << "\t\n";
     1798            if (fDimDriveControl.state()==Drive::State::kMoving)
     1799                out << " &#8362;";
    17931800            out << setprecision(3);
    17941801        }
    17951802        else
    1796             out << HTML::kWhite << '\n';
     1803            out << HTML::kWhite << '\t';
     1804        if (fSunIsVisible)
     1805            out << " &#9788;";
     1806        out << '\n';
    17971807
    17981808        // ------------------- FSC ------------------
     
    18421852                col = HTML::kRed;
    18431853
    1844             out << col << '\t' << fFtmControlTriggerRateCam << '\t';
    1845             out << fFtmPatchThresholdMed << '\n';
     1854            out << col << '\t' << fFtmControlTriggerRateCam << " Hz";
     1855            if (fDimBiasControl.state()==BIAS::State::kVoltageOn)
     1856                out << " (" << fFtmPatchThresholdMed << ')';
     1857            out << '\n';
    18461858        }
    18471859        else
     
    18771889
    18781890            // Feedback is currently calibrating => Blue
    1879             if (fDimFeedback.state()==13)
     1891            if (fDimFeedback.state()==Feedback::State::kCalibrating)
    18801892            {
    18811893                out << HTML::kBlue << '\t';
     
    19611973        fBiasControlCurrentMax(0),
    19621974        fFscControlHumidityAvg(0),
     1975        fFadControlDrsRuns(3),
    19631976        fFtmControlTriggerRateCam(0),
    19641977        fRateScanDataId(0),
    19651978        fRateScanBoard(0),
     1979        fSunIsVisible(true),
    19661980        fHasError(2),
    19671981        // ---
Note: See TracChangeset for help on using the changeset viewer.