Changeset 9443 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 05/11/09 21:49:57 (16 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/dkc.cc
r9439 r9443 15 15 using namespace std; 16 16 17 #define EXPERT17 //#define EXPERT 18 18 19 19 Dkc::Dkc(const BYTE_t nodeid, const char *name) 20 20 : NodeDrv(nodeid, name), fMacId(2*nodeid+1), 21 21 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), 23 23 fReport(NULL),fLabel(NULL),fUpdPos(0) 24 24 { … … 367 367 // FIXME: This isn't called if the initialization isn't done completely! 368 368 // 369 370 369 SetRpmMode(FALSE); 370 Disarm(); 371 371 } 372 372 … … 515 515 void Dkc::HandlePDO3(const BYTE_t *data, const timeval_t &tv) 516 516 { 517 fArmed = data[2]&0x01;518 519 517 if (fStatus!=data[3]) 520 518 { 521 // data[3]&0x01; // motor not moving519 fArmed = data[3]&0x01; // armed status 522 520 fPosActive = data[3]&0x02; // positioning active 523 521 fRpmActive = data[3]&0x04; // RPM mode switched on -
trunk/MagicSoft/Cosy/devdrv/dkc.h
r9439 r9443 120 120 121 121 bool IsOperative() const { return fStatusPdo3==0xef; } 122 bool IsRpmActive() const { return fRpmActive; } 122 123 123 124 void HandleError();
Note:
See TracChangeset
for help on using the changeset viewer.