TinyGSM
TinyGSM copied to clipboard
It's not a bug, but can you help me to instance PubSubClient with TinyGsmClient OR WiFi ?
Hi, I have this class :
class MqttBackend : PubSubClient
{
public:
MqttBackend(WiFiClient &wifiClient);
MqttBackend(TinyGsmClient &gsmClient);
....
and the main class as is :
#include <MqttBackend.h>
class SASModem : public MqttBackend
{
private:
TinyGsmClient &_gsmClient;
public:
SASModem()
{
MqttBackend(&_gsmClient);
}
bool init(); \\ init the modem network connection
bool close(); \\ close the modem connection
};
How to instanciate the PubSubClient passing it the gsmClient OR the WiFiClient ?
Thank's
Have you figured this out? I think you might be looking for an initialization list in your class constructor.