Skip to content

Commit

Permalink
set WiFi hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
matjaz committed Mar 12, 2021
1 parent 22e8d81 commit 3c206a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Network/Net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void NetImpl::connect(NetImpl::NetStateCallback* resultCallback){
void NetImpl::tryConnect(){
WiFi.disconnect(true);
WiFi.persistent(false);
WiFi.setHostname(SPENCER_HOSTNAME);
WiFi.begin(ssid, pass);
WiFi.setSleep(false);

Expand Down
4 changes: 4 additions & 0 deletions src/Network/Net.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef SPENCER_NET_H
#define SPENCER_NET_H

#ifndef SPENCER_HOSTNAME
#define SPENCER_HOSTNAME "Spencer"
#endif

#include <WiFi.h>
#include "../Loop/LoopListener.h"
#include "../Util/Vector.h"
Expand Down

0 comments on commit 3c206a3

Please sign in to comment.