Add option to disable SSL

it disable mqtts but save ~50ko
This commit is contained in:
Mathieu Maret 2016-09-28 23:19:12 +02:00
parent 3527184ce0
commit 0a55298feb
2 changed files with 5 additions and 0 deletions

View File

@ -45,9 +45,11 @@ int MqttSetup(char *server, char *user, char *passwd, int port, char *hostname)
if(!isMqttConfigured) if(!isMqttConfigured)
return 0; return 0;
#ifndef CONFIG_DISABLE_SSL
if(useMqtts) if(useMqtts)
mqtt = new Adafruit_MQTT_Client(new WiFiClientSecure(), server, port, user, passwd); mqtt = new Adafruit_MQTT_Client(new WiFiClientSecure(), server, port, user, passwd);
else else
#endif
mqtt = new Adafruit_MQTT_Client(new WiFiClient(), server, port, user, passwd); mqtt = new Adafruit_MQTT_Client(new WiFiClient(), server, port, user, passwd);
mqtt_dht_temp = MqttCreatePublisher(TEMPERATURE_DHT_FEED_FORMAT, user, mqttId); mqtt_dht_temp = MqttCreatePublisher(TEMPERATURE_DHT_FEED_FORMAT, user, mqttId);

View File

@ -6,6 +6,9 @@
// Switch Serial console on gpio 13 and 15 (So you can use GPIO 1 and 3 for other things) // Switch Serial console on gpio 13 and 15 (So you can use GPIO 1 and 3 for other things)
//#define CONFIG_ENABLE_EXTRA_GPIO //#define CONFIG_ENABLE_EXTRA_GPIO
// Disable SSL (so mqtts) to save some place (~52ko)
//#define CONFIG_DISABLE_SSL
// Enable the temperatue and pressure Sensor BMP180 // Enable the temperatue and pressure Sensor BMP180
// (CONFIG_BMP180_SDA and CONFIG_BMP180_SDA should be defined as well) // (CONFIG_BMP180_SDA and CONFIG_BMP180_SDA should be defined as well)
#define CONFIG_ENABLE_BMP180 #define CONFIG_ENABLE_BMP180