You are here

Add new comment

rncbc's picture

i don't really know why you get that double-rate figure, maybe it's because of the erm... somewhat flawed real-timing logic?

maybe you could rearrange it to the snipped below, which is likely one notch more correct to have on a real-time thread ?

// Trigger update process
if (pthread_mutex_trylock(&updateThreadMutex) == 0) {
    // Signal update thread
    pthread_cond_signal(&updateThreadCv);
    pthread_mutex_unlock(&updateThreadMutex);
}

hth.
cheers