Alvaro Cassinelli / Mbed 2 deprecated skinGames_forktest

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

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