- Timestamp:
- 01/16/08 10:05:44 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r8810 r8811 15 15 16 16 * videodev/CaosFilter.h, videodev/FilterLed.h, videodev/PixClient.h, 17 videodev/PixGetter.h, videodev/Writer.h :17 videodev/PixGetter.h, videodev/Writer.h, candrv/sdolist.h: 18 18 - added virtual destructor as suggested by gcc 4 19 20 * devdrv/macs.[h,cc], devdrv/shaftencoder.[h,cc]: 21 - replaced timeval_t* by a const reference in all arguments of 22 member functions 23 24 * gui/MGEmbeddedCanvas.cc: 25 - replaced C-style includes (iostream.h) with C++ style (iostream) 26 27 * videodev/FilterLed.cc: 28 - initialized fImg as suggested by valgrind 19 29 20 30 -
trunk/MagicSoft/Cosy/devdrv/macs.cc
r8376 r8811 43 43 } 44 44 45 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv)45 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv) 46 46 { 47 47 // cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx; … … 86 86 // lout << "Actual Position: " << dec << (signed long)val << endl; 87 87 fPos = (LWORDS_t)val; 88 fPosTime.Set( *tv);88 fPosTime.Set(tv); 89 89 return; 90 90 /* … … 136 136 } 137 137 138 void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, timeval_t *tv)138 void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, const timeval_t &tv) 139 139 { 140 140 // cout << "Node #" << dec << (int)GetId() << ": Sdo=" << hex << idx << "/" << (int)subidx << " set." << endl; … … 556 556 } 557 557 558 void Macs::HandlePDO1( BYTE_t *data, timeval_t *tv)558 void Macs::HandlePDO1(const BYTE_t *data, const timeval_t &tv) 559 559 { 560 560 // FIXME!!!! Only 0x4000 should do this to be … … 575 575 fStatus = data[3]; 576 576 577 fPdoTime.Set( *tv);578 } 579 580 void Macs::HandlePDO2( BYTE_t *data, timeval_t *tv)577 fPdoTime.Set(tv); 578 } 579 580 void Macs::HandlePDO2(const BYTE_t *data, const timeval_t &tv) 581 581 { 582 582 LWORDS_t errnum = (data[0]<<24) | (data[1]<<16) | (data[2]<<8) | data[3]; … … 727 727 } 728 728 729 void Macs::HandlePDO3( BYTE_t *data, timeval_t *tv)729 void Macs::HandlePDO3(const BYTE_t *data, const timeval_t &tv) 730 730 { 731 731 // 3 5 7 9 -
trunk/MagicSoft/Cosy/devdrv/macs.h
r4104 r8811 38 38 void StopDevice(); 39 39 40 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);41 void HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, timeval_t *tv);40 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv); 41 void HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, const timeval_t &tv); 42 42 //void HandleSDOError(LWORD_t data) { NodeDrv::HandleSDOError(data); } 43 43 44 void HandlePDO1( BYTE_t *data, timeval_t *tv);45 void HandlePDO2( BYTE_t *data, timeval_t *tv);46 void HandlePDO3( BYTE_t *data, timeval_t *tv);44 void HandlePDO1(const BYTE_t *data, const timeval_t &tv); 45 void HandlePDO2(const BYTE_t *data, const timeval_t &tv); 46 void HandlePDO3(const BYTE_t *data, const timeval_t &tv); 47 47 //void HandleNodeguard(timeval_t *tv); 48 48 -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r7300 r8811 17 17 : NodeDrv(nodeid, name, out), fPos(0), fVel(0), fAcc(0), 18 18 fTurn(0), fDirection(kUndefined), fHysteresisPos(0), fHysteresisNeg(0), 19 fLabel(NULL), f PosHasChanged(false), fDirHasChanged(false),19 fLabel(NULL), fUpdPos(0), fPosHasChanged(false), fDirHasChanged(false), 20 20 fReport(NULL), 21 21 /*fTwin(0), fIsUpdated(kFALSE),*/ … … 35 35 } 36 36 */ 37 void ShaftEncoder::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv)37 void ShaftEncoder::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv) 38 38 { 39 39 switch (idx) … … 125 125 } 126 126 127 void ShaftEncoder::HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, timeval_t *tv)127 void ShaftEncoder::HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, const timeval_t &tv) 128 128 { 129 129 switch (idx) … … 195 195 } 196 196 197 void ShaftEncoder::HandlePDOType0( BYTE_t *data, timeval_t *tv)197 void ShaftEncoder::HandlePDOType0(const BYTE_t *data, const timeval_t &tv) 198 198 { 199 199 // … … 216 216 217 217 fPos = pos; 218 fTime.Set( *tv);218 fTime.Set(tv); 219 219 fPosHasChanged = true; 220 220 … … 230 230 } 231 231 232 void ShaftEncoder::HandlePDOType1( BYTE_t *data, timeval_t *tv)232 void ShaftEncoder::HandlePDOType1(const BYTE_t *data, const timeval_t &tv) 233 233 { 234 234 // … … 253 253 //CheckTwin(fPos-pos); 254 254 fPos=pos; 255 fTime.Set( *tv);255 fTime.Set(tv); 256 256 fPosHasChanged=true; 257 257 //fIsUpdated=kTRUE; … … 271 271 //ofstream fout("log/shaftencoder.log"); 272 272 273 void ShaftEncoder::HandlePDOType2( BYTE_t *data, timeval_t *tv)273 void ShaftEncoder::HandlePDOType2(const BYTE_t *data, const timeval_t &tv) 274 274 { 275 275 // … … 322 322 fTurn = turn; 323 323 324 fTime.Set( *tv);324 fTime.Set(tv); 325 325 fPosHasChanged=true; 326 326 //fIsUpdated=kTRUE; -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r7299 r8811 45 45 46 46 47 void HandlePDOType0( BYTE_t *data, timeval_t *tv);48 void HandlePDOType1( BYTE_t *data, timeval_t *tv);49 void HandlePDOType2( BYTE_t *data, timeval_t *tv);47 void HandlePDOType0(const BYTE_t *data, const timeval_t &tv); 48 void HandlePDOType1(const BYTE_t *data, const timeval_t &tv); 49 void HandlePDOType2(const BYTE_t *data, const timeval_t &tv); 50 50 51 51 void ReqPos(); … … 64 64 //void SetTwin(ShaftEncoder *se) { fTwin = se; } 65 65 66 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);67 void HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, timeval_t *tv);66 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, const timeval_t &tv); 67 void HandleSDOOK(WORD_t idx, BYTE_t subidx, LWORD_t data, const timeval_t &tv); 68 68 /* 69 69 void HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv) { NodeDrv::HandleSDOOK(idx, subidx, tv); } 70 70 void HandleSDOError(LWORD_t data) { NodeDrv::HandleSDOError(data); } 71 71 */ 72 void HandlePDO1( BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); }73 void HandlePDO2( BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); }72 void HandlePDO1(const BYTE_t *data, const timeval_t &tv) { HandlePDOType2(data, tv); } 73 void HandlePDO2(const BYTE_t *data, const timeval_t &tv) { HandlePDOType2(data, tv); } 74 74 75 75 LWORDS_t GetPos() const { return IsZombieNode() ? 0 : fPos+fTurn*fTicks; } // FIXME? 0? -
trunk/MagicSoft/Cosy/gui/MGEmbeddedCanvas.cc
r2278 r8811 7 7 #include "MGEmbeddedCanvas.h" 8 8 9 #include <iostream .h>9 #include <iostream> 10 10 11 11 #include <TList.h> … … 15 15 16 16 ClassImp(MGEmbeddedCanvas); 17 18 using namespace std; 17 19 18 20 MGEmbeddedCanvas::MGEmbeddedCanvas(const char *name, const TGWindow* p, -
trunk/MagicSoft/Cosy/videodev/FilterLed.cc
r8377 r8811 75 75 76 76 public: 77 ClusterFinder(byte *img, UInt_t w, UInt_t h) : f LimitingSize(999)77 ClusterFinder(byte *img, UInt_t w, UInt_t h) : fImg(0), fLimitingSize(999) 78 78 { 79 79 fW = w;
Note:
See TracChangeset
for help on using the changeset viewer.