Fix ESP32 network checks

Fix ESP32 network checks (#8503)
This commit is contained in:
Theo Arends 2020-06-18 10:18:49 +02:00
parent 8414f73bf4
commit 63f8a2aafd
3 changed files with 3 additions and 3 deletions

View File

@ -379,7 +379,7 @@ void RtcSecond(void)
Rtc.millis = millis();
if (!Rtc.user_time_entry) {
if (!global_state.wifi_down) {
if (!global_state.network_down) {
uint8_t uptime_minute = (uptime / 60) % 60; // 0 .. 59
if ((Rtc.ntp_sync_minute > 59) && (uptime_minute > 2)) {
Rtc.ntp_sync_minute = 1; // If sync prepare for a new cycle

View File

@ -322,7 +322,7 @@ String TelegramExecuteCommand(const char *svalue) {
}
void TelegramLoop(void) {
if (!global_state.wifi_down && (Telegram.recv_enable || Telegram.echo_enable)) {
if (!global_state.network_down && (Telegram.recv_enable || Telegram.echo_enable)) {
switch (Telegram.state) {
case 0:
TelegramInit();

View File

@ -792,7 +792,7 @@ void HandleWebcamRoot(void) {
/*********************************************************************************************/
uint32_t WcSetStreamserver(uint32_t flag) {
if (global_state.wifi_down) { return 0; }
if (global_state.network_down) { return 0; }
Wc.stream_active = 0;