public override bool StartDataCollection(string csvFilepath, bool csvFileCreate = true) { if (csvFileCreate) { m_CSVFileWriter = new SpaceSensorCSVWriter(csvFilepath); m_CSVFileWriter.logHeader(m_CalibrationRecord); } else { m_CSVFileWriter = null; } if (ProjectCommon.ProjectConstants.DEFAULT_WIIMOTE_SIMULATION_MODE) { Thread spaceSensorRecording; spaceSensorRecording = new Thread(SpaceSensorRecordingThreadSimulation); } else { _startRecordingTime = DateTime.Now; Thread spaceSensorProcessing; spaceSensorProcessing = new Thread(SpaceSensorProcessingThread); _spaceProcessingStatus = true; spaceSensorProcessing.Start(); _spaceSensorMain.SpaceSensorDataEvent += new SpaceSensorMain.OnSpaceSensorDataEvent(ReceivedSpaceSensorData); _spaceSensorMain.StartReading(); } return(true); }
public override bool StartDataCollection(string csvFilepath, bool csvFileCreate = true) { if (csvFileCreate) { m_CSVFileWriter = new SpaceSensorCSVWriter(csvFilepath); m_CSVFileWriter.logHeader(m_CalibrationRecord); } else m_CSVFileWriter = null; if (ProjectCommon.ProjectConstants.DEFAULT_WIIMOTE_SIMULATION_MODE) { Thread spaceSensorRecording; spaceSensorRecording = new Thread(SpaceSensorRecordingThreadSimulation); } else { _startRecordingTime = DateTime.Now; Thread spaceSensorProcessing; spaceSensorProcessing = new Thread(SpaceSensorProcessingThread); _spaceProcessingStatus = true; spaceSensorProcessing.Start(); _spaceSensorMain.SpaceSensorDataEvent += new SpaceSensorMain.OnSpaceSensorDataEvent(ReceivedSpaceSensorData); _spaceSensorMain.StartReading(); } return true; }