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