fork of StateScript

Dependencies:   mbed SOMO_II

Fork of stateScript_v2 by Mattias Karlsson

Revision:
9:f783bce314cd
Parent:
7:5fe7329751d4
Child:
10:f65649c13b5b
--- a/mbedInterface/mbedInterface.cpp	Tue Feb 07 19:40:32 2017 +0000
+++ b/mbedInterface/mbedInterface.cpp	Wed Apr 26 16:40:36 2017 +0000
@@ -420,8 +420,7 @@
 int MBEDAnalogOut::read() {
 
     if (pinExists) {
-        return outpin->read()*3300.0; //read value is a fload between 0 and 1.0 (max voltage).  Convert to mV integer value.
-
+        return outpin->read()*3300.0; //read value is a float between 0 and 1.0 (max voltage).  Convert to mV integer value.
     } else {
         return 0;
     }
@@ -433,6 +432,7 @@
     if (pinExists) {
 
         outpin->write((float)value / 3300.0);//should be a float input (percentage).  We convert from integer mV value.
+
     }
 
 
@@ -455,7 +455,7 @@
 int MBEDAnalogIn::read() {
 
     if (pinExists) {
-        return inpin->read()*3300; //read value is a fload between 0 and 1.0 (max voltage).  Convert to mV integer value.
+        return inpin->read()*3300.0; //read value is a fload between 0 and 1.0 (max voltage).  Convert to mV integer value.
     } else {
         return 0;
     }