Changeset 2615 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 12/07/03 14:48:11 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r2613 r2615 4 4 #include <sys/time.h> // timeval->tv_sec 5 5 6 #include "timer.h"7 6 #include "network.h" 8 7 #include "MLogManip.h" … … 32 31 Macs::Macs(const BYTE_t nodeid, const char *name, MLog &out) 33 32 : NodeDrv(nodeid, name, out), fMacId(2*nodeid+1), 34 fPos(0), fP osTime(0.0), fPdoPos(0), fPdoTime(0.0),35 f PosActive(0), fRpmActive(0), fStatusPdo3(0xff)33 fPos(0), fPdoPos(0), fPosActive(0), fRpmActive(0), 34 fStatusPdo3(0xff) 36 35 { 37 36 // fTimeout = new TTimer(this, 100); //, kFALSE); // 100ms, asynchronous … … 87 86 // lout << "Actual Position: " << dec << (signed long)val << endl; 88 87 fPos = (LWORDS_t)val; 89 fPosTime.Set Timer(tv);88 fPosTime.Set(*tv); 90 89 return; 91 90 /* … … 576 575 fStatus = data[3]; 577 576 578 fPdoTime.Set Timer(tv);577 fPdoTime.Set(*tv); 579 578 } 580 579 … … 735 734 return; 736 735 737 Timertime;736 MTime time; 738 737 time.Now(); 739 738 … … 811 810 } 812 811 813 double Macs::GetTime()814 {815 return fPosTime.Now();816 }817 818 double Macs::GetMjd()819 {820 return fPosTime.GetMjd();821 }822 823 double Macs::GetPdoTime()824 {825 return fPdoTime.Now();826 }827 828 double Macs::GetPdoMjd()829 {830 return fPdoTime.GetMjd();831 }832 833 812 /* 0x2000 0 rw Maximum positioning error */ 834 813 /* 1 rw Negative Software Endswitch */ -
trunk/MagicSoft/Cosy/devdrv/macs.h
r2280 r2615 3 3 4 4 #include "nodedrv.h" 5 #include " base/timer.h"5 #include "MTime.h" 6 6 7 7 class Macs : public NodeDrv … … 16 16 17 17 LWORDS_t fPos; 18 TimerfPosTime;18 MTime fPosTime; 19 19 20 20 LWORD_t fRes; // Encoder resolution 21 21 22 22 LWORDS_t fPdoPos; 23 TimerfPdoTime;23 MTime fPdoTime; 24 24 25 25 BYTE_t fPosActive; … … 106 106 BYTE_t GetStatus() const { return fStatus; } 107 107 108 double GetTime();109 double GetMjd();110 111 double GetPdoTime();112 double GetPdoMjd();113 114 108 LWORDS_t GetPdoPos() const { return fPdoPos; } 115 109 -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r2518 r2615 1 1 #include "shaftencoder.h" 2 2 3 #include "base/timer.h"4 3 #include "network.h" 5 4 … … 182 181 183 182 fPos = pos; 184 fTime.Set Timer(tv);183 fTime.Set(*tv); 185 184 fPosHasChanged = true; 186 185 } … … 198 197 199 198 fPos=pos; 200 fTime.Set Timer(tv);199 fTime.Set(*tv); 201 200 fPosHasChanged=true; 202 201 … … 234 233 fTurn = turn; 235 234 236 fTime.Set Timer(tv);235 fTime.Set(*tv); 237 236 fPosHasChanged=true; 238 }239 240 double ShaftEncoder::GetTime()241 {242 return fTime.Now();243 237 } 244 238 -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r2518 r2615 2 2 #define SHAFTENCODER_H 3 3 4 #include "base/timer.h"5 4 #include "nodedrv.h" 5 #include "MTime.h" 6 6 7 7 class TGLabel; … … 24 24 bool fPosHasChanged; //! 25 25 26 TimerfTime;26 MTime fTime; 27 27 28 28 void HandlePDOType0(BYTE_t *data, timeval_t *tv); … … 54 54 LWORD_t GetPhysRes() { return fTicks; } 55 55 56 double GetTime();57 56 double GetMjd(); 58 57
Note:
See TracChangeset
for help on using the changeset viewer.