Skip to content

Commit

Permalink
Renamed Strings
Browse files Browse the repository at this point in the history
  • Loading branch information
couin3 committed Apr 22, 2020
1 parent 1c8cdb1 commit 364084d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RFLink/6_WiFi_MQTT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void setup_WIFI()

void setup_MQTT()
{
if (ac_MQTT_PORT == "") ac_MQTT_PORT = "1883"; // just in case ....
if (MQTT_PORT == "") MQTT_PORT = "1883"; // just in case ....
MQTTClient.setClient(WIFIClient);
MQTTClient.setServer(MQTT_SERVER.c_str(), MQTT_PORT.toInt());
// MQTTClient.setCallback(callback);
Expand All @@ -103,9 +103,9 @@ void reconnect()
{

// MQTTClient.setServer(serverName.c_str(), Mqtt_Port.toInt());
Serial.println(String("Attempting MQTT broker:") + ac_MQTT_SERVER.c_str());
Serial.println(String("Attempting MQTT broker:") + MQTT_SERVER.c_str());

if (MQTTClient.connect(ac_MQTT_ID.c_str(), ac_MQTT_USER.c_str(), ac_MQTT_PSWD.c_str()))
if (MQTTClient.connect(MQTT_ID.c_str(), MQTT_USER.c_str(), MQTT_PSWD.c_str()))
{
// Once connected, resubscribe
// MQTTClient.subscribe(MQTT_TOPIC_IN.c_str());
Expand All @@ -115,9 +115,9 @@ void reconnect()
}
else
{
Serial.println("Connection mqttserver:" + String(ac_MQTT_SERVER.c_str()));
Serial.println("Connection Mqtt_Username:" + String(ac_MQTT_USER.c_str()));
Serial.println("Connection Mqtt_Password:" + String(ac_MQTT_USER.c_str()));
Serial.println("Connection mqttserver:" + String(MQTT_SERVER.c_str()));
Serial.println("Connection Mqtt_Username:" + String(MQTT_USER.c_str()));
Serial.println("Connection Mqtt_Password:" + String(MQTT_USER.c_str()));
Serial.println("Connection failed:" + String(MQTTClient.state()));
if (!--retry)
break;
Expand Down

0 comments on commit 364084d

Please sign in to comment.