mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
используем везде isNetworkActive()
This commit is contained in:
@@ -10,7 +10,7 @@ public:
|
||||
|
||||
void sendHttpPOST(String url, String msg)
|
||||
{
|
||||
if (WiFi.status() == WL_CONNECTED)
|
||||
if (isNetworkActive())
|
||||
{
|
||||
|
||||
WiFiClient client;
|
||||
|
||||
@@ -13,7 +13,7 @@ class TelegramLT : public IoTItem {
|
||||
}
|
||||
|
||||
void sendTelegramMsg(bool often, String msg) {
|
||||
if (WiFi.status() == WL_CONNECTED && (often || !often && _prevMsg != msg)) {
|
||||
if (isNetworkActive() && (often || !often && _prevMsg != msg)) {
|
||||
WiFiClient client;
|
||||
HTTPClient http;
|
||||
http.begin(client, "http://live-control.com/iotm/telegram.php");
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
void doByInterval()
|
||||
{
|
||||
if (WiFi.status() == WL_CONNECTED)
|
||||
if (isNetworkActive())
|
||||
{
|
||||
String value = getItemValue(logid);
|
||||
if (value != "")
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
IoTValue execute(String command, std::vector<IoTValue> ¶m)
|
||||
{
|
||||
if (WiFi.status() == WL_CONNECTED)
|
||||
if (isNetworkActive())
|
||||
{
|
||||
if (command == F("logGoogle"))
|
||||
{ // Логирование определенного элемента по его идентификатору в GoogleSheet
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
{
|
||||
String ret;
|
||||
|
||||
if (WiFi.status() == WL_CONNECTED)
|
||||
if (isNetworkActive())
|
||||
{
|
||||
// char c;
|
||||
String payload;
|
||||
|
||||
Reference in New Issue
Block a user