get OTA enabling working

This commit is contained in:
2018-08-22 11:09:42 +02:00
parent 77f1b278f4
commit 426d495fd9
10 changed files with 49 additions and 35 deletions

View File

@@ -15,13 +15,14 @@ Network* MeshNet::init(){
mesh.onChangedConnections(bind(&MeshNet::changedConnectionCallback, this));
mesh.onNodeTimeAdjusted(bind(&MeshNet::nodeTimeAdjustedCallback, this, _1));
connectStation();
connectStation(config.stationMode);
return this;
}
Network* MeshNet::connectStation() {
if(config.stationMode){
Serial.println("connect station");
Network* MeshNet::connectStation(int doConnect) {
Serial.println("connect station?");
if(doConnect){
Serial.println("connect station!");
mesh.stationManual(config.stationSSID, config.stationPassword);
mesh.setHostname(config.hostname);
}