Changeset 920 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 08/29/01 16:44:38 (24 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r912 r920 7 7 #include "network.h" 8 8 9 Macs::Macs(BYTE_t nodeid, ostream &out=cout)9 Macs::Macs(BYTE_t nodeid, MLog &out) 10 10 : NodeDrv(nodeid, out), fMacId(2*nodeid+1), 11 11 fPos(0), fPosTime(0.0), fPdoPos(0), fPdoTime(0.0), -
trunk/MagicSoft/Cosy/devdrv/macs.h
r910 r920 28 28 29 29 public: 30 Macs(BYTE_t nodeid, ostream &out=cout);30 Macs(BYTE_t nodeid, MLog &out=gLog); 31 31 virtual ~Macs(); 32 32 -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r918 r920 13 13 #include <sys/resource.h> // PRIO_PROCESS 14 14 15 ShaftEncoder::ShaftEncoder(BYTE_t nodeid, ostream &out=cout) : NodeDrv(nodeid, out), fLabel(NULL)15 ShaftEncoder::ShaftEncoder(BYTE_t nodeid, MLog &out) : NodeDrv(nodeid, out), fLabel(NULL) 16 16 { 17 17 } … … 88 88 void ShaftEncoder::DisplayVal() 89 89 { 90 static LWORDS_t pos; // ticks91 static WORDS_t vel; // ticks per 5ms92 static WORDS_t acc; // ticks per 25ms^293 94 90 char text[21]; 95 91 96 if (fPos!= pos)92 if (fPos!=fUpdPos) 97 93 { 98 94 sprintf(text, "%ld", fPos); 99 95 fLabel[0]->SetText(new TGString(text)); 100 } 101 102 if (fVel!=vel) 96 fUpdPos = fPos; 97 } 98 99 if (fVel!=fUpdVel) 103 100 { 104 101 sprintf(text, "%d", fVel); 105 102 fLabel[1]->SetText(new TGString(text)); 106 } 107 108 if (fAcc!=acc) 103 fUpdVel = fVel; 104 } 105 106 if (fAcc!=fUpdAcc) 109 107 { 110 108 sprintf(text, "%d", fAcc); 111 109 fLabel[2]->SetText(new TGString(text)); 110 fUpdAcc = fAcc; 112 111 } 113 112 } -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r918 r920 18 18 19 19 TGLabel **fLabel; 20 LWORDS_t fUpdPos; // ticks 21 WORDS_t fUpdVel; // ticks per 5ms 22 WORDS_t fUpdAcc; // ticks per 25ms^2 20 23 21 24 Timer fTime; … … 28 31 29 32 public: 30 ShaftEncoder(BYTE_t nodeid, ostream &out=cout);33 ShaftEncoder(BYTE_t nodeid, MLog &out=gLog); 31 34 virtual ~ShaftEncoder(); 32 35
Note:
See TracChangeset
for help on using the changeset viewer.