26 recordingMode = NOT_RECORDING;
32 this->recordingMode = rhs.recordingMode;
33 this->prepTime = rhs.prepTime;
34 this->recordTime = rhs.recordTime;
35 this->trainingTimer = rhs.trainingTimer;
44 this->recordingMode = rhs.recordingMode;
45 this->prepTime = rhs.prepTime;
46 this->recordTime = rhs.recordTime;
47 this->trainingTimer = rhs.trainingTimer;
52 bool TrainingDataRecordingTimer::startRecording(
unsigned long prepTime,
unsigned long recordTime){
53 this->prepTime = prepTime;
54 this->recordTime = recordTime;
58 recordingMode = RECORDING;
61 if( recordTime < 1 ) trainingTimer.
start();
62 else trainingTimer.
start( recordTime );
64 recordingMode = PREP_COUNTDOWN;
65 trainingTimer.
start( prepTime );
71 bool TrainingDataRecordingTimer::stopRecording(){
72 recordingMode = NOT_RECORDING;
77 bool TrainingDataRecordingTimer::update(){
79 switch( recordingMode ){
87 recordingMode = RECORDING;
89 if( recordTime < 1 ) trainingTimer.
start();
90 else trainingTimer.
start( recordTime );
95 recordingMode = NOT_RECORDING;
105 bool TrainingDataRecordingTimer::getInPrepMode(){
107 return recordingMode==PREP_COUNTDOWN ?
true :
false;
110 bool TrainingDataRecordingTimer::getInRecordingMode(){
112 return recordingMode==RECORDING ?
true :
false;
115 bool TrainingDataRecordingTimer::getRecordingStopped(){
117 return recordingMode==NOT_RECORDING ?
true :
false;
120 double TrainingDataRecordingTimer::getSeconds(){
TrainingDataRecordingTimer & operator=(const TrainingDataRecordingTimer &rhs)
TrainingDataRecordingTimer()
The TrainingDataRecordingTimer is a tool to help record your training data.
~TrainingDataRecordingTimer()