Stephen Paulger / Mbed 2 deprecated munin-display-board

Dependencies:   EthernetInterface PCA9635 dispBoB mbed-rtos mbed munin-client-lib

Revision:
4:186148592f35
Parent:
3:56c6df84e619
Child:
5:5c0288a4e2c7
--- a/main.cpp	Fri Apr 11 18:05:00 2014 +0000
+++ b/main.cpp	Fri Apr 11 18:13:40 2014 +0000
@@ -1,10 +1,9 @@
+#include <string>
+#include <vector>
+#include <sstream>
 #include "mbed.h"
 #include "EthernetInterface.h"
 #include "dispBoB.h"
-#include <string>
-#include <vector>
-#include <sstream>
-#include <utility>
 
 namespace {
     const char* MUNIN_SERVER_ADDRESS = "172.28.22.45";
@@ -15,13 +14,13 @@
 
 class MuninDisplay {
 public:
-    MuninDisplay::MuninDisplay() : db(p28, p27, p26) {
-        db.cls();   
+    MuninDisplay() : bob_display(p28, p27, p26) {
+        bob_display.cls();   
     }
 
     void lcd_print_str(const char *str) {
-        db.cls();
-        db.printf("%s\n", str);        
+        bob_display.cls();
+        bob_display.printf("%s\n", str);        
     }
 
     void dhcp_connection() {
@@ -38,7 +37,7 @@
         return ret;
     }
 
-    int socket_close() {
+    void socket_close() {
         socket.close();
     }
 
@@ -76,8 +75,8 @@
                 std::vector<std::string> name_value = explode(param, ' ');
                 if (name_value.size() == 2) {
                     const int val = atoi(name_value[1].c_str());
-                    db.cls();
-                    db.printf(" %s\n", name_value[1].c_str());
+                    bob_display.cls();
+                    bob_display.printf(" %s\n", name_value[1].c_str());
                     printf("DISPLAYING: %s\r\n", name_value[1].c_str());                    
                     return val;
                 }
@@ -89,7 +88,7 @@
 protected:
     EthernetInterface eth;
     TCPSocketConnection socket;
-    dispBoB db;
+    dispBoB bob_display;
     char buf[256];
 
     std::vector<std::string> explode(std::string const &s, char delim)