Ignore:
Timestamp:
05/17/11 20:59:14 (13 years ago)
Author:
tbretz
Message:
Added DISABLE_PIXEL
File:
1 edited

Legend:

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

    r10727 r10735  
    872872    }
    873873
     874    bool DisablePixel(uint16_t idx, bool disable)
     875    {
     876        if (idx>FTM::StaticData::kMaxPixelIdx)
     877            return false;
     878
     879        fStaticData.EnablePixel(idx, !disable);
     880
     881        CmdSendStatDat();
     882
     883        return true;
     884    }
     885
    874886    int GetState() const { return IsConnected() ? fState : (int)FTM::kDisconnected; }
    875887};
     
    13181330    }
    13191331
     1332    int DisablePixel(const EventImp &evt)
     1333    {
     1334        if (!CheckEventSize(evt.GetSize(), "DisablePixel", 3))
     1335            return T::kSM_FatalError;
     1336
     1337        fFTM.DisablePixel(evt.GetUShort(), evt.GetText()[2]!=0);
     1338
     1339        return T::GetCurrentState();
     1340    }
     1341
    13201342    int Disconnect()
    13211343    {
     
    14611483             "|Enable[bool]:Whether FTU should be enabled or disabled (yes/no)");
    14621484
     1485        AddEvent("DISABLE_PIXEL", "S:1;B:1", kStateIdle)
     1486            (boost::bind(&StateMachineFTM::DisablePixel, this, _1))
     1487            ("");
     1488
    14631489        AddEvent("TOGGLE_FTU", "I:1", kStateIdle)
    14641490            (boost::bind(&StateMachineFTM::ToggleFTU, this, _1))
     
    15731599            ("(Re)connect ethernet connection to FTM, a new address can be given"
    15741600             "|[host][string]:new ethernet address in the form <host:port>");
    1575 
    1576         // Other
    1577         AddEvent(kCmdTest, "TEST", "O")
    1578             (boost::bind(&StateMachineFTM::Test, this, _1))
    1579             ("Just for test purpose, do not use");
    15801601
    15811602        fFTM.StartConnect();
Note: See TracChangeset for help on using the changeset viewer.