Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix WiFiManager in autoConnect and timeClient update in timer timeout #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions firmware/GyverLamp_v1.2/time.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
void timeTick() {
timeClient.update();
void timeTick() {
if (timeTimer.isReady()) {
timeClient.update();
byte thisDay = timeClient.getDay();
if (thisDay == 0) thisDay = 7; // воскресенье это 0
thisDay--;
Expand Down
2 changes: 1 addition & 1 deletion libraries/WiFiManager/WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
// attempt to connect; should it fail, fall back to AP
WiFi.mode(WIFI_STA);

if (connectWifi("", "") == WL_CONNECTED) {
if (connectWifi(String(apName),String(apPassword)) == WL_CONNECTED) {
DEBUG_WM(F("IP Address:"));
DEBUG_WM(WiFi.localIP());
//connected
Expand Down