Use MQTT in NORMAL mode only

and fix EEPROM size configuration
This commit is contained in:
Mathieu Maret 2016-04-07 12:24:30 +02:00
parent e1673f6c22
commit 9646eab78f

View File

@ -47,7 +47,6 @@ extern "C" {
#include <user_interface.h> #include <user_interface.h>
} }
#define CONFIG_EEPROM_SIZE 256
char eeprom[CONFIG_EEPROM_SIZE]; char eeprom[CONFIG_EEPROM_SIZE];
#define BOOTMODE_SETUP 0 #define BOOTMODE_SETUP 0
@ -232,7 +231,9 @@ void setup() {
SKETCH_DEBUG_PRINTLN(); SKETCH_DEBUG_PRINTLN();
WifiSetup(mode, txStatus == 0, confSsid, confPassword, confHost, ip_mode, ip, gw, mask, dns, dns2); WifiSetup(mode, txStatus == 0, confSsid, confPassword, confHost, ip_mode, ip, gw, mask, dns, dns2);
if (mode == BOOTMODE_NORMAL) {
MqttSetup(mqttServer, mqttUser, mqttPasswd, mqttPort, confHost); MqttSetup(mqttServer, mqttUser, mqttPasswd, mqttPort, confHost);
}
if (mode == BOOTMODE_OTA) { if (mode == BOOTMODE_OTA) {
OTASetup(); OTASetup();