Possibility to disable MQTT
save ~6k
This commit is contained in:
parent
87085fba3d
commit
e0f600baf0
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#ifndef CONFIG_DISABLE_MQTT
|
||||||
#include "Adafruit_MQTT.h"
|
#include "Adafruit_MQTT.h"
|
||||||
|
|
||||||
Adafruit_MQTT_Publish *MqttCreatePublisher(const char *fmt, ...);
|
Adafruit_MQTT_Publish *MqttCreatePublisher(const char *fmt, ...);
|
||||||
@ -13,3 +14,16 @@ void MqttCheckSubscription();
|
|||||||
void MqttChangeGpioValue(int gpio, int value);
|
void MqttChangeGpioValue(int gpio, int value);
|
||||||
void MqttChangePWMValue(int gpio, int value);
|
void MqttChangePWMValue(int gpio, int value);
|
||||||
bool MqttIsConfigured();
|
bool MqttIsConfigured();
|
||||||
|
#else
|
||||||
|
int MqttConnect(){return 0;}
|
||||||
|
int MqttIsConnected(){return 0;}
|
||||||
|
int MqttSetup(char *server, char *user, char *passwd, int port, char * hostname){return 0;}
|
||||||
|
int MqttPublish(double temp, double pressure){return 0;}
|
||||||
|
int MqttDhtPublish(float temp, float humidity){return 0;}
|
||||||
|
int MqttDryPublish(int dry){return 0;}
|
||||||
|
int MqttIPPublish(const String &ip){return 0;}
|
||||||
|
void MqttCheckSubscription(){}
|
||||||
|
void MqttChangeGpioValue(int gpio, int value){}
|
||||||
|
void MqttChangePWMValue(int gpio, int value){}
|
||||||
|
bool MqttIsConfigured(){}
|
||||||
|
#endif
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#ifndef CONFIG_DISABLE_MQTT
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "MQTT.h"
|
#include "MQTT.h"
|
||||||
@ -214,3 +215,4 @@ void MqttCheckSubscription() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user