Alvaro Cassinelli
/
skinGames_forktest
just a test
Fork of scoreLight_Advanced by
Diff: soundSpot.cpp
- Revision:
- 47:2312a8dc9658
- Parent:
- 44:46e25fa1669b
--- a/soundSpot.cpp Tue Apr 01 11:34:37 2014 +0000 +++ b/soundSpot.cpp Tue Apr 01 14:57:37 2014 +0000 @@ -1,5 +1,8 @@ #include "soundSpot.h" +// SHOULD NOT BE HERE: (only because I am using serial princ pc object) +#include "hardwareIO.h" + // Constructor: soundSpot::soundSpot() { // by default, the child constructor call the parameterless default constructor (we could force another by doing: soundSpot::soundSpot : LivingSpot (params...) { ..} @@ -20,6 +23,18 @@ soundSpot::~soundSpot() { } +void soundSpot::printParameters() { + // first show common parameters, then call the virtual method: + pc.printf("Mirror delay :%d\n", displaySensingBuffer.delayMirrorSamples); + pc.printf("Angle correction force :%f\n", angleCorrectionForceLoop); + pc.printf("Thresholding mode :%d\n", displaySensingBuffer.modeThreshold); + pc.printf("Min Contrast Ratio :%f / Current Contrast: %f\n", displaySensingBuffer.min_contrast_ratio, 1.0*displaySensingBuffer.maxI/displaySensingBuffer.minI); + pc.printf("Threshold Factor: %f\n", displaySensingBuffer.threshold_factor); + pc.printf("Min Acceptable Intensity :%f\n", displaySensingBuffer.min_acceptable_intensity); + pc.printf("Current Max / Min Intensity: %d / %d\n", displaySensingBuffer.maxI, displaySensingBuffer.minI, displaySensingBuffer.maxI/displaySensingBuffer.minI); + this->showChildParameters(); + } + void soundSpot::setColor(unsigned char c) { blobColor=0x07&c; // we will use the first three bits to set the RGB colors. }