Ignore:
Timestamp:
12/07/03 14:48:11 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
4 edited

Legend:

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

    r2613 r2615  
    44#include <sys/time.h>   // timeval->tv_sec
    55
    6 #include "timer.h"
    76#include "network.h"
    87#include "MLogManip.h"
     
    3231Macs::Macs(const BYTE_t nodeid, const char *name, MLog &out)
    3332    : NodeDrv(nodeid, name, out), fMacId(2*nodeid+1),
    34     fPos(0), fPosTime(0.0), fPdoPos(0), fPdoTime(0.0),
    35     fPosActive(0), fRpmActive(0), fStatusPdo3(0xff)
     33    fPos(0), fPdoPos(0), fPosActive(0), fRpmActive(0),
     34    fStatusPdo3(0xff)
    3635{
    3736//    fTimeout = new TTimer(this, 100); //, kFALSE); // 100ms, asynchronous
     
    8786//        lout << "Actual Position: " << dec << (signed long)val << endl;
    8887        fPos = (LWORDS_t)val;
    89         fPosTime.SetTimer(tv);
     88        fPosTime.Set(*tv);
    9089        return;
    9190/*
     
    576575    fStatus = data[3];
    577576
    578     fPdoTime.SetTimer(tv);
     577    fPdoTime.Set(*tv);
    579578}
    580579
     
    735734        return;
    736735
    737     Timer time;
     736    MTime time;
    738737    time.Now();
    739738
     
    811810}
    812811
    813 double Macs::GetTime()
    814 {
    815     return fPosTime.Now();
    816 }
    817 
    818 double Macs::GetMjd()
    819 {
    820     return fPosTime.GetMjd();
    821 }
    822 
    823 double Macs::GetPdoTime()
    824 {
    825     return fPdoTime.Now();
    826 }
    827 
    828 double Macs::GetPdoMjd()
    829 {
    830     return fPdoTime.GetMjd();
    831 }
    832 
    833812/*   0x2000 0 rw Maximum positioning error     */
    834813/*          1 rw Negative Software Endswitch   */
  • trunk/MagicSoft/Cosy/devdrv/macs.h

    r2280 r2615  
    33
    44#include "nodedrv.h"
    5 #include "base/timer.h"
     5#include "MTime.h"
    66
    77class Macs : public NodeDrv
     
    1616
    1717    LWORDS_t fPos;
    18     Timer    fPosTime;
     18    MTime    fPosTime;
    1919
    2020    LWORD_t  fRes;      // Encoder resolution
    2121
    2222    LWORDS_t fPdoPos;
    23     Timer    fPdoTime;
     23    MTime    fPdoTime;
    2424
    2525    BYTE_t   fPosActive;
     
    106106    BYTE_t GetStatus() const { return fStatus; }
    107107
    108     double GetTime();
    109     double GetMjd();
    110 
    111     double GetPdoTime();
    112     double GetPdoMjd();
    113 
    114108    LWORDS_t GetPdoPos() const { return fPdoPos; }
    115109
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc

    r2518 r2615  
    11#include "shaftencoder.h"
    22
    3 #include "base/timer.h"
    43#include "network.h"
    54
     
    182181
    183182    fPos = pos;
    184     fTime.SetTimer(tv);
     183    fTime.Set(*tv);
    185184    fPosHasChanged = true;
    186185}
     
    198197
    199198    fPos=pos;
    200     fTime.SetTimer(tv);
     199    fTime.Set(*tv);
    201200    fPosHasChanged=true;
    202201
     
    234233    fTurn = turn;
    235234
    236     fTime.SetTimer(tv);
     235    fTime.Set(*tv);
    237236    fPosHasChanged=true;
    238 }
    239 
    240 double ShaftEncoder::GetTime()
    241 {
    242     return fTime.Now();
    243237}
    244238
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.h

    r2518 r2615  
    22#define SHAFTENCODER_H
    33
    4 #include "base/timer.h"
    54#include "nodedrv.h"
     5#include "MTime.h"
    66
    77class TGLabel;
     
    2424    bool fPosHasChanged;  //!
    2525
    26     Timer fTime;
     26    MTime fTime;
    2727
    2828    void HandlePDOType0(BYTE_t *data, timeval_t *tv);
     
    5454    LWORD_t  GetPhysRes() { return fTicks; }
    5555
    56     double GetTime();
    5756    double GetMjd();
    5857
Note: See TracChangeset for help on using the changeset viewer.