mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-06 04:36:31 +02:00
Update multiple typos, #50
This commit is contained in:
@ -271,7 +271,7 @@ public:
|
||||
bool isPMSinUSAQI(void) { return inUSAQI; }
|
||||
|
||||
/**
|
||||
* @brief Get status of get server coniguration is failed
|
||||
* @brief Get status of get server configuration is failed
|
||||
*
|
||||
* @return true Failed
|
||||
* @return false Success
|
||||
|
@ -52,7 +52,7 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
|
||||
*/
|
||||
enum {
|
||||
APP_SM_WIFI_MANAGER_MODE, /** In WiFi Manger Mode */
|
||||
APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE, /** WiFi Manager has connected to mobile
|
||||
APP_SM_WIFI_MANAGER_PORTAL_ACTIVE, /** WiFi Manager has connected to mobile
|
||||
phone */
|
||||
APP_SM_WIFI_MANAGER_STA_CONNECTING, /** After SSID and PW entered and OK
|
||||
clicked, connection to WiFI network is
|
||||
@ -60,24 +60,24 @@ enum {
|
||||
APP_SM_WIFI_MANAGER_STA_CONNECTED, /** Connecting to WiFi worked */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECTING, /** Once connected to WiFi an attempt to
|
||||
reach the server is performed */
|
||||
APP_SM_WIFI_OK_SERVER_CONNNECTED, /** Server is reachable, all fine */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECTED, /** Server is reachable, all fine */
|
||||
/** Exceptions during WIFi Setup */
|
||||
APP_SM_WIFI_MANAGER_CONNECT_FAILED, /** Cannot connect to WiFi (e.g. wrong
|
||||
password, WPA Enterprise etc.) */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECT_FAILED, /** Connected to WiFi but server not
|
||||
reachable, e.g. firewall block/
|
||||
reachable, e.g. firewall block/
|
||||
whitelisting needed etc. */
|
||||
APP_SM_WIFI_OK_SERVER_OK_SENSOR_CONFIG_FAILED, /** Server reachable but sensor
|
||||
not configured correctly*/
|
||||
not configured correctly*/
|
||||
|
||||
/** During Normal Operation */
|
||||
APP_SM_WIFI_LOST, /** Connection to WiFi network failed credentials incorrect
|
||||
encryption not supported etc. */
|
||||
APP_SM_SERVER_LOST, /** Connected to WiFi network but the server cannot be
|
||||
reached through the internet, e.g. blocked by firewall
|
||||
reached through the internet, e.g. blocked by firewall
|
||||
*/
|
||||
APP_SM_SENSOR_CONFIG_FAILED, /** Server is reachable but there is some
|
||||
configuration issue to be fixed on the server
|
||||
configuration issue to be fixed on the server
|
||||
side */
|
||||
APP_SM_NORMAL,
|
||||
};
|
||||
@ -324,7 +324,7 @@ public:
|
||||
bool isPMSinUSAQI(void) { return inUSAQI; }
|
||||
|
||||
/**
|
||||
* @brief Get status of get server coniguration is failed
|
||||
* @brief Get status of get server configuration is failed
|
||||
*
|
||||
* @return true Failed
|
||||
* @return false Success
|
||||
@ -675,8 +675,8 @@ static void sendPing() {
|
||||
|
||||
delay(1500);
|
||||
if (agServer.postToServer(getDevId(), JSON.stringify(root))) {
|
||||
dispSmHandler(APP_SM_WIFI_OK_SERVER_CONNNECTED);
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNNECTED);
|
||||
dispSmHandler(APP_SM_WIFI_OK_SERVER_CONNECTED);
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNECTED);
|
||||
} else {
|
||||
dispSmHandler(APP_SM_WIFI_OK_SERVER_CONNECT_FAILED);
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNECT_FAILED);
|
||||
@ -939,7 +939,7 @@ static void connectToWifi() {
|
||||
if (clientConnected != clientConnectChanged) {
|
||||
clientConnectChanged = clientConnected;
|
||||
if (clientConnectChanged) {
|
||||
ledSmHandler(APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE);
|
||||
ledSmHandler(APP_SM_WIFI_MANAGER_PORTAL_ACTIVE);
|
||||
} else {
|
||||
ledCount = LED_BAR_COUNT_INIT_VALUE;
|
||||
ledSmHandler(APP_SM_WIFI_MANAGER_MODE);
|
||||
@ -1197,7 +1197,7 @@ static void ledSmHandler(int sm) {
|
||||
ag.ledBar.setColor(0, 0, 255, ag.ledBar.getNumberOfLeds() / 2);
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE: {
|
||||
case APP_SM_WIFI_MANAGER_PORTAL_ACTIVE: {
|
||||
/** WiFi Manager has connected to mobile phone */
|
||||
ag.ledBar.setColor(0, 0, 255);
|
||||
break;
|
||||
@ -1218,7 +1218,7 @@ static void ledSmHandler(int sm) {
|
||||
singleLedAnimation(0, 255, 0);
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_OK_SERVER_CONNNECTED: {
|
||||
case APP_SM_WIFI_OK_SERVER_CONNECTED: {
|
||||
/** Server is reachable, all fine */
|
||||
ag.ledBar.setColor(0, 255, 0);
|
||||
break;
|
||||
@ -1229,13 +1229,13 @@ static void ledSmHandler(int sm) {
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_OK_SERVER_CONNECT_FAILED: {
|
||||
/** Connected to WiFi but server not reachable, e.g. firewall block/
|
||||
/** Connected to WiFi but server not reachable, e.g. firewall block/
|
||||
* whitelisting needed etc. */
|
||||
ag.ledBar.setColor(233, 183, 54); /** orange */
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_OK_SERVER_OK_SENSOR_CONFIG_FAILED: {
|
||||
/** Server reachable but sensor not configured correctly */
|
||||
/** Server reachable but sensor not configured correctly */
|
||||
ag.ledBar.setColor(139, 24, 248); /** violet */
|
||||
break;
|
||||
}
|
||||
@ -1251,7 +1251,7 @@ static void ledSmHandler(int sm) {
|
||||
}
|
||||
case APP_SM_SERVER_LOST: {
|
||||
/** Connected to WiFi network but the server cannot be reached through the
|
||||
* internet, e.g. blocked by firewall */
|
||||
* internet, e.g. blocked by firewall */
|
||||
|
||||
ag.ledBar.setColor(233, 183, 54, 0);
|
||||
|
||||
@ -1260,7 +1260,7 @@ static void ledSmHandler(int sm) {
|
||||
break;
|
||||
}
|
||||
case APP_SM_SENSOR_CONFIG_FAILED: {
|
||||
/** Server is reachable but there is some configuration issue to be fixed on
|
||||
/** Server is reachable but there is some configuration issue to be fixed on
|
||||
* the server side */
|
||||
|
||||
ag.ledBar.setColor(139, 24, 248, 0);
|
||||
@ -1299,7 +1299,7 @@ static void dispSmHandler(int sm) {
|
||||
|
||||
switch (sm) {
|
||||
case APP_SM_WIFI_MANAGER_MODE:
|
||||
case APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE: {
|
||||
case APP_SM_WIFI_MANAGER_PORTAL_ACTIVE: {
|
||||
if (connectCountDown >= 0) {
|
||||
displayShowWifiText(String(connectCountDown) + "s to connect",
|
||||
"to WiFi hotspot:", "\"airgradient-",
|
||||
@ -1320,7 +1320,7 @@ static void dispSmHandler(int sm) {
|
||||
displayShowText("Connecting to", "Server", "...");
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_OK_SERVER_CONNNECTED: {
|
||||
case APP_SM_WIFI_OK_SERVER_CONNECTED: {
|
||||
displayShowText("Server", "connection", "successful");
|
||||
break;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ CC BY-SA 4.0 Attribution-ShareAlike 4.0 International License
|
||||
*/
|
||||
enum {
|
||||
APP_SM_WIFI_MANAGER_MODE, /** In WiFi Manger Mode */
|
||||
APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE, /** WiFi Manager has connected to mobile
|
||||
APP_SM_WIFI_MANAGER_PORTAL_ACTIVE, /** WiFi Manager has connected to mobile
|
||||
phone */
|
||||
APP_SM_WIFI_MANAGER_STA_CONNECTING, /** After SSID and PW entered and OK
|
||||
clicked, connection to WiFI network is
|
||||
@ -57,24 +57,24 @@ enum {
|
||||
APP_SM_WIFI_MANAGER_STA_CONNECTED, /** Connecting to WiFi worked */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECTING, /** Once connected to WiFi an attempt to
|
||||
reach the server is performed */
|
||||
APP_SM_WIFI_OK_SERVER_CONNNECTED, /** Server is reachable, all fine */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECTED, /** Server is reachable, all fine */
|
||||
/** Exceptions during WIFi Setup */
|
||||
APP_SM_WIFI_MANAGER_CONNECT_FAILED, /** Cannot connect to WiFi (e.g. wrong
|
||||
password, WPA Enterprise etc.) */
|
||||
APP_SM_WIFI_OK_SERVER_CONNECT_FAILED, /** Connected to WiFi but server not
|
||||
reachable, e.g. firewall block/
|
||||
reachable, e.g. firewall block/
|
||||
whitelisting needed etc. */
|
||||
APP_SM_WIFI_OK_SERVER_OK_SENSOR_CONFIG_FAILED, /** Server reachable but sensor
|
||||
not configured correctly*/
|
||||
not configured correctly*/
|
||||
|
||||
/** During Normal Operation */
|
||||
APP_SM_WIFI_LOST, /** Connection to WiFi network failed credentials incorrect
|
||||
encryption not supported etc. */
|
||||
APP_SM_SERVER_LOST, /** Connected to WiFi network but the server cannot be
|
||||
reached through the internet, e.g. blocked by firewall
|
||||
reached through the internet, e.g. blocked by firewall
|
||||
*/
|
||||
APP_SM_SENSOR_CONFIG_FAILED, /** Server is reachable but there is some
|
||||
configuration issue to be fixed on the server
|
||||
configuration issue to be fixed on the server
|
||||
side */
|
||||
APP_SM_NORMAL,
|
||||
};
|
||||
@ -313,7 +313,7 @@ public:
|
||||
bool isPMSinUSAQI(void) { return inUSAQI; }
|
||||
|
||||
/**
|
||||
* @brief Get status of get server coniguration is failed
|
||||
* @brief Get status of get server configuration is failed
|
||||
*
|
||||
* @return true Failed
|
||||
* @return false Success
|
||||
@ -511,7 +511,7 @@ void sendPing() {
|
||||
root["wifi"] = WiFi.RSSI();
|
||||
root["boot"] = loopCount;
|
||||
if (agServer.postToServer(getDevId(), JSON.stringify(root))) {
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNNECTED);
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNECTED);
|
||||
} else {
|
||||
ledSmHandler(APP_SM_WIFI_OK_SERVER_CONNECT_FAILED);
|
||||
}
|
||||
@ -643,7 +643,7 @@ void connectToWifi() {
|
||||
if (clientConnected != clientConnectChanged) {
|
||||
clientConnectChanged = clientConnected;
|
||||
if (clientConnectChanged) {
|
||||
ledSmHandler(APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE);
|
||||
ledSmHandler(APP_SM_WIFI_MANAGER_PORTAL_ACTIVE);
|
||||
} else {
|
||||
ledSmHandler(APP_SM_WIFI_MANAGER_MODE);
|
||||
}
|
||||
@ -884,7 +884,7 @@ void ledSmHandler(int sm) {
|
||||
ag.statusLed.setToggle();
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_MAMAGER_PORTAL_ACTIVE: {
|
||||
case APP_SM_WIFI_MANAGER_PORTAL_ACTIVE: {
|
||||
ag.statusLed.setOn();
|
||||
break;
|
||||
}
|
||||
@ -900,7 +900,7 @@ void ledSmHandler(int sm) {
|
||||
ag.statusLed.setOff();
|
||||
break;
|
||||
}
|
||||
case APP_SM_WIFI_OK_SERVER_CONNNECTED: {
|
||||
case APP_SM_WIFI_OK_SERVER_CONNECTED: {
|
||||
ag.statusLed.setOff();
|
||||
|
||||
/** two time slow blink, then off */
|
||||
|
Reference in New Issue
Block a user