Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
19:9bc8fabeddfa
Parent:
14:cc916fa8dd11
Child:
20:653923c2f37a
diff -r 9cf694a764c0 -r 9bc8fabeddfa src/ConfigurationHandler/Controls/SetpointControl.cpp
--- a/src/ConfigurationHandler/Controls/SetpointControl.cpp	Wed Sep 07 19:04:16 2016 +0000
+++ b/src/ConfigurationHandler/Controls/SetpointControl.cpp	Wed Sep 07 19:40:17 2016 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
- * File:                SetpointControl.c
- * Desciption:          ICE Timer Control Class implementation 
+ * File:                SetpointControl.cpp
+ * Desciption:          ICE Setpoint Control Class implementation 
  *
  *****************************************************************************/
 #include "SetpointControl.h"
@@ -9,23 +9,13 @@
 
 extern mDot *GLOBAL_mdot;
 
-/*****************************************************************************
- * Function:            SetpointControl()
- * Description:         Setpoint control constructor
- *
- * @param               filename (unused)
- * @return              none
- *****************************************************************************/
-SetpointControl::SetpointControl(string filename) : controlFile(filename)
-{
-    // attempt to open the control file (established by the data handlers)
-    printf("\r%s: opening control file %s\n", __func__, controlFile.c_str());
+bool SetpointControl::Load(string _controlFile){
+    controlFile = _controlFile;
+    
+    // try to open the control file
     mDot::mdot_file file = GLOBAL_mdot->openUserFile(controlFile.c_str(), mDot::FM_RDONLY);
-    
-    printf("\r %s: file.fd = %d\n", __func__, file.fd); 
+    if ( file.fd < 0 ) return false;
     
-    // use the jSON parser to extract the data
-        
-    // close the file
-    GLOBAL_mdot->closeUserFile(file);
-}
\ No newline at end of file
+    return true;
+}
+