diff --git a/src/CamNoiseAnalysis.cpp b/src/CamNoiseAnalysis.cpp index b61757c..e7b2355 100755 --- a/src/CamNoiseAnalysis.cpp +++ b/src/CamNoiseAnalysis.cpp @@ -73,50 +73,58 @@ void CamNoiseAnalysis::draw() /// *** TODO *** /// // still need to deal with latency frames here - i.e.: there are frames /// *** TODO *** /// - - ofEnableAlphaBlending(); - ofColor aColour; - - int _fade_in_frames = _frame_cnt_max/10; - float _number_of_grey_levels=10; - - float _frames_per_level = _frame_cnt_max / _number_of_grey_levels; - ofColor someColor; - - if (_frame_cnt < _fade_in_frames) { - aColour.set(255, 255, 255, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); - ofSetColor(aColour); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - //cout << "FADE IN STROBE TIME " << endl; - } - - if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ + + if (_frame_cnt < _frame_cnt_max) + { - - for(int i=0;i<_number_of_grey_levels;i++){ - if (_frame_cnt>= _frames_per_level *( i-1) && +_frame_cnt < _frames_per_level * (i) ) { - //set colour to current grey level - c=255-( 255.0 * ( i /_number_of_grey_levels)); - someColor.set(c); - } - ofSetColor(someColor); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - } + ofEnableAlphaBlending(); + ofColor aColour; - } - - if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { - aColour.set(0, 0, 0, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + int _fade_in_frames = _frame_cnt_max/10; + float _number_of_grey_levels=10; + + float _frames_per_level = _frame_cnt_max / _number_of_grey_levels; + ofColor someColor; + + if (_frame_cnt < _fade_in_frames) { + aColour.set(255, 255, 255, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); ofSetColor(aColour); ofRect(0, 0, ofGetWidth(), ofGetHeight()); - // cout << "FADE OUT STROBE TIME " << endl; - } - + //cout << "FADE IN STROBE TIME " << endl; + } + + if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ + + + for(int i=0;i<_number_of_grey_levels;i++){ + if (_frame_cnt>= _frames_per_level *( i-1) && +_frame_cnt < _frames_per_level * (i) ) { + //set colour to current grey level + c=255-( 255.0 * ( i /_number_of_grey_levels)); + someColor.set(c); + } + ofSetColor(someColor); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + } + + } + + if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { + aColour.set(0, 0, 0, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + ofSetColor(aColour); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + // cout << "FADE OUT STROBE TIME " << endl; + } + + ofDisableAlphaBlending(); + + + } else { + _RUN_DONE = true; + } _frame_cnt++; - ofDisableAlphaBlending(); - break; + } case STATE_SYNTHESISING: @@ -153,7 +161,7 @@ void CamNoiseAnalysis::save_cb(Timer& timer) _saved_filenames.push_back(file); - if(_save_cnt >= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/ColorMultiAnalysis.cpp b/src/ColorMultiAnalysis.cpp index 322dc00..02a5873 100755 --- a/src/ColorMultiAnalysis.cpp +++ b/src/ColorMultiAnalysis.cpp @@ -96,43 +96,54 @@ void ColorMultiAnalysis::draw() switch (_state) { case STATE_ACQUIRING: { - int _fade_in_frames = _frame_cnt_max/50; - if (_frame_cnt < _fade_in_frames) { - ofColor aColor; + if (_frame_cnt < _frame_cnt_max) + { + - aColor.setHsb(c, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255), ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + int _fade_in_frames = _frame_cnt_max/50; - ofSetColor(aColor); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); + if (_frame_cnt < _fade_in_frames) { + ofColor aColor; + + aColor.setHsb(c, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255), ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + + ofSetColor(aColor); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + + cout << "FADING IN..." << endl; + } - cout << "FADING IN..." << endl; - } + if (_frame_cnt >= _fade_in_frames && _frame_cnt < _frame_cnt_max-_fade_in_frames){ + + ofColor aColor; + aColor.setHsb(c, 255, 255); + ofSetColor(aColor); + + //how far are we as a percent of _frame_count_max * 360 HUE VALUES + c = 255.0 * (_frame_cnt_max - _frame_cnt)/(_frame_cnt_max); + + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + } + + if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { + + ofColor aColor; + + aColor.setHsb(c, 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255), 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255)); + + ofSetColor(aColor); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + + _fade_cnt++; + cout << "FADING OUT..." << endl; + + } + + } else { + + _RUN_DONE = true; - if (_frame_cnt >= _fade_in_frames && _frame_cnt < _frame_cnt_max-_fade_in_frames){ - - ofColor aColor; - aColor.setHsb(c, 255, 255); - ofSetColor(aColor); - - //how far are we as a percent of _frame_count_max * 360 HUE VALUES - c = 255.0 * (_frame_cnt_max - _frame_cnt)/(_frame_cnt_max); - - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - } - - if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { - - ofColor aColor; - - aColor.setHsb(c, 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255), 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255)); - - ofSetColor(aColor); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - - _fade_cnt++; - cout << "FADING OUT..." << endl; - } _frame_cnt++; @@ -175,7 +186,7 @@ void ColorMultiAnalysis::save_cb(Timer& timer) // cout<<_whole_file_path<= NUM_SAVE_PER_RUN){ - _RUN_DONE = true; - } + //if(_save_cnt >= NUM_SAVE_PER_RUN){ + // _RUN_DONE = true; + //} } diff --git a/src/ColorSingleAnalysis.cpp b/src/ColorSingleAnalysis.cpp index ec99afa..0ee5153 100755 --- a/src/ColorSingleAnalysis.cpp +++ b/src/ColorSingleAnalysis.cpp @@ -73,51 +73,59 @@ void ColorSingleAnalysis::draw() switch (_state) { case STATE_ACQUIRING: { - float one_third_of_frame_count_max=_frame_cnt_max/3; - int _fade_in_frames = one_third_of_frame_count_max/10; - if (_frame_cnt < _fade_in_frames){ - ofSetColor(ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255), 0, 0); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - fileNameTag = "FADING"; - } - - if (_frame_cnt >= _fade_in_frames && _frame_cnt < one_third_of_frame_count_max){ - r=255.0; - g=0.0; - b=0.0; - ofSetColor(r,g,b); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - fileNameTag = "RED"; - } - - if (_frame_cnt >= one_third_of_frame_count_max && _frame_cnt < 2*one_third_of_frame_count_max){ - r=0.0; - g=255.0; - b=0.0; - ofSetColor(r,g,b); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - fileNameTag = "GREEN"; - } - - if (_frame_cnt >= 2*one_third_of_frame_count_max && _frame_cnt < (_frame_cnt_max-_fade_in_frames) ){ - r=0.0; - g=0.0; - b=255.0; - ofSetColor(r,g,b); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - fileNameTag = "BLUE"; - } - - if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max){ + if (_frame_cnt < _frame_cnt_max) + { + + float one_third_of_frame_count_max=_frame_cnt_max/3; + int _fade_in_frames = one_third_of_frame_count_max/10; - ofSetColor(0, 0, 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255)); - cout << "255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)"<< 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255) << endl; + if (_frame_cnt < _fade_in_frames){ + ofSetColor(ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255), 0, 0); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + fileNameTag = "FADING"; + } - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - _fade_cnt++; - fileNameTag = "FADING"; + if (_frame_cnt >= _fade_in_frames && _frame_cnt < one_third_of_frame_count_max){ + r=255.0; + g=0.0; + b=0.0; + ofSetColor(r,g,b); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + fileNameTag = "RED"; + } + + if (_frame_cnt >= one_third_of_frame_count_max && _frame_cnt < 2*one_third_of_frame_count_max){ + r=0.0; + g=255.0; + b=0.0; + ofSetColor(r,g,b); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + fileNameTag = "GREEN"; + } + + if (_frame_cnt >= 2*one_third_of_frame_count_max && _frame_cnt < (_frame_cnt_max-_fade_in_frames) ){ + r=0.0; + g=0.0; + b=255.0; + ofSetColor(r,g,b); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + fileNameTag = "BLUE"; + } + + if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max){ + + ofSetColor(0, 0, 255-ofMap(_fade_cnt, 0, _fade_in_frames, 0, 255)); + cout << "255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)"<< 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255) << endl; + + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + _fade_cnt++; + fileNameTag = "FADING"; + } + + } else { + _RUN_DONE = true; } _frame_cnt++; @@ -156,7 +164,7 @@ void ColorSingleAnalysis::save_cb(Timer& timer) //cout<<_whole_file_path+"/"+file_name<= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/DiffNoiseAnalysis.cpp b/src/DiffNoiseAnalysis.cpp index a2a32cf..54e635b 100755 --- a/src/DiffNoiseAnalysis.cpp +++ b/src/DiffNoiseAnalysis.cpp @@ -69,67 +69,77 @@ void DiffNoiseAnalysis::draw() switch (_state) { case STATE_ACQUIRING: { - ofColor aColour; - int rectSize = 5; - ofEnableAlphaBlending(); - int _fade_in_frames = _frame_cnt_max/10; - - if (_frame_cnt < _fade_in_frames) { + if (_frame_cnt < _frame_cnt_max) + { + + ofColor aColour; + int rectSize = 5; + ofEnableAlphaBlending(); - for (int i=1; i < ofGetHeight() ; i=i+rectSize) - { - for (int j=1; j < ofGetWidth(); j=j+rectSize) + int _fade_in_frames = _frame_cnt_max/10; + + if (_frame_cnt < _fade_in_frames) { + + for (int i=1; i < ofGetHeight() ; i=i+rectSize) { - c = ofRandom(0,255); - aColour.set(c, c, c, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); - ofSetColor(aColour); - ofRect(j, i, rectSize, rectSize); - } - } - - cout << "FADING IN..." << endl; - } - - - - if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ - - for (int i=1; i < ofGetHeight() ; i=i+rectSize) - { - for (int j=1; j < ofGetWidth(); j=j+rectSize) - { - c = ofRandom(0,255); - aColour.set(c, c, c, 255); - ofSetColor(aColour); - ofRect(j, i, rectSize, rectSize); - - } - } - } - - - if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { - - for (int i=1; i < ofGetHeight() ; i=i+rectSize) - { - for (int j=1; j < ofGetWidth(); j=j+rectSize) - { - c = ofRandom(0,255); - aColour.set(c, c, c, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); - ofSetColor(aColour); - ofRect(j, i, rectSize, rectSize); - } + for (int j=1; j < ofGetWidth(); j=j+rectSize) + { + c = ofRandom(0,255); + aColour.set(c, c, c, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + ofSetColor(aColour); + ofRect(j, i, rectSize, rectSize); + } + } + + cout << "FADING IN..." << endl; } - _fade_cnt++; - cout << "FADING OUT..." << endl; + + if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ + + for (int i=1; i < ofGetHeight() ; i=i+rectSize) + { + for (int j=1; j < ofGetWidth(); j=j+rectSize) + { + c = ofRandom(0,255); + aColour.set(c, c, c, 255); + ofSetColor(aColour); + ofRect(j, i, rectSize, rectSize); + + } + } + } + + + if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { + + for (int i=1; i < ofGetHeight() ; i=i+rectSize) + { + for (int j=1; j < ofGetWidth(); j=j+rectSize) + { + c = ofRandom(0,255); + aColour.set(c, c, c, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + ofSetColor(aColour); + ofRect(j, i, rectSize, rectSize); + } + } + + _fade_cnt++; + cout << "FADING OUT..." << endl; + + } + + + ofDisableAlphaBlending(); + + } else { + + _RUN_DONE = true; + } - - ofDisableAlphaBlending(); - _frame_cnt++; break; @@ -182,7 +192,7 @@ void DiffNoiseAnalysis::save_cb(Timer& timer) } _save_cnt++; - if(_save_cnt >= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/IResponseAnalysis.cpp b/src/IResponseAnalysis.cpp index 624f78e..efa0e96 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -79,6 +79,8 @@ void IResponseAnalysis::draw() ofSetColor(c, c, c); ofRect(0, 0, ofGetWidth(), ofGetHeight()); c = 255.0 * (_frame_cnt_max*_frame_cnt_max - _frame_cnt*_frame_cnt)/(_frame_cnt_max*_frame_cnt_max); + } else { + _RUN_DONE = true; } _frame_cnt++; @@ -121,6 +123,6 @@ void IResponseAnalysis::save_cb(Timer& timer) ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - if(_save_cnt >= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index b3ed89c..521e049 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -75,7 +75,7 @@ void RelaxRateAnalysis::draw() // still need to deal with latency frames here - i.e.: there are frames /// *** TODO *** /// - if (_frame_cnt <= _frame_cnt_max) + if (_frame_cnt < _frame_cnt_max) { float lightLevel=pow(_level,2); @@ -93,7 +93,8 @@ void RelaxRateAnalysis::draw() } else { cout << "RELAXRATE RUN COMPLETED" << endl; - _state = STATE_SYNTHESISING; + //_state = STATE_SYNTHESISING; + _RUN_DONE = true; } _frame_cnt++; @@ -138,7 +139,7 @@ void RelaxRateAnalysis::save_cb(Timer& timer) _saved_filenames.push_back(file); - if(_save_cnt >= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index f3b64a5..c39a34f 100755 --- a/src/ShadowScapesAnalysis.cpp +++ b/src/ShadowScapesAnalysis.cpp @@ -166,21 +166,21 @@ void ShadowScapesAnalysis::draw() if(_dir == V && int(_line) >= (ofGetHeight()+4*_scanLineWidth)){ cout << "VERTICAL IS DONE - _line >= (ofGetHeight()+4*_scanLineWidth) is TRUE" << endl; - _state = STATE_SYNTHESISING; + //_state = STATE_SYNTHESISING; _RUN_DONE = true; } if(_dir == H && int(_line) >= (ofGetWidth()+4*_scanLineWidth)) { //cout << "HORIZONTAL IS DONE - _line >= (ofGetWidth()+4*_scanLineWidth)) is TRUE" << endl; - _state = STATE_SYNTHESISING; + //_state = STATE_SYNTHESISING; _RUN_DONE = true; } if(_dir == D && int(_line) >= (1.5*ofGetHeight()+4*_scanLineWidth)) { //cout << "DIAGONAL IS DONE - _line >= (1.5*ofGetHeight()+4*_scanLineWidth)) is TRUE" << endl; - _state = STATE_SYNTHESISING; + //_state = STATE_SYNTHESISING; _RUN_DONE = true; } diff --git a/src/ShapeFromShadingAnalysis.cpp b/src/ShapeFromShadingAnalysis.cpp index 4736499..5bb67dd 100755 --- a/src/ShapeFromShadingAnalysis.cpp +++ b/src/ShapeFromShadingAnalysis.cpp @@ -89,7 +89,7 @@ void ShapeFromShadingAnalysis::draw() switch (_state) { case STATE_ACQUIRING: { - if (_frame_cnt <= _frame_cnt_max) + if (_frame_cnt < _frame_cnt_max) { ofEnableAlphaBlending(); @@ -344,7 +344,7 @@ void ShapeFromShadingAnalysis::save_cb(Timer& timer) ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); _save_cnt++; - if(_save_cnt >= NUM_SAVE_PER_RUN) - _RUN_DONE = true; + //if(_save_cnt >= NUM_SAVE_PER_RUN) + // _RUN_DONE = true; } diff --git a/src/StrobeAnalysis.cpp b/src/StrobeAnalysis.cpp index 4680699..5778165 100755 --- a/src/StrobeAnalysis.cpp +++ b/src/StrobeAnalysis.cpp @@ -74,51 +74,58 @@ void StrobeAnalysis::draw() switch (_state) { case STATE_ACQUIRING: { - ofEnableAlphaBlending(); - ofColor aColour; - int _fade_in_frames = _frame_cnt_max/10; - cout<< "_fade_in_frames" << _fade_in_frames<< endl; - if (_frame_cnt < _fade_in_frames) { + if (_frame_cnt < _frame_cnt_max) + { + ofEnableAlphaBlending(); + ofColor aColour; + int _fade_in_frames = _frame_cnt_max/10; + cout<< "_fade_in_frames" << _fade_in_frames<< endl; - aColour.set(255, 255, 255, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); - ofSetColor(aColour); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - //cout << "FADE IN STROBE TIME " << endl; - - - } - - if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ - - //cout << "_frame_cnt: " << _frame_cnt << endl; - //cout << "frame_cnt % 15: " << _frame_cnt%15 << endl; - //cout << "MAIN STROBE TIME " << endl; - - if (_frame_cnt%int(ofGetFrameRate()*_strobe_interval/1000) < (ofGetFrameRate()*_strobe_interval/1000)/2) - { - ofSetColor(255, 255, 255); + if (_frame_cnt < _fade_in_frames) { + + aColour.set(255, 255, 255, ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + ofSetColor(aColour); ofRect(0, 0, ofGetWidth(), ofGetHeight()); - _strobe_cnt++; - _strobe_on = 1; - } else if (_frame_cnt%int(ofGetFrameRate()*_strobe_interval/1000) >= (ofGetFrameRate()*_strobe_interval/1000)/2) - { - ofSetColor(0, 0, 0); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - _strobe_on = 0; + //cout << "FADE IN STROBE TIME " << endl; + + } + if (_frame_cnt >= _fade_in_frames && _frame_cnt < (_frame_cnt_max-_fade_in_frames)){ + + //cout << "_frame_cnt: " << _frame_cnt << endl; + //cout << "frame_cnt % 15: " << _frame_cnt%15 << endl; + //cout << "MAIN STROBE TIME " << endl; + + if (_frame_cnt%int(ofGetFrameRate()*_strobe_interval/1000) < (ofGetFrameRate()*_strobe_interval/1000)/2) + { + ofSetColor(255, 255, 255); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + _strobe_cnt++; + _strobe_on = 1; + } else if (_frame_cnt%int(ofGetFrameRate()*_strobe_interval/1000) >= (ofGetFrameRate()*_strobe_interval/1000)/2) + { + ofSetColor(0, 0, 0); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + _strobe_on = 0; + } + + } + + if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { + aColour.set(255, 255, 255, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); + ofSetColor(aColour); + ofRect(0, 0, ofGetWidth(), ofGetHeight()); + // cout << "FADE OUT STROBE TIME " << endl; + } + + ofDisableAlphaBlending(); + } else { + _RUN_DONE = true; } - if (_frame_cnt >= (_frame_cnt_max-_fade_in_frames) && _frame_cnt < _frame_cnt_max) { - aColour.set(255, 255, 255, 255-ofMap(_frame_cnt, 0, _fade_in_frames, 0, 255)); - ofSetColor(aColour); - ofRect(0, 0, ofGetWidth(), ofGetHeight()); - // cout << "FADE OUT STROBE TIME " << endl; - } - _frame_cnt++; - ofDisableAlphaBlending(); break; } @@ -154,8 +161,8 @@ void StrobeAnalysis::save_cb(Timer& timer) cout << "_save_cnt_max" << _save_cnt_max << endl; //TODO: something fucked here with my calc of _save_cnt_max - new structure should fix it? - if(_save_cnt >= _save_cnt_max-10) { - _RUN_DONE = true; - } + //if(_save_cnt >= _save_cnt_max-10) { + // _RUN_DONE = true; + //} }