Changeset 10581 for trunk/FACT++/src/ftmctrl.cc
- Timestamp:
- 05/04/11 20:34:16 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ftmctrl.cc
r10573 r10581 620 620 } 621 621 622 bool SetVal(uint 32_t &dest, uint32_t val, uint32_t max)622 bool SetVal(uint16_t *dest, uint32_t val, uint32_t max) 623 623 { 624 624 if (val>max) 625 625 return false; 626 626 627 if ( dest==val)627 if (*dest==val) 628 628 return true; 629 629 630 dest = val;630 *dest = val; 631 631 632 632 CmdSendStatDat(); … … 637 637 bool SetTriggerInterval(uint32_t val) 638 638 { 639 return Set (fStaticData.fTriggerInterval, val, StaticData::kMaxTriggerInterval);639 return SetVal(&fStaticData.fTriggerInterval, val, StaticData::kMaxTriggerInterval); 640 640 } 641 641 642 642 bool SetTriggerDelay(uint32_t val) 643 643 { 644 return Set (fStaticData.fDelayTrigger, val, StaticData::kMaxDelayTrigger);644 return SetVal(&fStaticData.fDelayTrigger, val, StaticData::kMaxDelayTrigger); 645 645 } 646 646 647 647 bool SetTimeMarkerDelay(uint32_t val) 648 648 { 649 return Set (fStaticData.fDelayTimeMarker, val, StaticData::kMaxDelayTimeMarker);649 return SetVal(&fStaticData.fDelayTimeMarker, val, StaticData::kMaxDelayTimeMarker); 650 650 } 651 651 652 652 bool SetDeadTime(uint32_t val) 653 653 { 654 return Set (fStaticData.fDeadTime, val, StaticData::kMaxDeadTime);654 return SetVal(&fStaticData.fDeadTime, val, StaticData::kMaxDeadTime); 655 655 } 656 656
Note:
See TracChangeset
for help on using the changeset viewer.