When running on a cluster the timestamps on positional devices (like the head proxy) can be used for timing purposes. Is the ability to use the timestamps in a non-cluster use case or in a simulator still supposed to function? Thanks.
Doug
I'm pretty sure simulated inputs should carry time stamps.
-Todd
Doug
I don't think I fully realized this before, but the way that gadget::KeyboardMouseProxy gets its current time stamp is different from that of the other proxy types. If you look at the implementation of gadget::KeyboardMouseProxy::getTimeStamp(), you'll see that there is a "sync time" being requested from the referenced gadget::KeyboardMouseDevice. As best as I can tell from scanning the code, it appears that, for a non-cluster configuration, this sync time should be getting set every time gadget::KeyboardMouse::updateEventQueue() is called. That is invoked by gadget::KeyboardMouseDevice::updateData(), and that in turn should be getting called every time gadget::InputManager::updateAllDevices() is invoked.
There are a lot of pieces in play here, and I will need to do some more thorough digging in order to determine whether there is a bug. It would definitely help to know if this problem is limited to simulated positional devices.
-Patrick
--
Patrick L. Hartling
Senior Software Engineer, Priority 5
http://www.priority5.com/
The time stamp for a sample recored by an instance of gadget::SimPosition is set on line 197 of modules/gadgeteer/gadget/Devices/Sim/SimPosition.cpp. The sample time used comes from the keyboard/mouse proxy that supplies input to the simulated positional device. This should be the same for all simulated device types, but if you're only experiencing it with simulated positional devices, what I say below may have no relevance.
I don't think I fully realized this before, but the way that gadget::KeyboardMouseProxy gets its current time stamp is different from that of the other proxy types. If you look at the implementation of gadget::KeyboardMouseProxy::getTimeStamp(), you'll see that there is a "sync time" being requested from the referenced gadget::KeyboardMouseDevice. As best as I can tell from scanning the code, it appears that, for a non-cluster configuration, this sync time should be getting set every time gadget::KeyboardMouse::updateEventQueue() is called. That is invoked by gadget::KeyboardMouseDevice::updateData(), and that in turn should be getting called every time gadget::InputManager::updateAllDevices() is invoked.
There are a lot of pieces in play here, and I will need to do some more thorough digging in order to determine whether there is a bug. It would definitely help to know if this problem is limited to simulated positional devices.