Ignore:
Timestamp:
05/20/04 04:42:48 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.h

    r4076 r4104  
    1 #ifndef SHAFTENCODER_H
    2 #define SHAFTENCODER_H
     1#ifndef COSY_ShafTEncoder
     2#define COSY_ShafTEncoder
    33
     4#ifndef COSY_NodeDrv
    45#include "nodedrv.h"
     6#endif
     7
     8#ifndef MARS_MTime
    59#include "MTime.h"
     10#endif
    611
     12class Macs;
    713class TGLabel;
    814
     
    1925    TGLabel  *fLabel;     //
    2026    LWORDS_t  fUpdPos;    // ticks
    21     //    WORDS_t   fUpdVel;    // ticks per 5ms
    22     //    WORDS_t   fUpdAcc;    // ticks per 25ms^2
    2327
    2428    bool fPosHasChanged;  //!
     
    2630    MTime fTime;
    2731    MLog *fReport;
     32
     33    Macs *fMotor;
     34    Int_t fOffset;
    2835
    2936    void HandlePDOType0(BYTE_t *data, timeval_t *tv);
     
    3542    void Init();
    3643    void CheckConnection();
     44    // void CheckTwin(Int_t diff) const;
    3745
    3846public:
     
    4250
    4351    void SetDisplay(TGLabel *label) { fLabel = label; }
     52    void SetMotor(Macs *m) { fMotor = m; }
     53    //void SetTwin(ShaftEncoder *se) { fTwin = se; }
    4454
    4555    void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);
     
    5262    void HandlePDO2(BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); }
    5363
    54     LWORDS_t GetPos() { return IsZombieNode() ? 0 : fPos+fTurn*fTicks; } // FIXME? 0?
    55     LWORD_t  GetPhysRes() { return fTicks; }
     64    LWORDS_t GetPos() const { return IsZombieNode() ? 0 : fPos+fTurn*fTicks; } // FIXME? 0?
     65    LWORD_t  GetPhysRes() const { return fTicks; }
     66    Int_t    GetOffset() const { return fOffset; }
     67    void     SetOffset(Int_t off) { fOffset = off; }
    5668
    5769    double GetMjd();
Note: See TracChangeset for help on using the changeset viewer.