1111#include < boost/lexical_cast.hpp>
1212#include < boost/shared_ptr.hpp>
1313#include < boost/foreach.hpp>
14+ #include < iostream>
1415
1516const int m_pnBaseSamplingRates[] = {10000 ,50000 ,100000 };
1617const int m_pnSubSampleDivisors[] = { 1 ,2 ,5 ,10 ,20 ,50 ,100 };
@@ -40,10 +41,25 @@ MainWindow::MainWindow(QWidget *parent, const std::string &config_file): QMainWi
4041 QObject::connect (ui->actionSave_Configuration , SIGNAL (triggered ()), this , SLOT (save_config_dialog ()));
4142 QObject::connect (ui->baseSamplingRate , SIGNAL (currentIndexChanged (int )), this , SLOT (setSamplingRate ()));
4243 QObject::connect (ui->subSampleDivisor , SIGNAL (currentIndexChanged (int )), this , SLOT (setSamplingRate ()));
44+ QObject::connect (ui->actionVersions , SIGNAL (triggered ()), this , SLOT (versionsDialog ()));
4345
4446 setSamplingRate ();
4547}
4648
49+ void MainWindow::versionsDialog ()
50+ {
51+ t_VersionNumber libVersion;
52+ GetLibraryVersion (&libVersion);
53+ int32_t lslProtocolVersion = lsl::protocol_version ();
54+ int32_t lslLibVersion = lsl::library_version ();
55+ std::stringstream ss;
56+ ss << " Amplifier_LIB: " << LIBVERSIONSTREAM (libVersion) << " \n " <<
57+ " lsl protocol: " << LSLVERSIONSTREAM (lslProtocolVersion) << " \n " <<
58+ " liblsl: " << LSLVERSIONSTREAM (lslLibVersion) << " \n " <<
59+ " App: " << APPVERSIONSTREAM (m_AppVersion) << " _beta" ;
60+ QMessageBox::information (this , " Versions" , ss.str ().c_str (), QMessageBox::Ok);
61+ }
62+
4763void MainWindow::setSamplingRate ()
4864{
4965 int nNum = m_pnBaseSamplingRates[ui->baseSamplingRate ->currentIndex ()];
@@ -304,7 +320,7 @@ void MainWindow::link()
304320// background data reader thread
305321void MainWindow::read_thread (const std::vector<std::string>& channelLabels)
306322{
307- int res = SetPriorityClass (GetCurrentProcess (), HIGH_PRIORITY_CLASS);
323+ // int res = SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
308324 int nEnabledChannelCnt = m_nEEGChannelCount + ((m_bUseAUX) ? 8 : 0 );
309325 int nExtraEEGChannelCnt = 0 ;
310326 if (m_bSampledMarkersEEG) nExtraEEGChannelCnt+=1 ;
@@ -313,7 +329,13 @@ void MainWindow::read_thread(const std::vector<std::string>& channelLabels)
313329 try
314330 {
315331 // setup LSL
316- lsl::stream_outlet* poutMarkerOutlet;
332+ lsl::stream_outlet* poutMarkerOutlet = NULL ;
333+ std::cout << std::string (" actiCHamp" + m_LibTalker.getSerialNumber ());
334+ std::cout << " EEG" ;
335+ std::cout << nEnabledChannelCnt + nEnabledChannelCnt;
336+ std::cout << (double )m_nSamplingRate;
337+ std::cout << lsl::cf_float32;
338+ std::cout << m_LibTalker.getSerialNumber ();
317339 lsl::stream_info infoData (" actiCHamp-" + m_LibTalker.getSerialNumber (),
318340 " EEG" ,
319341 nEnabledChannelCnt + nExtraEEGChannelCnt,
@@ -395,7 +417,7 @@ void MainWindow::read_thread(const std::vector<std::string>& channelLabels)
395417 .append_child_value (" manufacturer" , " Brain Products" );
396418
397419 infoMarkers.desc ().append_child (" versions" )
398- .append_child_value (" Amplifier_LIB" , ssLib.str ())
420+ .append_child_value (" Amplifier_LIB" , ssLib.str () + " _beta " )
399421 .append_child_value (" lsl_protocol" , ssProt.str ())
400422 .append_child_value (" liblsl" , ssLSL.str ())
401423 .append_child_value (" App" , ssApp.str ());
0 commit comments