Ignore:
Timestamp:
08/29/01 16:44:38 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
2 added
4 edited

Legend:

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

    r912 r920  
    77#include "network.h"
    88
    9 Macs::Macs(BYTE_t nodeid, ostream &out=cout)
     9Macs::Macs(BYTE_t nodeid, MLog &out)
    1010    : NodeDrv(nodeid, out), fMacId(2*nodeid+1),
    1111    fPos(0), fPosTime(0.0), fPdoPos(0), fPdoTime(0.0),
  • trunk/MagicSoft/Cosy/devdrv/macs.h

    r910 r920  
    2828
    2929public:
    30     Macs(BYTE_t nodeid, ostream &out=cout);
     30    Macs(BYTE_t nodeid, MLog &out=gLog);
    3131    virtual ~Macs();
    3232
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc

    r918 r920  
    1313#include <sys/resource.h>  // PRIO_PROCESS
    1414
    15 ShaftEncoder::ShaftEncoder(BYTE_t nodeid, ostream &out=cout) : NodeDrv(nodeid, out), fLabel(NULL)
     15ShaftEncoder::ShaftEncoder(BYTE_t nodeid, MLog &out) : NodeDrv(nodeid, out), fLabel(NULL)
    1616{
    1717}
     
    8888void ShaftEncoder::DisplayVal()
    8989{
    90     static LWORDS_t pos;   // ticks
    91     static WORDS_t  vel;   // ticks per 5ms
    92     static WORDS_t  acc;   // ticks per 25ms^2
    93 
    9490    char text[21];
    9591
    96     if (fPos!=pos)
     92    if (fPos!=fUpdPos)
    9793    {
    9894        sprintf(text, "%ld", fPos);
    9995        fLabel[0]->SetText(new TGString(text));
    100     }
    101 
    102     if (fVel!=vel)
     96        fUpdPos = fPos;
     97    }
     98
     99    if (fVel!=fUpdVel)
    103100    {
    104101        sprintf(text, "%d", fVel);
    105102        fLabel[1]->SetText(new TGString(text));
    106     }
    107 
    108     if (fAcc!=acc)
     103        fUpdVel = fVel;
     104    }
     105
     106    if (fAcc!=fUpdAcc)
    109107    {
    110108        sprintf(text, "%d", fAcc);
    111109        fLabel[2]->SetText(new TGString(text));
     110        fUpdAcc = fAcc;
    112111    }
    113112}
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.h

    r918 r920  
    1818
    1919    TGLabel **fLabel;
     20    LWORDS_t  fUpdPos;   // ticks
     21    WORDS_t   fUpdVel;   // ticks per 5ms
     22    WORDS_t   fUpdAcc;   // ticks per 25ms^2
    2023
    2124    Timer fTime;
     
    2831
    2932public:
    30     ShaftEncoder(BYTE_t nodeid, ostream &out=cout);
     33    ShaftEncoder(BYTE_t nodeid, MLog &out=gLog);
    3134    virtual ~ShaftEncoder();
    3235
Note: See TracChangeset for help on using the changeset viewer.