Changeset 223 in flair-src for trunk/lib/FlairSensorActuator
- Timestamp:
- Feb 27, 2018, 12:20:03 PM (7 years ago)
- Location:
- trunk/lib/FlairSensorActuator/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp
r218 r223 93 93 parent->pimpl_->AddTrackable(this); 94 94 } 95 95 96 previousTime=TIME_INFINITE; 96 97 } 97 98 … … 143 144 Time time = GetTime(); 144 145 //Printf("%s %lld %lld\n",caller->self->ObjectName().c_str(),time,t.msg_time.tv_sec*1000000+t.msg_time.tv_usec); 145 146 Time vrpnTime=t.msg_time.tv_sec*1000000000+t.msg_time.tv_usec*1000; 147 Time deltaTime; 148 if(caller->previousTime!=TIME_INFINITE) { 149 deltaTime=vrpnTime-caller->previousTime; 150 } else { 151 deltaTime=TIME_INFINITE; 152 } 153 caller->previousTime=vrpnTime; 154 146 155 // check if something is nan 147 156 for (int i = 0; i < 3; i++) { … … 178 187 caller->output->SetValueNoMutex(6, 0, pos.z); 179 188 180 caller->output->SetDataTime(time );189 caller->output->SetDataTime(time,deltaTime); 181 190 caller->output->ReleaseMutex(); 182 191 -
trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h
r214 r223 67 67 vrpn_Tracker_Remote *tracker; 68 68 void Update(void); 69 flair::core::Time previousTime; 69 70 }; 70 71
Note:
See TracChangeset
for help on using the changeset viewer.