21 #define GRT_DLL_EXPORTS 27 recordingMode = NOT_RECORDING;
33 this->recordingMode = rhs.recordingMode;
34 this->prepTime = rhs.prepTime;
35 this->recordTime = rhs.recordTime;
36 this->trainingTimer = rhs.trainingTimer;
45 this->recordingMode = rhs.recordingMode;
46 this->prepTime = rhs.prepTime;
47 this->recordTime = rhs.recordTime;
48 this->trainingTimer = rhs.trainingTimer;
53 bool TrainingDataRecordingTimer::startRecording(
unsigned long prepTime,
unsigned long recordTime){
54 this->prepTime = prepTime;
55 this->recordTime = recordTime;
59 recordingMode = RECORDING;
62 if( recordTime < 1 ) trainingTimer.start();
63 else trainingTimer.start( recordTime );
65 recordingMode = PREP_COUNTDOWN;
66 trainingTimer.start( prepTime );
72 bool TrainingDataRecordingTimer::stopRecording(){
73 recordingMode = NOT_RECORDING;
78 bool TrainingDataRecordingTimer::update(){
80 switch( recordingMode ){
87 if( trainingTimer.getTimerReached() ){
88 recordingMode = RECORDING;
90 if( recordTime < 1 ) trainingTimer.start();
91 else trainingTimer.start( recordTime );
95 if( trainingTimer.getTimerReached() ){
96 recordingMode = NOT_RECORDING;
106 bool TrainingDataRecordingTimer::getInPrepMode(){
108 return recordingMode==PREP_COUNTDOWN ?
true :
false;
111 bool TrainingDataRecordingTimer::getInRecordingMode(){
113 return recordingMode==RECORDING ?
true :
false;
116 bool TrainingDataRecordingTimer::getRecordingStopped(){
118 return recordingMode==NOT_RECORDING ?
true :
false;
121 double TrainingDataRecordingTimer::getSeconds(){
123 return trainingTimer.getSeconds();
~TrainingDataRecordingTimer()
TrainingDataRecordingTimer & operator=(const TrainingDataRecordingTimer &rhs)
The TrainingDataRecordingTimer is a tool to help record your training data.
TrainingDataRecordingTimer()