diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9507d65..4f36709 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,5 +11,4 @@ examples:
image: python:2.7-stretch
script:
- pio run -t clean
- - pio run -e basic
- - pio run -e ota
\ No newline at end of file
+ - pio run
\ No newline at end of file
diff --git a/platformio.ini b/platformio.ini
index 3d46ff5..464e324 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -1,5 +1,5 @@
-[platformio]
-env_default = basic
+;[platformio]
+;env_default = basic
[common]
framework = arduino
@@ -12,8 +12,7 @@ lib_deps =
TaskScheduler
SPIFFS
ArduinoJson
- ESP8266mDNS
- https://gitlab.com/wirelos/sprocket-lib.git#feature/13-separation-of-concerns
+ https://gitlab.com/wirelos/sprocket-lib.git#develop
[env:basic]
src_filter = +<*> - +
@@ -23,6 +22,17 @@ upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
lib_deps = ${common.lib_deps}
+ ESP8266mDNS
+
+[env:basic_esp32]
+src_filter = +<*> - +
+platform = ${common.platform}
+board = ${common.board}
+upload_speed = ${common.upload_speed}
+monitor_baud = ${common.monitor_baud}
+framework = ${common.framework}
+lib_deps = ${common.lib_deps}
+ ESPmDNS
[env:ota]
src_filter = +<*> - +
@@ -32,4 +42,5 @@ upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
lib_deps = ${common.lib_deps}
+ ESP8266mDNS
ArduinoOTA
\ No newline at end of file
diff --git a/src/WiFiNet.cpp b/src/WiFiNet.cpp
index e5e8005..abeca2a 100644
--- a/src/WiFiNet.cpp
+++ b/src/WiFiNet.cpp
@@ -19,7 +19,11 @@ WiFiNet::WiFiNet(
int WiFiNet::connect(){
config.fromFile("/config.json");
- WiFi.hostname(config.hostname);
+ #ifdef ESP32
+ WiFi.setHostname(config.hostname.c_str());
+ #elif defined(ESP8266)
+ WiFi.hostname(config.hostname.c_str());
+ #endif
Serial.println("Hostname: " + config.hostname);
if(!connectStation()) {
createAccessPoint();
diff --git a/src/WiFiNet.h b/src/WiFiNet.h
index 5d3177c..48a2641 100644
--- a/src/WiFiNet.h
+++ b/src/WiFiNet.h
@@ -1,13 +1,14 @@
#ifndef __WIFI_NET__
#define __WIFI_NET__
-#include
-#include
+
#ifdef ESP32
#include
+#include
#elif defined(ESP8266)
#include
+#include
#endif // ESP32
#include "Network.h"