Orefatoi / Mbed 2 deprecated afero_poc15_171201

Dependencies:   mbed vt100

Revision:
3:cac964851bb6
Parent:
0:f0de320e23ac
Child:
7:aa858d789025
diff -r 778a4d4436ff -r cac964851bb6 edge_sensor/edge_pressure.cpp
--- a/edge_sensor/edge_pressure.cpp	Sun Dec 03 23:58:11 2017 +0000
+++ b/edge_sensor/edge_pressure.cpp	Mon Dec 04 02:47:38 2017 +0000
@@ -5,7 +5,7 @@
 #include "edge_pressure.h"
 #include "SO1602A.h"
 
-extern SO1602A *so1602a ; /* OLED display on I2C */
+extern SO1602A *display ; /* OLED display on I2C */
 
 #define LOW_THR   0.2
 #define HIGH_THR  0.3 
@@ -83,11 +83,12 @@
     } else {
         sprintf(str_buf, "GAS:%.2f ", _value  ) ;
     }
+    printf(" ") ;
     printf(str_buf) ;
-    if (so1602a != 0) {
-        so1602a->clearDisplay() ;
-        so1602a->locate(0, 0) ;
-        so1602a->putStr(str_buf) ;
+    if (display != 0) {
+        display->clearDisplay() ;
+        display->locate(0, 0) ;
+        display->putStr(str_buf) ;
     }
     if (current_temp != 0) {
         expected = temp2expected(*current_temp) ;
@@ -99,12 +100,13 @@
             sprintf(str_buf, "Normal") ;
         }
     }
-    if (so1602a != 0) {
-        so1602a->locate(0, 1) ;
-        so1602a->putStr(str_buf) ;
+    if (display != 0) {
+        display->locate(0, 1) ;
+        display->putStr(str_buf) ;
     }
-    printf(str_buf) ;
-    printf("\n") ;
+    printf(" %s\n", str_buf) ;
+//    printf(str_buf) ;
+//    printf("\n") ;
     sprintf(_str_buf,
        "{\"DEVICE\":\"GAS\",\"PN\":\"PSE530\",\"PRESSURE\":\"%.3f\",\"UNIT\":\"kgf/cm2\",\"S\":\"%06d\",\"E\":\"%d\"}",
        _value, time2seq(_sampled_time), _error_count) ;