Changeset 4104 for trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
- Timestamp:
- 05/20/04 04:42:48 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r4076 r4104 1 #ifndef SHAFTENCODER_H2 #define SHAFTENCODER_H1 #ifndef COSY_ShafTEncoder 2 #define COSY_ShafTEncoder 3 3 4 #ifndef COSY_NodeDrv 4 5 #include "nodedrv.h" 6 #endif 7 8 #ifndef MARS_MTime 5 9 #include "MTime.h" 10 #endif 6 11 12 class Macs; 7 13 class TGLabel; 8 14 … … 19 25 TGLabel *fLabel; // 20 26 LWORDS_t fUpdPos; // ticks 21 // WORDS_t fUpdVel; // ticks per 5ms22 // WORDS_t fUpdAcc; // ticks per 25ms^223 27 24 28 bool fPosHasChanged; //! … … 26 30 MTime fTime; 27 31 MLog *fReport; 32 33 Macs *fMotor; 34 Int_t fOffset; 28 35 29 36 void HandlePDOType0(BYTE_t *data, timeval_t *tv); … … 35 42 void Init(); 36 43 void CheckConnection(); 44 // void CheckTwin(Int_t diff) const; 37 45 38 46 public: … … 42 50 43 51 void SetDisplay(TGLabel *label) { fLabel = label; } 52 void SetMotor(Macs *m) { fMotor = m; } 53 //void SetTwin(ShaftEncoder *se) { fTwin = se; } 44 54 45 55 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv); … … 52 62 void HandlePDO2(BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); } 53 63 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; } 56 68 57 69 double GetMjd();
Note:
See TracChangeset
for help on using the changeset viewer.