Changeset 10735 for trunk/FACT++/src/ftmctrl.cc
- Timestamp:
- 05/17/11 20:59:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10727 r10735 872 872 } 873 873 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 874 886 int GetState() const { return IsConnected() ? fState : (int)FTM::kDisconnected; } 875 887 }; … … 1318 1330 } 1319 1331 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 1320 1342 int Disconnect() 1321 1343 { … … 1461 1483 "|Enable[bool]:Whether FTU should be enabled or disabled (yes/no)"); 1462 1484 1485 AddEvent("DISABLE_PIXEL", "S:1;B:1", kStateIdle) 1486 (boost::bind(&StateMachineFTM::DisablePixel, this, _1)) 1487 (""); 1488 1463 1489 AddEvent("TOGGLE_FTU", "I:1", kStateIdle) 1464 1490 (boost::bind(&StateMachineFTM::ToggleFTU, this, _1)) … … 1573 1599 ("(Re)connect ethernet connection to FTM, a new address can be given" 1574 1600 "|[host][string]:new ethernet address in the form <host:port>"); 1575 1576 // Other1577 AddEvent(kCmdTest, "TEST", "O")1578 (boost::bind(&StateMachineFTM::Test, this, _1))1579 ("Just for test purpose, do not use");1580 1601 1581 1602 fFTM.StartConnect();
Note:
See TracChangeset
for help on using the changeset viewer.