Commit 254ee860 authored by MONSEIGNE Thibaut's avatar MONSEIGNE Thibaut

Fix: Coding Rules Useless Typedef boolean, float & double

parent 1082b25b
......@@ -89,7 +89,7 @@ CGenericStimulatorFlickeringObject* CGenericStimulatorFlickeringObject::createGe
}
}
//SP CTrainerFlickeringObject::CTrainerFlickeringObject( OpenViBE::float32 f32PosX, OpenViBE::float32 f32PosY, Ogre::ColourValue oColour, OpenViBE::uint8 ui8LitFrames, OpenViBE::uint8 ui8DarkFrames ) :
//SP CTrainerFlickeringObject::CTrainerFlickeringObject( float f32PosX, float f32PosY, Ogre::ColourValue oColour, OpenViBE::uint8 ui8LitFrames, OpenViBE::uint8 ui8DarkFrames ) :
//SP CSSVEPFlickeringObject( NULL, ui8LitFrames, ui8DarkFrames )
CGenericStimulatorFlickeringObject::CGenericStimulatorFlickeringObject(float f32PosX, float f32PosY, ColourValue oColour, OpenViBE::CString sMaterial, uint32_t ui32StimulationPattern) :
CSSVEPFlickeringObject(nullptr, ui32StimulationPattern)
......
......@@ -175,11 +175,11 @@ void CCommandControlAnalog::commandeerShip(const double* pProbs)
m_vCommandStates[2] = 0;
// If true, a NOP classification (class 0) will never be selected
// const boolean l_bIgnoreIdle = false;
// const bool l_bIgnoreIdle = false;
// Find the strongest activation.
uint32_t l_ui32MaxIdx = 0;
float64 l_f64MaxVal = -std::numeric_limits<double>::max();
double l_f64MaxVal = -std::numeric_limits<double>::max();
double l_f64Sum = 0;
for (uint32_t i = 0; i < 4; i++)
{
......@@ -220,7 +220,7 @@ void CCommandControlAnalog::commandeerShip(const double* pProbs)
// modulate the strength of the ship movement.
// Modulating with the probabilities makes the movements a bit jittery
// const float64 l_f64Strength = l_f64MaxVal / l_f64Sum;
// const double l_f64Strength = l_f64MaxVal / l_f64Sum;
// This choice is smoother, but will make the behavior identical to discrete control
const double l_f64Strength = 1.0;
......
......@@ -35,13 +35,13 @@ bool CLogListenerFileBuffered::isActive(ELogLevel eLogLevel)
return itLogLevel->second;
}
boolean CLogListenerFileBuffered::activate(ELogLevel eLogLevel, bool bActive)
bool CLogListenerFileBuffered::activate(ELogLevel eLogLevel, bool bActive)
{
m_vActiveLevel[eLogLevel] = bActive;
return true;
}
boolean CLogListenerFileBuffered::activate(ELogLevel eStartLogLevel, ELogLevel eEndLogLevel, bool bActive)
bool CLogListenerFileBuffered::activate(ELogLevel eStartLogLevel, ELogLevel eEndLogLevel, bool bActive)
{
for (int i = eStartLogLevel; i <= eEndLogLevel; i++)
{
......@@ -50,7 +50,7 @@ boolean CLogListenerFileBuffered::activate(ELogLevel eStartLogLevel, ELogLevel e
return true;
}
boolean CLogListenerFileBuffered::activate(bool bActive)
bool CLogListenerFileBuffered::activate(bool bActive)
{
return activate(LogLevel_First, LogLevel_Last, bActive);
}
......
......@@ -150,7 +150,7 @@ public:
if (error == error::eof) { return; } // Connection closed cleanly by peer.
if (error != nullptr) { throw system::system_error(error); } // Some other error.
// signalBuffer will now contain bufferSize/sizeof(float64) amount of samples in float64s. Here we just discard the data.
// signalBuffer will now contain bufferSize/sizeof(double) amount of samples in float64s. Here we just discard the data.
const char* buf = m_signalBuffer.data();
const double* signalData = reinterpret_cast<const double*>(buf);
......
......@@ -189,7 +189,7 @@ namespace OpenViBEAcquisitionServer
*/
virtual bool setChannelUnits(const uint32_t ui32ChannelIndex, const uint32_t ui32ChannelUnit, const uint32_t ui32ChannelFactor) =0;
/// \todo setChannelLocation
// virtual OpenViBE::boolean setChannelLocation(const uint32_t ui32ChannelIndex, const OpenViBE::float32 ui32ChannelLocationX, const OpenViBEAcquisitionServer::float32 ui32ChannelLocationY, const OpenViBEAcquisitionServer::float32 ui32ChannelLocationZ)=0;
// virtual bool setChannelLocation(const uint32_t ui32ChannelIndex, const float ui32ChannelLocationX, const OpenViBEAcquisitionServer::float ui32ChannelLocationY, const OpenViBEAcquisitionServer::float ui32ChannelLocationZ)=0;
/**
* \brief Gets the number of channels for this header
* \return the number of channels.
......@@ -251,7 +251,7 @@ namespace OpenViBEAcquisitionServer
*/
virtual bool isChannelGainSet() const =0;
/// \todo isChannelLocationSet
// virtual OpenViBE::boolean isChannelLocationSet() const=0;
// virtual bool isChannelLocationSet() const=0;
/**
* \brief Tests if channel unit has been set at least once
* \return \e true if channel unit has been set at least once since last \c reset.
......
......@@ -636,7 +636,7 @@ bool CDriverBrainProductsActiCHamp::loop()
{
t_champDataStatus l_oDataStatus;
champGetDataStatus(m_pHandle, &l_oDataStatus);
//m_rDriverContext.getLogManager() << LogLevel_Trace << "Status : Samples:" << uint32(l_oDataStatus.Samples) << " Errors:" << uint32(l_oDataStatus.Errors) << " Rate:" << float32(l_oDataStatus.Rate) << " Speed:" << float32(l_oDataStatus.Speed) << "\n";
//m_rDriverContext.getLogManager() << LogLevel_Trace << "Status : Samples:" << uint32(l_oDataStatus.Samples) << " Errors:" << uint32(l_oDataStatus.Errors) << " Rate:" << float(l_oDataStatus.Rate) << " Speed:" << float(l_oDataStatus.Speed) << "\n";
// Reads all the data.
// Buffers are aligned : with one call to champGetData we get as much buffers as possible
......
......@@ -52,7 +52,7 @@ namespace OpenViBEAcquisitionServer
std::vector<unsigned int> m_vImpedance;
std::vector<float> m_vSample;
std::vector<float> m_vResolution;
//std::vector < std::vector < OpenViBE::float32 > > m_vSampleCache;
//std::vector < std::vector < float > > m_vSampleCache;
std::deque<std::vector<float>> m_vSampleCache;
uint32_t m_ui32SampleCacheIndex;
std::vector<double> m_vFilter;
......
......@@ -265,7 +265,7 @@ bool CDriverBrainProductsLiveAmp::loop()
if (m_rDriverContext.isStarted())
{
CStimulationSet l_oStimulationSet;
std::vector<std::vector<float32>> l_vTemp_buffer(1, std::vector<float>(1));
std::vector<std::vector<float>> l_vTemp_buffer(1, std::vector<float>(1));
while (1)
{
......@@ -344,7 +344,7 @@ bool CDriverBrainProductsLiveAmp::loop()
if (m_iRecordingMode != RM_IMPEDANCE)
return true; // go out of the loop
std::vector<std::vector<float32>> l_vTempBuffer(1, std::vector<float>(1));
std::vector<std::vector<float>> l_vTempBuffer(1, std::vector<float>(1));
uint32_t l_ui32SamplesRead = ampGetImpedanceData(m_pHandle, m_pSampleBuffer, m_ui32BufferSize);
if (l_ui32SamplesRead < 1)
return true;
......@@ -578,7 +578,7 @@ bool CDriverBrainProductsLiveAmp::initializeLiveAmp()
bool CDriverBrainProductsLiveAmp::configureLiveAmp()
{
// amplifier configuration
float32 l_f32Var = static_cast<float>(m_oHeader.getSamplingFrequency());
float l_f32Var = static_cast<float>(m_oHeader.getSamplingFrequency());
int32_t l_i32Res = ampSetProperty(m_pHandle, PG_DEVICE, 0, DPROP_F32_BaseSampleRate, &l_f32Var, sizeof(l_f32Var));
if (l_i32Res != AMP_OK)
{
......@@ -1104,7 +1104,7 @@ void CDriverBrainProductsLiveAmp::liveAmpExtractData(int32_t samplesRead, std::v
}
case DT_FLOAT32:
{
float32 tmp = reinterpret_cast<float&>(m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset]);
float tmp = reinterpret_cast<float&>(m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset]);
l_f32Sample = tmp * m_vResolutionArray[i];
l_i32Offset += 4;
break;
......@@ -1125,7 +1125,7 @@ void CDriverBrainProductsLiveAmp::liveAmpExtractData(int32_t samplesRead, std::v
}
case DT_FLOAT64:
{
float64 tmp = reinterpret_cast<double&>(m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset]);
double tmp = reinterpret_cast<double&>(m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset]);
l_f32Sample = static_cast<float>(tmp) * m_vResolutionArray[i];
l_i32Offset += 8;
break;
......@@ -1155,7 +1155,7 @@ void CDriverBrainProductsLiveAmp::liveAmpExtractImpedanceData(int32_t samplesRea
for (uint32_t i = 0; i < m_ui32ImpedanceChannels; i++)
{
float32 l_f32Samp = *(float*)&m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset];
float l_f32Samp = *(float*)&m_pSampleBuffer[s * m_ui32SampleSize + l_i32Offset];
extractData[s][i] = l_f32Samp;
l_i32Offset += l_i32OffsetStep; // sample counter offset
}
......
......@@ -133,7 +133,7 @@ void initFastModeSettingsComboBox(GtkWidget * comboBox, uint32_t activeValue, bo
//____________________________________________________________________________________
CConfigurationBrainProductsVAmp::CConfigurationBrainProductsVAmp(IDriverContext& rDriverContext, const char* sGtkBuilderFileName, CHeaderBrainProductsVAmp * pHeaderBrainProductsVAmp, boolean& rAcquireAuxiliaryAsEEG, bool& rAcquireTriggerAsEEG)
CConfigurationBrainProductsVAmp::CConfigurationBrainProductsVAmp(IDriverContext& rDriverContext, const char* sGtkBuilderFileName, CHeaderBrainProductsVAmp * pHeaderBrainProductsVAmp, bool& rAcquireAuxiliaryAsEEG, bool& rAcquireTriggerAsEEG)
:CConfigurationBuilder(sGtkBuilderFileName)
,m_rDriverContext(rDriverContext)
,m_pHeaderBrainProductsVAmp(pHeaderBrainProductsVAmp)
......@@ -497,7 +497,7 @@ void CConfigurationBrainProductsVAmp::buttonStopServiceCB()
controlVampService(false);
}
boolean CConfigurationBrainProductsVAmp::controlVampService(bool bStartService)
bool CConfigurationBrainProductsVAmp::controlVampService(bool bStartService)
{
SC_HANDLE l_handleSCM = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
SC_HANDLE l_handleService = nullptr;
......
......@@ -193,7 +193,7 @@ bool CHeaderBrainProductsVAmp::setSubjectGender(const uint32_t ui32SubjectGender
{
return m_pBasicHeader->setSubjectGender(ui32SubjectGender);
}
boolean CHeaderBrainProductsVAmp::setImpedanceCheckRequested(const bool bImpedanceCheckRequested)
bool CHeaderBrainProductsVAmp::setImpedanceCheckRequested(const bool bImpedanceCheckRequested)
{
return m_pBasicHeader->setImpedanceCheckRequested(bImpedanceCheckRequested);
}
......
......@@ -208,7 +208,7 @@ bool CDriverEGIAmpServer::loop()
if (l_oHeader.m_ui64PacketSize)
{
float32* l_pBufferSwap = new float32[(unsigned int)(l_oHeader.m_ui64PacketSize / sizeof(float))];
float* l_pBufferSwap = new float[(unsigned int)(l_oHeader.m_ui64PacketSize / sizeof(float))];
m_pStream->receiveBufferBlocking(reinterpret_cast<char*>(l_pBufferSwap), (uint32_t)l_oHeader.m_ui64PacketSize);
if (m_rDriverContext.isStarted())
......
......@@ -211,7 +211,7 @@ bool CDriverEmotivEPOC::initialize(
// Builds up a buffer to store acquired samples. This buffer will be sent to the acquisition server later.
m_pSample=new float[m_oHeader.getChannelCount()];
//m_pBuffer=new float64[m_oHeader.getChannelCount()*ui32SampleCountPerSentBlock];
//m_pBuffer=new double[m_oHeader.getChannelCount()*ui32SampleCountPerSentBlock];
if(!m_pSample /*|| !m_pBuffer*/)
{
delete [] m_pSample;
......@@ -301,7 +301,7 @@ bool CDriverEmotivEPOC::start()
if(m_rDriverContext.isStarted()) { return false; }
m_tDataHandle = IEE_DataCreate();
//float l_fBufferSizeInSeconds = (float32)m_ui32SampleCountPerSentBlock/(float32)m_oHeader.getSamplingFrequency();
//float l_fBufferSizeInSeconds = (float)m_ui32SampleCountPerSentBlock/(float)m_oHeader.getSamplingFrequency();
float l_fBufferSizeInSeconds = 1;
m_ui32EDK_LastErrorCode = IEE_DataSetBufferSizeInSec(l_fBufferSizeInSeconds);
if (m_ui32EDK_LastErrorCode != EDK_OK) {
......
......@@ -87,7 +87,7 @@ namespace OpenViBEAcquisitionServer
uint32_t m_ui32SampleCountPerSentBlock;
uint32_t m_ui32TotalSampleCount;
float* m_pSample;
//OpenViBE::float64* m_pBuffer;
//double* m_pBuffer;
private:
......
......@@ -101,7 +101,7 @@ bool CDriverGenericTimeSignal::loop()
return true;
}
const float32 timeNow = static_cast<float>(ITimeArithmetics::timeToSeconds(ui64TimeNow));
const float timeNow = static_cast<float>(ITimeArithmetics::timeToSeconds(ui64TimeNow));
m_pCallback->setSamples(&timeNow, 1);
......
......@@ -111,7 +111,7 @@ bool CConfigurationLabStreamingLayer::preConfigure()
}
else
{
// Only float32 and int32 are currently supported for signals and markers respectively
// Only float and int32 are currently supported for signals and markers respectively
m_rDriverContext.getLogManager() << LogLevel_Trace << i << ". Discovered stream with channel format " << m_vStreams[i].channel_format() << " of stream [" << m_vStreams[i].name().c_str() << "] which is not supported, skipped.\n";
continue;
......
......@@ -8,7 +8,7 @@
* This driver makes a few assumptions:
*
* Signal streams
* - are float32
* - are float
* - dense, i.e. there are no dropped or extra samples in them
* - the driver fills a sample block consequently until either the block has been filled or
* time runs out. In case of the latter, the chunk is padded with NaNs.
......@@ -507,8 +507,8 @@ bool CDriverLabStreamingLayer::loop()
// no more markers available at the moment
break;
}
// float64 l_f64Correction = m_pMarkerInlet->time_correction();
// float64 l_f64StimTime = captureTime + l_f64Correction - l_f64FirstCaptureTime;
// double l_f64Correction = m_pMarkerInlet->time_correction();
// double l_f64StimTime = captureTime + l_f64Correction - l_f64FirstCaptureTime;
// For openvibe, we need to set the stimulus time relative to the start of the chunk
const double l_f64StimTime = captureTime - l_f64BlockStartTime;
......
......@@ -181,7 +181,7 @@ namespace
char g_sTCPSendAcq[1024];
char g_sTCPServerName[1024];
HKEY g_hRegistryKey = nullptr;
// boolean g_bInitializedFromRegistry=false;
// bool g_bInitializedFromRegistry=false;
const char* g_sRegisteryKeyName = "Software\\VB and VBA Program Settings\\Brain Quick - System 98\\EEG_Settings";
}
......
......@@ -106,7 +106,7 @@ void CConfigurationNeuroskyMindset::buttonRefreshCB()
//if it has been updated...
if( TG_GetValueStatus(m_ui32CurrentConnectionId, TG_DATA_POOR_SIGNAL ) != 0 )
{
float32 signal_quality = (float) TG_GetValue(m_ui32CurrentConnectionId, TG_DATA_POOR_SIGNAL); //0-200
float signal_quality = (float) TG_GetValue(m_ui32CurrentConnectionId, TG_DATA_POOR_SIGNAL); //0-200
m_rDriverContext.getLogManager() << LogLevel_Info << "Poor signal value received: "<<signal_quality<<".\n";
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtk_builder_get_object(m_pBuilderConfigureInterface, "progressbar_signal_quality")),1-(signal_quality/200.0));
......@@ -136,7 +136,7 @@ void CConfigurationNeuroskyMindset::buttonRefreshCB()
*/
//_________________________________________________
CConfigurationNeuroskyMindset::CConfigurationNeuroskyMindset(IDriverContext& rDriverContext, const char* sGtkBuilderFileName,uint32_t& rComPort,boolean& rESenseChannels,boolean& rBandPowerChannels,boolean& rBlinkStimulations,bool& rBlinkStrengthChannel)
CConfigurationNeuroskyMindset::CConfigurationNeuroskyMindset(IDriverContext& rDriverContext, const char* sGtkBuilderFileName,uint32_t& rComPort,bool& rESenseChannels,bool& rBandPowerChannels,bool& rBlinkStimulations,bool& rBlinkStrengthChannel)
:CConfigurationBuilder(sGtkBuilderFileName)
,m_rDriverContext(rDriverContext)
,m_rComPort(rComPort)
......
......@@ -26,7 +26,7 @@ namespace OpenViBEAcquisitionServer
{
public:
CConfigurationNeuroskyMindset(OpenViBEAcquisitionServer::IDriverContext& rDriverContext, const char* sGtkBuilderFileName,uint32_t& rComPort,OpenViBE::boolean& rESenseChannels,OpenViBE::boolean& rBandPowerChannels,bool& rBlinkStimulations,bool& rBlinkStrengthChannel);
CConfigurationNeuroskyMindset(OpenViBEAcquisitionServer::IDriverContext& rDriverContext, const char* sGtkBuilderFileName,uint32_t& rComPort,bool& rESenseChannels,bool& rBandPowerChannels,bool& rBlinkStimulations,bool& rBlinkStrengthChannel);
virtual bool preConfigure();
virtual bool postConfigure();
......
......@@ -330,7 +330,7 @@ bool CDriverNeuroskyMindset::loop()
/* If raw value has been updated by TG_ReadPackets()... */
if( TG_GetValueStatus(m_i32ConnectionID, TG_DATA_RAW ) != 0 )
{
float32 raw_value = (float) TG_GetValue(m_i32ConnectionID, TG_DATA_RAW);
float raw_value = (float) TG_GetValue(m_i32ConnectionID, TG_DATA_RAW);
m_pSample[l_ui32ReceivedSamples] = raw_value;
l_ui32ReceivedSamples++;
}
......@@ -339,7 +339,7 @@ bool CDriverNeuroskyMindset::loop()
//if it has been updated...
if( TG_GetValueStatus(m_i32ConnectionID, TG_DATA_POOR_SIGNAL ) != 0 )
{
float32 signal_quality = (float) TG_GetValue(m_i32ConnectionID, TG_DATA_POOR_SIGNAL);
float signal_quality = (float) TG_GetValue(m_i32ConnectionID, TG_DATA_POOR_SIGNAL);
// Special warning for value 200 (no contact with electrode)
// Noise warning after 25% contamination.
......
......@@ -491,11 +491,11 @@ bool CDriverTMSiRefa32B::loop()
}
else if(m_bSignalBufferUnsigned)
{
m_pSample[m_ui32SampleIndex+j + i*m_ui32SampleCountPerSentBlock] =(float32)((((float)m_ulSignalBuffer[(l_ui32IndexBuffer+j)*m_ui32NbTotalChannels +i])*m_vUnitGain[i]+m_vUnitOffSet[i])*pow(10.,(double)m_vExponentChannel[i]));
m_pSample[m_ui32SampleIndex+j + i*m_ui32SampleCountPerSentBlock] =(float)((((float)m_ulSignalBuffer[(l_ui32IndexBuffer+j)*m_ui32NbTotalChannels +i])*m_vUnitGain[i]+m_vUnitOffSet[i])*pow(10.,(double)m_vExponentChannel[i]));
}
else
{
m_pSample[m_ui32SampleIndex+j + i*m_ui32SampleCountPerSentBlock] =(float32)((((float)m_lSignalBuffer[(l_ui32IndexBuffer+j)*m_ui32NbTotalChannels +i])*m_vUnitGain[i]+m_vUnitOffSet[i])*pow(10.,(double)m_vExponentChannel[i]));
m_pSample[m_ui32SampleIndex+j + i*m_ui32SampleCountPerSentBlock] =(float)((((float)m_lSignalBuffer[(l_ui32IndexBuffer+j)*m_ui32NbTotalChannels +i])*m_vUnitGain[i]+m_vUnitOffSet[i])*pow(10.,(double)m_vExponentChannel[i]));
}
}
......
......@@ -602,7 +602,7 @@ void CTMSiAccess::freeSignalFormat()
}
}
boolean CTMSiAccess::setCommonModeRejection(bool bIsCommonModeRejectionEnabled)
bool CTMSiAccess::setCommonModeRejection(bool bIsCommonModeRejectionEnabled)
{
int l_iCARStatus = bIsCommonModeRejectionEnabled ? 1 : 0;
......
......@@ -1057,7 +1057,7 @@ void CAcquisitionServer::setSamples(const float* pSample, const uint32_t ui32Sam
}
for (uint32_t k = 0; k < m_ui64OverSamplingFactor; k++)
{
const float32 alpha = float(k + 1) / m_ui64OverSamplingFactor;
const float alpha = float(k + 1) / m_ui64OverSamplingFactor;
bool l_bHadNaN = false;
......@@ -1218,13 +1218,13 @@ bool CAcquisitionServer::setOversamplingFactor(uint64_t ui64OversamplingFactor)
return true;
}
boolean CAcquisitionServer::setImpedanceCheckRequest(bool bActive)
bool CAcquisitionServer::setImpedanceCheckRequest(bool bActive)
{
m_bIsImpedanceCheckRequested = bActive;
return true;
}
boolean CAcquisitionServer::setChannelSelectionRequest(const bool bActive)
bool CAcquisitionServer::setChannelSelectionRequest(const bool bActive)
{
m_bIsChannelSelectionRequested = bActive;
return true;
......
......@@ -146,7 +146,7 @@ CAcquisitionServerGUI::CAcquisitionServerGUI(const IKernelContext& rKernelContex
, m_pImpedanceWindow(nullptr)
, m_pThread(nullptr)
{
// boolean l_bShowUnstable=m_rKernelContext.getConfigurationManager().expandAsBoolean("${AcquisitionServer_ShowUnstable}", false);
// bool l_bShowUnstable=m_rKernelContext.getConfigurationManager().expandAsBoolean("${AcquisitionServer_ShowUnstable}", false);
m_pAcquisitionServer = new CAcquisitionServer(rKernelContext);
......@@ -551,7 +551,7 @@ void CAcquisitionServerGUI::setStateText(const char* sStateText)
void CAcquisitionServerGUI::setDriftMs(double f64DriftMs)
{
const uint64_t l_ui64DriftToleranceDurationMs = m_pAcquisitionServer->m_oDriftCorrection.getDriftToleranceDurationMs();
float64 l_f64DriftRatio = f64DriftMs / static_cast<double>(l_ui64DriftToleranceDurationMs);
double l_f64DriftRatio = f64DriftMs / static_cast<double>(l_ui64DriftToleranceDurationMs);
bool l_bDriftWarning = false;
char l_sLabel[1024];
......@@ -599,7 +599,7 @@ void CAcquisitionServerGUI::setImpedance(uint32_t ui32ChannelIndex, double f64Im
{
if (f64Impedance >= 0)
{
//float64 l_dFraction=(f64Impedance*.001/20); With fixed impedance limit, 20kOhm max / 25%=5kOhm to be good
//double l_dFraction=(f64Impedance*.001/20); With fixed impedance limit, 20kOhm max / 25%=5kOhm to be good
double l_dFraction = (f64Impedance / (m_rKernelContext.getConfigurationManager().expandAsFloat("${AcquisitionServer_DefaultImpedanceLimit}", 5000) * 4));
if (l_dFraction > 1) l_dFraction = 1;
......@@ -821,7 +821,7 @@ void CAcquisitionServerGUI::buttonPreferencePressedCB(GtkButton* pButton)
// Create the setting controller widget
GtkWidget* l_pSettingControl = nullptr;
if (const TypedProperty<boolean>* r = dynamic_cast<const TypedProperty<bool>*>(l_pCurrentProperty))
if (const TypedProperty<bool>* r = dynamic_cast<const TypedProperty<bool>*>(l_pCurrentProperty))
{
// cout << "bool\n";
l_pSettingControl = gtk_check_button_new();
......@@ -845,10 +845,10 @@ void CAcquisitionServerGUI::buttonPreferencePressedCB(GtkButton* pButton)
l_pSettingControl = gtk_spin_button_new_with_range((gdouble)std::numeric_limits<int64>::min(), (gdouble)std::numeric_limits<int64_t>::max(), 1.0);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(l_pSettingControl), (gdouble)*(r->getData()));
}
else if (const TypedProperty<float32>* r = dynamic_cast<const TypedProperty<float>*>(l_pCurrentProperty))
else if (const TypedProperty<float>* r = dynamic_cast<const TypedProperty<float>*>(l_pCurrentProperty))
{
// cout << "float32\n";
l_pSettingControl = gtk_spin_button_new_with_range((gdouble)std::numeric_limits<float32>::min(), (gdouble)std::numeric_limits<float>::max(), 1.0);
// cout << "float\n";
l_pSettingControl = gtk_spin_button_new_with_range((gdouble)std::numeric_limits<float>::min(), (gdouble)std::numeric_limits<float>::max(), 1.0);
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(l_pSettingControl), 5);
gtk_spin_button_set_increments(GTK_SPIN_BUTTON(l_pSettingControl), 0.1f, 1.0f);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(l_pSettingControl), (gdouble)*(r->getData()));
......@@ -897,7 +897,7 @@ void CAcquisitionServerGUI::buttonPreferencePressedCB(GtkButton* pButton)
{
Property* l_pCurrentProperty = m_vPluginProperties[setting_index].m_pProperty;
if (TypedProperty<boolean>* r = dynamic_cast<TypedProperty<bool>*>(l_pCurrentProperty))
if (TypedProperty<bool>* r = dynamic_cast<TypedProperty<bool>*>(l_pCurrentProperty))
{
// cout << "bool\n";
bool tmp = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_vPluginProperties[setting_index].m_pWidget)) ? true : false;
......@@ -925,12 +925,12 @@ void CAcquisitionServerGUI::buttonPreferencePressedCB(GtkButton* pButton)
uint32 tmp = static_cast<uint32_t>(gtk_spin_button_get_value(button));
r->replaceData(tmp);
}
else if (TypedProperty<float32>* r = dynamic_cast<TypedProperty<float>*>(l_pCurrentProperty))
else if (TypedProperty<float>* r = dynamic_cast<TypedProperty<float>*>(l_pCurrentProperty))
{
// cout << "float32\n";
// cout << "float\n";
GtkSpinButton* button = GTK_SPIN_BUTTON(m_vPluginProperties[setting_index].m_pWidget);
gtk_spin_button_update(button);
float32 tmp = static_cast<float>(gtk_spin_button_get_value(button));
float tmp = static_cast<float>(gtk_spin_button_get_value(button));
r->replaceData(tmp);
}
else
......
......@@ -138,16 +138,16 @@ void CDriftCorrection::printStats() const
const uint64_t l_ui64TheoreticalSampleCountFixedPoint = m_ui32SamplingFrequency * l_ui64ElapsedTime;
const double l_f64TheoreticalSampleCount = ITimeArithmetics::timeToSeconds(l_ui64TheoreticalSampleCountFixedPoint);
const float64 l_f64AddedRatio = (l_f64TheoreticalSampleCount ? (m_i64DriftCorrectionSampleCountAdded / static_cast<double>(l_f64TheoreticalSampleCount)) : 0);
const float64 l_f64RemovedRatio = (l_f64TheoreticalSampleCount ? (m_i64DriftCorrectionSampleCountRemoved / static_cast<double>(l_f64TheoreticalSampleCount)) : 0);
const double l_f64AddedRatio = (l_f64TheoreticalSampleCount ? (m_i64DriftCorrectionSampleCountAdded / static_cast<double>(l_f64TheoreticalSampleCount)) : 0);
const double l_f64RemovedRatio = (l_f64TheoreticalSampleCount ? (m_i64DriftCorrectionSampleCountRemoved / static_cast<double>(l_f64TheoreticalSampleCount)) : 0);
const uint64_t l_ui64DriftToleranceDurationMs = getDriftToleranceDurationMs();
const float64 l_f64DriftRatio = getDriftMs() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const float64 l_f64DriftRatioTooFastMax = getDriftTooFastMax() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const float64 l_f64DriftRatioTooSlowMax = getDriftTooSlowMax() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const double l_f64DriftRatio = getDriftMs() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const double l_f64DriftRatioTooFastMax = getDriftTooFastMax() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const double l_f64DriftRatioTooSlowMax = getDriftTooSlowMax() / static_cast<double>(l_ui64DriftToleranceDurationMs);
const double l_f64EstimatedSamplingRate = m_f64ReceivedSampleCount / l_f64ElapsedTime;
const float64 l_f64DeviationPercent = 100.0 * (l_f64EstimatedSamplingRate / static_cast<double>(m_ui32SamplingFrequency));
const double l_f64DeviationPercent = 100.0 * (l_f64EstimatedSamplingRate / static_cast<double>(m_ui32SamplingFrequency));
if (l_f64DriftRatioTooFastMax > 1.0 || l_f64DriftRatioTooSlowMax > 1.0 || std::abs(l_f64DriftRatio) > 1.0)
......@@ -183,7 +183,7 @@ void CDriftCorrection::printStats() const
<< "\n";
const double l_f64RemainingDriftCount = m_f64CorrectedSampleCount - l_f64TheoreticalSampleCount;
const float64 l_f64RemainingDriftMs = 1000.0 * l_f64RemainingDriftCount / static_cast<double>(m_ui32SamplingFrequency);
const double l_f64RemainingDriftMs = 1000.0 * l_f64RemainingDriftCount / static_cast<double>(m_ui32SamplingFrequency);
m_rKernelContext.getLogManager() << (std::abs(l_f64RemainingDriftMs) > l_ui64DriftToleranceDurationMs ? LogLevel_Warning : LogLevel_Info)
<< " Remaining : " << l_f64RemainingDriftCount << " samples (" << l_f64RemainingDriftMs << "ms, " << 100 * l_f64RemainingDriftMs / l_ui64DriftToleranceDurationMs << "% of tol., "
<< std::round(100.0 * (l_f64RemainingDriftMs / 1000.0) / l_f64ElapsedTime * 10.0) / 10.0 << "% of session length)"
......@@ -223,7 +223,7 @@ double CDriftCorrection::computeJitter(const uint64_t ui64CurrentTime)
}
// Jitter in fractional samples
const float64 l_f64Jitter = l_f64TimeDiff * m_ui32SamplingFrequency + static_cast<double>(m_i64InnerLatencySampleCount);
const double l_f64Jitter = l_f64TimeDiff * m_ui32SamplingFrequency + static_cast<double>(m_i64InnerLatencySampleCount);
return l_f64Jitter;
}
......@@ -430,7 +430,7 @@ int64_t CDriftCorrection::getDriftSampleCount() const
// Note that we cannot do actual correction with subsample accuracy, so here we truncate the drift estimate to integer in getDriftSampleCount().
int64_t CDriftCorrection::getSuggestedDriftCorrectionSampleCount() const
{
const float64 l_f64DriftToleranceMs = static_cast<double>(this->getDriftToleranceDurationMs());
const double l_f64DriftToleranceMs = static_cast<double>(this->getDriftToleranceDurationMs());
const double l_f64CurrentDriftMs = this->getDriftMs();
if (std::abs(l_f64CurrentDriftMs) > l_f64DriftToleranceMs)
......
......@@ -47,7 +47,7 @@ namespace OpenViBEAcquisitionServer
bool setChannelName(const uint32_t ui32ChannelIndex, const char* sChannelName) override;
bool setChannelGain(const uint32_t ui32ChannelIndex, const float f32ChannelGain) override;
bool setChannelUnits(const uint32_t ui32ChannelIndex, const uint32_t ui32ChannelUnit, const uint32_t ui32ChannelFactor) override;
// virtual OpenViBE::boolean setChannelLocation(const uint32_t ui32ChannelIndex, const OpenViBE::float32 ui32ChannelLocationX, const OpenViBE::float32 ui32ChannelLocationY, const OpenViBE::float32 ui32ChannelLocationZ);
// virtual bool setChannelLocation(const uint32_t ui32ChannelIndex, const float ui32ChannelLocationX, const float ui32ChannelLocationY, const float ui32ChannelLocationZ);
uint32_t getChannelCount() const override;
const char* getChannelName(const uint32_t ui32ChannelIndex) const override;
......@@ -58,7 +58,7 @@ namespace OpenViBEAcquisitionServer
bool isChannelCountSet() const override;
bool isChannelNameSet() const override;
bool isChannelGainSet() const override;
// virtual OpenViBE::boolean isChannelLocationSet() const;
// virtual bool isChannelLocationSet() const;
bool isChannelUnitSet() const override;
// Samples information
......@@ -156,7 +156,7 @@ uint32_t CHeaderImpl::getSubjectGender() const
return m_ui32SubjectGender;
}
boolean CHeaderImpl::setImpedanceCheckRequested(const bool bImpedanceCheckRequested)
bool CHeaderImpl::setImpedanceCheckRequested(const bool bImpedanceCheckRequested)
{
m_bIsImpedanceCheckRequested = bImpedanceCheckRequested;
return true;
......@@ -224,7 +224,7 @@ bool CHeaderImpl::setChannelUnits(const uint32_t ui32ChannelIndex, const uint32_
return ui32ChannelIndex < m_ui32ChannelCount;
}
// boolean CHeaderImpl::setChannelLocation(const uint32 ui32ChannelIndex, const float32 ui32ChannelLocationX, const float32 ui32ChannelLocationY, const float32 ui32ChannelLocationZ);
// bool CHeaderImpl::setChannelLocation(const uint32 ui32ChannelIndex, const float ui32ChannelLocationX, const float ui32ChannelLocationY, const float ui32ChannelLocationZ);
uint32_t CHeaderImpl::getChannelCount() const
{
......@@ -286,7 +286,7 @@ bool CHeaderImpl::isChannelGainSet() const
return isChannelCountSet();
}
// boolean CHeaderImpl::isChannelLocationSet() const
// bool CHeaderImpl::isChannelLocationSet() const
bool CHeaderImpl::isChannelUnitSet() const
{
......@@ -429,7 +429,7 @@ bool CHeader::setChannelUnits(const uint32_t ui32ChannelIndex, const uint32_t ui
return m_pHeaderImpl->setChannelUnits(ui32ChannelIndex, ui32ChannelUnit, ui32ChannelFactor);
}
// boolean CHeader::setChannelLocation(const uint32 ui32ChannelIndex, const float32 ui32ChannelLocationX, const float32 ui32ChannelLocationY, const float32 ui32ChannelLocationZ);
// bool CHeader::setChannelLocation(const uint32 ui32ChannelIndex, const float ui32ChannelLocationX, const float ui32ChannelLocationY, const float ui32ChannelLocationZ);
uint32_t CHeader::getChannelCount() const
{
......@@ -468,7 +468,7 @@ bool CHeader::isChannelGainSet() const
return m_pHeaderImpl->isChannelGainSet();
}
// boolean CHeader::isChannelLocationSet() const
// bool CHeader::isChannelLocationSet() const
bool CHeader::isChannelUnitSet() const
{
......
......@@ -36,7 +36,7 @@ namespace OpenViBEAcquisitionServer
bool setChannelName(const uint32_t ui32ChannelIndex, const char* sChannelName) override;
bool setChannelGain(const uint32_t ui32ChannelIndex, const float f32ChannelGain) override;
bool setChannelUnits(const uint32_t ui32ChannelIndex, const uint32_t ui32ChannelUnit, const uint32_t ui32ChannelFactor) override;
// virtual OpenViBE::boolean setChannelLocation(const uint32_t ui32ChannelIndex, const OpenViBE::float32 ui32ChannelLocationX, const OpenViBE::float32 ui32ChannelLocationY, const OpenViBE::float32 ui32ChannelLocationZ);
// virtual bool setChannelLocation(const uint32_t ui32ChannelIndex, const float ui32ChannelLocationX, const float ui32ChannelLocationY, const float ui32ChannelLocationZ);
uint32_t getChannelCount() const override;
const char* getChannelName(const uint32_t ui32ChannelIndex) const override;
......@@ -47,7 +47,7 @@ namespace OpenViBEAcquisitionServer
bool isChannelCountSet() const override;
bool isChannelNameSet() const override;
bool isChannelGainSet() const override;
// virtual OpenViBE::boolean isChannelLocationSet() const;
// virtual bool isChannelLocationSet() const;
bool isChannelUnitSet() const override;
// Samples information
......
......@@ -33,7 +33,7 @@ namespace OpenViBETracker
Contexted() = delete;
// Needed if Contexted is used as a base class for TAttributable
// virtual OpenViBE::boolean isDerivedFromClass(
// virtual bool isDerivedFromClass(
// const OpenViBE::CIdentifier& rClassIdentifier) const
// {
// return false;
......
......@@ -90,7 +90,7 @@ namespace OpenViBETracker
private:
EBML::boolean isMasterChild(const EBML::CIdentifier& rIdentifier) override;
bool isMasterChild(const EBML::CIdentifier& rIdentifier) override;
void openChild(const EBML::CIdentifier& rIdentifier) override;
void processChildData(const void* pBuffer, const EBML::uint64 ui64BufferSize) override;
void closeChild() override;
......
......@@ -125,7 +125,7 @@ bool Demuxer::step()
bool Demuxer::stop() { return true; }
EBML::boolean Demuxer::isMasterChild(const EBML::CIdentifier& rIdentifier)
bool Demuxer::isMasterChild(const EBML::CIdentifier& rIdentifier)
{
if (rIdentifier == EBML_Identifier_Header) return true;
if (rIdentifier == OVP_NodeId_OpenViBEStream_Header) return true;
......
......@@ -684,8 +684,8 @@ bool GUI::redrawStream(size_t trackIndex, size_t streamIndex)
return false;
}
const float64 hValue = (double)std::floor(gtk_range_get_value(GTK_RANGE(m_hScrollbar)));
const float64 hScale = (double)std::floor(gtk_range_get_value(GTK_RANGE(m_hScale)));
const double hValue = (double)std::floor(gtk_range_get_value(GTK_RANGE(m_hScrollbar)));
const double hScale = (double)std::floor(gtk_range_get_value(GTK_RANGE(m_hScale)));
// std::cout << "HSlider is at " << hValue << " and " << hScale << "\n";
......
......@@ -229,7 +229,7 @@ bool CBoxAlgorithmEDFFileWriter::process()
for (int channel = 0; channel < m_iNumberOfChannels; channel++)
{
//Creation of one information channel structure per channel
SChannelInfo l_oChannelInfo = { std::numeric_limits<float64>::max(), -std::numeric_limits<double>::max() };
SChannelInfo l_oChannelInfo = { std::numeric_limits<double>::max(), -std::numeric_limits<double>::max() };
m_oChannelInformation.push_back(l_oChannelInfo);
}
......
......@@ -126,7 +126,7 @@ bool CBoxAlgorithmOSCController::process()
for (uint32_t k = 0; k < l_pMatrix->getBufferElementCount(); k++)
{
const float32 l_f32InputVal = static_cast<float>(l_pMatrix->getBuffer()[k]);