Resolve "OTA"

This commit is contained in:
Patrick Balsiger
2018-08-03 11:01:42 +00:00
parent 18ccf6a892
commit dbb4ce9de7
18 changed files with 895 additions and 17 deletions

View File

@@ -15,15 +15,18 @@ Network* MeshNet::init(){
mesh.onChangedConnections(bind(&MeshNet::changedConnectionCallback, this));
mesh.onNodeTimeAdjusted(bind(&MeshNet::nodeTimeAdjustedCallback, this, _1));
connectStation();
return this;
}
Network* MeshNet::connectStation() {
if(config.stationMode){
Serial.println("connect station");
mesh.stationManual(config.stationSSID, config.stationPassword);
mesh.setHostname(config.hostname);
}
return this;
}
void MeshNet::sendTo(uint32_t target, String msg){
mesh.sendSingle(target, msg);
}