Changeset 14452 for trunk/FACT++/src
- Timestamp:
- 10/02/12 21:39:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratecontrol.cc
r14439 r14452 52 52 53 53 bool fVerbose; 54 bool fEnabled;55 54 56 55 uint64_t fCounter; … … 379 378 } 380 379 381 int StartRC()382 {383 fEnabled = true;384 return GetCurrentState();385 }386 387 380 int StopRC() 388 381 { 389 fEnabled = false; 390 return GetCurrentState(); 382 return RateControl::State::kConnected; 391 383 } 392 384 … … 441 433 return RateControl::State::kDisconnected; 442 434 443 const bool inprog = f Enabled && fTriggerOn && fDimRS.state()<RateScan::State::kConfiguring;435 const bool inprog = fTriggerOn && fDimRS.state()<RateScan::State::kConfiguring; 444 436 445 437 switch (GetCurrentState()) … … 465 457 fDimFTM("FTM_CONTROL"), 466 458 fDimRS("RATE_SCAN"), 467 fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1", "Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration"), 468 fEnabled(false) 459 fDimThreshold("RATE_CONTROL/THRESHOLD", "S:1", "Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration") 469 460 { 470 461 // ba::io_service::work is a kind of keep_alive for the loop. … … 507 498 ("Start a search for a reasonable minimum global threshold"); 508 499 509 AddEvent("START", "", RateControl::State::kConnected, RateControl::State::kGlobalThresholdSet)510 (bind(&StateMachineRateControl::StartRC, this))511 ("Enable rate control (it will start when the trigger is on and a calibration was successfull)");512 513 500 AddEvent("STOP", "", RateControl::State::kSettingGlobalThreshold, RateControl::State::kInProgress) 514 501 (bind(&StateMachineRateControl::StopRC, this)) 515 ("Stop rat control");502 ("Stop a calibration or ratescan in progress"); 516 503 517 504 AddEvent("SET_MIN_THRESHOLD", "I:1")
Note:
See TracChangeset
for help on using the changeset viewer.