Christopher Haster / ESP8266Interface

Dependencies:   ESP8266

Fork of ESP8266Interface by NetworkSocketAPI

Branch:
api-changes
Revision:
41:3f4d5f4862d2
Parent:
40:83c6b4129468
Child:
42:4bf09cadf328
diff -r 83c6b4129468 -r 3f4d5f4862d2 ESP8266Interface.cpp
--- a/ESP8266Interface.cpp	Wed Feb 24 22:17:45 2016 -0600
+++ b/ESP8266Interface.cpp	Wed Feb 24 22:21:43 2016 -0600
@@ -32,20 +32,32 @@
     const char *pass_phrase, 
     wifi_security_t)
 {
-    if (!_esp.startup(3)) return -1;
-    if (!_esp.dhcp(true, 1)) return -1;
-    if (!_esp.connect(ap, pass_phrase)) return -1;
+    if (!_esp.startup(3)) {
+        return -1;
+    }
+
+    if (!_esp.dhcp(true, 1)) {
+        return -1;
+    }
+
+    if (!_esp.connect(ap, pass_phrase)) {
+        return -1;
+    }
 
     _ip_address = _esp.getIPAddress();
     _mac_address = _esp.getMACAddress();
-    if (!_ip_address || !_mac_address) return -1;
+    if (!_ip_address || !_mac_address) {
+        return -1;
+    }
 
     return 0;
 }
 
 int32_t ESP8266Interface::disconnect()
 {
-    if (!_esp.disconnect()) return -1;
+    if (!_esp.disconnect()) {
+        return -1;
+    }
 
     return 0;
 }