Fix strange indent in MQTT
This commit is contained in:
parent
20e4869a21
commit
3a6987af44
@ -36,7 +36,7 @@ bool isMqttConfigured = false;
|
||||
bool useMqtts = false;
|
||||
|
||||
|
||||
int MqttSetup(char *server, char *user, char *passwd, int port, char * hostname) {
|
||||
int MqttSetup(char *server, char *user, char *passwd, int port, char *hostname) {
|
||||
mqttId = hostname;
|
||||
useMqtts = (port == 8883);
|
||||
isMqttConfigured = server[0] != '\0';
|
||||
@ -48,12 +48,13 @@ int MqttSetup(char *server, char *user, char *passwd, int port, char * hostname)
|
||||
mqtt = new Adafruit_MQTT_Client(new WiFiClientSecure(), server, port, user, passwd);
|
||||
else
|
||||
mqtt = new Adafruit_MQTT_Client(new WiFiClient(), server, port, user, passwd);
|
||||
mqtt_dht_temp = MqttCreatePublisher(TEMPERATURE_DHT_FEED_FORMAT, user, mqttId);
|
||||
mqtt_dht_humidity = MqttCreatePublisher(HUMIDITY_DHT_FEED_FORMAT, user, mqttId);
|
||||
mqtt_temp = MqttCreatePublisher(TEMPERATURE_FEED_FORMAT, user, mqttId);
|
||||
mqtt_pressure = MqttCreatePublisher(PRESSURE_FEED_FORMAT, user, mqttId);
|
||||
mqtt_dry = MqttCreatePublisher(DRY_FEED_FORMAT, user, mqttId);
|
||||
mqtt_ip = MqttCreatePublisher(IP_FEED_FORMAT, user, mqttId);
|
||||
|
||||
mqtt_dht_temp = MqttCreatePublisher(TEMPERATURE_DHT_FEED_FORMAT, user, mqttId);
|
||||
mqtt_dht_humidity = MqttCreatePublisher(HUMIDITY_DHT_FEED_FORMAT, user, mqttId);
|
||||
mqtt_temp = MqttCreatePublisher(TEMPERATURE_FEED_FORMAT, user, mqttId);
|
||||
mqtt_pressure = MqttCreatePublisher(PRESSURE_FEED_FORMAT, user, mqttId);
|
||||
mqtt_dry = MqttCreatePublisher(DRY_FEED_FORMAT, user, mqttId);
|
||||
mqtt_ip = MqttCreatePublisher(IP_FEED_FORMAT, user, mqttId);
|
||||
|
||||
for (uint i = 0 ; i < NB_ELEMENTS(gpioWatched) && i < MAXSUBSCRIPTIONS; i++) {
|
||||
mqtt->subscribe(MqttCreateSubscribe(GPIO_SET_FEED_FORMAT, user, mqttId, gpioWatched[i]));
|
||||
|
Loading…
Reference in New Issue
Block a user