Changeset 18379


Ignore:
Timestamp:
11/12/15 19:44:58 (9 years ago)
Author:
tbretz
Message:
Exchanged order for checking for blocked and available.. otherwise blocked will always be shown as available, fixed a wrong state description, removed some states from allowed states for STOP. Esepcially in LOCKED it must not be allowed, because it would leave locked.
File:
1 edited

Legend:

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

    r18363 r18379  
    13141314    bool IsBlocked() const
    13151315    {
    1316         return (fStatusSys&0x10)==0 || (fStatusSys&kManualMode);
     1316        return (fStatusSys&kEmergencyOk)==0 || (fStatusSys&kManualMode);
    13171317    }
    13181318
     
    24682468        // a drive goes below the RF state during operation without
    24692469        // a warning or error message.
     2470        if (fDrive.IsOnline() && fDrive.IsBlocked())
     2471            return State::kBlocked;
     2472
    24702473        if (fDrive.IsOnline() && !fDrive.IsReady())
    24712474            return State::kAvailable;
    2472 
    2473         if (fDrive.IsOnline() && fDrive.IsBlocked())
    2474             return State::kBlocked;
    24752475
    24762476        // This is the case as soon as the init commands were send
     
    26482648                        "Connected to SPS and to IndraDrives, but at least one drive not in RF");
    26492649        T::AddStateName(State::kBlocked, "Blocked",
    2650                         "Drive system is blocked by manual operation or an released emergeny button");
     2650                        "Drive system is blocked by manual operation or a pressed emergeny button");
    26512651        T::AddStateName(State::kArmed, "Armed",
    26522652                        "Connected to SPS and IndraDrives in RF, but not yet initialized");
     
    27622762            ("Park the telescope");
    27632763
    2764         T::AddEvent("STOP")
     2764        T::AddEvent("STOP")(State::kUnavailable)(State::kAvailable)(State::kArmed)(State::kInitialized)(State::kStopping)(State::kParking)(State::kMoving)(State::kTracking)(State::kOnTrack)(State::kPositioningFailed)(State::kAllowedRangeExceeded)
    27652765            (bind(&StateMachineDrive::StopMovement, this))
    27662766            ("Stop any kind of movement.");
Note: See TracChangeset for help on using the changeset viewer.