Changeset 10033


Ignore:
Timestamp:
10/22/10 11:11:49 (14 years ago)
Author:
tbretz
Message:
Get drive status from pdo3 and fixed a parenthesis problem in a boolean expression in MCosy.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosy/main/MCosy.cc

    r10030 r10033  
    870870    armed &= fMac2 && fMac2->IsArmed();
    871871
    872     if (HasError())
    873         SetStatus(MDriveCom::kError);
     872    if (fMac1 && fMac2)
     873    {
     874        SetStatus(MDriveCom::kStopped);
     875        if (fMac1->IsPositioning() || fMac2->IsPositioning())
     876            SetStatus(MDriveCom::kMoving);
     877        if (fMac1->IsRpmActive() || fMac2->IsRpmActive())
     878            SetStatus(MDriveCom::kTracking);
     879    }
     880
     881     if (HasError())
     882         SetStatus(MDriveCom::kError);
     883 
     884     gLog.UpdateGui();
     885 
    874886
    875887    const TString stataz = fMac1 ? fMac1->GetStatusDKC() : "";
     
    893905    fWin->UpdateWeather(*fCom);
    894906    fWin->Update(bendist, fTrackingError, /*fVelocity, fOffset,*/
    895                  fRaDec, fZdAzSoll, fStatus, (stat1&0xff<<8)|(stat2&0xff), HasConnection(), armed, statzd, stataz);
     907                 fRaDec, fZdAzSoll, fStatus, ((stat1&0xff)<<8)|(stat2&0xff), HasConnection(), armed, statzd, stataz);
    896908
    897909    gLog.UpdateGui();
Note: See TracChangeset for help on using the changeset viewer.