FACT++  1.0
void ConnectionDrive::HandlePdo1 ( const uint8_t &  node,
const uint8_t *  data,
const Time tv 
)
inlineprivate

Definition at line 748 of file drivectrl.cc.

References Time::GetAsStr().

749  {
750  const uint32_t pos1 = (data[3]<<24) | (data[2]<<16) | (data[1]<<8) | data[0];
751  const uint32_t pos2 = (data[7]<<24) | (data[6]<<16) | (data[5]<<8) | data[4];
752 
753  if (fVerbosity>2)
754  Out() << Time().GetAsStr("%M:%S.%f") << " PDO1[" << (int)node << "] " << 360.*int32_t(pos1)/fPosRes[node/2] << " " << 360.*int32_t(pos2)/fPosRes[node/2] << endl;
755 
756  // Once every few milliseconds!
757 
758  fPdoPos1[node/2] = pos1;
759  fPdoTime1[node/2] = tv;
760  fHasChangedPos1[node/2] = true;
761 
762  fPdoPos2[node/2] = pos2;
763  fPdoTime2[node/2] = tv;
764  fHasChangedPos2[node/2] = true;
765  }
Time fPdoTime1[2]
Definition: drivectrl.cc:741
Definition: dns.c:26
bool fHasChangedPos2[2]
Definition: drivectrl.cc:746
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
uint32_t fPosRes[2]
Definition: drivectrl.cc:583
Time fPdoTime2[2]
Definition: drivectrl.cc:743
std::ostream & Out()
Definition: Connection.h:51
int32_t fPdoPos2[2]
Definition: drivectrl.cc:739
bool fHasChangedPos1[2]
Definition: drivectrl.cc:745
int32_t fPdoPos1[2]
Definition: drivectrl.cc:738
uint16_t fVerbosity
Definition: drivectrl.cc:484
float data[4 *1440]
std::string GetAsStr(const char *fmt="%Y-%m-%d %H:%M:%S") const
Definition: Time.cc:240

+ Here is the call graph for this function: