Changeset 10622 for trunk/FACT++


Ignore:
Timestamp:
05/08/11 16:48:41 (14 years ago)
Author:
tbretz
Message:
Added getter for general settings and trigger sequence.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/HeadersFTM.h

    r10599 r10622  
    282282            kMaxDelayTrigger    = 0x3ff,
    283283            kMaxTriggerInterval = 0x3ff,
    284             kMaskSequence       = 0x7ff,
     284            kMaxSequence        = 0x1f,
    285285            kMaskSettings       = 0xf,
    286286            kMaskLEDs           = 0xf,
     
    350350
    351351        void ToggleFTU(int i)  { fActiveFTU[i/10] ^= (1<<(i%10)); }
     352
     353        void Enable(GeneralSettings type, bool enable)  {
     354            if (enable) fGeneralSettings |= uint16_t(type); else fGeneralSettings &= ~uint16_t(type); }
     355
     356        bool IsEnabled(GeneralSettings type)  { return fGeneralSettings&uint16_t(type); }
     357
     358        uint8_t GetSequencePed() const   { return (fTriggerSequence>>10)&0x1f; }
     359        uint8_t GetSequenceLPext() const { return (fTriggerSequence>> 5)&0x1f; }
     360        uint8_t GetSequenceLPint() const { return (fTriggerSequence)    &0x1f; }
    352361
    353362    } __attribute__((__packed__));
Note: See TracChangeset for help on using the changeset viewer.