add standalone wifi network

This commit is contained in:
2018-09-25 16:05:32 +02:00
parent 8d3a47431b
commit accf5dcd75
15 changed files with 288 additions and 18 deletions

View File

@@ -29,13 +29,14 @@ Network* MeshNet::init(){
return this;
}
Network* MeshNet::connectStation(int doConnect) {
int MeshNet::connectStation(int doConnect) {
if(doConnect){
Serial.println("connect station");
mesh.stationManual(config.stationSSID, config.stationPassword);
mesh.setHostname(config.hostname.c_str());
return 1;
}
return this;
return 0;
}
void MeshNet::sendTo(uint32_t target, String msg){
mesh.sendSingle(target, msg);