ControllerBox directs electromechanical equipment in restaurants to display information.

Dependencies:   TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed

Fork of Mbed_MotiVControllerBox by Tim Wöstemeier

Revision:
3:21c8adb97c8f
Parent:
1:d54aed10ddf3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libMotiv/Flower.cpp	Thu Dec 04 22:26:30 2014 +0000
@@ -0,0 +1,88 @@
+#include "Flower.h"
+#include <string>
+//#include <cstdlib>
+
+
+Flower::Flower()
+    :Device(0) {}
+
+Flower::Flower(int id)
+    :Device(id) {}
+
+Flower::~Flower()
+{
+
+}
+
+Flower::Flower(const Flower& f)
+{
+    id = f.getId();
+}
+
+Flower& Flower::operator=(const Flower& f)
+{
+    id = f.getId();
+    return *this;
+}
+
+void Flower::setLed(int state)
+{}
+
+//This can be in config file later on
+//Also, functions with a variable value should be settable
+
+std::string Flower::getCommandDesc(int c)
+{
+    switch(c) {
+        case fRESET:
+            return "reset";
+            break;
+        case fPETAL_SPD:
+            return "set petal speed";
+            break;
+        case fBLINK_SPD:
+            return "set blink speed";
+            break;
+//        fBLINK_PERIOD = 3,
+//        fLED_INTENSITY = 4,
+//        fPETAL_POS = 10,
+//        fLED_TABLE_FREE = 20,
+//        fLED_TABLE_RES = 21,
+//        fLED_FOOD = 22,
+//        fLED_DRINK = 23,
+//        fLED_SERVICE = 24,
+//        fLED_CLR = 29
+            /*        Flower version 2 commands n/a for now.
+            //        fPISTIL_SPD = 3,
+            //        fPETAL1_POS = 11,
+            //        fPETAL2_POS = 12,
+            //        fPETAL3_POS = 13,
+            //        fPETAL4_POS = 14,
+            //        fPETAL5_POS = 15,
+            //        fPETAL6_POS = 16,
+            //        fPISTIL_POS_FOOD = 30,
+            //        fPISTIL_POS_DRINKS = 31,
+            //        fPISTIL_POS_SERVICE = 32 */
+        case fTABLE_FREE:
+            return "table free";
+            break;
+        case fTABLE_ACTIVE:
+            return "table active";
+            break;
+        case fTABLE_RES:
+            return "table reserved";
+            break;
+//        fTABLE_END = 53,
+        case fFOOD_ORDERED:
+            return "food ordered";
+            break;
+            //fDRINKS_ORDERED = 55,
+//        fSERVICE_REQ = 56,
+//        fPETALS_CLOSE = 60,
+//        fLAMP_ACT = 100,
+        case fDEMO1:
+            return "demo program 1";
+            break;
+//        fDEMO2 = 102
+    }
+}
\ No newline at end of file