Então PARA...

Dependencies:   MenuLCD mbed

Revision:
0:92357d1220f3
diff -r 000000000000 -r 92357d1220f3 menbed/menbedMenuParam.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/menbed/menbedMenuParam.cpp	Fri May 19 13:07:52 2017 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "include/menbedMenuParam.h"
+#include  <string>
+
+MenbedMenuParam::MenbedMenuParam (
+    float (*initValFcn)(void), void (*finalValFcn)(float),
+    bool liveUpdate, float min, float max,
+    float inc) : 
+    initValFcn(initValFcn), finalValFcn(finalValFcn), _liveUpdate(liveUpdate),
+    _min(min), _max(max), _inc(inc)    
+{
+}
+
+
+float MenbedMenuParam::getVal (void)
+{
+    if (initValFcn == NULL)
+        return 0.0;
+        
+    return initValFcn();
+}
+
+void MenbedMenuParam::setVal (float v)
+{
+    if (finalValFcn == NULL)
+        return;
+        
+    finalValFcn(v);
+}
\ No newline at end of file