I'm understanding the driver for OpenEEG in OV:
"ovasCDriverOpenEEGModularEEG.cpp"
in the block:
Code: Select all
boolean CDriverOpenEEGModularEEG::loop(void){
if(!m_rDriverContext.isConnected()) { return false; }
if(this->readPacketFromTTY(m_i32FileDescriptor)<0)
{
m_rDriverContext.getLogManager() << LogLevel_ImportantWarning << "Could not receive data from " << m_sTTYName << "\n";
return false;
}
if(m_vChannelBuffer.size()!=0)
{
if(m_rDriverContext.isStarted())
{
for(uint32 i=0; i<m_vChannelBuffer.size(); i++)
{
for(uint32 j=0; j<m_ui32ChannelCount; j++)
{
m_pSample[j]=(float32)m_vChannelBuffer[i][j]-512.f;
}
m_pCallback->setSamples(m_pSample, 1);
}
m_rDriverContext.correctDriftSampleCount(m_rDriverContext.getSuggestedDriftCorrectionSampleCount());
}
m_vChannelBuffer.clear();
}
return true;
}
in the line:
m_pSample[j]=(float32)m_vChannelBuffer[j]-512.f;
I understand that to subtract 512 from the value retrieved is to transfer the values from (0 - 1023) to (+/- 512), but the resulting values are raw values; the question is: where are these raw values converted to microvolts, or so they send the designer?.
Sergio Vivar