Changeset 8862 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 02/13/08 19:44:39 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r8835 r8862 278 278 // Decode information, we have a 14bit only 279 279 // 280 LWORDS_t pos = data[0] | (data[1]<<8) | (data[2]<<16) ; //| (data[3]<<24);280 LWORDS_t pos = data[0] | (data[1]<<8) | (data[2]<<16) | (data[3]<<24); 281 281 282 282 fVel = data[4] | (data[5]<<8); … … 465 465 return; 466 466 467 fPos = pre% 16384;468 fTurn = pre/ 16384;467 fPos = pre%fTicks; 468 fTurn = pre/fTicks; 469 469 fDirChangedPos = fPos; 470 470 fOffset = fMotor ? fMotor->GetPdoPos() : 0; -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r8835 r8862 22 22 WORDS_t fAcc; // ticks per 25ms^2 23 23 WORDS_t fTurn; // Number of turn 24 LWORD_t fTicks; // Number of ticks per turn24 LWORD_t fTicks; // Number of ticks per revolution (resolution) 25 25 WORD_t fTurns; // Number of possible turns 26 26
Note:
See TracChangeset
for help on using the changeset viewer.