Skip to content

Commit

Permalink
Run the ticker in the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiejones85 committed Dec 22, 2021
1 parent 666f4c5 commit 1f06ff4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.cpp
Expand Up @@ -73,6 +73,7 @@ int8_t connectionNumber = 0;

void staCheck(){
sta_tick.stop();

if(!(uint32_t)WiFi.localIP()){
WiFi.mode(WIFI_AP); //disable station mode
}
Expand Down Expand Up @@ -114,10 +115,8 @@ void setup(void){

webSocket.begin();
webSocket.onEvent(webSocketEvent);

webServer.setup();


}

void broadcastMessage(String message, String type) {
Expand Down Expand Up @@ -148,7 +147,7 @@ void loop(void){
ArduinoOTA.handle();
webSocket.loop();
webServer.loop();

sta_tick.update();
if(connectionNumber > 0 && Serial.available()) {
char receivedChar = Serial.read();

Expand Down

0 comments on commit 1f06ff4

Please sign in to comment.