From 04690a4c667bee0e81998a9ebe277ee9ba016b23 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Wed, 1 Jun 2016 01:22:47 +0200 Subject: [PATCH] MDNS is optionnal --- WifiControlSensor/WifiControlSensor.ino | 7 ++++--- WifiControlSensor/config_device.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index 4fb4df8..f93117f 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -20,8 +20,9 @@ /* --------------------- MQTT ------------------------------------ */ /* Send information to mqtt server configured in the setup mode */ /* GPIO value configured in config_device.h can be get by */ -/* subscribing to /feeds/[HOSTNAME]/gpio/[GPIO] and modified by */ -/* publishing to /feeds/[HOSTNAME]/gpio/[GPIO]/set */ +/* subscribing to /feeds/MQTTUSER/[HOSTNAME]/gpio/[GPIO] and */ +/* modified by publishin to */ +/* /feeds/MQTTUSER/[HOSTNAME]/gpio/[GPIO]/set */ /* BMP180 will be published to /feeds/[HOSTNAME]/temperature and */ /* /feeds/[HOSTNAME]/pressure */ @@ -110,7 +111,7 @@ void WifiSetup(int bootmode, char *confSsid, char *confPassword, char *confHost, SKETCH_DEBUG_PRINTLN(""); SKETCH_DEBUG_PRINTLN("WiFi connected"); -#ifndef CONFIG_DISABLE_MDNS +#ifdef CONFIG_ENABLE_MDNS if (!MDNS.begin(confHost)) { SKETCH_DEBUG_PRINTLN("Error setting up MDNS responder!"); while (1) { diff --git a/WifiControlSensor/config_device.h b/WifiControlSensor/config_device.h index 30ae7c7..f126d0f 100644 --- a/WifiControlSensor/config_device.h +++ b/WifiControlSensor/config_device.h @@ -20,7 +20,7 @@ //#define CONFIG_ENABLE_POWER_SAVE // Disable mDNS can also save power -//#define CONFIG_DISABLE_MDNS +#define CONFIG_ENABLE_MDNS //Web controlled GPIO #define CONFIG_WEB_CONTROLLED_GPIO 2