Big Mouth Billy Bass automation library

Dependents:   BillyBass_with_SD

Revision:
4:f009306756b3
Parent:
0:84aaade0de8f
Child:
7:dba9221acf48
--- a/billybass.cpp	Tue Jun 18 13:11:07 2013 +0000
+++ b/billybass.cpp	Tue Jun 18 14:10:34 2013 +0000
@@ -16,15 +16,21 @@
     if (!strcmp(_outputName, mouthName)) {
         output = &mouth;
         if (_pName) *_pName = mouthName;
-    }
-    else if (!strcmp(_outputName, "head") || !strcmp(_outputName, bodyName)) {
+    } else if (!strcmp(_outputName, "head") || !strcmp(_outputName, bodyName)) {
         output = &body;
         if (_pName) *_pName = bodyName;
-    }
-    else if (!strcmp(_outputName, tailName)) {
+    } else if (!strcmp(_outputName, tailName)) {
         output = &tail;
         if (_pName) *_pName = tailName;
     }
 
     return output;
 }
+
+char const *BillyBass::outputName(DigitalOut const *out) const
+{
+    if (out == &tail) return tailName;
+    else if (out == &body) return bodyName;
+    else if (out == &mouth) return mouthName;
+    else return "unknown";
+}