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:
- 32:52273c3291fe
- Parent:
- 31:5f039cbddee8
- Child:
- 44:46e25fa1669b
diff -r 5f039cbddee8 -r 52273c3291fe soundSpot.cpp
--- a/soundSpot.cpp Sun Sep 23 10:11:43 2012 +0000
+++ b/soundSpot.cpp Mon Oct 29 14:28:47 2012 +0000
@@ -25,6 +25,18 @@
// NOTE: it may be better to have always the red on?
}
+void soundSpot::setGreenColor(unsigned char c) {
+// this set/reset the green bit only:
+ if (c>0) blobColor=blobColor|0x2; //meaning second bit to 1
+ else blobColor=blobColor&0x5; // meaning second bit to 0
+}
+
+void soundSpot::setBlueColor(unsigned char c) {
+// this set/reset the green bit only:
+ if (c>0) blobColor=blobColor|0x1; //meaning first bit to 1
+ else blobColor=blobColor&0x6; // meaning first bit to 0
+}
+
void soundSpot::initCommonVariables() {
firstTimeNoTouch=true;
// randomForce.set(1,0);// first time there won't be any force, or random force
