Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of scoreLight_Advanced by
Diff: soundSpot.cpp
- Revision:
- 47:2312a8dc9658
- Parent:
- 44:46e25fa1669b
diff -r 90516893793a -r 2312a8dc9658 soundSpot.cpp
--- 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.
}
