Ignore:
Timestamp:
05/11/09 21:49:57 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
2 edited

Legend:

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

    r9439 r9443  
    1515using namespace std;
    1616
    17 #define EXPERT
     17//#define EXPERT
    1818
    1919Dkc::Dkc(const BYTE_t nodeid, const char *name)
    2020    : NodeDrv(nodeid, name), fMacId(2*nodeid+1),
    2121    fPdoPos1(0), fPdoPos2(0), fPosActive(0), fRpmActive(0),
    22     fStatus(0), fStatusDKC(0), fStatusPdo3(0xff), fArmed(false),
     22    fStatus(0xff), fStatusDKC(0), fStatusPdo3(0xff), fArmed(false),
    2323    fReport(NULL),fLabel(NULL),fUpdPos(0)
    2424{
     
    367367    // FIXME: This isn't called if the initialization isn't done completely!
    368368    //
    369 
    370369    SetRpmMode(FALSE);
     370    Disarm();
    371371}
    372372
     
    515515void Dkc::HandlePDO3(const BYTE_t *data, const timeval_t &tv)
    516516{
    517     fArmed = data[2]&0x01;
    518 
    519517    if (fStatus!=data[3])
    520518    {
    521                   // data[3]&0x01; // motor not moving
     519        fArmed     = data[3]&0x01; // armed status
    522520        fPosActive = data[3]&0x02; // positioning active
    523521        fRpmActive = data[3]&0x04; // RPM mode switched on
  • trunk/MagicSoft/Cosy/devdrv/dkc.h

    r9439 r9443  
    120120
    121121    bool IsOperative() const { return fStatusPdo3==0xef; }
     122    bool IsRpmActive() const { return fRpmActive; }
    122123
    123124    void HandleError();
Note: See TracChangeset for help on using the changeset viewer.