Skip to content

Fix FAILD typo #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/ota_updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ or it return header 304 to notify the ESP that no Update is needed.
```cpp
t_httpUpdate_return ret = ESPhttpUpdate.update("192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
switch(ret) {
case HTTP_UPDATE_FAILD:
Serial.println("[update] Update fail.");
case HTTP_UPDATE_FAILED:
Serial.println("[update] Update failed.");
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("[update] Update no Update.");
Expand Down
16 changes: 8 additions & 8 deletions libraries/ESP8266WiFi/src/ESP8266WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ int8_t ESP8266WiFiClass::scanComplete() {
return ESP8266WiFiClass::_scanCount;
}

return WIFI_SCAN_FAILD;
return WIFI_SCAN_FAILED;
}

void ESP8266WiFiClass::scanDelete()
Expand Down Expand Up @@ -527,7 +527,7 @@ int8_t ESP8266WiFiClass::scanNetworks(bool async)
esp_yield();
return ESP8266WiFiClass::_scanCount;
} else {
return WIFI_SCAN_FAILD;
return WIFI_SCAN_FAILED;
}

}
Expand Down Expand Up @@ -702,12 +702,12 @@ void wifi_wps_status_cb(wps_cb_status status)
switch (status) {
case WPS_CB_ST_SUCCESS:
if(!wifi_wps_disable()) {
DEBUGV("wps disable faild\n");
DEBUGV("wps disable failed\n");
}
wifi_station_connect();
break;
case WPS_CB_ST_FAILED:
DEBUGV("wps FAILD\n");
DEBUGV("wps FAILED\n");
break;
case WPS_CB_ST_TIMEOUT:
DEBUGV("wps TIMEOUT\n");
Expand Down Expand Up @@ -738,23 +738,23 @@ bool ESP8266WiFiClass::beginWPSConfig(void) {
DEBUGV("wps begin\n");

if(!wifi_wps_disable()) {
DEBUGV("wps disable faild\n");
DEBUGV("wps disable failed\n");
return false;
}

// so far only WPS_TYPE_PBC is supported (SDK 1.2.0)
if(!wifi_wps_enable(WPS_TYPE_PBC)) {
DEBUGV("wps enable faild\n");
DEBUGV("wps enable failed\n");
return false;
}

if(!wifi_set_wps_cb((wps_st_cb_t) &wifi_wps_status_cb)) {
DEBUGV("wps cb faild\n");
DEBUGV("wps cb failed\n");
return false;
}

if(!wifi_wps_start()) {
DEBUGV("wps start faild\n");
DEBUGV("wps start failed\n");
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" {
#include "WiFiServer.h"

#define WIFI_SCAN_RUNNING (-1)
#define WIFI_SCAN_FAILD (-2)
#define WIFI_SCAN_FAILED (-2)

enum WiFiMode { WIFI_OFF = 0, WIFI_STA = 1, WIFI_AP = 2, WIFI_AP_STA = 3 };

Expand Down
6 changes: 3 additions & 3 deletions libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ wl_status_t ESP8266WiFiMulti::run(void) {
DEBUG_WIFI_MULTI("[WIFI] Channel: %d\n", WiFi.channel());
break;
case WL_NO_SSID_AVAIL:
DEBUG_WIFI_MULTI("[WIFI] Connecting Faild AP not found.\n");
DEBUG_WIFI_MULTI("[WIFI] Connecting Failed AP not found.\n");
break;
case WL_CONNECT_FAILED:
DEBUG_WIFI_MULTI("[WIFI] Connecting Faild.\n");
DEBUG_WIFI_MULTI("[WIFI] Connecting Failed.\n");
break;
default:
DEBUG_WIFI_MULTI("[WIFI] Connecting Faild (%d).\n", status);
DEBUG_WIFI_MULTI("[WIFI] Connecting Failed (%d).\n", status);
break;
}
} else {
Expand Down
14 changes: 7 additions & 7 deletions libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ ESP8266HTTPUpdate::~ESP8266HTTPUpdate(void) {

t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port, const char * url, const char * current_version) {

t_httpUpdate_return ret = HTTP_UPDATE_FAILD;
t_httpUpdate_return ret = HTTP_UPDATE_FAILED;
WiFiClient tcp;
DEBUG_HTTP_UPDATE("[httpUpdate] connected to %s:%u %s .... ", host, port, url);

if(!tcp.connect(host, port)) {
DEBUG_HTTP_UPDATE("faild.\n");
DEBUG_HTTP_UPDATE("failed.\n");
return ret;
}
DEBUG_HTTP_UPDATE("ok.\n");
Expand Down Expand Up @@ -125,7 +125,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port,
case 200: ///< OK (Start Update)
if(len > 0) {
if(len > ESP.getFreeSketchSpace()) {
ret = HTTP_UPDATE_FAILD;
ret = HTTP_UPDATE_FAILED;
DEBUG_HTTP_UPDATE("[httpUpdate] FreeSketchSpace to low (%d) needed: %d\n", ESP.getFreeSketchSpace(), len);
} else {

Expand All @@ -140,13 +140,13 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port,
tcp.stop();
ESP.restart();
} else {
ret = HTTP_UPDATE_FAILD;
ret = HTTP_UPDATE_FAILED;
DEBUG_HTTP_UPDATE("[httpUpdate] Update failed\n");
}
}
} else {
ret = HTTP_UPDATE_FAILD;
DEBUG_HTTP_UPDATE("[httpUpdate]Content-Length is 0?!\n");
ret = HTTP_UPDATE_FAILED;
DEBUG_HTTP_UPDATE("[httpUpdate] Content-Length is 0?!\n");
}
break;
case 304:
Expand All @@ -157,7 +157,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port,
///< Forbidden
// todo handle login
default:
ret = HTTP_UPDATE_FAILD;
ret = HTTP_UPDATE_FAILED;
DEBUG_HTTP_UPDATE("[httpUpdate] Code is (%d)\n", code);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#endif

typedef enum {
HTTP_UPDATE_FAILD,
HTTP_UPDATE_FAILED,
HTTP_UPDATE_NO_UPDATES,
HTTP_UPDATE_OK
} t_httpUpdate_return;
Expand Down