Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
183:44f7fea6b208
Parent:
177:9ec90c8e3ce1
Child:
190:af7ab603c9fe
Child:
192:052a419837fa
--- a/src/ConfigurationHandler/Controls/SetpointControl.cpp	Tue Oct 04 16:08:49 2016 +0000
+++ b/src/ConfigurationHandler/Controls/SetpointControl.cpp	Tue Oct 04 20:50:33 2016 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * File:                SetpointControl.cpp
- * Desciption:          ICE Setpoint Control Class implementation
+ * Desciption:          ICE Setpoint Control class implementation
  *
  *****************************************************************************/
 #include "SetpointControl.h"
@@ -239,8 +239,14 @@
     OutputMasterMailBox.put(output_mail);
 }
 
+// Method:              display
+// Description:         display the control's information
+//
+// @param               none
+// @return              none
 void SetpointControl::display(void)
 {
+    // NOTE: this mapping must be 1:1 with "State" enumeration in SetpointControl.h
     string mapper[] = { "INIT",
                         "STARTUP",
                         "CONTROL_OFF",
@@ -251,6 +257,9 @@
                       };
 
 
+    ModbusValue inputValue;
+    ModbusMasterReadRegister(input, &inputValue);
+    
     printf("\r      controlFile : %s   \n", controlFile.c_str());
     printf("\r               id : %s   \n", id.c_str());
     printf("\r         priority : %d   \n", priority);
@@ -267,6 +276,7 @@
     printf("\r\n");
     printf("\r     currentState : %s\n",    mapper[currentState].c_str());
     printf("\r        high band : %0.2f\n", setpoint + tolerance);
+    printf("\r  current reading : %0.2f [%s]\n", inputValue.value, inputValue.valid ? "valid" : "invalid");
     printf("\r         low band : %0.2f\n", setpoint - tolerance);
     printf("\r\n");
 }
\ No newline at end of file