Ignore:
Timestamp:
01/19/08 12:55:11 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8811 r8820  
    1515
    1616ShaftEncoder::ShaftEncoder(const BYTE_t nodeid, const char *name, MLog &out)
    17     : NodeDrv(nodeid, name, out), fPos(0), fVel(0), fAcc(0),
    18     fTurn(0), fDirection(kUndefined), fHysteresisPos(0), fHysteresisNeg(0),
    19     fLabel(NULL), fUpdPos(0), fPosHasChanged(false), fDirHasChanged(false),
    20     fReport(NULL),
    21     /*fTwin(0), fIsUpdated(kFALSE),*/
    22       fMotor(0), fOffset(0), fDirChangedPos(0)
     17    : NodeDrv(nodeid, name, out),
     18    fPos(0), fVel(0), fAcc(0), fTurn(0), fTicks(0),
     19    fDirection(kUndefined), fHysteresisPos(0), fHysteresisNeg(0),
     20    fLabel(NULL), fUpdPos(0),
     21    fPosHasChanged(false), fDirHasChanged(false),
     22    fReport(NULL), fMotor(0), fOffset(0), fDirChangedPos(0)
    2323{
    2424}
     
    186186    }
    187187
    188     char text[21];
     188    char text[21]="";
    189189    if (pos!=fUpdPos && fLabel)
    190190    {
     
    314314    }
    315315
    316     if (multipos>GetPos()) fDirection = kForward;
    317     else if (multipos<GetPos()) fDirection = kBackward;
    318     else fDirection = kUndefined;
     316    if (multipos>GetPos())
     317        fDirection = kForward;
     318    else
     319        if (multipos<GetPos())
     320            fDirection = kBackward;
     321        else
     322            fDirection = kUndefined;
    319323
    320324
Note: See TracChangeset for help on using the changeset viewer.