Open MolsonB opened 7 years ago
I don't know how to do the pull request, but here is a function to change the servername (ipaddress) once defined. I have a system where it tries the main IP address, and if it doesn't connect to go to the backup IP address.
.h void setServer(const char *server, uint16_t port);
void setServer(const char *server, uint16_t port);
.cpp void Adafruit_MQTT::setServer(const char *server, uint16_t port) { servername = server; portnum = port; }
void Adafruit_MQTT::setServer(const char *server, uint16_t port) { servername = server; portnum = port; }
I don't know how to do the pull request, but here is a function to change the servername (ipaddress) once defined. I have a system where it tries the main IP address, and if it doesn't connect to go to the backup IP address.
.h
void setServer(const char *server, uint16_t port);
.cpp
void Adafruit_MQTT::setServer(const char *server, uint16_t port) { servername = server; portnum = port; }