File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,9 @@ void AnalogIO::processFrame(uint64_t eventWord)
231231
232232 currentAverageFrame = 0 ;
233233
234- timestamps[currentFrame] = deviceContext->convertTimestampToSeconds (frame->time );
234+ auto hubClock = (uint64_t *)frame->data ;
235+
236+ timestamps[currentFrame] = deviceContext->convertTimestampToSeconds (*hubClock);
235237 sampleNumbers[currentFrame] = sampleNumber++;
236238 eventCodes[currentFrame] = eventWord;
237239
Original file line number Diff line number Diff line change @@ -133,14 +133,16 @@ void DigitalIO::processFrames()
133133 {
134134 size_t offset = 0 ;
135135
136- uint16_t * dataPtr = (uint16_t *)frame->data ;
136+ auto hubClock = (uint64_t *)frame->data ;
137137
138- timestamps[currentFrame] = deviceContext->convertTimestampToSeconds (frame-> time );
138+ timestamps[currentFrame] = deviceContext->convertTimestampToSeconds (*hubClock );
139139 sampleNumbers[currentFrame] = sampleNumber++;
140140
141141 constexpr int inputDataOffset = 4 ;
142142 constexpr int buttonDataOffset = inputDataOffset + 1 ;
143143
144+ uint16_t * dataPtr = (uint16_t *)frame->data ;
145+
144146 uint64_t inputState = *(dataPtr + inputDataOffset);
145147 uint64_t buttonState = *(dataPtr + buttonDataOffset);
146148
Original file line number Diff line number Diff line change @@ -83,10 +83,11 @@ void HarpSyncInput::processFrames()
8383 oni_frame_t * frame;
8484 while (frameQueue.try_dequeue (frame))
8585 {
86+ auto hubClock = (uint64_t *)frame->data ;
8687
87- uint32_t * dataPtr = ( uint32_t *)frame-> data ;
88+ timestamps[currentFrame] = deviceContext-> convertTimestampToSeconds (*hubClock) ;
8889
89- timestamps[currentFrame] = deviceContext-> convertTimestampToSeconds ( frame->time ) ;
90+ uint32_t * dataPtr = ( uint32_t *) frame->data ;
9091
9192 harpTimeSamples[currentFrame] = *(dataPtr + 2 ) + 1 ;
9293
Original file line number Diff line number Diff line change @@ -153,8 +153,9 @@ void MemoryMonitor::processFrames()
153153
154154 while (frameQueue.try_dequeue (frame))
155155 {
156+ auto hubClock = (uint64_t *)frame->data ;
157+ auto t = deviceContext->convertTimestampToSeconds (*hubClock);
156158 uint32_t * dataPtr = (uint32_t *)frame->data ;
157- auto t = deviceContext->convertTimestampToSeconds (frame->time );
158159 auto p = 100 .0f * float (*(dataPtr + 2 )) / totalMemory;
159160 lastPercentUsedValue = p;
160161 oni_destroy_frame (frame);
You can’t perform that action at this time.
0 commit comments