Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
93:1553fb156915
Parent:
92:9a6a1adca19c
Child:
94:18ae2fd82638
--- a/src/ConfigurationHandler/Controls/SetpointControl.cpp	Tue Sep 20 19:19:34 2016 +0000
+++ b/src/ConfigurationHandler/Controls/SetpointControl.cpp	Tue Sep 20 19:31:38 2016 +0000
@@ -36,8 +36,7 @@
     int bytes_read = GLOBAL_mdot->readUserFile(file, (void *)dataBuf, sizeof(dataBuf));
     if ( bytes_read != sizeof(dataBuf) ) {
         logError("%s: failed to read %d bytes from %s", __func__, sizeof(dataBuf), controlFile.c_str());
-        // we can't throw exceptions in mbed, so just return false. the calling function will
-        // destroy the object
+        // caller should destroy the object
         return false;
     }
 
@@ -224,4 +223,31 @@
     strncpy(output_mail->output, this->output.c_str(), sizeof(output_mail->output)-1);
     strncpy(output_mail->id, this->id.c_str(), sizeof(output_mail->id)-1);
     OutputMasterMailBox.put(output_mail);
+}
+
+void SetpointControl::display(void)
+{
+    string mapper[] = { "STARTUP",
+                        "CONTROL_OFF",
+                        "CONTROL_ON",
+                        "CONTROL_DISABLE",
+                        "CONTROL_PAUSE",
+                        "CONTROL_MAX" };
+                        
+                        
+    printf("\r      controlFile : %s   \n", controlFile.c_str());
+    printf("\r               id : %s   \n", id.c_str());
+    printf("\r         priority : %d   \n", priority);
+    printf("\r            input : %s   \n", input.c_str());
+    printf("\r           output : %s   \n", output.c_str());
+    printf("\r         setpoint : %0.2f\n", setpoint);
+    printf("\r         prodfact : %0.2f\n", productFactor);
+    printf("\r        actingDir : %d   \n", actingDir);
+    printf("\r           halert : %0.2f\n", highAlert);
+    printf("\r           lalert : %0.2f\n", lowAlert);
+    printf("\r              hfs : %0.2f\n", highFailsafe);
+    printf("\r              lfs : %0.2f\n", lowFailsafe);
+    printf("\r\n");
+    printf("\r      currentState: %s\n",    mapper[currentState].c_str());
+    printf("\r\n");
 }
\ No newline at end of file