Ignore:
Timestamp:
02/13/08 19:44:39 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc

    r8835 r8862  
    278278    // Decode information, we have a 14bit only
    279279    //
    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);
    281281
    282282    fVel = data[4] | (data[5]<<8);
     
    465465        return;
    466466
    467     fPos  = pre%16384;
    468     fTurn = pre/16384;
     467    fPos  = pre%fTicks;
     468    fTurn = pre/fTicks;
    469469    fDirChangedPos = fPos;
    470470    fOffset = fMotor ? fMotor->GetPdoPos() : 0;
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.h

    r8835 r8862  
    2222    WORDS_t  fAcc;   // ticks per 25ms^2
    2323    WORDS_t  fTurn;  // Number of turn
    24     LWORD_t  fTicks; // Number of ticks per turn
     24    LWORD_t  fTicks; // Number of ticks per revolution (resolution)
    2525    WORD_t   fTurns; // Number of possible turns
    2626
Note: See TracChangeset for help on using the changeset viewer.