make wifi_always_on configurable
This commit is contained in:
parent
4e1696bb65
commit
db9cd46ab5
@ -23,7 +23,7 @@ lib_deps =
|
|||||||
arkhipenko/TaskScheduler@^3.4.0
|
arkhipenko/TaskScheduler@^3.4.0
|
||||||
adafruit/Adafruit Unified Sensor @ ^1.1.4
|
adafruit/Adafruit Unified Sensor @ ^1.1.4
|
||||||
adafruit/Adafruit BMP280 Library@^2.5.0
|
adafruit/Adafruit BMP280 Library@^2.5.0
|
||||||
build_flags = -D IR=1
|
build_flags = -D IR=1 -D WIFI_ALWAYS_ON=1
|
||||||
|
|
||||||
[env:laptop_home]
|
[env:laptop_home]
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,9 @@ void onWifiConnected() {
|
|||||||
Serial.println("Wifi connected event");
|
Serial.println("Wifi connected event");
|
||||||
Wifi::printStatus();
|
Wifi::printStatus();
|
||||||
Ota::tLoop.enable();
|
Ota::tLoop.enable();
|
||||||
|
#if !WIFI_ALWAYS_ON
|
||||||
if (!Ir::avrOn) tCheckWifi.restartDelayed();
|
if (!Ir::avrOn) tCheckWifi.restartDelayed();
|
||||||
|
#endif
|
||||||
Mqtt::client.connect();
|
Mqtt::client.connect();
|
||||||
if (time_t newTime = Ntp::updateTime()) {
|
if (time_t newTime = Ntp::updateTime()) {
|
||||||
Serial.println(asctime(localtime(&newTime)));
|
Serial.println(asctime(localtime(&newTime)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user