finally fix wifi name to be unique
This commit is contained in:
parent
1d47154445
commit
d212640f74
@ -4,4 +4,4 @@
|
||||
#include <ESP8266mDNS.h>
|
||||
#include <ArduinoOTA.h>
|
||||
|
||||
void ota_setup(const char* name);
|
||||
void ota_setup();
|
@ -6,11 +6,10 @@
|
||||
#include "serial.hpp"
|
||||
|
||||
|
||||
const char* ssid = "fan_XXX";
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
ota_setup(ssid);
|
||||
ota_setup();
|
||||
server_setup();
|
||||
collector_setup();
|
||||
DEBUG_OUT.println(F("Setup done"));
|
||||
|
@ -2,8 +2,12 @@
|
||||
#include "serial.hpp"
|
||||
#include <LittleFS.h>
|
||||
|
||||
void ota_setup(const char* ssid) {
|
||||
static String ssid;
|
||||
|
||||
void ota_setup() {
|
||||
String mac = WiFi.macAddress();
|
||||
mac.replace(":","_");
|
||||
ssid = String("fan_") + mac;
|
||||
DEBUG_OUT.println("Booting");
|
||||
boolean result = WiFi.softAP(ssid);
|
||||
while (result == false) {
|
||||
|
Loading…
Reference in New Issue
Block a user